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 AVColorSpace color_space;
54 unsigned int color_range : 1;
55 AVChromaLocation chroma_position;
56 AVColorPrimaries color_primaries;
57 AVColorPrimaries m_originalColorPrimaries;
58 AVColorTransferCharacteristic color_transfer;
59 unsigned int colorBits = 8;
60 std::string stereoMode;
67 StreamHdrType hdrType;
69 bool hasDisplayMetadata =
false;
70 AVMasteringDisplayMetadata displayMetadata;
71 bool hasLightMetadata =
false;
72 AVContentLightMetadata lightMetadata;
74 AVPixelFormat pixelFormat;
78 unsigned int iDisplayWidth;
79 unsigned int iDisplayHeight;
86 #define DVP_FLAG_TOP_FIELD_FIRST 0x00000001 87 #define DVP_FLAG_REPEAT_TOP_FIELD 0x00000002 //< Set to indicate that the top field should be repeated 88 #define DVP_FLAG_INTERLACED 0x00000008 //< Set to indicate that this frame is interlaced 89 #define DVP_FLAG_DROPPED 0x00000010 //< indicate that this picture has been dropped in decoder stage, will have no data 91 #define DVD_CODEC_CTRL_SKIPDEINT 0x01000000 //< request to skip a deinterlacing cycle, if possible 92 #define DVD_CODEC_CTRL_NO_POSTPROC 0x02000000 //< see GetCodecStats 93 #define DVD_CODEC_CTRL_HURRY 0x04000000 //< see GetCodecStats 94 #define DVD_CODEC_CTRL_DROP 0x08000000 //< drop in decoder or set DVP_FLAG_DROPPED, no render of frame 95 #define DVD_CODEC_CTRL_DROP_ANY 0x10000000 //< drop some non-reference frame 96 #define DVD_CODEC_CTRL_DRAIN 0x20000000 //< squeeze out pictured without feeding new packets 97 #define DVD_CODEC_CTRL_ROTATE 0x40000000 //< rotate if renderer does not support it 101 #define DVP_QSCALE_UNKNOWN 0 102 #define DVP_QSCALE_MPEG1 1 103 #define DVP_QSCALE_MPEG2 2 104 #define DVP_QSCALE_H264 3 152 virtual bool AddData(
const DemuxPacket &packet) = 0;
158 virtual void Reset() = 0;
165 virtual VCReturn GetPicture(
VideoPicture* pVideoPicture) = 0;
176 virtual const char* GetName() = 0;
205 virtual bool GetCodecStats(
double &pts,
int &droppedFrames,
int &skippedPics)
253 virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx,
const enum AVPixelFormat) = 0;
254 virtual CDVDVideoCodec::VCReturn Decode(AVCodecContext* avctx, AVFrame* frame) = 0;
255 virtual bool GetPicture(AVCodecContext* avctx,
VideoPicture* picture) = 0;
256 virtual CDVDVideoCodec::VCReturn Check(AVCodecContext* avctx) = 0;
257 virtual void Reset() {}
258 virtual unsigned GetAllowedReferences() {
return 0; }
259 virtual bool CanSkipDeint() {
return false; }
260 virtual const std::string Name() = 0;
261 virtual void SetCodecControl(
int flags) {}
269 virtual bool GetPictureCommon(
VideoPicture* pVideoPicture) = 0;
virtual void SetSpeed(int iSpeed)
will be called by video player indicating the playback speed.
Definition: DVDVideoCodec.h:171
Definition: DVDStreamInfo.h:25
Definition: VideoBuffer.h:85
virtual void SetCodecControl(int flags)
Codec can be informed by player with the following flags:
Definition: DVDVideoCodec.h:235
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:248
Definition: DVDResource.h:14
Definition: DVDVideoCodec.h:264
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:182
virtual bool Reconfigure(CDVDStreamInfo &hints)
Reconfigure the decoder, returns true on success Decoders not capable of running multiple instances m...
Definition: DVDVideoCodec.h:143
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:205
virtual unsigned GetAllowedReferences()
Number of references to old pictures that are allowed to be retained when calling decode on the next ...
Definition: DVDVideoCodec.h:191
Definition: DemuxPacket.h:22
Definition: DVDCodecs.h:15
Definition: DVDVideoCodec.h:110
virtual void Reopen()
Re-open the decoder.
Definition: DVDVideoCodec.h:241