I am developing an application which plays H264 dump using gstreamer
The pipeline is: appsrc - h264parse - ffdec_h264 - ffmpegcolorspace - deinterlace - autovideosink
And data flow is :: PULL Mode from appsrc
{ using the signals: need-data
}
I want to verify the same application using PUSH mode from application: In the documentation it is mentioned that: we need to invoke push-buffer
signals and send the buffers
My code snippet is:
gst_app_src_set_emit_signals(source, TRUE);
g_signal_connect (source, "push-buffer", G_CALLBACK (start_feed), source);
Though the pipeline is created, I am not getting any callbacks to : start_feed()
Can anyone help me, what exactly need to do for PUSH mode operation of appsrc
.
According to the documentation:
Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is by default disabled because signal emission is expensive and unneeded when the application prefers to operate in pull mode.
So, you could try adding a "new-buffer" signal. "push-buffer" is an action, so attaching a signal handler won't do anything because it's something you're supposed to call when you have data, not something that calls a callback.
Depending on what your start_feed
does, you may also be looking for the "need-data" signal (presumably signals when the pipeline needs more data).