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