[gst-devel] problem while pushing data to multiple srcpads.
Wim Taymans
wim at fluendo.com
Fri Feb 2 11:48:00 CET 2007
On Fri, 2007-02-02 at 15:12 +0530, Vinayak wrote:
>
> On 2/2/07, Wim Taymans <wim at fluendo.com> wrote:
> On Fri, 2007-02-02 at 10:02 +0530, Vinayak wrote:
> > Hi all,
> > I am implementing the demuxer which will divide the input
> stream into
> > multiple.
> > I wrote a function for request_new_pad which creates a new
> srcpad
> > new_from_template, now this one is associated with my
> element by
> > "gst_element_add_pad". And after that I keep a pointers to
> alll such
> > newly created srcpads.
> >
> Normally a demuxer will create dynamic pads, based on the
> contents of
> the stream, instead of the app requesting pads.
>
> demuxer is only creating dynamic pads but not based on the contents of
> the stream, but they are requested while linking the elements .
> Basically, This demux-elements provides n number of elements a
> different output-streams, which means there could be three elements
> connected to this demuxer srcpads.
>
>
> You also need to activate the pads (when requested in
> >=PAUSED) before
> adding them to the element so that they can be used for data
> passing.
>
> Which exactly state of transitions makes the srcpads on element
> inactive ?
> Do I have to make them active by "gst_pad_activate_push(pad, TRUE)" ?
>
Pads become active in the element READY->PAUSED state change and
inactive again in PAUSED->READY. The FLUSHING flag is set on the pad so
that any push/pull on the pad will return GST_FLOW_WRONG_STATE.
gst_pad_set_active (pad, TRUE) is the function.
>
> >
> > gst_pad_push (srcpads[i], outbuf);
> > }
>
> The return value of _push should tell you about the reason for
> the
> failure. You also need to pass this return value upstream
> (possibly
> combining the return values of all pads).
>
> Yes, I using combined return. But this gst_pad_push never returns
> after pushing, Infact the data is never pushed & never received on the
> peer end. It just hangs.
If that is the case then I think the dataflow is just blocked in the
sink as the preroll buffer. Maybe you forget to add queues after the
srcpads to give all sinks a chance to receive a buffer?
Wim
>
> Thanks,
> Vinayak
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list