[FFmpeg-devel] [PATCH 2/4] lavc/pthread_frame: set worker thread names

Rémi Denis-Courmont remi at remlab.net
Wed Oct 19 07:51:09 EEST 2022


Le 18 octobre 2022 23:59:21 GMT+03:00, Henrik Gramner <henrik at gramner.com> a écrit :
>On Tue, Oct 18, 2022 at 6:54 PM Anton Khirnov <anton at khirnov.net> wrote:
>> +static void thread_set_name(PerThreadContext *p)
>> +{
>> +    AVCodecContext *avctx = p->avctx;
>> +    int idx = p - p->parent->threads;
>> +    char name[16];
>> +
>> +    snprintf(name, sizeof(name), "d:%.7s:ft%d", avctx->codec->name, idx);
>> +
>> +    ff_thread_setname(name);
>> +}
>
>How about having some kind of prefix to indicate that those are
>libavcodec threads?
>
>Could be helpful in a scenario where a process has threads spawned by
>35 different libraries.
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>

There's only 15 characters maximum, so not much for a prefix . I guess that's why it's just d:...


More information about the ffmpeg-devel mailing list