MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
DecoderBase Class Reference

#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)
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)
void SetLowBuffers (bool low)
virtual void SetDisablePassThrough (bool disable)
 Disables AC3/DTS pass through.
virtual void SetWatchingRecording (bool mode)
virtual bool GetFrame (DecodeType)=0
 Demux, preprocess and possibly decode a frame of video/audio.
MythPlayerGetPlayer ()
virtual int GetNumChapters (void)
virtual int GetCurrentChapter (long long framesPlayed)
virtual void GetChapterTimes (QList< long long > &times)
virtual long long GetChapter (int chapter)
virtual bool DoRewind (long long desiredFrame, bool doflush=true)
virtual bool DoFastForward (long long desiredFrame, bool doflush=true)
 Skips ahead or rewinds to desiredFrame.
virtual void SetIdrOnlyKeyframes (bool value)
uint64_t TranslatePositionFrameToMs (uint64_t 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.
virtual void UpdateFramesPlayed (void)
long long GetFramesRead (void) const
long long GetFramesPlayed (void) const
virtual QString GetCodecDecoderName (void) const =0
virtual QString GetRawEncodingType (void)
virtual MythCodecID GetVideoCodecID (void) const =0
virtual voidGetVideoCodecPrivate (void)
virtual void ResetPosMap (void)
virtual bool SyncPositionMap (void)
 Updates the position map used for skipping frames.
virtual bool PosMapFromDb (void)
virtual bool PosMapFromEnc (void)
 Queries encoder for position map data that has not been committed to the DB yet.
virtual bool FindPosition (long long desired_value, bool search_adjusted, int &lower_bound, int &upper_bound)
uint64_t SavePositionMapDelta (uint64_t first_frame, uint64_t 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 trackNo) const
virtual void GetAttachmentData (uint trackNo, QByteArray &filename, QByteArray &data)
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)

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, uint64_t key, float fallback_ratio)

Protected Types

typedef struct
DecoderBase::posmapentry 
PosMapEntry

Protected Member Functions

virtual int AutoSelectTrack (uint type)
 Select best track.
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.
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
ProgramInfom_playbackinfo
AudioPlayerm_audio
RingBufferringBuffer
int current_width
int current_height
float current_aspect
double fps
uint bitrate
long long framesPlayed
long long framesRead
AVRational totalDuration
long long lastKey
int keyframedist
long long indexOffset
bool trackTotalDuration
EofState ateof
bool exitafterdecoded
bool transcoding
bool hasFullPositionMap
bool recordingHasPositionMap
bool posmapStarted
MarkTypes positionMapType
QMutex m_positionMapLock
vector< PosMapEntrym_positionMap
frm_pos_map_t m_frameToDurMap
frm_pos_map_t m_durToFrameMap
bool dontSyncPositionMap
QDateTime m_lastPositionMapUpdate
uint64_t seeksnap
bool livetv
bool watchingrecording
bool hasKeyFrameAdjustTable
bool lowbuffers
bool getrawframes
bool getrawvideo
bool errored
bool waitingForChange
long long readAdjust
bool justAfterChange
bool video_inverted
bool decodeAllSubtitles
int currentTrack [kTrackTypeCount]
sinfo_vec_t tracks [kTrackTypeCount]
StreamInfo wantedTrack [kTrackTypeCount]
StreamInfo selectedTrack [(uint) kTrackTypeCount]
vector< intlanguagePreference
 language preferences for auto-selection of streams

Detailed Description

Definition at line 121 of file decoderbase.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 22 of file decoderbase.cpp.

DecoderBase::~DecoderBase ( )
virtual

Definition at line 60 of file decoderbase.cpp.

Member Function Documentation

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

Reimplemented in AvFormatDecoder, AvFormatDecoderBD, and AvFormatDecoderDVD.

Definition at line 73 of file decoderbase.cpp.

Referenced by MythPlayer::ResetPlaying().

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().

virtual void DecoderBase::SetEofState ( EofState  eof)
inlinevirtual

Definition at line 133 of file decoderbase.h.

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

virtual void DecoderBase::SetEof ( bool  eof)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 134 of file decoderbase.h.

Referenced by NuppelDecoder::GetFrame().

EofState DecoderBase::GetEof ( void  )
inline

Definition at line 137 of file decoderbase.h.

Referenced by MythPlayer::GetEof().

void DecoderBase::SetSeekSnap ( uint64_t  snap)
inline
uint64_t DecoderBase::GetSeekSnap ( void  ) const
inline

Definition at line 140 of file decoderbase.h.

Referenced by AvFormatDecoder::DoFastForward().

void DecoderBase::SetLiveTVMode ( bool  live)
inline

Definition at line 141 of file decoderbase.h.

Referenced by MythPlayer::OpenFile().

void DecoderBase::SetProgramInfo ( const ProgramInfo pginfo)
void DecoderBase::SetLowBuffers ( bool  low)
inline
virtual void DecoderBase::SetDisablePassThrough ( bool  disable)
inlinevirtual

Disables AC3/DTS pass through.

Reimplemented in AvFormatDecoder.

Definition at line 148 of file decoderbase.h.

Referenced by MythPlayer::syncWithAudioStretch().

void DecoderBase::SetWatchingRecording ( bool  mode)
virtual

Definition at line 105 of file decoderbase.cpp.

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

virtual bool DecoderBase::GetFrame ( DecodeType  )
pure virtual

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

Implemented in AvFormatDecoder, NuppelDecoder, DummyDecoder, and AvFormatDecoderDVD.

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

