• Felix Abecassis's avatar
    mediacodec: implementation of MediaCodec GPU direct rendering · d75a07a2
    Felix Abecassis authored
    Based on the work by Martin Storsjö.
    
    The decoder stores opaque buffers in the p_sys member of the picture
    and the vout uses a callback from the decoder to render these
    buffers. When the decoder flushes or closes, all the currently in
    flight pictures (filled by the decoder but not displayed yet) need to
    be invalidated. A mutex is required in order to prevent the vout from using
    destroyed MediaCodec buffers.
    
    In order to avoid a deadlock when exiting the decoder, a maximum number of polling
    attempts was added in order to avoid blocking the decoder indefinitely if the vout
    is not releasing output buffers anymore.
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    d75a07a2
surface.c 14.3 KB