gst_segment_to_running_time assertion
Sebastian Dröge
sebastian at centricular.com
Thu Jul 3 01:45:27 PDT 2014
On Mi, 2014-07-02 at 17:21 -0700, Shawn Lewis wrote:
> Hi, I've got appsrc -> playbin, for audio only. I'm trying to reset
> the pipeline if the user interrupts playback with a new track, by
> setting the state to NULL, setting a new uri ("appsrc://"), and then
> setting the state to PAUSED.
>
> This works if I let playbin detect caps, but I need to manually set
> caps on appsrc sometimes.
>
> If I manually set the caps on appsrc during the source_found callback
> ('deep-notify::source') by doing:
>
> static void
> found_source (GObject * object, GObject * orig, GParamSpec * pspec, GstApp * app
> )
> {
> GstCaps* caps;
>
> g_object_get (orig, pspec->name, &app->appsrc, NULL);
>
> caps = gst_caps_new_simple("audio/x-raw",
> "format", G_TYPE_STRING, "S16LE",
> "layout", G_TYPE_STRING, "interleaved",
> "rate", G_TYPE_INT, 44100,
> "channels", G_TYPE_INT, 2,
> NULL);
> gst_app_src_set_caps(GST_APP_SRC(gst_app->appsrc), caps);
> gst_base_src_set_format(GST_BASE_SRC(gst_app->appsrc), GST_FORMAT_TIME);
> gst_caps_unref(caps);
>
> gst_element_set_state (gst_app->playbin, GST_STATE_PLAYING);
> }
>
> things work the first time through. But when I switch tracks via the
> above method (still manually setting caps), I get the following error.
> I've seen some references elsewhere on the list to this error but
> haven't been able to find a solution.
>
> GStreamer-CRITICAL **: gst_segment_to_running_time: assertion
> `segment->format == format' failed
Hi,
what you describe there should work in theory. Independent of that, why
are you setting the playbin to PLAYING inside the found_source callback?
Can you provide a simple testcase that others can run to reproduce the
issue? That will make it easier for everybody to find the exact problem
other than just guessing.
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140703/01675a46/attachment-0001.sig>
More information about the gstreamer-devel
mailing list