MythPlayer* DecoderBase::GetPlayer ( )
inline
virtual int DecoderBase::GetNumChapters ( void  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 155 of file decoderbase.h.

Referenced by MythPlayer::GetNumChapters().

virtual int DecoderBase::GetCurrentChapter ( long long  framesPlayed)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 156 of file decoderbase.h.

Referenced by MythPlayer::GetCurrentChapter().

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

Reimplemented in AvFormatDecoder.

Definition at line 157 of file decoderbase.h.

Referenced by MythPlayer::GetChapterTimes().

virtual long long DecoderBase::GetChapter ( int  chapter)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 158 of file decoderbase.h.

Referenced by MythPlayer::GetChapter().

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

Reimplemented in AvFormatDecoder.

Definition at line 573 of file decoderbase.cpp.

Referenced by MythPlayer::DecoderGetFrameREW(), MythPlayer::DecoderLoop(), and DoFastForward().

bool DecoderBase::DoFastForward ( long long  desiredFrame,
bool  doflush = 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 724 of file decoderbase.cpp.

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

virtual void DecoderBase::SetIdrOnlyKeyframes ( bool  value)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 161 of file decoderbase.h.

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

Definition at line 1326 of file decoderbase.cpp.

Referenced by TranslatePositionFrameToMs().

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

Definition at line 1375 of file decoderbase.cpp.

Referenced by TranslatePositionMsToFrame().

uint64_t DecoderBase::TranslatePosition ( const frm_pos_map_t map,
uint64_t  key,
float  fallback_ratio 
)
static
uint64_t DecoderBase::TranslatePositionFrameToMs ( uint64_t  position,
float  fallback_framerate,
const frm_dir_map_t cutlist 
)

Definition at line 1274 of file decoderbase.cpp.

Referenced by DeleteMap::TranslatePositionFrameToMs().

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

Definition at line 1302 of file decoderbase.cpp.

Referenced by DeleteMap::TranslatePositionMsToFrame().

float DecoderBase::GetVideoAspect ( void  ) const
inline

Definition at line 183 of file decoderbase.h.

Referenced by Transcode::TranscodeFile().

virtual int64_t DecoderBase::NormalizeVideoTimecode ( int64_t  timecode)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 185 of file decoderbase.h.

Referenced by SubtitleScreen::DisplayTextSubtitles().

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

Reimplemented in AvFormatDecoder.

Definition at line 188 of file decoderbase.h.

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

Reimplemented in NuppelDecoder.

Definition at line 191 of file decoderbase.h.

Referenced by MythPlayer::TranscodeGetNextFrame().

virtual void DecoderBase::SetRawAudioState ( bool  state)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 192 of file decoderbase.h.

Referenced by MythPlayer::InitForTranscode().

virtual bool DecoderBase::GetRawAudioState ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 193 of file decoderbase.h.

Referenced by MythPlayer::GetRawAudioState().

virtual void DecoderBase::SetRawVideoState ( bool  state)
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 194 of file decoderbase.h.

Referenced by MythPlayer::InitForTranscode().

virtual bool DecoderBase::GetRawVideoState ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 195 of file decoderbase.h.

Referenced by MythPlayer::WriteStoredData().

virtual long DecoderBase::UpdateStoredFrameNum ( long  frame)
pure virtual
virtual double DecoderBase::GetFPS ( void  ) const
inlinevirtual
uint DecoderBase::GetRawBitrate ( void  ) const
inline

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

Definition at line 201 of file decoderbase.h.

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

void DecoderBase::UpdateFramesPlayed ( void  )
virtual
long long DecoderBase::GetFramesRead ( void  ) const
inline
long long DecoderBase::GetFramesPlayed ( void  ) const
inline

Definition at line 205 of file decoderbase.h.

Referenced by MythPlayer::DecoderGetFrameREW().

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

Reimplemented in AvFormatDecoder, and NuppelDecoder.

Definition at line 208 of file decoderbase.h.

Referenced by MythPlayer::GetCodecDescription().

virtual MythCodecID DecoderBase::GetVideoCodecID ( void  ) const
pure virtual
virtual void* DecoderBase::GetVideoCodecPrivate ( void  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 210 of file decoderbase.h.

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

void DecoderBase::ResetPosMap ( void  )
virtual
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 341 of file decoderbase.cpp.

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

bool DecoderBase::PosMapFromDb ( void  )
virtual

Definition at line 118 of file decoderbase.cpp.

Referenced by SyncPositionMap().

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 245 of file decoderbase.cpp.

Referenced by SyncPositionMap().

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

Definition at line 439 of file decoderbase.cpp.

Referenced by DoFastForwardSeek(), and DoRewindSeek().

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

Definition at line 519 of file decoderbase.cpp.

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

Reimplemented in AvFormatDecoder.

Definition at line 100 of file decoderbase.cpp.

Referenced by DoFastForward(), MythDVDPlayer::DoJumpChapter(), DoRewind(), and Reset().

void DecoderBase::SetTranscoding ( bool  value)
inline

Definition at line 224 of file decoderbase.h.

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

bool DecoderBase::IsErrored ( ) const
inline

Definition at line 226 of file decoderbase.h.

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

bool DecoderBase::HasPositionMap ( void  ) const
inline

Definition at line 228 of file decoderbase.h.

void DecoderBase::SetWaitForChange ( void  )

Definition at line 908 of file decoderbase.cpp.

Referenced by MythPlayer::SwitchToProgram().

bool DecoderBase::GetWaitForChange ( void  ) const

Definition at line 913 of file decoderbase.cpp.

Referenced by MythPlayer::EventLoop().

void DecoderBase::SetReadAdjust ( long long  adjust)

Definition at line 903 of file decoderbase.cpp.

Referenced by MythPlayer::SwitchToProgram().

void DecoderBase::SetDecodeAllSubtitles ( bool  val)
inline

Definition at line 235 of file decoderbase.h.

Referenced by MythCCExtractorPlayer::run().

QStringList DecoderBase::GetTracks ( uint  type) const
virtual

Definition at line 918 of file decoderbase.cpp.

Referenced by MythPlayer::GetTracks().

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

Definition at line 930 of file decoderbase.cpp.

Referenced by MythPlayer::EnableCaptions().

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

Reimplemented in AvFormatDecoder.

Definition at line 960 of file decoderbase.cpp.

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

int DecoderBase::GetTrack ( uint  type) const
inline

Definition at line 243 of file decoderbase.h.

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

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

Definition at line 980 of file decoderbase.cpp.

Referenced by MythPlayer::SetTrack(), and MythPlayer::VideoStart().

int DecoderBase::IncrementTrack ( uint  type)
inline

Definition at line 357 of file decoderbase.h.

int DecoderBase::DecrementTrack ( uint  type)
inline

Definition at line 366 of file decoderbase.h.

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

Definition at line 375 of file decoderbase.h.

Referenced by MythPlayer::ChangeTrack().

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

Definition at line 993 of file decoderbase.cpp.

Referenced by CC708Reader::DefineWindow().

int DecoderBase::NextTrack ( uint  type)
inline

Definition at line 395 of file decoderbase.h.

Referenced by MythPlayer::ChangeCaptionTrack().

virtual int DecoderBase::GetTeletextDecoderType ( void  ) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 251 of file decoderbase.h.

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

Reimplemented in AvFormatDecoder.

Definition at line 253 of file decoderbase.h.

Referenced by MythPlayer::GetXDS().

virtual QByteArray DecoderBase::GetSubHeader ( uint  trackNo) const
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 254 of file decoderbase.h.

Referenced by SubtitleScreen::InitialiseAssTrack().

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

Reimplemented in AvFormatDecoder.

Definition at line 255 of file decoderbase.h.

Referenced by SubtitleScreen::LoadAssFonts().

virtual bool DecoderBase::SetAudioByComponentTag ( int  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 259 of file decoderbase.h.

Referenced by MythPlayer::SetAudioByComponentTag().

virtual bool DecoderBase::SetVideoByComponentTag ( int  )
inlinevirtual

Reimplemented in AvFormatDecoder.

Definition at line 260 of file decoderbase.h.

Referenced by MythPlayer::SetVideoByComponentTag().

void DecoderBase::SaveTotalDuration ( void  )

Definition at line 1203 of file decoderbase.cpp.

Referenced by MythPlayer::SaveTotalDuration().

void DecoderBase::ResetTotalDuration ( void  )
inline

Definition at line 263 of file decoderbase.h.

Referenced by MythPlayer::ResetTotalDuration().

void DecoderBase::SaveTotalFrames ( void  )

Definition at line 1211 of file decoderbase.cpp.

Referenced by MythPlayer::SaveTotalFrames().

bool DecoderBase::GetVideoInverted ( void  ) const
inline

Definition at line 265 of file decoderbase.h.

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

void DecoderBase::TrackTotalDuration ( bool  track)
inline

Definition at line 266 of file decoderbase.h.

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 1024 of file decoderbase.cpp.

void DecoderBase::AutoSelectTracks ( void  )
inlineprotected

Definition at line 383 of file decoderbase.h.

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

void DecoderBase::ResetTracks ( void  )
inlineprotected

Definition at line 389 of file decoderbase.h.

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

void DecoderBase::FileChanged ( void  )
protected

Definition at line 890 of file decoderbase.cpp.

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

bool DecoderBase::DoRewindSeek ( long long  desiredFrame)
protectedvirtual

Reimplemented in AvFormatDecoder.

Definition at line 606 of file decoderbase.cpp.

Referenced by DoRewind().

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.

Definition at line 843 of file decoderbase.cpp.

Referenced by DoFastForward().

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

Definition at line 681 of file decoderbase.cpp.

Referenced by DoFastForward(), and DoRewindSeek().

long long DecoderBase::GetLastFrameInPosMap ( void  ) const
protected

Definition at line 670 of file decoderbase.cpp.

Referenced by ConditionallyUpdatePosMap(), and DoFastForward().

unsigned long DecoderBase::GetPositionMapSize ( void  ) const
protected

Definition at line 313 of file decoderbase.cpp.

Referenced by DoRewindSeek(), and SyncPositionMap().

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

Member Data Documentation

MythPlayer* DecoderBase::m_parent
protected
ProgramInfo* DecoderBase::m_playbackinfo
protected
AudioPlayer* DecoderBase::m_audio
protected
RingBuffer* DecoderBase::ringBuffer
protected

Definition at line 293 of file decoderbase.h.

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

int DecoderBase::current_width
protected
int DecoderBase::current_height
protected
float DecoderBase::current_aspect
protected
double DecoderBase::fps
protected
uint DecoderBase::bitrate
protected
long long DecoderBase::framesPlayed
protected
long long DecoderBase::framesRead
protected
AVRational DecoderBase::totalDuration
protected
long long DecoderBase::lastKey
protected
int DecoderBase::keyframedist
protected
long long DecoderBase::indexOffset
protected

Definition at line 306 of file decoderbase.h.

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

bool DecoderBase::trackTotalDuration
protected
EofState DecoderBase::ateof
protected
bool DecoderBase::exitafterdecoded
protected

Definition at line 314 of file decoderbase.h.

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

bool DecoderBase::transcoding
protected

Definition at line 315 of file decoderbase.h.

bool DecoderBase::hasFullPositionMap
protected
bool DecoderBase::recordingHasPositionMap
protected
bool DecoderBase::posmapStarted
protected

Definition at line 319 of file decoderbase.h.

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

MarkTypes DecoderBase::positionMapType
protected
QMutex DecoderBase::m_positionMapLock
mutableprotected
vector<PosMapEntry> DecoderBase::m_positionMap
protected
frm_pos_map_t DecoderBase::m_frameToDurMap
protected
frm_pos_map_t DecoderBase::m_durToFrameMap
protected
bool DecoderBase::dontSyncPositionMap
protected

Definition at line 326 of file decoderbase.h.

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

QDateTime DecoderBase::m_lastPositionMapUpdate
mutableprotected

Definition at line 327 of file decoderbase.h.

Referenced by SyncPositionMap(), and TranslatePositionFrameToMs().

uint64_t DecoderBase::seeksnap
protected

Definition at line 329 of file decoderbase.h.

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

bool DecoderBase::livetv
protected
bool DecoderBase::watchingrecording
protected
bool DecoderBase::hasKeyFrameAdjustTable
protected

Definition at line 333 of file decoderbase.h.

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

bool DecoderBase::lowbuffers
protected

Definition at line 335 of file decoderbase.h.

Referenced by AvFormatDecoder::GetFrame().

bool DecoderBase::getrawframes
protected
bool DecoderBase::getrawvideo
protected

Definition at line 338 of file decoderbase.h.

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

bool DecoderBase::errored
protected

Definition at line 340 of file decoderbase.h.

Referenced by NuppelDecoder::NuppelDecoder().

bool DecoderBase::waitingForChange
protected
long long DecoderBase::readAdjust
protected
bool DecoderBase::justAfterChange
protected

Definition at line 344 of file decoderbase.h.

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

bool DecoderBase::video_inverted
protected

Definition at line 345 of file decoderbase.h.

Referenced by AvFormatDecoder::InitVideoCodec().

bool DecoderBase::decodeAllSubtitles
protected
int DecoderBase::currentTrack[kTrackTypeCount]
protected
sinfo_vec_t DecoderBase::tracks[kTrackTypeCount]
protected
StreamInfo DecoderBase::wantedTrack[kTrackTypeCount]
protected

Definition at line 351 of file decoderbase.h.

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

StreamInfo DecoderBase::selectedTrack[(uint) kTrackTypeCount]
protected
vector<int> DecoderBase::languagePreference
protected

language preferences for auto-selection of streams

Definition at line 354 of file decoderbase.h.

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


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