SOLVED: Seeking Audio and Video?

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

SOLVED: Seeking Audio and Video?

killerrats
Administrator
This post was updated on .
I can seek the video either audio or video by themselves. If I have both
branches going it won't seek the audio side. to perform the operation, I am
pausing the video first. Then I go ahead and set position and then play the
video again. For some reason it says this error everytime.

error:
audiosink gstaudiosink.c:248:audioringbuffer_thread_func:<ausink> error
writing data in gst_directsound_sink_write (reason: unknown), skipping
segment (left: 440, written: -1)


pipeline:
filesrc location=E8D15E5608CFC8.mp4 ! qtdemux name=demux demux.video_0 !
queue ! h264parse ! avdec_h264 ! d3dvideosink demux.audio_0 ! queue !
aacparse ! faad! directsoundsink





-----
------------------------------
Gstreamer 1.14.4
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Seeking Audio and Video?

GStreamer-devel mailing list

found out how to do it.

gint64 newSeek = 10;
GstQuery *query;
gint64 start, end;
query = gst_query_new_seeking(GST_FORMAT_TIME);

if (gst_element_query(playbin, query)) 
{
	gst_query_parse_seeking(query, NULL, &aSeek_enabled, &start, &end);
	if (aSeek_enabled) {
		gst_element_seek_simple(this->aRtspPipeConstruct.playbin, GST_FORMAT_TIME,
			(GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT),newSeek * GST_SECOND);
}
	else 
        {
	      g_print("Seeking is DISABLED for this stream.\n");
	}
}
else {
	g_printerr("Seeking query failed.");
}
gst_query_unref(query);
------------------------------
Gstreamer 1.14.4
------------------------------
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