MythTV  master
Public Member Functions | List of all members
DummyDecoder Class Reference

#include <dummydecoder.h>

Inheritance diagram for DummyDecoder:
Inheritance graph
[legend]
Collaboration diagram for DummyDecoder:
Collaboration graph
[legend]

Public Member Functions

 DummyDecoder (MythPlayer *parent, const ProgramInfo &pginfo)
 
 ~DummyDecoder () override=default
 
int OpenFile (RingBuffer *, bool, char *, int) override
 
bool GetFrame (DecodeType, bool &) override
 Demux, preprocess and possibly decode a frame of video/audio. More...
 
bool IsLastFrameKey (void) const override
 
void WriteStoredData (RingBuffer *, bool, long) override
 
long UpdateStoredFrameNum (long) override
 
QString GetCodecDecoderName (void) const override
 
MythCodecID GetVideoCodecID (void) const override
 
bool SyncPositionMap (void) override
 Updates the position map used for skipping frames. More...
 
- Public Member Functions inherited from DecoderBase
 DecoderBase (MythPlayer *parent, const ProgramInfo &pginfo)
 
 DecoderBase (const DecoderBase &rhs)
 
virtual ~DecoderBase ()
 
virtual void Reset (bool reset_video_data, bool seek_reset, bool reset_file)
 
virtual int OpenFile (RingBuffer *rbuffer, bool novideo, char testbuf[kDecoderProbeBufferSize], int testbufsize=kDecoderProbeBufferSize)=0
 
virtual void SetEofState (EofState eof)
 
virtual void SetEof (bool eof)
 
EofState GetEof (void)
 
void SetSeekSnap (uint64_t snap)
 
uint64_t GetSeekSnap (void) const
 
void SetLiveTVMode (bool live)
 
void SetProgramInfo (const ProgramInfo &pginfo)
 
virtual void SetDisablePassThrough (bool disable)
 Disables AC3/DTS pass through. More...
 
virtual void ForceSetupAudioStream (void)
 
virtual void SetWatchingRecording (bool mode)
 
MythPlayerGetPlayer ()
 
virtual int GetNumChapters (void)
 
virtual int GetCurrentChapter (long long)
 
virtual void GetChapterTimes (QList< long long > &)
 
virtual long long GetChapter (int)
 
virtual bool DoRewind (long long desiredFrame, bool discardFrames=true)
 
virtual bool DoFastForward (long long desiredFrame, bool discardFrames=true)
 Skips ahead or rewinds to desiredFrame. More...
 
virtual void SetIdrOnlyKeyframes (bool)
 
uint64_t TranslatePositionFrameToMs (long long position, float fallback_framerate, const frm_dir_map_t &cutlist)
 
uint64_t TranslatePositionMsToFrame (uint64_t dur_ms, float fallback_framerate, const frm_dir_map_t &cutlist)
 
float GetVideoAspect (void) const
 
virtual int64_t NormalizeVideoTimecode (int64_t timecode)
 
virtual void ClearStoredData (void)
 
virtual void SetRawAudioState (bool state)
 
virtual bool GetRawAudioState (void) const
 
virtual void SetRawVideoState (bool state)
 
virtual bool GetRawVideoState (void) const
 
virtual double GetFPS (void) const
 
uint GetRawBitrate (void) const
 Returns the estimated bitrate if the video were played at normal speed. More...
 
virtual void UpdateFramesPlayed (void)
 
long long GetFramesRead (void) const
 
long long GetFramesPlayed (void) const
 
void SetFramesPlayed (long long newValue)
 
virtual QString GetRawEncodingType (void)
 
virtual void ResetPosMap (void)
 
virtual bool PosMapFromDb (void)
 
virtual bool PosMapFromEnc (void)
 Queries encoder for position map data that has not been committed to the DB yet. More...
 
virtual bool FindPosition (long long desired_value, bool search_adjusted, int &lower_bound, int &upper_bound)
 
uint64_t SavePositionMapDelta (long long first_frame, long long last_frame)
 
virtual void SeekReset (long long newkey, uint skipFrames, bool doFlush, bool discardFrames)
 
void SetTranscoding (bool value)
 
bool IsErrored () const
 
bool HasPositionMap (void) const
 
void SetWaitForChange (void)
 
bool GetWaitForChange (void) const
 
void SetReadAdjust (long long adjust)
 
void SetDecodeAllSubtitles (bool val)
 
virtual QStringList GetTracks (uint type) const
 
virtual uint GetTrackCount (uint type) const
 
virtual int GetTrackLanguageIndex (uint type, uint trackNo) const
 
virtual QString GetTrackDesc (uint type, uint trackNo) const
 
virtual int SetTrack (uint type, int trackNo)
 
int GetTrack (uint type) const
 
StreamInfo GetTrackInfo (uint type, uint trackNo) const
 
int IncrementTrack (uint type)
 
int DecrementTrack (uint type)
 
int ChangeTrack (uint type, int dir)
 
virtual bool InsertTrack (uint type, const StreamInfo &info)
 
int NextTrack (uint type)
 
virtual int GetTeletextDecoderType (void) const
 
virtual QString GetXDS (const QString &) const
 
virtual QByteArray GetSubHeader (uint) const
 
virtual void GetAttachmentData (uint, QByteArray &, QByteArray &)
 
virtual bool SetAudioByComponentTag (int)
 
virtual bool SetVideoByComponentTag (int)
 
void SaveTotalDuration (void)
 
void ResetTotalDuration (void)
 
void SaveTotalFrames (void)
 
void TrackTotalDuration (bool track)
 
int GetfpsMultiplier (void)
 
MythCodecContextGetMythCodecContext (void)
 
VideoDisplayProfileGetVideoDisplayProfile (void)
 
AVPixelFormat GetBestVideoFormat (AVPixelFormat *Formats)
 Find a suitable frame format that is mutually acceptable to the decoder and render device. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DecoderBase
static uint64_t TranslatePositionAbsToRel (const frm_dir_map_t &deleteMap, uint64_t absPosition, const frm_pos_map_t &map=frm_pos_map_t(), float fallback_ratio=1.0)
 
static uint64_t TranslatePositionRelToAbs (const frm_dir_map_t &deleteMap, uint64_t relPosition, const frm_pos_map_t &map=frm_pos_map_t(), float fallback_ratio=1.0)
 
static uint64_t TranslatePosition (const frm_pos_map_t &map, long long key, float fallback_ratio)
 
- Protected Member Functions inherited from DecoderBase
virtual int AutoSelectTrack (uint type)
 Select best track. More...
 
void AutoSelectTracks (void)
 
void ResetTracks (void)
 
void FileChanged (void)
 
virtual bool DoRewindSeek (long long desiredFrame)
 
virtual void DoFastForwardSeek (long long desiredFrame, bool &needflush)
 Seeks to the keyframe just before the desiredFrame if exact seeks is enabled, or the frame just after it if exact seeks is not enabled. More...
 
long long ConditionallyUpdatePosMap (long long desiredFrame)
 
long long GetLastFrameInPosMap (void) const
 
unsigned long GetPositionMapSize (void) const
 
long long GetKey (const PosMapEntry &entry) const
 
- Protected Attributes inherited from DecoderBase
MythPlayerm_parent {nullptr}
 
ProgramInfom_playbackInfo {nullptr}
 
AudioPlayerm_audio {nullptr}
 
RingBufferm_ringBuffer {nullptr}
 
int m_currentWidth {640}
 
int m_currentHeight {480}
 
float m_currentAspect {1.33333F}
 
double m_fps {29.97}
 
int m_fpsMultiplier {1}
 
int m_fpsSkip {0}
 
uint m_bitrate {4000}
 
long long m_framesPlayed {0}
 
long long m_framesRead {0}
 
unsigned long long m_frameCounter {0}
 
AVRational m_totalDuration
 
long long m_lastKey {0}
 
int m_keyframeDist {-1}
 
long long m_indexOffset {0}
 
MythAVCopy m_copyFrame
 
bool m_trackTotalDuration {false}
 
EofState m_atEof {kEofStateNone}
 
bool m_exitAfterDecoded {false}
 
bool m_transcoding {false}
 
bool m_hasFullPositionMap {false}
 
bool m_recordingHasPositionMap {false}
 
bool m_posmapStarted {false}
 
MarkTypes m_positionMapType {MARK_UNSET}
 
QMutex m_positionMapLock {QMutex::Recursive}
 
vector< PosMapEntrym_positionMap
 
frm_pos_map_t m_frameToDurMap
 
frm_pos_map_t m_durToFrameMap
 
bool m_dontSyncPositionMap {false}
 
QDateTime m_lastPositionMapUpdate
 
uint64_t m_seekSnap {UINT64_MAX}
 
bool m_livetv {false}
 
bool m_watchingRecording {false}
 
bool m_hasKeyFrameAdjustTable {false}
 
bool m_getRawFrames {false}
 
bool m_getRawVideo {false}
 
bool m_errored {false}
 
bool m_waitingForChange {false}
 
long long m_readAdjust {0}
 
bool m_justAfterChange {false}
 
int m_videoRotation {0}
 
bool m_decodeAllSubtitles {false}
 
int m_currentTrack [kTrackTypeCount] {}
 
sinfo_vec_t m_tracks [kTrackTypeCount]
 
StreamInfo m_wantedTrack [kTrackTypeCount]
 
StreamInfo m_selectedTrack [(uint) kTrackTypeCount]
 
vector< int > m_languagePreference
 language preferences for auto-selection of streams More...
 
MythCodecContextm_mythCodecCtx {nullptr}
 
VideoDisplayProfile m_videoDisplayProfile
 

Detailed Description

Definition at line 9 of file dummydecoder.h.

Constructor & Destructor Documentation

◆ DummyDecoder()

DummyDecoder::DummyDecoder ( MythPlayer parent,
const ProgramInfo pginfo 
)
inline

Definition at line 12 of file dummydecoder.h.

◆ ~DummyDecoder()

DummyDecoder::~DummyDecoder ( )
overridedefault

Member Function Documentation

◆ OpenFile()

int DummyDecoder::OpenFile ( RingBuffer ,
bool  ,
char *  ,
int   
)
inlineoverride

Definition at line 17 of file dummydecoder.h.

◆ GetFrame()

bool DummyDecoder::GetFrame ( DecodeType  Type,
bool Retry 
)
inlineoverridevirtual

Demux, preprocess and possibly decode a frame of video/audio.

Implements DecoderBase.

Definition at line 19 of file dummydecoder.h.

◆ IsLastFrameKey()

bool DummyDecoder::IsLastFrameKey ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 21 of file dummydecoder.h.

◆ WriteStoredData()

void DummyDecoder::WriteStoredData ( RingBuffer ,
bool  ,
long   
)
inlineoverridevirtual

Implements DecoderBase.

Definition at line 22 of file dummydecoder.h.

◆ UpdateStoredFrameNum()

long DummyDecoder::UpdateStoredFrameNum ( long  )
inlineoverridevirtual

Implements DecoderBase.

Definition at line 23 of file dummydecoder.h.

◆ GetCodecDecoderName()

QString DummyDecoder::GetCodecDecoderName ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 24 of file dummydecoder.h.

◆ GetVideoCodecID()

MythCodecID DummyDecoder::GetVideoCodecID ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 25 of file dummydecoder.h.

◆ SyncPositionMap()

bool DummyDecoder::SyncPositionMap ( void  )
inlineoverridevirtual

Updates the position map used for skipping frames.

There are different sources for position maps, depending on where we are getting the stream from.

positionmap sources: live tv:

  1. remote encoder
  2. stream parsing decide keyframedist based on samples from remote encoder

watching recording:

  1. initial fill from db
  2. incremental from remote encoder, until it finishes recording
  3. then db again (which should be the final time)
  4. stream parsing decide keyframedist based on which table in db

watching prerecorded:

  1. initial fill from db is all that's needed

Reimplemented from DecoderBase.

Definition at line 26 of file dummydecoder.h.


The documentation for this class was generated from the following file: