11 #include "DVDResource.h" 12 #include "cores/VideoPlayer/Buffers/VideoBuffer.h" 13 #include "cores/VideoPlayer/Interface/DemuxPacket.h" 14 #include "cores/VideoPlayer/Process/ProcessInfo.h" 17 #include <libavcodec/avcodec.h> 18 #include <libavutil/mastering_display_metadata.h> 28 #define FRAME_TYPE_UNDEF 0 29 #define FRAME_TYPE_I 1 30 #define FRAME_TYPE_P 2 31 #define FRAME_TYPE_B 3 32 #define FRAME_TYPE_D 4 50 double iRepeatPicture;
52 unsigned int iFrameType : 4;
53 unsigned int color_space;
54 unsigned int color_range : 1;
55 unsigned int chroma_position;
56 unsigned int color_primaries;
57 unsigned int color_transfer;
58 unsigned int colorBits = 8;
59 std::string stereoMode;
66 bool hasDisplayMetadata =
false;
67 AVMasteringDisplayMetadata displayMetadata;
68 bool hasLightMetadata =
false;
69 AVContentLightMetadata lightMetadata;
71 AVPixelFormat pixelFormat;
75 unsigned int iDisplayWidth;
76 unsigned int iDisplayHeight;
83 #define DVP_FLAG_TOP_FIELD_FIRST 0x00000001 84 #define DVP_FLAG_REPEAT_TOP_FIELD 0x00000002 //< Set to indicate that the top field should be repeated 85 #define DVP_FLAG_INTERLACED 0x00000008 //< Set to indicate that this frame is interlaced 86 #define DVP_FLAG_DROPPED 0x00000010 //< indicate that this picture has been dropped in decoder stage, will have no data 88 #define DVD_CODEC_CTRL_SKIPDEINT 0x01000000 //< request to skip a deinterlacing cycle, if possible 89 #define DVD_CODEC_CTRL_NO_POSTPROC 0x02000000 //< see GetCodecStats 90 #define DVD_CODEC_CTRL_HURRY 0x04000000 //< see GetCodecStats 91 #define DVD_CODEC_CTRL_DROP 0x08000000 //< drop in decoder or set DVP_FLAG_DROPPED, no render of frame 92 #define DVD_CODEC_CTRL_DROP_ANY 0x10000000 //< drop some non-reference frame 93 #define DVD_CODEC_CTRL_DRAIN 0x20000000 //< squeeze out pictured without feeding new packets 94 #define DVD_CODEC_CTRL_ROTATE 0x40000000 //< rotate if renderer does not support it 98 #define DVP_QSCALE_UNKNOWN 0 99 #define DVP_QSCALE_MPEG1 1 100 #define DVP_QSCALE_MPEG2 2 101 #define DVP_QSCALE_H264 3 149 virtual bool AddData(
const DemuxPacket &packet) = 0;
155 virtual void Reset() = 0;
162 virtual VCReturn GetPicture(
VideoPicture* pVideoPicture) = 0;
173 virtual const char* GetName() = 0;
202 virtual bool GetCodecStats(
double &pts,
int &droppedFrames,
int &skippedPics)
250 virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx,
const enum AVPixelFormat) = 0;
251 virtual CDVDVideoCodec::VCReturn Decode(AVCodecContext* avctx, AVFrame* frame) = 0;
252 virtual bool GetPicture(AVCodecContext* avctx,
VideoPicture* picture) = 0;
253 virtual CDVDVideoCodec::VCReturn Check(AVCodecContext* avctx) = 0;
254 virtual void Reset() {}
255 virtual unsigned GetAllowedReferences() {
return 0; }
256 virtual bool CanSkipDeint() {
return false; }
257 virtual const std::string Name() = 0;
258 virtual void SetCodecControl(
int flags) {}
266 virtual bool GetPictureCommon(
VideoPicture* pVideoPicture) = 0;
virtual void SetSpeed(int iSpeed)
will be called by video player indicating the playback speed.
Definition: DVDVideoCodec.h:168
Definition: DVDStreamInfo.h:23
Definition: VideoBuffer.h:85
virtual void SetCodecControl(int flags)
Codec can be informed by player with the following flags:
Definition: DVDVideoCodec.h:232
Definition: DVDCodecs.h:23
Setting base class containing all the properties which are common to all settings independent of the ...
Definition: Setting.h:46
Definition: DVDVideoCodec.h:245
Definition: DVDResource.h:14
Definition: DVDVideoCodec.h:261
Definition: ProcessInfo.h:26
virtual unsigned GetConvergeCount()
How many packets should player remember, so codec can recover should something cause it to flush outs...
Definition: DVDVideoCodec.h:179
virtual bool Reconfigure(CDVDStreamInfo &hints)
Reconfigure the decoder, returns true on success Decoders not capable of running multiple instances m...
Definition: DVDVideoCodec.h:140
Definition: DVDVideoCodec.h:36
virtual bool GetCodecStats(double &pts, int &droppedFrames, int &skippedPics)
For calculation of dropping requirements player asks for some information.
Definition: DVDVideoCodec.h:202
virtual unsigned GetAllowedReferences()
Number of references to old pictures that are allowed to be retained when calling decode on the next ...
Definition: DVDVideoCodec.h:188
Definition: DemuxPacket.h:22
Definition: DVDCodecs.h:15
Definition: DVDVideoCodec.h:107
virtual void Reopen()
Re-open the decoder.
Definition: DVDVideoCodec.h:238