how to set name for each thread in gstreamer

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

how to set name for each thread in gstreamer

brad2012
Dears,

Does anyone know how to assign name in gstreamer ?
for example:
when in playing state, I would like see the  "playbin"  thread by ps command.
Is there any method to do that?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to set name for each thread in gstreamer

Stefan Sauer
On 07/25/2012 11:38 AM, Soho Soho123 wrote:
> Dears,
>
> Does anyone know how to assign name in gstreamer ?
> for example:
> when in playing state, I would like see the  "playbin"  thread by ps command.
> Is there any method to do that?
>
GStreamer is already setting the pad-names that start the thread as a
thread name. This only works on linux as far as I know. Also the names
unfortunately get truncated. You could overwrite the name using prctrl()
in stream-status message if you want.

Stefan
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to set name for each thread in gstreamer

brad2012
Hi,Sir,

I know the thread name from linux kernel, since I add printk in/kernel/sys.c
function sys_prctl(),
But I do not know where is the code to start thread in gstreamer code?
If I know the code, I can use prctl() to modify the name that I want.
Below is the example that I got when gstreamer playing mp3 file.

It confused me about the name "pool", and "aqueue:src",
the name "audiosink-ringb" seems be truncated as you mentioned.
Do you have idea about where is the code start thread in gstreamer?



sys_prctl, 1769, pid=7934, name=pool
sys_prctl, 1769, pid=7935, name=pool
sys_prctl, 1769, pid=7936, name=pool
sys_prctl, 1769, pid=7936, name=aqueue:src
sys_prctl, 1769, pid=7939, name=audiosink-ringb


2012/7/26 Stefan Sauer <[hidden email]>:

> On 07/25/2012 11:38 AM, Soho Soho123 wrote:
>> Dears,
>>
>> Does anyone know how to assign name in gstreamer ?
>> for example:
>> when in playing state, I would like see the  "playbin"  thread by ps command.
>> Is there any method to do that?
>>
> GStreamer is already setting the pad-names that start the thread as a
> thread name. This only works on linux as far as I know. Also the names
> unfortunately get truncated. You could overwrite the name using prctrl()
> in stream-status message if you want.
>
> Stefan
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to set name for each thread in gstreamer

Stefan Sauer
On 07/26/2012 06:38 AM, Soho Soho123 wrote:

> Hi,Sir,
>
> I know the thread name from linux kernel, since I add printk in/kernel/sys.c
> function sys_prctl(),
> But I do not know where is the code to start thread in gstreamer code?
> If I know the code, I can use prctl() to modify the name that I want.
> Below is the example that I got when gstreamer playing mp3 file.
>
> It confused me about the name "pool", and "aqueue:src",
> the name "audiosink-ringb" seems be truncated as you mentioned.
> Do you have idea about where is the code start thread in gstreamer?
Gstreamer is using thread pools. I told you already that you can listen
on the bus for

stream-status messages and rename your threads. Look under gstreamer/tests/examples/streams for examples.

Stefan

>
>
>
> sys_prctl, 1769, pid=7934, name=pool
> sys_prctl, 1769, pid=7935, name=pool
> sys_prctl, 1769, pid=7936, name=pool
> sys_prctl, 1769, pid=7936, name=aqueue:src
> sys_prctl, 1769, pid=7939, name=audiosink-ringb
>
>
> 2012/7/26 Stefan Sauer <[hidden email]>:
>> On 07/25/2012 11:38 AM, Soho Soho123 wrote:
>>> Dears,
>>>
>>> Does anyone know how to assign name in gstreamer ?
>>> for example:
>>> when in playing state, I would like see the  "playbin"  thread by ps command.
>>> Is there any method to do that?
>>>
>> GStreamer is already setting the pad-names that start the thread as a
>> thread name. This only works on linux as far as I know. Also the names
>> unfortunately get truncated. You could overwrite the name using prctrl()
>> in stream-status message if you want.
>>
>> Stefan
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel