stream: set specific names for each thread #6556
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NamedThread
class that automatically sets its name from its class name, with an optional suffix, and with a unique counterSegmentedStreamWriter
andSegmentedStreamWorker
subclass fromNamedThread
and pass through the optionalname
suffixSegmentedStreamReader
and its subclasses (HLS and DASH) set the optional name suffix for its writer and worker threads, and fix signature of the Twitch plugin's subclassname
argument toHLSStream
, so it can be passed to its readerMuxedHLSStream
set the "audio" suffix for all audio substreams#6550 (comment)
After this has been merged, I will add the thread name to the default logformat for the trace log level.
The
FFMPEGMuxer
class has not been touched. Thecopy_to_pipe
threads already have a unique name, and the thread pool that's used for concurrently closing the substreams is not important. The whole class needs to be rewritten anyway, so there's no reason to modify it now.The only plugin that needed an update was Twitch, because the constructor of the
HLSStreamReader
subclass was modified, and the signatures didn't match anymore. Other plugins that subclass the HLS reader were fine. Since this is not a public interface, I don't care about 3rd party plugins.Unmuxed HLS
Worker and writer+children are now properly named
Muxed HLS
Threads of the audio substreams have the "audio" name suffix
DASH
Worker and writer+children have unique names, including "video"/"audio" name suffixes.