Administrator
|
I am trying to fiddle with the playback rate but haven't been able to make the video go slower or faster. Anyone know how to do this? Tried: 1. gst_element_seek(); 2. /* Create the seek event */ if (playRate > 0) { seek_event = gst_event_new_seek(playRate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), GST_SEEK_TYPE_SET, gPosition, GST_SEEK_TYPE_END, 0); } else { seek_event = gst_event_new_seek(playRate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, gPosition); } if (video_sink == NULL) { /* If we have not done so, obtain the sink through which we will send the seek events */ g_object_get(G_OBJECT(gespipeline), "video-sink", &video_sink, NULL); } if (audio_sink == NULL) { /* If we have not done so, obtain the sink through which we will send the seek events */ g_object_get(G_OBJECT(gespipeline), "audio-sink", &audio_sink, NULL); if(audio_sink != NULL) { gboolean mute = (playRate > 1.0)?TRUE:FALSE; g_object_set(G_OBJECT(audio_sink), "mute",mute, NULL); } } /* Send the event */ // tried the gespipeline and the gst_element(gespipeline) that has the main pipe. GstElement* pipeline = (GST_ELEMENT(gespipeline)) / gespipeline; gst_element_send_event(pipeline, seek_event);
------------------------------
Gstreamer 1.14.3 ------------------------------ Windows Sent from the GStreamer-devel mailing list archive at Nabble.com. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Hello, Can you try with master, this should work now. Regards, - Thibault On Fri, May 8, 2020 at 5:37 PM killerrats <[hidden email]> wrote: I am trying to fiddle with the playback rate but haven't been able to make the video go slower or faster. Anyone know how to do this? Tried: 1. gst_element_seek(); 2. /* Create the seek event */ if (playRate > 0) { seek_event = gst_event_new_seek(playRate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), GST_SEEK_TYPE_SET, gPosition, GST_SEEK_TYPE_END, 0); } else { seek_event = gst_event_new_seek(playRate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_SET, gPosition); } if (video_sink == NULL) { /* If we have not done so, obtain the sink through which we will send the seek events */ g_object_get(G_OBJECT(gespipeline), "video-sink", &video_sink, NULL); } if (audio_sink == NULL) { /* If we have not done so, obtain the sink through which we will send the seek events */ g_object_get(G_OBJECT(gespipeline), "audio-sink", &audio_sink, NULL); if(audio_sink != NULL) { gboolean mute = (playRate > 1.0)?TRUE:FALSE; g_object_set(G_OBJECT(audio_sink), "mute",mute, NULL); } } /* Send the event */ // tried the gespipeline and the gst_element(gespipeline) that has the main pipe. GstElement* pipeline = (GST_ELEMENT(gespipeline)) / gespipeline; gst_element_send_event(pipeline, seek_event); _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
are you meaning the command line instead of programming?
----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
No, I mean using gstreamer master instead of 1.14 On Fri, May 8, 2020, 18:00 killerrats <[hidden email]> wrote: are you meaning the command line instead of programming? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |