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  void WriteStoredData(MythMediaBuffer* /*Buffer*/, bool /*storevid*/,
24  std::chrono::milliseconds /*timecodeOffset*/) override {}
25  long UpdateStoredFrameNum(long /*frame*/) override { return 0; }
26  QString GetCodecDecoderName(void) const override { return "dummy"; }
27  MythCodecID GetVideoCodecID(void) const override { return kCodec_NONE; }
28  bool SyncPositionMap(void) override { return false; }
29 };
30 
31 #endif
DummyDecoder::UpdateStoredFrameNum
long UpdateStoredFrameNum(long) override
Definition: dummydecoder.h:25
kCodec_NONE
@ kCodec_NONE
Definition: mythcodecid.h:14
format.h
MythMediaBuffer
Definition: mythmediabuffer.h:50
mythframe.h
MythPlayer
Definition: mythplayer.h:83
MythCodecID
MythCodecID
Definition: mythcodecid.h:10
programinfo.h
DecodeType
DecodeType
Definition: decoderbase.h:47
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:26
TestBufferVec
std::vector< char > TestBufferVec
Definition: decoderbase.h:23
DummyDecoder::GetVideoCodecID
MythCodecID GetVideoCodecID(void) const override
Definition: dummydecoder.h:27
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:28
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
DummyDecoder::WriteStoredData
void WriteStoredData(MythMediaBuffer *, bool, std::chrono::milliseconds) override
Definition: dummydecoder.h:23
DecoderBase
Definition: decoderbase.h:120