video - Android MediaCodec: Backlink to input -


i'm receiving video data via rtp/h.264 (profile baseline). i'm building complete nal unit (using nal (network abstraction limit) delimiter 0x09) , pushing mediacodec. afterwards i'm rendering decoded image via opengl surfacetexture. work far.

now need know in rendering calls video frame rendered. need meta information attached video frame later in rendering part.

my first idea use simple queue:

1) queue.offer(videoframeid) 2) mediacodec.queueinputbuffer() 3) mediacodec.deqeueoutputbuffer() 4) mediacodec.releaseoutputbuffer()

then on rendering side:

1) onframeavailable(surfacetexture) 2) queue.poll() 3) render()

but out of sync. there more calls mediacodec.queueinputbuffer onframeavailable(). appears if video frame build multiple nal units.

are there means reference original video frame rendering? i'm limited sdk 19 api.

thank you


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -