Hi All,
I have an application where I embed 2 pipelines in my main pipeline. Each having its own filesrc, decodebin and sink elements:
gst_bin_add_many(GST_BIN(pipeline1), filesrc1, decodebin1, videosink1,..., NULL);
gst_bin_add_many(GST_BIN(pipeline2), filesrc2, decodebin2, videosink2..., NULL);
gst_bin_add_many(GST_BIN(mainpipeline), pipeline1, pipeline2, NULL); However I want to send specific seek events for each pipeline (to access specific parts of the video files I play). If I use gst_element_send_event (mainpipeline, my_seek_event) then I got one of the file beeing seek, but it is not sure which line received the event. And if I use gst_element_send_event (pipeline1, my_seek_event_1) and gst_element_send_event (pipeline2, my_seek_event_2) then it seems that none of the events is catched nor processed.
Is there something I do wrong or do not understand correctly?
Regards,
Al ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Thu, 2008-11-13 at 17:36 +0000, Albert Costa wrote:
> Hi All, > I have an application where I embed 2 pipelines in my main pipeline. > Each having its own filesrc, decodebin and sink elements: > > gst_bin_add_many(GST_BIN(pipeline1), filesrc1, decodebin1, > videosink1,..., NULL); > gst_bin_add_many(GST_BIN(pipeline2), filesrc2, decodebin2, > videosink2..., NULL); > gst_bin_add_many(GST_BIN(mainpipeline), pipeline1, pipeline2, NULL); I assume mainpipeline is a GstPipeline while pipeline1 and pipeline2 are plain bins? > > However I want to send specific seek events for each pipeline (to > access specific parts of the video files I play). If I use > gst_element_send_event (mainpipeline, my_seek_event) then I got one of > the file beeing seek, but it is not sure which line received the > event. And if I use gst_element_send_event (pipeline1, > my_seek_event_1) and gst_element_send_event (pipeline2, > my_seek_event_2) then it seems that none of the events is catched nor > processed. Sending the event to a pipeline/bin will send the event to all sinks (or bins with sinks in them) so both pipelines should receive the event. The best way to do this is to simply put the two separate pipelines into two separate GstPipeline objects and work from there. Wim > Is there something I do wrong or do not understand correctly? > Regards, > Al > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks Wim,
yes your assumption was right. I could see indeed that both src elements got the seek events, so I guess I have to manage the 2 sets separately as you said. In that case, is it still possible to have both sides synchronized together? (starting, stopping, pausing and so on)
Regards, Al
De : Wim Taymans <[hidden email]> À : Discussion of the development of GStreamer <[hidden email]> Envoyé le : Jeudi, 13 Novembre 2008, 18h55mn 32s Objet : Re: [gst-devel] Sending seek events to correct pipelines On Thu, 2008-11-13 at 17:36 +0000, Albert Costa wrote: > Hi All, > I have an application where I embed 2 pipelines in my main pipeline. > Each having its own filesrc, decodebin and sink elements: > > gst_bin_add_many(GST_BIN(pipeline1), filesrc1, decodebin1, > videosink1,..., NULL); > gst_bin_add_many(GST_BIN(pipeline2), filesrc2, decodebin2, > videosink2..., NULL); > gst_bin_add_many(GST_BIN(mainpipeline), pipeline1, pipeline2, NULL); I assume mainpipeline is a GstPipeline while pipeline1 and pipeline2 are plain bins? > > However I want to send specific seek events for each pipeline (to > access specific parts of the video files I play). If I use > gst_element_send_event (mainpipeline, my_seek_event) then I got one of > the file beeing seek, but it is not sure which line received the > event. And if I use gst_element_send_event (pipeline1, > my_seek_event_1) and gst_element_send_event (pipeline2, > my_seek_event_2) then it seems that none of the events is catched nor > processed. Sending the event to a pipeline/bin will send the event to all sinks (or bins with sinks in them) so both pipelines should receive the event. The best way to do this is to simply put the two separate pipelines into two separate GstPipeline objects and work from there. Wim > Is there something I do wrong or do not understand correctly? > Regards, > Al > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Wim Taymans
Hi Wim,
is there any way of sending the event to only the specific element (one of the filesrc elements in my case) I need?
If I try to send the seek with gst_element_send_event (pipeline1.source, seek_event) (where pipeline1.source would of course be my video source), then it seems the event is not sent (returns false). Sending to pipeline1 itself returns ok, but seems not to be taken into account anyway.
Regards,
Al
> However I want to send specific seek events for each pipeline (to > access specific parts of the video files I play). If I use > gst_element_send_event (mainpipeline, my_seek_event) then I got one of > the file beeing seek, but it is not sure which line received the > event. And if I use gst_element_send_event (pipeline1, > my_seek_event_1) and gst_element_send_event (pipeline2, > my_seek_event_2) then it seems that none of the events is catched nor > processed. Sending the event to a pipeline/bin will send the event to all sinks (or bins with sinks in them) so both pipelines should receive the event. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Fri, 2008-11-14 at 14:13 +0000, Albert Costa wrote:
> Hi Wim, > is there any way of sending the event to only the specific element > (one of the filesrc elements in my case) I need? > If I try to send the seek with gst_element_send_event > (pipeline1.source, seek_event) (where pipeline1.source would of course > be my video source), then it seems the event is not sent (returns > false). Sending to pipeline1 itself returns ok, but seems not to be > taken into account anyway. > Regards, > Al You can send the event to any element that is driving the pipeline, which may or may not be the source. In a typical playback pipeline, the demuxer is pushing data into the pipeline. Wim > > > However I want to send specific seek events for each pipeline (to > > access specific parts of the video files I play). If I use > > gst_element_send_event (mainpipeline, my_seek_event) then I got one > of > > the file beeing seek, but it is not sure which line received the > > event. And if I use gst_element_send_event (pipeline1, > > my_seek_event_1) and gst_element_send_event (pipeline2, > > my_seek_event_2) then it seems that none of the events is catched > nor > > processed. > > Sending the event to a pipeline/bin will send the event to all sinks > (or > bins with sinks in them) so both pipelines should receive the event. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks Wim,
I've tried as follows for testing:
[create and set all the elements and properties...]
gst_bin_add_many(GST_BIN(pipeline), filesrc1, decodebin1, ffmpegcolorspace1, directdrawsink1, filesrc2, decodebin2, ffmpegcolorspace2, directdrawsink2, NULL);
[link filesrc1, decodebin1, ffmpegcolorspace1, directdrawsink1 together, and filesrc2, decodebin2, ffmpegcolorspace2, directdrawsink2 together as distinct lines]
gst_element_set_state (pipeline, GST_STATE_PLAYING);
then gst_element_send_event (pipeline, seek_event); -> ok but both filesrc1 & filesrc2 get the seek event (not what I want) gst_element_send_event (filesrc1, seek_event); -> not sent (returns 0)
gst_element_send_event (decodebin1, seek_event); -> sent (returns 1) but nothing happens (seek not handled)
I don't know why this won't work, but if I understand what you wrote in the first reply, there's no way to set the seek only on one of the lines.
Regards,
Al
De : Wim Taymans <[hidden email]> À : Discussion of the development of GStreamer <[hidden email]> Envoyé le : Vendredi, 14 Novembre 2008, 15h23mn 32s Objet : Re: [gst-devel] Re : Sending seek events to correct pipelines On Fri, 2008-11-14 at 14:13 +0000, Albert Costa wrote: > Hi Wim, > is there any way of sending the event to only the specific element > (one of the filesrc elements in my case) I need? > If I try to send the seek with gst_element_send_event > (pipeline1.source, seek_event) (where pipeline1.source would of course > be my video source), then it seems the event is not sent (returns > false). Sending to pipeline1 itself returns ok, but seems not to be > taken into account anyway. > Regards, > Al You can send the event to any element that is driving the pipeline, which may or may not be the source. In a typical playback pipeline, the demuxer is pushing data into the pipeline. Wim > > > However I want to send specific seek events for each pipeline (to > > access specific parts of the video files I play). If I use > > gst_element_send_event (mainpipeline, my_seek_event) then I got one > of > > the file beeing seek, but it is not sure which line received the > > event. And if I use gst_element_send_event (pipeline1, > > my_seek_event_1) and gst_element_send_event (pipeline2, > > my_seek_event_2) then it seems that none of the events is catched > nor > > processed. > > Sending the event to a pipeline/bin will send the event to all sinks > (or > bins with sinks in them) so both pipelines should receive the event. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Fri, 2008-11-14 at 15:50 +0000, Albert Costa wrote:
> Thanks Wim, > I've tried as follows for testing: > > [create and set all the elements and properties...] > gst_bin_add_many(GST_BIN(pipeline), filesrc1, decodebin1, > ffmpegcolorspace1, directdrawsink1, filesrc2, decodebin2, > ffmpegcolorspace2, directdrawsink2, NULL); > [link filesrc1, decodebin1, ffmpegcolorspace1, directdrawsink1 > together, and filesrc2, decodebin2, ffmpegcolorspace2, directdrawsink2 > together as distinct lines] > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > > > then > > gst_element_send_event (pipeline, seek_event); -> ok but both filesrc1 > & filesrc2 get the seek event (not what I want) > > > gst_element_send_event (filesrc1, seek_event); -> not sent (returns 0) > gst_element_send_event (decodebin1, seek_event); -> sent (returns 1) > but nothing happens (seek not handled) > > I don't know why this won't work, but if I understand what you wrote > in the first reply, there's no way to set the seek only on one of the > lines. Yes there is, send the event to the relevant sink. Wim > Regards, > Al > > > ______________________________________________________________________ > De : Wim Taymans <[hidden email]> > À : Discussion of the development of GStreamer > <[hidden email]> > Envoyé le : Vendredi, 14 Novembre 2008, 15h23mn 32s > Objet : Re: [gst-devel] Re : Sending seek events to correct pipelines > > On Fri, 2008-11-14 at 14:13 +0000, Albert Costa wrote: > > Hi Wim, > > is there any way of sending the event to only the specific element > > (one of the filesrc elements in my case) I need? > > If I try to send the seek with gst_element_send_event > > (pipeline1.source, seek_event) (where pipeline1.source would of > course > > be my video source), then it seems the event is not sent (returns > > false). Sending to pipeline1 itself returns ok, but seems not to be > > taken into account anyway. > > Regards, > > Al > > You can send the event to any element that is driving the pipeline, > which may or may not be the source. In a typical playback pipeline, > the > demuxer is pushing data into the pipeline. > > Wim > > > > > > However I want to send specific seek events for each pipeline (to > > > access specific parts of the video files I play). If I use > > > gst_element_send_event (mainpipeline, my_seek_event) then I got > one > > of > > > the file beeing seek, but it is not sure which line received the > > > event. And if I use gst_element_send_event (pipeline1, > > > my_seek_event_1) and gst_element_send_event (pipeline2, > > > my_seek_event_2) then it seems that none of the events is catched > > nor > > > processed. > > > > Sending the event to a pipeline/bin will send the event to all sinks > > (or > > bins with sinks in them) so both pipelines should receive the event. > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ gstreamer-devel > mailing list [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks Wim,
I got it working fine now,
Regards,
Al
De : Wim Taymans <[hidden email]> À : Discussion of the development of GStreamer <[hidden email]> Envoyé le : Vendredi, 14 Novembre 2008, 17h35mn 54s Objet : Re: [gst-devel] Re : Re : Sending seek events to correct pipelines On Fri, 2008-11-14 at 15:50 +0000, Albert Costa wrote: > Thanks Wim, > I've tried as follows for testing: > > [create and set all the elements and properties...] > gst_bin_add_many(GST_BIN(pipeline), filesrc1, decodebin1, > ffmpegcolorspace1, directdrawsink1, filesrc2, decodebin2, > ffmpegcolorspace2, directdrawsink2, NULL); > [link filesrc1, decodebin1, ffmpegcolorspace1, directdrawsink1 > together, and filesrc2, decodebin2, ffmpegcolorspace2, directdrawsink2 > together as distinct lines] > gst_element_set_state (pipeline, GST_STATE_PLAYING); > > > > then > > gst_element_send_event (pipeline, seek_event); -> ok but both filesrc1 > & filesrc2 get the seek event (not what I want) > > > gst_element_send_event (filesrc1, seek_event); -> not sent (returns 0) > gst_element_send_event (decodebin1, seek_event); -> sent (returns 1) > but nothing happens (seek not handled) > > I don't know why this won't work, but if I understand what you wrote > in the first reply, there's no way to set the seek only on one of the > lines. Yes there is, send the event to the relevant sink. Wim > Regards, > Al > > > ______________________________________________________________________ > De : Wim Taymans <[hidden email]> > À : Discussion of the development of GStreamer > <[hidden email]> > Envoyé le : Vendredi, 14 Novembre 2008, 15h23mn 32s > Objet : Re: [gst-devel] Re : Sending seek events to correct pipelines > > On Fri, 2008-11-14 at 14:13 +0000, Albert Costa wrote: > > Hi Wim, > > is there any way of sending the event to only the specific element > > (one of the filesrc elements in my case) I need? > > If I try to send the seek with gst_element_send_event > > (pipeline1.source, seek_event) (where pipeline1.source would of > course > > be my video source), then it seems the event is not sent (returns > > false). Sending to pipeline1 itself returns ok, but seems not to be > > taken into account anyway. > > Regards, > > Al > > You can send the event to any element that is driving the pipeline, > which may or may not be the source. In a typical playback pipeline, > the > demuxer is pushing data into the pipeline. > > Wim > > > > > > However I want to send specific seek events for each pipeline (to > > > access specific parts of the video files I play). If I use > > > gst_element_send_event (mainpipeline, my_seek_event) then I got > one > > of > > > the file beeing seek, but it is not sure which line received the > > > event. And if I use gst_element_send_event (pipeline1, > > > my_seek_event_1) and gst_element_send_event (pipeline2, > > > my_seek_event_2) then it seems that none of the events is catched > > nor > > > processed. > > > > Sending the event to a pipeline/bin will send the event to all sinks > > (or > > bins with sinks in them) so both pipelines should receive the event. > > > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ gstreamer-devel > mailing list [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |