1 #ifndef decoderthread_HEADER_GUARD
2 #define decoderthread_HEADER_GUARD
71 bool use_time_correction;
80 virtual Decoder* chooseAudioDecoder(AVCodecID codec_id);
82 virtual Decoder* fallbackAudioDecoder(AVCodecID codec_id);
110 void setNumberOfThreads(
int n_threads);
Passes frames to a multiprocessing fifo.
Definition: framefilter.h:554
Definition: decoderthread.h:43
BlockingFifoFrameFilter infilter_block
Incoming frames can also be written here. If stack runs out of frames, writing will block.
Definition: decoderthread.h:59
AbstractFileState state
Seek, play, stop or what.
Definition: decoderthread.h:66
FrameFilter & outfilter
Outgoing, decoded frames are written here.
Definition: decoderthread.h:63
void decodingOnCall()
API method: enable decoding // <pyapi>
Definition: decoderthread.cpp:427
DecoderThread(const char *name, FrameFilter &outfilter, FrameFifoContext fifo_ctx=FrameFifoContext())
Default constructor.
Definition: decoderthread.cpp:39
bool is_decoding
should currently decode or not
Definition: decoderthread.h:74
virtual Decoder * fallbackVideoDecoder(AVCodecID codec_id)
If the the video decoder obtained from chooseVideoDecoder fails for some reason, provide a fallback v...
Definition: decoderthread.cpp:95
void run()
Main execution loop is defined here.
Definition: decoderthread.cpp:101
void postRun()
Called after the main execution loop exits, but before joining the thread.
Definition: decoderthread.cpp:360
void requestStopCall()
API method: Like Thread::stopCall() but does not block. // <pyapi>
Definition: decoderthread.cpp:454
virtual ~DecoderThread()
Default destructor. Calls AVThread::stopCall // <pyapi>
Definition: decoderthread.cpp:50
std::deque< AVSignalContext > signal_fifo
Redefinition of signal fifo.
Definition: decoderthread.h:77
long int mstimetolerance
Drop frames if they are in milliseconds this much late.
Definition: decoderthread.h:65
void setTimeCorrection(bool val)
Set number of decoding threads.
Definition: decoderthread.cpp:379
FrameFifo infifo
Incoming frames are read from here.
Definition: decoderthread.h:57
void setTimeTolerance(long int mstol)
API method: decoder will scrap late frames that are mstol milliseconds late. Call before starting the...
Definition: decoderthread.cpp:375
virtual Decoder * chooseVideoDecoder(AVCodecID codec_id)
Chooses a video decoder.
Definition: decoderthread.cpp:76
void preRun()
Called before entering the main execution loop, but after creating the thread.
Definition: decoderthread.cpp:354
std::vector< Decoder * > decoders
A vector/list of registered and instantiated decoders.
Definition: decoderthread.h:64
void decodingOffCall()
API method: pause decoding // <pyapi>
Definition: decoderthread.cpp:434
FifoFrameFilter infilter
Write incoming frames here.
Definition: decoderthread.h:58
void sendSignal(AVSignalContext signal_ctx)
Redefined : Thread::SignalContext has been changed to AVThread::SignalContext.
Definition: decoderthread.cpp:389
std::vector< SetupFrame > setupframes
Save decoder(s) setup information.
Definition: decoderthread.h:67
A Virtual class for decoders.
Definition: decoder.h:62
Passes frames to a FrameFifo.
Definition: framefilter.h:530
A thread-safe combination of a fifo (first-in-first-out) queue and an associated stack.
Definition: framefifo.h:83
The mother class of all frame filters! FrameFilters are used to create "filter chains".
Definition: framefilter.h:44
A class for multithreading with a signaling system.
Definition: thread.h:87
std::string name
Name of the thread.
Definition: thread.h:116
Corrects erroneous timestamps (while preserving timestamp distances).
Definition: framefilter.h:317
Constant/default values, version numbers.
Definition of FrameFilter and derived classes for various purposes.
AbstractFileState
Describes the state of a stream.
Definition: threadsignal.h:43
Redefinition of characteristic signal contexts (info that goes with the signal) for AVThread thread.
Definition: threadsignal.h:94
Describes the stack structure and fifo behaviour for a FrameFifo.
Definition: framefifo.h:56
Base class for multithreading.