[gst-devel] Change the priority of the tasks that are used in bin2

Michael Trimarchi michael at panicking.kicks-ass.org
Thu Feb 11 12:04:15 CET 2010


Hi all,

With some help :) now I have the solution

Michael Trimarchi wrote:
> Hi all,
> 
> I create in my application these three element
> 
> bin = gst_element_factory_make ("playbin2", "play");
> videosink = gst_element_factory_make ("xvimagesink", "videosink");
> audiosink = gst_element_factory_make ("pulsesink", "audio-sink");
> 
> Each element maybe has an associated thread id. Can I access to it and 
> change
> prioriry and parameter? How to access to GstTask part of the GstElement?

This is a way to do it and it's reported in example
+static GstBusSyncReply
+sync_bus_handler(GstBus * bus, GstMessage * message, GstElement * bin)
+{
...
+                       case GST_STREAM_STATUS_TYPE_ENTER:
+                               if (task) {
+                                       g_message
+                                           ("raising task priority for %p",
+                                            task);
+                                       gst_task_set_priority(task,
+                                                             G_THREAD_PRIORITY_HIGH);
+                               }
+                               break;
...
                bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline));
+               gst_bus_set_sync_handler(bus,
+                                        (GstBusSyncHandler) sync_bus_handler,
+                                        bin);

Michael


> 
> Michael
> 





More information about the gstreamer-devel mailing list