in gstamcvideodechybris.c, how buffer index is passed on?

Aihua Zhao halley.zhaoaihua at gmail.com
Thu Jul 9 02:33:57 PDT 2015


Hi Jim:


I'm studying your implementation of gst plugin over hybris mediacodec of
android.

https://launchpad.net/ubuntu/+source/gst-plugins-bad1.0



now, I have one question: how the buffer index is passed from video decoder
to mirsink?

in gst_amc_video_dec_loop(), buffer index is got by

      idx = gst_amc_codec_dequeue_output_buffer (self->codec, &buffer_info,
self->current_timeout);

however, I don't find any clue to wrap this idx in GstBuffer to pass it to
downstream video sink.

could you educate me on it?

thanks.


my understanding is:

the output frame is got by gst_video_decoder_allocate_output_frame(), which
allocates output buffer from GstBufferPool.

in GstMirBufferPool, mir_buffer_pool_alloc()
--> gst_mir_allocate_native_window_buffer()
--> gst_mir_image_allocator_wrap();

however, buffer_id is always there.


I saw that gst_mir_image_memory_set_buffer_index() can update buffer index
of GstMirImageMemory;

however, I don't find gst_mir_image_memory_set_buffer_index is called
anywhere.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150709/a194d798/attachment.html>


More information about the gstreamer-devel mailing list