Valkka  1.6.1
OpenSource Video Management
Public Member Functions | Public Attributes | Protected Attributes | List of all members
AVHwDecoder Class Reference

Video decoder using FFmpeg/libav with VAAPI. More...

#include <hwdecoder.h>

Inheritance diagram for AVHwDecoder:
Inheritance graph
[legend]
Collaboration diagram for AVHwDecoder:
Collaboration graph
[legend]

Public Member Functions

 AVHwDecoder (AVCodecID av_codec_id, AVHWDeviceType hwtype, int n_threads=1)
 Default constructor. More...
 
virtual ~AVHwDecoder ()
 Default destructor.
 
virtual void flush ()
 Reset decoder state. How to flush depends on the decoder library.
 
virtual bool isOk ()
 The thread that uses this decoder can check if it has gone sour.
 
- Public Member Functions inherited from Decoder
 Decoder ()
 Default constructor.
 
virtual ~Decoder ()
 Default destructor.
 
void input (Frame *f)
 Create a copy of the frame into the internal storage of the decoder (i.e. to Decoder::in_frame)
 
long int getMsTimestamp ()
 
virtual Frameoutput ()=0
 < Return in_frame timestamp More...
 
virtual void releaseOutput ()
 Decoder might want to know that it's ok to overwrite the frame.
 
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.
 
bool hasFrame ()
 

Public Attributes

AVCodecID av_codec_id
 FFmpeg AVCodecId, identifying the codec.
 
AVPacket * av_packet
 FFmpeg internal data structure; encoded frame (say, H264)
 
AVCodecContext * av_codec_context
 FFmpeg internal data structure.
 
AVCodec * av_codec
 FFmpeg internal data structure.
 
AVBufferRef * hw_device_ctx
 FFmpeg/libav hardware context.
 
AVFrame * hw_frame
 
AVPixelFormat hw_pix_format
 

Protected Attributes

int n_threads
 
bool active
 
- Protected Attributes inherited from Decoder
BasicFrame in_frame
 Payload data to be decoded.
 
bool has_frame
 

Detailed Description

Video decoder using FFmpeg/libav with VAAPI.

Subclassed from the basic ffmpeg/libav decoder class VideoDecoder

See also Code walkthrough: rendering

TODO: from here we still need to subclass into HWVideoDecoder i.e. to define Frame *output() bool pull()

like class VideoDecoder : public AVDecoder

Constructor & Destructor Documentation

◆ AVHwDecoder()

AVHwDecoder::AVHwDecoder ( AVCodecID  av_codec_id,
AVHWDeviceType  hwtype,
int  n_threads = 1 
)

Default constructor.


The documentation for this class was generated from the following files: