MythTV  master
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
DecoderBase Class Referenceabstract

#include <decoderbase.h>

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

Classes

struct  posmapentry
 

Public Member Functions

 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)
 
virtual bool GetFrame (DecodeType)=0
 Demux, preprocess and possibly decode a frame of video/audio. More...
 
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 bool IsLastFrameKey (void) const =0
 
virtual bool IsCodecMPEG (void) const
 
virtual void WriteStoredData (RingBuffer *rb, bool storevid, long timecodeOffset)=0
 
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 long UpdateStoredFrameNum (long frame)=0
 
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 GetCodecDecoderName (void) const =0
 
virtual QString GetRawEncodingType (void)
 
virtual MythCodecID GetVideoCodecID (void) const =0
 
virtual void * GetVideoCodecPrivate (void)
 
virtual void ResetPosMap (void)
 
virtual bool SyncPositionMap (void)
 Updates the position map used for skipping frames. More...
 
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 &)
 
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)
 
bool GetVideoInverted (void) const
 
void TrackTotalDuration (bool track)
 
int GetfpsMultiplier (void)
 
MythCodecContextGetMythCodecContext (void)
 
VideoDisplayProfileGetVideoDisplayProfile (void)
 

Static Public Member Functions

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 Types

typedef struct DecoderBase::posmapentry PosMapEntry
 

Protected Member Functions

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

MythPlayerm_parent {nullptr}
 
ProgramInfom_playbackinfo {nullptr}
 
AudioPlayerm_audio {nullptr}
 
RingBufferringBuffer {nullptr}
 
int m_current_width {640}
 
int m_current_height {480}
 
float m_current_aspect {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}
 
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}
 
bool m_video_inverted {false}
 
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 120 of file decoderbase.h.

Member Typedef Documentation

◆ PosMapEntry

Constructor & Destructor Documentation

◆ DecoderBase() [1/2]

DecoderBase::DecoderBase ( MythPlayer parent,
const ProgramInfo pginfo 
)

Definition at line 18 of file decoderbase.cpp.

◆ DecoderBase() [2/2]

DecoderBase::DecoderBase ( const DecoderBase rhs)

◆ ~DecoderBase()

DecoderBase::~DecoderBase ( )
virtual

Definition at line 34 of file decoderbase.cpp.

Member Function Documentation

◆ Reset()

void DecoderBase::Reset ( bool  reset_video_data,
bool  seek_reset,
bool  reset_file 
)
virtual

Reimplemented in AvFormatDecoder, AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 45 of file decoderbase.cpp.

Referenced by AvFormatDecoder::Reset(), and MythPlayer::ResetPlaying().

◆ OpenFile()

virtual int DecoderBase::OpenFile ( RingBuffer rbuffer,
bool  novideo,
char  testbuf[kDecoderProbeBufferSize],
int  testbufsize = kDecoderProbeBufferSize 
)
pure virtual

Implemented in AvFormatDecoder, and NuppelDecoder.

Referenced by MythPlayer::OpenFile().

◆ SetEofState()

virtual void DecoderBase::SetEofState ( EofState  eof)
inlinevirtual

Definition at line 133 of file decoderbase.h.

Referenced by Reset(), and MythPlayer::SetEof().

◆ SetEof()

virtual void DecoderBase::SetEof ( bool  eof)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 134 of file decoderbase.h.

Referenced by NuppelDecoder::GetFrame(), and AvFormatDecoder::SetEof().

◆ GetEof()

EofState DecoderBase::GetEof ( void  )
inline

Definition at line 137 of file decoderbase.h.

Referenced by MythPlayer::GetEof(), and MythPlayer::VideoLoop().

◆ SetSeekSnap()

void DecoderBase::SetSeekSnap ( uint64_t  snap)
inline

◆ GetSeekSnap()

uint64_t DecoderBase::GetSeekSnap ( void  ) const
inline

Definition at line 140 of file decoderbase.h.

Referenced by AvFormatDecoder::DoFastForward(), and AvFormatDecoder::SeekReset().

◆ SetLiveTVMode()

void DecoderBase::SetLiveTVMode ( bool  live)
inline

Definition at line 141 of file decoderbase.h.

Referenced by MythPlayer::OpenFile().

◆ SetProgramInfo()

void DecoderBase::SetProgramInfo ( const ProgramInfo pginfo)

◆ SetDisablePassThrough()

virtual void DecoderBase::SetDisablePassThrough ( bool  disable)
inlinevirtual

Disables AC3/DTS pass through.

Reimplemented in AvFormatDecoder.

Definition at line 147 of file decoderbase.h.

Referenced by MythPlayer::SetDisablePassThrough().

◆ ForceSetupAudioStream()

virtual void DecoderBase::ForceSetupAudioStream ( void  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 149 of file decoderbase.h.

Referenced by MythPlayer::ForceSetupAudioStream().

◆ SetWatchingRecording()

void DecoderBase::SetWatchingRecording ( bool  mode)
virtual

Definition at line 79 of file decoderbase.cpp.

Referenced by MythPlayer::OpenFile(), and MythPlayer::SetWatchingRecording().

◆ GetFrame()

virtual bool DecoderBase::GetFrame ( DecodeType  )
pure virtual

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

Implemented in AvFormatDecoder, NuppelDecoder, AvFormatDecoderDVD, and DummyDecoder.

Referenced by MythPlayer::DecoderGetFrame(), MythPlayer::DecoderGetFrameFFREW(), DoFastForward(), and MythPlayer::TranscodeGetNextFrame().

◆ GetPlayer()

MythPlayer* DecoderBase::GetPlayer ( )
inline

◆ GetNumChapters()

virtual int DecoderBase::GetNumChapters ( void  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 156 of file decoderbase.h.

Referenced by MythPlayer::GetNumChapters().

◆ GetCurrentChapter()

virtual int DecoderBase::GetCurrentChapter ( long long  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 157 of file decoderbase.h.

Referenced by MythPlayer::GetCurrentChapter().

◆ GetChapterTimes()

virtual void DecoderBase::GetChapterTimes ( QList< long long > &  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 158 of file decoderbase.h.

Referenced by MythPlayer::GetChapterTimes().

◆ GetChapter()

virtual long long DecoderBase::GetChapter ( int  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 159 of file decoderbase.h.

Referenced by MythPlayer::GetChapter().

◆ DoRewind()

bool DecoderBase::DoRewind ( long long  desiredFrame,
bool  discardFrames = true 
)
virtual

◆ DoFastForward()

bool DecoderBase::DoFastForward ( long long  desiredFrame,
bool  discardFrames = true 
)
virtual

Skips ahead or rewinds to desiredFrame.

If discardFrames is true and cached frames are released and playback continues at the desiredFrame, if it is not any interviening frames between the last frame already in the buffer and the desiredFrame are released, but none of the frames decoded at the time this is called are released.

Reimplemented in AvFormatDecoder.

Definition at line 706 of file decoderbase.cpp.

Referenced by MythPlayer::DecoderGetFrameFFREW(), MythPlayer::DecoderLoop(), and AvFormatDecoder::DoFastForward().

◆ SetIdrOnlyKeyframes()

virtual void DecoderBase::SetIdrOnlyKeyframes ( bool  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 162 of file decoderbase.h.

◆ TranslatePositionAbsToRel()

uint64_t DecoderBase::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

◆ TranslatePositionRelToAbs()

uint64_t DecoderBase::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

◆ TranslatePosition()

uint64_t DecoderBase::TranslatePosition ( const frm_pos_map_t map,
long long  key,
float  fallback_ratio 
)
static

◆ TranslatePositionFrameToMs()

uint64_t DecoderBase::TranslatePositionFrameToMs ( long long  position,
float  fallback_framerate,
const frm_dir_map_t cutlist 
)

Definition at line 1257 of file decoderbase.cpp.

Referenced by DeleteMap::TranslatePositionFrameToMs().

◆ TranslatePositionMsToFrame()

uint64_t DecoderBase::TranslatePositionMsToFrame ( uint64_t  dur_ms,
float  fallback_framerate,
const frm_dir_map_t cutlist 
)

Definition at line 1285 of file decoderbase.cpp.

Referenced by DeleteMap::TranslatePositionMsToFrame().

◆ GetVideoAspect()

float DecoderBase::GetVideoAspect ( void  ) const
inline

Definition at line 184 of file decoderbase.h.

Referenced by Transcode::TranscodeFile().

◆ NormalizeVideoTimecode()

virtual int64_t DecoderBase::NormalizeVideoTimecode ( int64_t  timecode)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 186 of file decoderbase.h.

Referenced by SubtitleScreen::DisplayTextSubtitles().

◆ IsLastFrameKey()

virtual bool DecoderBase::IsLastFrameKey ( void  ) const
pure virtual

◆ IsCodecMPEG()

virtual bool DecoderBase::IsCodecMPEG ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 189 of file decoderbase.h.

◆ WriteStoredData()

virtual void DecoderBase::WriteStoredData ( RingBuffer rb,
bool  storevid,
long  timecodeOffset 
)
pure virtual

◆ ClearStoredData()

virtual void DecoderBase::ClearStoredData ( void  )
inlinevirtual

Reimplemented in NuppelDecoder.

Definition at line 192 of file decoderbase.h.

Referenced by MythPlayer::TranscodeGetNextFrame().

◆ SetRawAudioState()

virtual void DecoderBase::SetRawAudioState ( bool  state)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 193 of file decoderbase.h.

Referenced by MythPlayer::InitForTranscode().

◆ GetRawAudioState()

virtual bool DecoderBase::GetRawAudioState ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 194 of file decoderbase.h.

Referenced by MythPlayer::GetRawAudioState().

◆ SetRawVideoState()

virtual void DecoderBase::SetRawVideoState ( bool  state)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 195 of file decoderbase.h.

Referenced by MythPlayer::InitForTranscode().

◆ GetRawVideoState()

virtual bool DecoderBase::GetRawVideoState ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 196 of file decoderbase.h.

Referenced by MythPlayer::WriteStoredData().

◆ UpdateStoredFrameNum()

virtual long DecoderBase::UpdateStoredFrameNum ( long  frame)
pure virtual

◆ GetFPS()

virtual double DecoderBase::GetFPS ( void  ) const
inlinevirtual

◆ GetRawBitrate()

uint DecoderBase::GetRawBitrate ( void  ) const
inline

Returns the estimated bitrate if the video were played at normal speed.

Definition at line 202 of file decoderbase.h.

Referenced by NuppelDecoder::GetFrame(), MythPlayer::JumpToProgram(), MythPlayer::JumpToStream(), NuppelDecoder::OpenFile(), and MythPlayer::SwitchToProgram().

◆ UpdateFramesPlayed()

void DecoderBase::UpdateFramesPlayed ( void  )
virtual

◆ GetFramesRead()

long long DecoderBase::GetFramesRead ( void  ) const
inline

◆ GetFramesPlayed()

long long DecoderBase::GetFramesPlayed ( void  ) const
inline

Definition at line 206 of file decoderbase.h.

Referenced by MythPlayer::DecoderGetFrameREW().

◆ SetFramesPlayed()

void DecoderBase::SetFramesPlayed ( long long  newValue)
inline

Definition at line 207 of file decoderbase.h.

Referenced by MythPlayer::AVSync2().

◆ GetCodecDecoderName()

virtual QString DecoderBase::GetCodecDecoderName ( void  ) const
pure virtual

◆ GetRawEncodingType()

virtual QString DecoderBase::GetRawEncodingType ( void  )
inlinevirtual

Reimplemented in AvFormatDecoder, and NuppelDecoder.

Definition at line 210 of file decoderbase.h.

Referenced by MythPlayer::GetCodecDescription().

◆ GetVideoCodecID()

virtual MythCodecID DecoderBase::GetVideoCodecID ( void  ) const
pure virtual

◆ GetVideoCodecPrivate()

virtual void* DecoderBase::GetVideoCodecPrivate ( void  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 212 of file decoderbase.h.

Referenced by MythPlayer::InitVideo(), and MythPlayer::ReinitVideo().

◆ ResetPosMap()

void DecoderBase::ResetPosMap ( void  )
virtual

◆ SyncPositionMap()

bool DecoderBase::SyncPositionMap ( void  )
virtual

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 in DummyDecoder.

Definition at line 320 of file decoderbase.cpp.

Referenced by ConditionallyUpdatePosMap(), MythPlayer::DecoderLoop(), DoFastForward(), AvFormatDecoder::HandleGopStart(), NuppelDecoder::OpenFile(), AvFormatDecoder::OpenFile(), AvFormatDecoderBD::Reset(), AvFormatDecoderDVD::Reset(), SetWatchingRecording(), AvFormatDecoderBD::StreamChangeCheck(), AvFormatDecoderDVD::StreamChangeCheck(), and TranslatePositionFrameToMs().

◆ PosMapFromDb()

bool DecoderBase::PosMapFromDb ( void  )
virtual

Definition at line 92 of file decoderbase.cpp.

Referenced by SyncPositionMap().

◆ PosMapFromEnc()

bool DecoderBase::PosMapFromEnc ( void  )
virtual

Queries encoder for position map data that has not been committed to the DB yet.

PosMapFromDb(void) must be called first in order to set positionMapType and keyframedist correctly.

Definition at line 221 of file decoderbase.cpp.

Referenced by SyncPositionMap().

◆ FindPosition()

bool DecoderBase::FindPosition ( long long  desired_value,
bool  search_adjusted,
int &  lower_bound,
int &  upper_bound 
)
virtual

Definition at line 418 of file decoderbase.cpp.

Referenced by DoFastForwardSeek(), and DoRewindSeek().

◆ SavePositionMapDelta()

uint64_t DecoderBase::SavePositionMapDelta ( long long  first_frame,
long long  last_frame 
)

Definition at line 498 of file decoderbase.cpp.

◆ SeekReset()

void DecoderBase::SeekReset ( long long  newkey,
uint  skipFrames,
bool  doFlush,
bool  discardFrames 
)
virtual

◆ SetTranscoding()

void DecoderBase::SetTranscoding ( bool  value)
inline

Definition at line 226 of file decoderbase.h.

Referenced by MythPlayer::OpenFile(), and MythPlayer::SetTranscoding().

◆ IsErrored()

bool DecoderBase::IsErrored ( ) const
inline

Definition at line 228 of file decoderbase.h.

Referenced by MythPlayer::OpenFile(), and MythPlayer::ResetPlaying().

◆ HasPositionMap()

bool DecoderBase::HasPositionMap ( void  ) const
inline

Definition at line 230 of file decoderbase.h.

Referenced by MythPlayer::AVSync().

◆ SetWaitForChange()

void DecoderBase::SetWaitForChange ( void  )

Definition at line 891 of file decoderbase.cpp.

Referenced by MythPlayer::SwitchToProgram().

◆ GetWaitForChange()

bool DecoderBase::GetWaitForChange ( void  ) const

Definition at line 896 of file decoderbase.cpp.

Referenced by MythPlayer::EventLoop().

◆ SetReadAdjust()

void DecoderBase::SetReadAdjust ( long long  adjust)

Definition at line 886 of file decoderbase.cpp.

Referenced by MythPlayer::SwitchToProgram().

◆ SetDecodeAllSubtitles()

void DecoderBase::SetDecodeAllSubtitles ( bool  val)
inline

Definition at line 237 of file decoderbase.h.

Referenced by MythCCExtractorPlayer::run().

◆ GetTracks()

QStringList DecoderBase::GetTracks ( uint  type) const
virtual

Definition at line 901 of file decoderbase.cpp.

Referenced by MythPlayer::GetTracks().

◆ GetTrackCount()

virtual uint DecoderBase::GetTrackCount ( uint  type) const
inlinevirtual

◆ GetTrackLanguageIndex()

int DecoderBase::GetTrackLanguageIndex ( uint  type,
uint  trackNo 
) const
virtual

Definition at line 913 of file decoderbase.cpp.

Referenced by MythPlayer::EnableCaptions().

◆ GetTrackDesc()

QString DecoderBase::GetTrackDesc ( uint  type,
uint  trackNo 
) const
virtual

◆ SetTrack()

int DecoderBase::SetTrack ( uint  type,
int  trackNo 
)
virtual

Reimplemented in AvFormatDecoder.

Definition at line 940 of file decoderbase.cpp.

Referenced by AvFormatDecoder::SetTrack(), MythPlayer::SetTrack(), and Transcode::TranscodeFile().

◆ GetTrack()

int DecoderBase::GetTrack ( uint  type) const
inline

Definition at line 245 of file decoderbase.h.

Referenced by SubtitleScreen::DisplayAVSubtitles(), and MythPlayer::GetTrack().

◆ GetTrackInfo()

StreamInfo DecoderBase::GetTrackInfo ( uint  type,
uint  trackNo 
) const

◆ IncrementTrack()

int DecoderBase::IncrementTrack ( uint  type)
inline

Definition at line 365 of file decoderbase.h.

◆ DecrementTrack()

int DecoderBase::DecrementTrack ( uint  type)
inline

Definition at line 374 of file decoderbase.h.

◆ ChangeTrack()

int DecoderBase::ChangeTrack ( uint  type,
int  dir 
)
inline

Definition at line 383 of file decoderbase.h.

Referenced by MythPlayer::ChangeTrack().

◆ InsertTrack()

bool DecoderBase::InsertTrack ( uint  type,
const StreamInfo info 
)
virtual

Definition at line 975 of file decoderbase.cpp.

Referenced by CC708Reader::DefineWindow().

◆ NextTrack()

int DecoderBase::NextTrack ( uint  type)
inline

Definition at line 403 of file decoderbase.h.

Referenced by MythPlayer::ChangeCaptionTrack().

◆ GetTeletextDecoderType()

virtual int DecoderBase::GetTeletextDecoderType ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 253 of file decoderbase.h.

◆ GetXDS()

virtual QString DecoderBase::GetXDS ( const QString &  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 255 of file decoderbase.h.

Referenced by MythPlayer::GetXDS().

◆ GetSubHeader()

virtual QByteArray DecoderBase::GetSubHeader ( uint  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 256 of file decoderbase.h.

Referenced by SubtitleScreen::InitialiseAssTrack().

◆ GetAttachmentData()

virtual void DecoderBase::GetAttachmentData ( uint  ,
QByteArray &  ,
QByteArray &   
)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 257 of file decoderbase.h.

Referenced by SubtitleScreen::LoadAssFonts().

◆ SetAudioByComponentTag()

virtual bool DecoderBase::SetAudioByComponentTag ( int  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 261 of file decoderbase.h.

Referenced by MythPlayer::SetAudioByComponentTag().

◆ SetVideoByComponentTag()

virtual bool DecoderBase::SetVideoByComponentTag ( int  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 262 of file decoderbase.h.

Referenced by MythPlayer::SetVideoByComponentTag().

◆ SaveTotalDuration()

void DecoderBase::SaveTotalDuration ( void  )

Definition at line 1189 of file decoderbase.cpp.

Referenced by MythPlayer::SaveTotalDuration().

◆ ResetTotalDuration()

void DecoderBase::ResetTotalDuration ( void  )
inline

Definition at line 265 of file decoderbase.h.

Referenced by MythPlayer::ResetTotalDuration().

◆ SaveTotalFrames()

void DecoderBase::SaveTotalFrames ( void  )

Definition at line 1197 of file decoderbase.cpp.

Referenced by MythPlayer::SaveTotalFrames().

◆ GetVideoInverted()

bool DecoderBase::GetVideoInverted ( void  ) const
inline

Definition at line 267 of file decoderbase.h.

Referenced by MythPlayer::InitFilters(), and MythPlayer::InitVideo().

◆ TrackTotalDuration()

void DecoderBase::TrackTotalDuration ( bool  track)
inline

Definition at line 268 of file decoderbase.h.

◆ GetfpsMultiplier()

int DecoderBase::GetfpsMultiplier ( void  )
inline

◆ GetMythCodecContext()

MythCodecContext* DecoderBase::GetMythCodecContext ( void  )
inline

◆ GetVideoDisplayProfile()

VideoDisplayProfile* DecoderBase::GetVideoDisplayProfile ( void  )
inline

◆ AutoSelectTrack()

int DecoderBase::AutoSelectTrack ( uint  type)
protectedvirtual

Select best track.

In case there's only one track available, always choose it.

If there is a user selected track we try to find it.

If we can't find the user selected track we try to picked according to the ISO639Language[0..] settings.

In case there are no ISOLanguage[0..] settings, or no preferred language is found, the first found track stream is chosen

Returns
track if a track was selected, -1 otherwise

Reimplemented in AvFormatDecoder.

Definition at line 1006 of file decoderbase.cpp.

Referenced by AvFormatDecoder::AutoSelectTrack().

◆ AutoSelectTracks()

void DecoderBase::AutoSelectTracks ( void  )
inlineprotected

Definition at line 391 of file decoderbase.h.

Referenced by AvFormatDecoder::GetFrame(), and AvFormatDecoder::OpenFile().

◆ ResetTracks()

void DecoderBase::ResetTracks ( void  )
inlineprotected

Definition at line 397 of file decoderbase.h.

Referenced by DecoderBase(), and AvFormatDecoder::ScanStreams().

◆ FileChanged()

void DecoderBase::FileChanged ( void  )
protected

Definition at line 873 of file decoderbase.cpp.

Referenced by NuppelDecoder::GetFrame(), and AvFormatDecoder::GetFrame().

◆ DoRewindSeek()

bool DecoderBase::DoRewindSeek ( long long  desiredFrame)
protectedvirtual

Reimplemented in AvFormatDecoder, AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 586 of file decoderbase.cpp.

Referenced by DoRewind(), and AvFormatDecoder::DoRewindSeek().

◆ DoFastForwardSeek()

void DecoderBase::DoFastForwardSeek ( long long  desiredFrame,
bool needflush 
)
protectedvirtual

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.

The seek is not made if framesPlayed is greater than the keyframe this would jump too. This means that frame-by-frame seeking after a keyframe must be done elsewhere.

If the seek is made the needflush parameter is set.

Parameters
desiredFrameframe we are attempting to seek to.
needflushset to true if a seek is made.

Reimplemented in AvFormatDecoder, AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 825 of file decoderbase.cpp.

Referenced by DoFastForward(), and AvFormatDecoder::DoFastForwardSeek().

◆ ConditionallyUpdatePosMap()

long long DecoderBase::ConditionallyUpdatePosMap ( long long  desiredFrame)
protected

Definition at line 663 of file decoderbase.cpp.

Referenced by DoFastForward(), and DoRewindSeek().

◆ GetLastFrameInPosMap()

long long DecoderBase::GetLastFrameInPosMap ( void  ) const
protected

Definition at line 652 of file decoderbase.cpp.

Referenced by ConditionallyUpdatePosMap(), and DoFastForward().

◆ GetPositionMapSize()

unsigned long DecoderBase::GetPositionMapSize ( void  ) const
protected

Definition at line 292 of file decoderbase.cpp.

Referenced by DoRewindSeek(), and SyncPositionMap().

◆ GetKey()

long long DecoderBase::GetKey ( const PosMapEntry entry) const
protected

Member Data Documentation

◆ m_parent

MythPlayer* DecoderBase::m_parent {nullptr}
protected

◆ m_playbackinfo

ProgramInfo* DecoderBase::m_playbackinfo {nullptr}
protected

◆ m_audio

AudioPlayer* DecoderBase::m_audio {nullptr}
protected

◆ ringBuffer

RingBuffer* DecoderBase::ringBuffer {nullptr}
protected

Definition at line 298 of file decoderbase.h.

Referenced by AvFormatDecoder::AutoSelectTrack(), AvFormatDecoderBD::BDFindPosition(), AvFormatDecoderDVD::CheckContext(), DoFastForward(), AvFormatDecoderBD::DoFastForwardSeek(), AvFormatDecoderDVD::DoFastForwardSeek(), DoFastForwardSeek(), DoRewind(), AvFormatDecoderBD::DoRewindSeek(), AvFormatDecoderDVD::DoRewindSeek(), DoRewindSeek(), AvFormatDecoderDVD::DVDFindPosition(), AvFormatDecoderBD::GetAudioLanguage(), AvFormatDecoderDVD::GetAudioLanguage(), AvFormatDecoderDVD::GetAudioTrackType(), NuppelDecoder::GetFrame(), AvFormatDecoder::GetFrame(), GetKey(), AvFormatDecoder::getRingBuf(), AvFormatDecoderBD::GetSubtitleLanguage(), AvFormatDecoder::GetTrackDesc(), AvFormatDecoder::HandleGopStart(), AvFormatDecoder::InitByteContext(), AvFormatDecoder::InitVideoCodec(), AvFormatDecoderBD::IsValidStream(), AvFormatDecoder::MpegPreProcessPkt(), NuppelDecoder::OpenFile(), AvFormatDecoder::OpenFile(), PosMapFromDb(), PosMapFromEnc(), AvFormatDecoderDVD::PostProcessTracks(), AvFormatDecoder::ProcessAudioPacket(), AvFormatDecoderDVD::ProcessDataPacket(), AvFormatDecoder::ProcessSubtitlePacket(), AvFormatDecoder::ProcessVideoFrame(), AvFormatDecoderDVD::ProcessVideoPacket(), AvFormatDecoder::ProcessVideoPacket(), NuppelDecoder::ReadFileheader(), NuppelDecoder::ReadFrameheader(), AvFormatDecoderBD::ReadPacket(), AvFormatDecoderDVD::ReadPacket(), AvFormatDecoder::ScanStreams(), AvFormatDecoder::SeekReset(), AvFormatDecoderBD::StreamChangeCheck(), AvFormatDecoderDVD::StreamChangeCheck(), SyncPositionMap(), AvFormatDecoderBD::UpdateFramesPlayed(), and AvFormatDecoderDVD::UpdateFramesPlayed().

◆ m_current_width

int DecoderBase::m_current_width {640}
protected

◆ m_current_height

int DecoderBase::m_current_height {480}
protected

◆ m_current_aspect

float DecoderBase::m_current_aspect {1.33333f}
protected

◆ m_fps

double DecoderBase::m_fps {29.97}
protected

Definition at line 303 of file decoderbase.h.

Referenced by PosMapFromDb(), and SyncPositionMap().

◆ m_fpsMultiplier

int DecoderBase::m_fpsMultiplier {1}
protected

Definition at line 304 of file decoderbase.h.

Referenced by AvFormatDecoder::ProcessVideoFrame().

◆ m_fpsSkip

int DecoderBase::m_fpsSkip {0}
protected

◆ m_bitrate

uint DecoderBase::m_bitrate {4000}
protected

◆ m_framesPlayed

long long DecoderBase::m_framesPlayed {0}
protected

◆ m_framesRead

long long DecoderBase::m_framesRead {0}
protected

◆ m_totalDuration

AVRational DecoderBase::m_totalDuration
protected

◆ m_lastKey

long long DecoderBase::m_lastKey {0}
protected

◆ m_keyframedist

int DecoderBase::m_keyframedist {-1}
protected

◆ m_indexOffset

long long DecoderBase::m_indexOffset {0}
protected

Definition at line 313 of file decoderbase.h.

Referenced by FindPosition(), GetKey(), PosMapFromDb(), and PosMapFromEnc().

◆ m_copyFrame

MythAVCopy DecoderBase::m_copyFrame
protected

Definition at line 314 of file decoderbase.h.

Referenced by NuppelDecoder::DecodeFrame().

◆ m_trackTotalDuration

bool DecoderBase::m_trackTotalDuration {false}
protected

◆ m_ateof

EofState DecoderBase::m_ateof {kEofStateNone}
protected

◆ m_exitafterdecoded

bool DecoderBase::m_exitafterdecoded {false}
protected

Definition at line 322 of file decoderbase.h.

Referenced by DoFastForward(), and AvFormatDecoder::PreProcessVideoPacket().

◆ m_transcoding

bool DecoderBase::m_transcoding {false}
protected

Definition at line 323 of file decoderbase.h.

Referenced by DoFastForward().

◆ m_hasFullPositionMap

bool DecoderBase::m_hasFullPositionMap {false}
protected

◆ m_recordingHasPositionMap

bool DecoderBase::m_recordingHasPositionMap {false}
protected

◆ m_posmapStarted

bool DecoderBase::m_posmapStarted {false}
protected

Definition at line 327 of file decoderbase.h.

Referenced by ResetPosMap(), SetWatchingRecording(), and SyncPositionMap().

◆ m_positionMapType

MarkTypes DecoderBase::m_positionMapType {MARK_UNSET}
protected

◆ m_positionMapLock

QMutex DecoderBase::m_positionMapLock {QMutex::Recursive}
mutableprotected

◆ m_positionMap

vector<PosMapEntry> DecoderBase::m_positionMap
protected

◆ m_frameToDurMap

frm_pos_map_t DecoderBase::m_frameToDurMap
protected

◆ m_durToFrameMap

frm_pos_map_t DecoderBase::m_durToFrameMap
protected

◆ m_dontSyncPositionMap

bool DecoderBase::m_dontSyncPositionMap {false}
protected

Definition at line 334 of file decoderbase.h.

Referenced by AvFormatDecoder::OpenFile(), Reset(), and SyncPositionMap().

◆ m_lastPositionMapUpdate

QDateTime DecoderBase::m_lastPositionMapUpdate
mutableprotected

Definition at line 335 of file decoderbase.h.

Referenced by SyncPositionMap(), and TranslatePositionFrameToMs().

◆ m_seeksnap

uint64_t DecoderBase::m_seeksnap {UINT64_MAX}
protected

Definition at line 337 of file decoderbase.h.

Referenced by DoFastForward(), DoFastForwardSeek(), DoRewind(), and DoRewindSeek().

◆ m_livetv

bool DecoderBase::m_livetv {false}
protected

◆ m_watchingrecording

bool DecoderBase::m_watchingrecording {false}
protected

◆ m_hasKeyFrameAdjustTable

bool DecoderBase::m_hasKeyFrameAdjustTable {false}
protected

Definition at line 341 of file decoderbase.h.

Referenced by DoFastForwardSeek(), DoRewindSeek(), GetKey(), and NuppelDecoder::OpenFile().

◆ m_getrawframes

bool DecoderBase::m_getrawframes {false}
protected

◆ m_getrawvideo

bool DecoderBase::m_getrawvideo {false}
protected

Definition at line 344 of file decoderbase.h.

Referenced by NuppelDecoder::GetFrame(), and NuppelDecoder::NuppelDecoder().

◆ m_errored

bool DecoderBase::m_errored {false}
protected

Definition at line 346 of file decoderbase.h.

Referenced by NuppelDecoder::NuppelDecoder().

◆ m_waitingForChange

bool DecoderBase::m_waitingForChange {false}
protected

◆ m_readAdjust

long long DecoderBase::m_readAdjust {0}
protected

◆ m_justAfterChange

bool DecoderBase::m_justAfterChange {false}
protected

Definition at line 350 of file decoderbase.h.

Referenced by FileChanged(), and AvFormatDecoder::PreProcessVideoPacket().

◆ m_video_inverted

bool DecoderBase::m_video_inverted {false}
protected

Definition at line 351 of file decoderbase.h.

Referenced by AvFormatDecoder::InitVideoCodec().

◆ m_decodeAllSubtitles

bool DecoderBase::m_decodeAllSubtitles {false}
protected

◆ m_currentTrack

int DecoderBase::m_currentTrack[kTrackTypeCount]
protected

◆ m_tracks

sinfo_vec_t DecoderBase::m_tracks[kTrackTypeCount]
protected

◆ m_wantedTrack

StreamInfo DecoderBase::m_wantedTrack[kTrackTypeCount]
protected

Definition at line 357 of file decoderbase.h.

Referenced by AvFormatDecoder::AutoSelectAudioTrack(), AutoSelectTrack(), and SetTrack().

◆ m_selectedTrack

StreamInfo DecoderBase::m_selectedTrack[(uint) kTrackTypeCount]
protected

◆ m_languagePreference

vector<int> DecoderBase::m_languagePreference
protected

language preferences for auto-selection of streams

Definition at line 360 of file decoderbase.h.

Referenced by AvFormatDecoder::AutoSelectAudioTrack(), and AutoSelectTrack().

◆ m_mythcodecctx

MythCodecContext* DecoderBase::m_mythcodecctx {nullptr}
protected

◆ m_videoDisplayProfile

VideoDisplayProfile DecoderBase::m_videoDisplayProfile
protected

Definition at line 362 of file decoderbase.h.

Referenced by AvFormatDecoder::ScanStreams().


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