1 #ifndef decoder_HEADER_GUARD 2 #define decoder_HEADER_GUARD 71 long int getMsTimestamp();
73 virtual void flush() = 0;
74 virtual bool pull() = 0;
111 AVDecoder(AVCodecID av_codec_id,
int n_threads = 1);
125 virtual void flush();
147 AVFrame *aux_av_frame;
148 AVPixelFormat current_pixel_format;
150 float secs_per_frame;
A Virtual class for decoders.
Definition: decoder.h:58
Custom payload Frame.
Definition: frame.h:160
virtual ~Decoder()
Default destructor.
Definition: decoder.cpp:43
Decoder using FFmpeg/libav.
Definition: decoder.h:102
AVCodecContext * av_codec_context
FFmpeg internal data structure.
Definition: decoder.h:120
AVCodecID av_codec_id
FFmpeg AVCodecId, identifying the codec.
Definition: decoder.h:118
AVCodec * av_codec
FFmpeg internal data structure.
Definition: decoder.h:121
AVPacket * av_packet
FFmpeg internal data structure; encoded frame (say, H264)
Definition: decoder.h:119
virtual Frame * output()=0
< Return in_frame timestamp
Decoder()
Default constructor.
Definition: decoder.cpp:41
Video decoder using FFmpeg/libav.
Definition: decoder.h:136
Decoded YUV/RGB frame in FFMpeg format.
Definition: frame.h:354
BasicFrame in_frame
Payload data to be decoded.
Definition: decoder.h:66
Frame: An abstract queueable class.
Definition: frame.h:108
virtual void flush()=0
Reset decoder state. How to flush depends on the decoder library.
BasicFrame out_frame
Output frame: no decoding, just copy input here.
Definition: decoder.h:88
A Dummy decoder.
Definition: decoder.h:84
virtual bool pull()=0
Decode in_frame to out_frame. Return true if decoder returned a new frame (into out_frame), otherwise false. Implementation depends on the decoder library.
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:50