gst_send_event and gst_new_event_eos()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gst_send_event and gst_new_event_eos()

rossana
Hello, I have video which lasts 2 minutes, I want it to finish at the minute 1 (at the half of its duration).
What is the best way to do this? I send an event to the pipeline (eos_event)
How I control the time to trigger the event to finish it?

Thanks

Rossana

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst_send_event and gst_new_event_eos()

Tim-Philipp Müller-2
On Thu, 2012-03-08 at 05:40 -0200, Rossana Guerra wrote:

> Hello, I have video which lasts 2 minutes, I want it to finish at the
> minute 1 (at the half of its duration).
> What is the best way to do this? I send an event to the pipeline
> (eos_event)
> How I control the time to trigger the event to finish it?

What's the context? What are you trying to do? What pipeline are you
using?

Cheers
-Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst_send_event and gst_new_event_eos()

rossana
Hello Tim, the context is very straightforward, I need to stop playing a video in order to fit certain schedulling issues/rules.
So as I said before, if I have a video1 which lasts 2 mins, but video2 is scheduled to start at the next minute, I need to stop video1. I need it to play just one minute.

This is the pipeline:

textoverlay ----- ffmpegcolor ---- videoscale --- autovideosink

                          decodebin2 ----queue ---audioconvert----audioresample---alsasink    // audio
(.avi)                  |
filescr----avidemux
                         |
                          decodebin2 --- queue --- textoverlay.video_sink     // video


(.srt)
filescr -----parse ------textoverlay.text_sink


I was intended to do it with gst_element_send_event(pipeline, gst_event_new_eos()) and a 'trigger' [1]

gst_clock_new_single_shot_id, where the gst_clock_id_wait_async has a callback function which calls [1].

But it doesn't work, I don't know if it's the best idea or the functions are in wrong places.

Thanks for any suggestion.

Rossana




2012/3/8 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-03-08 at 05:40 -0200, Rossana Guerra wrote:

> Hello, I have video which lasts 2 minutes, I want it to finish at the
> minute 1 (at the half of its duration).
> What is the best way to do this? I send an event to the pipeline
> (eos_event)
> How I control the time to trigger the event to finish it?

What's the context? What are you trying to do? What pipeline are you
using?

Cheers
-Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel