MythTV  master
privatedecoder.h
Go to the documentation of this file.
1 #ifndef PRIVATEDECODER_H
2 #define PRIVATEDECODER_H
3 
4 #include <QString>
5 
6 #include "mythconfig.h"
7 
8 extern "C" {
9 #include "libavcodec/avcodec.h"
10 #include "libavformat/avformat.h"
11 }
12 
13 #include "videodisplayprofile.h"
14 #include "mythcodecid.h"
15 #include "mythplayer.h"
16 #include "mythavutil.h"
17 
19 {
20  public:
21  static void GetDecoders(render_opts &opts);
22  static PrivateDecoder* Create(const QString &decoder,
23  PlayerFlags flags,
24  AVCodecContext *avctx);
25  PrivateDecoder() = default;
26  virtual ~PrivateDecoder() = default;
27  virtual QString GetName(void) = 0;
28  virtual bool Init(const QString &decoder,
29  PlayerFlags flags,
30  AVCodecContext *avctx) = 0;
31  virtual bool Reset(void) = 0;
32  virtual int GetFrame(AVStream *stream,
33  AVFrame *picture,
34  int *got_picture_ptr,
35  AVPacket *pkt) = 0;
36  virtual bool HasBufferedFrames(void) { return false; }
37  virtual bool NeedsReorderedPTS(void) { return false; }
38 
39 protected:
41 };
42 
43 #endif // PRIVATEDECODER_H
virtual bool Reset(void)=0
PlayerFlags
Definition: mythplayer.h:88
static void GetDecoders(render_opts &opts)
MythAVCopy m_copyCtx
struct AVFrame AVFrame
MythAVCopy Copy AVFrame<->frame, performing the required conversion if any.
Definition: mythavutil.h:114
static PrivateDecoder * Create(const QString &decoder, PlayerFlags flags, AVCodecContext *avctx)
virtual QString GetName(void)=0
PrivateDecoder()=default
virtual ~PrivateDecoder()=default
virtual bool NeedsReorderedPTS(void)
virtual bool Init(const QString &decoder, PlayerFlags flags, AVCodecContext *avctx)=0
virtual int GetFrame(AVStream *stream, AVFrame *picture, int *got_picture_ptr, AVPacket *pkt)=0
virtual bool HasBufferedFrames(void)