Change the priority of the tasks that are used in bin2

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

Change the priority of the tasks that are used in bin2

Michael Trimarchi
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?

Michael

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Change the priority of the tasks that are used in bin2

Michael Trimarchi
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
>


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel