Unable to get GstClock from GstElement

Edward Hervey bilboed at bilboed.com
Fri Feb 13 00:24:03 PST 2015


Hi,

  The clock is chosen and distributed by the pipeline in PAUSED to
PLAYING.

  In the case of the distributed playback use-cases, you will need to:
  1) grab the clock in PLAYING on the server, and wrap it with the
nettimeprovider
  2) set the net client clock on the clients (you can do that in any
state)

    Edward

On Thu, 2015-02-12 at 10:13 -0800, svenyonson wrote:
> I am trying to port the sample python code from noraisin.net (synchronized
> playback across machines) to Android devices. I have the tutorial 5 working,
> and am now trying to integrate the relevant pieces from the python code:
> 
>     // Create our own GLib Main Context and make it the default one
>     data->context = g_main_context_new ();
>     g_main_context_push_thread_default(data->context);
> 
>     // Build pipeline
>     data->pipeline = gst_parse_launch("playbin", &error);
>     if (error) {
>         gchar *message = g_strdup_printf("Unable to build pipeline: %s",
> error->message);
>         g_clear_error (&error);
>         set_ui_message(message, data);
>         g_free (message);
>         return NULL;
>     }
> 
>     GstPipeline* pipeline = GST_PIPELINE_CAST(data->pipeline);
>     GstElement* element = data->pipeline;
> 
>     gchar* uri = "http://docs.gstreamer.com/media/sintel_trailer-368p.ogv";
> 
>     g_object_set(data->pipeline, "uri", uri, NULL);
> 
>     // Set the pipeline to READY, so it can already accept a window handle,
> if we have one
>     data->target_state = GST_STATE_READY;
>     gst_element_set_state(data->pipeline, GST_STATE_READY);
> 
>     // Add sync stuff from tutorial
>     GstClock* clock = gst_element_get_clock(data->pipeline);
> 
>     GST_DEBUG ("gst_element_get_clock... (GstClock:%p)", clock);
> 
> When I run this code, clock is 0x0.
> 
> 
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Unable-to-get-GstClock-from-GstElement-tp4670705.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list