how to set name for each thread in gstreamer

Stefan Sauer ensonic at hora-obscura.de
Thu Jul 26 00:24:19 PDT 2012


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 <ensonic at hora-obscura.de>:
>> 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
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> 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