MythTV  master
dummydecoder.h
Go to the documentation of this file.
1 #ifndef DUMMYDECODER_H_
2 #define DUMMYDECODER_H_
3 
5 
6 #include "decoders/decoderbase.h"
7 #include "format.h"
8 #include "mythframe.h"
9 
10 class DummyDecoder : public DecoderBase
11 {
12  public:
13  DummyDecoder(MythPlayer *parent, const ProgramInfo &pginfo) :
14  DecoderBase(parent, pginfo) {}
15  ~DummyDecoder() override = default;
16 
17  // DecoderBase
18  int OpenFile(MythMediaBuffer* /*Buffer*/, bool /*novideo*/, TestBufferVec & /*testbuf*/) override
19  { return 0; }
20  bool GetFrame(DecodeType /*Type*/, bool &/*Retry*/) override
21  { usleep(10000); return false; }
22  bool IsLastFrameKey(void) const override { return true; }
23  QString GetCodecDecoderName(void) const override { return "dummy"; }
24  MythCodecID GetVideoCodecID(void) const override { return kCodec_NONE; }
25  bool SyncPositionMap(void) override { return false; }
26 };
27 
28 #endif
DecodeType
DecodeType
Definition: decoderbase.h:48
MythCodecID
MythCodecID
Definition: mythcodecid.h:11
format.h
MythMediaBuffer
Definition: mythmediabuffer.h:59
mythframe.h
MythPlayer
Definition: mythplayer.h:83
kCodec_NONE
@ kCodec_NONE
Definition: mythcodecid.h:15
programinfo.h
DummyDecoder::GetFrame
bool GetFrame(DecodeType, bool &) override
Demux, preprocess and possibly decode a frame of video/audio.
Definition: dummydecoder.h:20
DummyDecoder::GetCodecDecoderName
QString GetCodecDecoderName(void) const override
Definition: dummydecoder.h:23
TestBufferVec
std::vector< char > TestBufferVec
Definition: decoderbase.h:24
DummyDecoder::GetVideoCodecID
MythCodecID GetVideoCodecID(void) const override
Definition: dummydecoder.h:24
DummyDecoder::DummyDecoder
DummyDecoder(MythPlayer *parent, const ProgramInfo &pginfo)
Definition: dummydecoder.h:13
DummyDecoder::SyncPositionMap
bool SyncPositionMap(void) override
Updates the position map used for skipping frames.
Definition: dummydecoder.h:25
DummyDecoder::OpenFile
int OpenFile(MythMediaBuffer *, bool, TestBufferVec &) override
Definition: dummydecoder.h:18
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
decoderbase.h
DummyDecoder::IsLastFrameKey
bool IsLastFrameKey(void) const override
Definition: dummydecoder.h:22
DummyDecoder
Definition: dummydecoder.h:10
DummyDecoder::~DummyDecoder
~DummyDecoder() override=default
DecoderBase
Definition: decoderbase.h:121