|
List Info
Thread: problem while pushing data to multiple srcpads.
|
|
| problem while pushing data to multiple
srcpads. |

|
2007-02-01 22:32:36 |
|
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.
I'm using default handlers for event passing ( which apparently passes the down-stream events to all srcpads in that element)
In my chain function: When I try to push data to first srcpad that fails..... it never returns and the next element never gets a pushed buffer.. may be its waiting for some events tobe passed down ?
Could it be a PreRolling issue ?
thanks in advance, --vinayak
Here is snappet of my code : _request_new_pad() { MySplit *split= .....; splitpad = gst_pad_new_from_template(templ, padname);
GST_PAD_ELEMENT_PRIVATE (splitpad) = split; gst_pad_use_fixed_caps (splitpad); gst_pad_set_event_function(splitpad, gst_src_event); . . gst_element_add_pad(element, splitpad); srcpads[index++] = splitpad;
}
_chain_func(GstPad *pad, GstBuffer *buffer) {
for(i=0; i < n_srcpads; i++) { if(somecondition) { outbuf = gst_buffer_new(); } . . (!GST_PAD_PEER (srcpads[i]))
return;
gst_pad_push (srcpads[i], outbuf); }
|
| Re: problem while pushing data to
multiple srcpads. |

|
2007-02-02 04:22:55 |
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.
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.
> I'm using default handlers for event passing ( which
apparently passes
> the down-stream events to all srcpads in that element)
>
> In my chain function: When I try to push data to first
srcpad that
> fails..... it never returns and the next element never
gets a pushed
> buffer.. may be its waiting for some events tobe passed
down ?
> Could it be a PreRolling issue ?
>
> thanks in advance,
> --vinayak
>
> Here is snappet of my code :
> _request_new_pad()
> {
> MySplit *split= .....;
> splitpad = gst_pad_new_from_template(templ, padname);
> GST_PAD_ELEMENT_PRIVATE (splitpad) = split;
> gst_pad_use_fixed_caps (splitpad);
> gst_pad_set_event_function(splitpad, gst_src_event);
> .
> .
> gst_element_add_pad(element, splitpad);
> srcpads[index++] = splitpad;
> }
>
> _chain_func(GstPad *pad, GstBuffer *buffer)
> {
>
> for(i=0; i < n_srcpads; i++) {
> if(somecondition) {
> outbuf = gst_buffer_new();
> }
> .
> .
> (!GST_PAD_PEER (srcpads[i]))
> return;
>
> 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).
Wim
>
>
------------------------------------------------------------
-------------
> 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 lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
------------------------------------------------------------
-------------
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 lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|
|
| Re: problem while pushing data to
multiple srcpads. |

|
2007-02-02 03:42:49 |
|
On 2/2/07, Wim Taymans < wim fluendo.com">wim 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)" ?
> > 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.
Thanks, Vinayak
|
| Re: problem while pushing data to
multiple srcpads. |

|
2007-02-02 04:48:00 |
On Fri, 2007-02-02 at 15:12 +0530, Vinayak wrote:
>
> On 2/2/07, Wim Taymans <wim 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 lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
------------------------------------------------------------
-------------
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 lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstream
er-devel
|
|
| Re: problem while pushing data to
multiple srcpads. |

|
2007-02-02 04:32:56 |
|
> 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.
Yes, I added the gst_pad_set_active() code in the corresponding transitions.
> > > > > 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?
Queue is for the purpose of buffering ? Is there anyway we can make this work with using queue element ? Cause, if I use the queue element in between my whole idea of connecting my_filters & my_splitter plugins goes waste.
Thanks ./v
|
[1-5]
|
|