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 (MythMediaBuffer *, bool, TestBufferVec &) override
 
bool GetFrame (DecodeType, bool &) override
 Demux, preprocess and possibly decode a frame of video/audio. More...
 
bool IsLastFrameKey (void) const override
 
void WriteStoredData (MythMediaBuffer *, bool, std::chrono::milliseconds) 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)
 
virtual ~DecoderBase ()
 
void SetRenderFormats (const VideoFrameTypes *RenderFormats)
 
virtual void Reset (bool reset_video_data, bool seek_reset, bool reset_file)
 
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< std::chrono::seconds > &)
 
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)
 
std::chrono::milliseconds TranslatePositionFrameToMs (long long position, float fallback_framerate, const frm_dir_map_t &cutlist)
 
uint64_t TranslatePositionMsToFrame (std::chrono::milliseconds dur_ms, float fallback_framerate, const frm_dir_map_t &cutlist)
 
float GetVideoAspect (void) const
 
virtual std::chrono::milliseconds NormalizeVideoTimecode (std::chrono::milliseconds 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 DecodeAll)
 
virtual QStringList GetTracks (uint Type)
 
virtual uint GetTrackCount (uint Type)
 
virtual int GetTrackLanguageIndex (uint Type, uint TrackNo)
 
virtual QString GetTrackDesc (uint Type, uint TrackNo)
 
virtual int SetTrack (uint Type, int TrackNo)
 
int GetTrack (uint Type)
 
StreamInfo GetTrackInfo (uint Type, uint TrackNo)
 
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)
 
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) const
 
MythCodecContextGetMythCodecContext (void)
 

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)
 
static AVPixelFormat GetBestVideoFormat (AVPixelFormat *Formats, const VideoFrameTypes *RenderFormats)
 Find a suitable frame format that is mutually acceptable to the decoder and render device. More...
 
- Protected Member Functions inherited from DecoderBase
int BestTrack (uint Type, bool forcedPreferred, int preferredLanguage=0)
 Determine the best track according to weights. More...
 
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}
 
MythMediaBufferm_ringBuffer {nullptr}
 
double m_fps {29.97}
 
int m_fpsMultiplier {1}
 
int m_fpsSkip {0}
 
uint m_bitrate {4000}
 
int m_currentWidth {640}
 
int m_currentHeight {480}
 
float m_currentAspect {1.33333F}
 
long long m_framesPlayed {0}
 
long long m_framesRead {0}
 
uint64_t m_frameCounter {0}
 
AVRational m_totalDuration
 
int m_keyframeDist {-1}
 
long long m_lastKey {0}
 
long long m_indexOffset {0}
 
MythAVCopy m_copyFrame
 
bool m_nextDecodedFrameIsKeyFrame { false }
 
EofState m_atEof {kEofStateNone}
 
bool m_trackTotalDuration {false}
 
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}
 
QRecursiveMutex m_positionMapLock
 
std::vector< PosMapEntrym_positionMap
 
frm_pos_map_t m_frameToDurMap
 
frm_pos_map_t m_durToFrameMap
 
QDateTime m_lastPositionMapUpdate
 
uint64_t m_seekSnap {UINT64_MAX}
 
bool m_dontSyncPositionMap {false}
 
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}
 
bool m_justAfterChange {false}
 
long long m_readAdjust {0}
 
int m_videoRotation {0}
 
uint m_stereo3D {0}
 
QRecursiveMutex m_trackLock
 
bool m_decodeAllSubtitles { false }
 
std::array< int, kTrackTypeCountm_currentTrack {}
 
std::array< sinfo_vec_t, kTrackTypeCountm_tracks
 
std::array< StreamInfo, kTrackTypeCountm_wantedTrack
 
std::array< StreamInfo, kTrackTypeCountm_selectedTrack
 
std::array< StreamInfo, kTrackTypeCountm_selectedForcedTrack
 
std::vector< int > m_languagePreference
 language preferences for auto-selection of streams More...
 
MythCodecContextm_mythCodecCtx { nullptr }
 
MythVideoProfile m_videoDisplayProfile
 
const VideoFrameTypesm_renderFormats { &MythVideoFrame::kDefaultRenderFormats }
 

Detailed Description

Definition at line 10 of file dummydecoder.h.

Constructor & Destructor Documentation

◆ DummyDecoder()

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

Definition at line 13 of file dummydecoder.h.

◆ ~DummyDecoder()

DummyDecoder::~DummyDecoder ( )
overridedefault

Member Function Documentation

◆ OpenFile()

int DummyDecoder::OpenFile ( MythMediaBuffer ,
bool  ,
TestBufferVec  
)
inlineoverridevirtual

Implements DecoderBase.

Definition at line 18 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 20 of file dummydecoder.h.

◆ IsLastFrameKey()

bool DummyDecoder::IsLastFrameKey ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 22 of file dummydecoder.h.

◆ WriteStoredData()

void DummyDecoder::WriteStoredData ( MythMediaBuffer ,
bool  ,
std::chrono::milliseconds   
)
inlineoverridevirtual

Implements DecoderBase.

Definition at line 23 of file dummydecoder.h.

◆ UpdateStoredFrameNum()

long DummyDecoder::UpdateStoredFrameNum ( long  )
inlineoverridevirtual

Implements DecoderBase.

Definition at line 25 of file dummydecoder.h.

◆ GetCodecDecoderName()

QString DummyDecoder::GetCodecDecoderName ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 26 of file dummydecoder.h.

◆ GetVideoCodecID()

MythCodecID DummyDecoder::GetVideoCodecID ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 27 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 28 of file dummydecoder.h.


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