H264 source plugin in pull mode

Vladimir Tyutin vladimir.tyutin at gmail.com
Mon Jan 18 20:30:12 UTC 2021


Hi all,
I'm trying to implement source plugin that takes H264 encoded frames from
HW directly.
I use GstBaseSrc as a base class for my plugin. I have implemented it in
push mode and everything works fine.
Now I want to switch it to pull mode. But I faced with few issues:
1. virtual methods start and stop are not invoked despite I set them:
    gstbasesrc_class->start = gst_v536videosrc_start;
    gstbasesrc_class->stop = gst_v536videosrc_stop;
2. virtual method create is also not invoked. But it's also set:
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_v536videosrc_create);

And I have question regarding buffer size. According to documentation
create will have offset and size parameters for a buffer I have to create.
But how it knows the size of buffer. In my case H264 frame size is
different every time. So where and how should I set buffer size?

May be there is some good example where encoded frames are taken from HW
and provided in source plugin in pull mode?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210118/0a85bed4/attachment-0001.htm>


More information about the gstreamer-devel mailing list