mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
fftools/ffmpeg: set thread names
This commit is contained in:
parent
a2f5913857
commit
874a6f2090
@ -177,6 +177,13 @@ static void ts_fixup(InputFile *ifile, AVPacket *pkt, int *repeat_pict)
|
|||||||
*repeat_pict = av_stream_get_parser(ist->st)->repeat_pict;
|
*repeat_pict = av_stream_get_parser(ist->st)->repeat_pict;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void thread_set_name(InputFile *f)
|
||||||
|
{
|
||||||
|
char name[16];
|
||||||
|
snprintf(name, sizeof(name), "dmx%d:%s", f->index, f->ctx->iformat->name);
|
||||||
|
ff_thread_setname(name);
|
||||||
|
}
|
||||||
|
|
||||||
static void *input_thread(void *arg)
|
static void *input_thread(void *arg)
|
||||||
{
|
{
|
||||||
InputFile *f = arg;
|
InputFile *f = arg;
|
||||||
@ -190,6 +197,8 @@ static void *input_thread(void *arg)
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thread_set_name(f);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
DemuxMsg msg = { NULL };
|
DemuxMsg msg = { NULL };
|
||||||
|
|
||||||
|
@ -184,6 +184,13 @@ static int sync_queue_process(Muxer *mux, OutputStream *ost, AVPacket *pkt)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void thread_set_name(OutputFile *of)
|
||||||
|
{
|
||||||
|
char name[16];
|
||||||
|
snprintf(name, sizeof(name), "mux%d:%s", of->index, of->format->name);
|
||||||
|
ff_thread_setname(name);
|
||||||
|
}
|
||||||
|
|
||||||
static void *muxer_thread(void *arg)
|
static void *muxer_thread(void *arg)
|
||||||
{
|
{
|
||||||
Muxer *mux = arg;
|
Muxer *mux = arg;
|
||||||
@ -197,6 +204,8 @@ static void *muxer_thread(void *arg)
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thread_set_name(of);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
OutputStream *ost;
|
OutputStream *ost;
|
||||||
int stream_idx;
|
int stream_idx;
|
||||||
|
Loading…
Reference in New Issue
Block a user