You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	fftools/ffmpeg: set thread names
This commit is contained in:
		| @@ -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; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user