Understanding GstBaseSrc Create function
Tim Müller
tim at centricular.com
Tue Oct 28 02:46:05 PDT 2014
On Mon, 2014-10-27 at 22:46 -0700, HK wrote:
Hi,
> I am new to gstreamer. I was going through the filesrc plugin. Here I came
> across the create function. In this create function we have a buffer, and
> the data which is to be pushed to the other element is copied to the
> gstreamer buffer in this create function. I have couple of questions
> regarding this scenario.
>
> 1. Who will invoke the create function ? Is it invoked by the next element
> or is it invoked by the application ? Or is it something like if the
> application is changing the state, automatically this create function is
> called ?
It's invoked by the GstBaseSrc base class, which basically starts a
thread that does:
while (run) {
buf = create()
push_buffer (buf);
}
> 2. Once the create method is called, the data buffer has to go to the other
> element ( say for example demux ). Will the input buffer from the file
> source is processed by the chain function of demux ? How the buffer is
> passed to the demux element ?
output buffer you mean presumably? The buffer is passed to the next
element (e.g. a demuxer) by the base class via gst_pad_push().
Cheers
-Tim
> Thanks
> HK
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Understanding-GstBaseSrc-Create-function-tp4669223.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list