1 #ifndef decoder_HEADER_GUARD
2 #define decoder_HEADER_GUARD
74 long int getMsTimestamp();
130 virtual void flush();
152 AVFrame *aux_av_frame;
153 AVPixelFormat current_pixel_format;
155 float secs_per_frame;
Decoded YUV/RGB frame in FFMpeg format.
Definition: frame.h:361
Decoder using FFmpeg/libav.
Definition: decoder.h:108
AVDecoder(AVCodecID av_codec_id, int n_threads=1)
Default constructor.
Definition: decoder.cpp:92
AVCodecContext * av_codec_context
FFmpeg internal data structure.
Definition: decoder.h:125
AVCodecID av_codec_id
FFmpeg AVCodecId, identifying the codec.
Definition: decoder.h:123
AVPacket * av_packet
FFmpeg internal data structure; encoded frame (say, H264)
Definition: decoder.h:124
AVCodec * av_codec
FFmpeg internal data structure.
Definition: decoder.h:126
virtual void flush()
Reset decoder state. How to flush depends on the decoder library.
Definition: decoder.cpp:160
Custom payload Frame.
Definition: frame.h:166
A Virtual class for decoders.
Definition: decoder.h:62
virtual bool pull()=0
Decode in_frame to out_frame. Return true if decoder returned a new frame (into out_frame),...
virtual Frame * output()=0
< Return in_frame timestamp
virtual void flush()=0
Reset decoder state. How to flush depends on the decoder library.
Decoder()
Default constructor.
Definition: decoder.cpp:39
BasicFrame in_frame
Payload data to be decoded.
Definition: decoder.h:69
virtual ~Decoder()
Default destructor.
Definition: decoder.cpp:42
virtual bool isOk()
The thread that uses this decoder can check if it has gone sour.
Definition: decoder.cpp:71
void input(Frame *f)
Create a copy of the frame into the internal storage of the decoder (i.e. to Decoder::in_frame)
Definition: decoder.cpp:49
virtual void releaseOutput()
Decoder might want to know that it's ok to overwrite the frame.
Definition: decoder.cpp:66
A Dummy decoder.
Definition: decoder.h:90
virtual bool pull()
Decode in_frame to out_frame. Return true if decoder returned a new frame (into out_frame),...
Definition: decoder.cpp:85
virtual Frame * output()
Return a reference to the internal storage of the decoder where the decoded frame is.
Definition: decoder.cpp:78
virtual void flush()
Reset decoder state. How to flush depends on the decoder library.
Definition: decoder.cpp:83
BasicFrame out_frame
Output frame: no decoding, just copy input here.
Definition: decoder.h:93
Frame: An abstract queueable class.
Definition: frame.h:112
Video decoder using FFmpeg/libav.
Definition: decoder.h:142
VideoDecoder(AVCodecID av_codec_id, int n_threads=1)
Default constructor.
Definition: decoder.cpp:167
virtual Frame * output()
Return a reference to the internal storage of the decoder where the decoded frame is.
Definition: decoder.cpp:202
virtual ~VideoDecoder()
Default destructor.
Definition: decoder.cpp:191
virtual bool pull()
Decode in_frame to out_frame. Return true if decoder returned a new frame (into out_frame),...
Definition: decoder.cpp:208