Go to the documentation of this file.
79 bool g =
false,
bool h =
false,
86 bool g =
false,
bool h =
false,
bool i =
false,
127 virtual void Reset(
bool reset_video_data,
bool seek_reset,
bool reset_file);
158 virtual bool DoRewind(
long long desiredFrame,
bool discardFrames =
true);
159 virtual bool DoFastForward(
long long desiredFrame,
bool discardFrames =
true);
164 uint64_t absPosition,
166 float fallback_ratio = 1.0);
169 uint64_t relPosition,
171 float fallback_ratio = 1.0);
174 float fallback_ratio);
176 float fallback_framerate,
179 float fallback_framerate,
189 std::chrono::milliseconds timecodeOffset) = 0;
216 virtual bool FindPosition(
long long desired_value,
bool search_adjusted,
217 int &lower_bound,
int &upper_bound);
221 bool doFlush,
bool discardFrames);
249 virtual QString
GetXDS(
const QString &)
const {
return {}; }
267 int BestTrack(
uint Type,
bool forcedPreferred,
int preferredLanguage = 0);
AVRational AVRationalInit(int num, int den=1)
virtual int GetCurrentChapter(long long)
virtual long UpdateStoredFrameNum(long frame)=0
virtual bool DoFastForward(long long desiredFrame, bool discardFrames=true)
Skips ahead or rewinds to desiredFrame.
virtual std::chrono::milliseconds NormalizeVideoTimecode(std::chrono::milliseconds timecode)
virtual bool SetVideoByComponentTag(int)
virtual int SetTrack(uint Type, int TrackNo)
const int kDecoderProbeBufferSize
void TrackTotalDuration(bool track)
virtual void ClearStoredData(void)
long long GetFramesPlayed(void) const
std::array< StreamInfo, kTrackTypeCount > m_selectedTrack
MythMediaBuffer * m_ringBuffer
const VideoFrameTypes * m_renderFormats
int to_track_type(const QString &str)
QDateTime m_lastPositionMapUpdate
bool m_hasKeyFrameAdjustTable
long long ConditionallyUpdatePosMap(long long desiredFrame)
virtual int AutoSelectTrack(uint Type)
Select best track.
uint64_t SavePositionMapDelta(long long first_frame, long long last_frame)
DecoderBase(MythPlayer *parent, const ProgramInfo &pginfo)
virtual void GetAttachmentData(uint, QByteArray &, QByteArray &)
uint64_t GetSeekSnap(void) const
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
bool m_hasFullPositionMap
MythCodecContext * GetMythCodecContext(void)
MythVideoProfile m_videoDisplayProfile
int ChangeTrack(uint Type, int Dir)
QRecursiveMutex m_trackLock
virtual bool SetAudioByComponentTag(int)
MarkTypes m_positionMapType
virtual MythCodecID GetVideoCodecID(void) const =0
uint GetRawBitrate(void) const
Returns the estimated bitrate if the video were played at normal speed.
StreamInfo(int a, int b, uint c, int d, int e, int f, bool g=false, bool h=false, bool i=false, AudioTrackType j=kAudioTypeNormal)
std::vector< StreamInfo > sinfo_vec_t
frm_pos_map_t m_frameToDurMap
bool GetWaitForChange(void) const
void SetWaitForChange(void)
std::array< int, kTrackTypeCount > m_currentTrack
bool m_dontSyncPositionMap
uint64_t TranslatePositionMsToFrame(std::chrono::milliseconds dur_ms, float fallback_framerate, const frm_dir_map_t &cutlist)
std::array< sinfo_vec_t, kTrackTypeCount > m_tracks
virtual void WriteStoredData(MythMediaBuffer *Buffer, bool storevid, std::chrono::milliseconds timecodeOffset)=0
virtual long long GetChapter(int)
virtual void GetChapterTimes(QList< std::chrono::seconds > &)
virtual QString GetTrackDesc(uint Type, uint TrackNo)
void SaveTotalDuration(void)
virtual uint GetTrackCount(uint Type)
virtual bool FindPosition(long long desired_value, bool search_adjusted, int &lower_bound, int &upper_bound)
virtual QString GetCodecDecoderName(void) const =0
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)
virtual void ForceSetupAudioStream(void)
virtual bool GetRawVideoState(void) const
StreamInfo GetTrackInfo(uint Type, uint TrackNo)
std::vector< int > m_languagePreference
language preferences for auto-selection of streams
virtual bool DoRewindSeek(long long desiredFrame)
AudioTrackType m_audio_type
int GetfpsMultiplier(void) const
std::vector< VideoFrameType > VideoFrameTypes
virtual bool IsLastFrameKey(void) const =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)
std::vector< PosMapEntry > m_positionMap
void ResetTotalDuration(void)
std::chrono::milliseconds TranslatePositionFrameToMs(long long position, float fallback_framerate, const frm_dir_map_t &cutlist)
virtual void SetEof(bool eof)
virtual QString GetRawEncodingType(void)
std::vector< char > TestBufferVec
virtual QString GetXDS(const QString &) const
frm_pos_map_t m_durToFrameMap
virtual void ResetPosMap(void)
virtual double GetFPS(void) const
void SetReadAdjust(long long adjust)
ProgramInfo * m_playbackInfo
AVRational m_totalDuration
void SetFramesPlayed(long long newValue)
unsigned long GetPositionMapSize(void) const
void AutoSelectTracks(void)
std::array< StreamInfo, kTrackTypeCount > m_wantedTrack
virtual bool GetRawAudioState(void) const
StreamInfo(int a, int b, uint c, int d, int e, bool f=false, bool g=false, bool h=false, AudioTrackType i=kAudioTypeNormal)
@ kAudioTypeHearingImpaired
virtual QByteArray GetSubHeader(uint)
virtual bool SyncPositionMap(void)
Updates the position map used for skipping frames.
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
void SetSeekSnap(uint64_t snap)
void SetProgramInfo(const ProgramInfo &pginfo)
float GetVideoAspect(void) const
long long GetKey(const PosMapEntry &entry) const
virtual int GetNumChapters(void)
int m_av_substream_index
-1 for no substream, 0 for first dual audio stream, 1 for second dual
virtual bool PosMapFromEnc(void)
Queries encoder for position map data that has not been committed to the DB yet.
virtual void SetWatchingRecording(bool mode)
void SetTranscoding(bool value)
std::array< StreamInfo, kTrackTypeCount > m_selectedForcedTrack
virtual bool GetFrame(DecodeType Type, bool &Retry)=0
Demux, preprocess and possibly decode a frame of video/audio.
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...
virtual void UpdateFramesPlayed(void)
Holds information on recordings and videos.
void SetDecodeAllSubtitles(bool DecodeAll)
static const VideoFrameTypes kDefaultRenderFormats
MythCodecContext * m_mythCodecCtx
QRecursiveMutex m_positionMapLock
void SetRenderFormats(const VideoFrameTypes *RenderFormats)
bool m_decodeAllSubtitles
int m_language
ISO639 canonical language key.
int BestTrack(uint Type, bool forcedPreferred, int preferredLanguage=0)
Determine the best track according to weights.
@ kTrackTypeTeletextCaptions
static uint64_t TranslatePosition(const frm_pos_map_t &map, long long key, float fallback_ratio)
virtual bool PosMapFromDb(void)
bool m_nextDecodedFrameIsKeyFrame
bool operator<(const StreamInfo &b) const
virtual int GetTeletextDecoderType(void) const
virtual void SetDisablePassThrough(bool disable)
Disables AC3/DTS pass through.
virtual void SetRawAudioState(bool state)
static AVPixelFormat GetBestVideoFormat(AVPixelFormat *Formats, const VideoFrameTypes *RenderFormats)
Find a suitable frame format that is mutually acceptable to the decoder and render device.
static float snap(float value, float snapto, float diff)
virtual int OpenFile(MythMediaBuffer *Buffer, bool novideo, TestBufferVec &testbuf)=0
QString toString(TrackType type)
bool m_trackTotalDuration
static const iso6937table * d
virtual void Reset(bool reset_video_data, bool seek_reset, bool reset_file)
@ kAudioTypeAudioDescription
virtual QStringList GetTracks(uint Type)
virtual void SetRawVideoState(bool state)
long long GetLastFrameInPosMap(void) const
virtual void SetEofState(EofState eof)
virtual bool InsertTrack(uint Type, const StreamInfo &Info)
void SetLiveTVMode(bool live)
virtual void SeekReset(long long newkey, uint skipFrames, bool doFlush, bool discardFrames)
long long GetFramesRead(void) const
virtual bool DoRewind(long long desiredFrame, bool discardFrames=true)
bool HasPositionMap(void) const
virtual void SetIdrOnlyKeyframes(bool)
bool m_recordingHasPositionMap
virtual int GetTrackLanguageIndex(uint Type, uint TrackNo)
void SaveTotalFrames(void)