MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
AvFormatDecoder Class Reference

A decoder for video files. More...

#include <avformatdecoder.h>

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

Public Member Functions

 AvFormatDecoder (MythPlayer *parent, const ProgramInfo &pginfo, PlayerFlags flags)
 
virtual ~AvFormatDecoder ()
 
void SetEof (bool eof) override
 
void CloseCodecs ()
 
void CloseContext ()
 
void Reset (bool reset_video_data, bool seek_reset, bool reset_file) override
 
int OpenFile (RingBuffer *rbuffer, bool novideo, char testbuf[kDecoderProbeBufferSize], int testbufsize=kDecoderProbeBufferSize) override
 Open our file and set up or audio and video parameters. More...
 
bool GetFrame (DecodeType) override
 Demux, preprocess and possibly decode a frame of video/audio. More...
 
bool IsLastFrameKey (void) const override
 
bool IsCodecMPEG (void) const override
 
void WriteStoredData (RingBuffer *rb, bool storevid, long timecodeOffset) override
 This is a No-op for this class. More...
 
void SetRawAudioState (bool state) override
 This is a No-op for this class. More...
 
bool GetRawAudioState (void) const override
 This is a No-op for this class. More...
 
void SetRawVideoState (bool state) override
 This is a No-op for this class. More...
 
bool GetRawVideoState (void) const override
 This is a No-op for this class. More...
 
long UpdateStoredFrameNum (long frame) override
 This is a No-op for this class. More...
 
QString GetCodecDecoderName (void) const override
 
QString GetRawEncodingType (void) override
 
MythCodecID GetVideoCodecID (void) const override
 
void * GetVideoCodecPrivate (void) override
 
void SetDisablePassThrough (bool disable) override
 Disables AC3/DTS pass through. More...
 
void ForceSetupAudioStream (void) override
 
void AddTextData (unsigned char *buf, int len, int64_t timecode, char type)
 
QString GetTrackDesc (uint type, uint trackNo) const override
 
int SetTrack (uint type, int trackNo) override
 
int ScanStreams (bool novideo)
 
int FindStreamInfo (void)
 
int GetNumChapters () override
 
void GetChapterTimes (QList< long long > &times) override
 
int GetCurrentChapter (long long framesPlayed) override
 
long long GetChapter (int chapter) override
 
bool DoRewind (long long desiredFrame, bool discardFrames=true) override
 
bool DoFastForward (long long desiredFrame, bool discardFrames=true) override
 Skips ahead or rewinds to desiredFrame. More...
 
void SetIdrOnlyKeyframes (bool value) override
 
int64_t NormalizeVideoTimecode (int64_t timecode) override
 
virtual int64_t NormalizeVideoTimecode (AVStream *st, int64_t timecode)
 
int GetTeletextDecoderType (void) const override
 
QString GetXDS (const QString &) const override
 
QByteArray GetSubHeader (uint trackNo) const override
 
void GetAttachmentData (uint trackNo, QByteArray &filename, QByteArray &data) override
 
bool SetAudioByComponentTag (int tag) override
 
bool SetVideoByComponentTag (int tag) override
 
virtual int GetTeletextLanguage (uint lang_idx) const
 Returns TeleText language. More...
 
virtual int GetSubtitleLanguage (uint subtitle_index, uint stream_index)
 Returns DVD Subtitle language. More...
 
virtual int GetCaptionLanguage (TrackTypes trackType, int service_num)
 Return ATSC Closed Caption Language. More...
 
virtual int GetAudioLanguage (uint audio_index, uint stream_index)
 
virtual AudioTrackType GetAudioTrackType (uint stream_index)
 
- Public Member Functions inherited from DecoderBase
 DecoderBase (MythPlayer *parent, const ProgramInfo &pginfo)
 
 DecoderBase (const DecoderBase &rhs)
 
virtual ~DecoderBase ()
 
virtual void SetEofState (EofState 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 SetWatchingRecording (bool mode)
 
MythPlayerGetPlayer ()
 
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 void ClearStoredData (void)
 
virtual double GetFPS (void) const
 
uint GetRawBitrate (void) const
 Returns the estimated bitrate if the video were played at normal speed. More...
 
long long GetFramesRead (void) const
 
long long GetFramesPlayed (void) const
 
void SetFramesPlayed (long long newValue)
 
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)
 
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
 
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)
 
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 void GetDecoders (render_opts &opts)
 
static bool CanHandle (char testbuf[kDecoderProbeBufferSize], const QString &filename, int testbufsize=kDecoderProbeBufferSize)
 Perform an av_probe_input_format on the passed data to see if we can decode it with this class. More...
 
- 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)
 

Protected Member Functions

RingBuffergetRingBuf (void)
 
int AutoSelectTrack (uint type) override
 Select best track. More...
 
void ScanATSCCaptionStreams (int av_index)
 
void UpdateATSCCaptionTracks (void)
 
void UpdateCaptionTracksFromStreams (bool check_608, bool check_708)
 
void ScanTeletextCaptions (int av_index)
 
void ScanRawTextCaptions (int av_stream_index)
 
void ScanDSMCCStreams (void)
 Check to see whether there is a Network Boot Ifo sub-descriptor in the PMT which requires the MHEG application to reboot. More...
 
int AutoSelectAudioTrack (void)
 Selects the best audio track. More...
 
int filter_max_ch (const AVFormatContext *ic, const sinfo_vec_t &tracks, const vector< int > &fs, enum AVCodecID codecId=AV_CODEC_ID_NONE, int profile=-1)
 
void DecodeDTVCC (const uint8_t *buf, uint buf_size, bool scte)
 
void DecodeCCx08 (const uint8_t *buf, uint buf_size, bool scte)
 
void InitByteContext (bool forceseek=false)
 
void InitVideoCodec (AVStream *stream, AVCodecContext *enc, bool selectedStream=false)
 
void MpegPreProcessPkt (AVStream *stream, AVPacket *pkt)
 Preprocess a packet, setting the video parms if necessary. More...
 
int H264PreProcessPkt (AVStream *stream, AVPacket *pkt)
 
bool PreProcessVideoPacket (AVStream *stream, AVPacket *pkt)
 
virtual bool ProcessVideoPacket (AVStream *stream, AVPacket *pkt)
 
virtual bool ProcessVideoFrame (AVStream *stream, AVFrame *mpa_pic)
 
bool ProcessAudioPacket (AVStream *stream, AVPacket *pkt, DecodeType decodetype)
 
bool ProcessSubtitlePacket (AVStream *stream, AVPacket *pkt)
 
bool ProcessRawTextPacket (AVPacket *pkt)
 
virtual bool ProcessDataPacket (AVStream *curstream, AVPacket *pkt, DecodeType decodetype)
 
void ProcessVBIDataPacket (const AVStream *stream, const AVPacket *pkt)
 Process ivtv proprietary embedded vertical blanking interval captions. More...
 
void ProcessDVBDataPacket (const AVStream *stream, const AVPacket *pkt)
 Process DVB Teletext. More...
 
void ProcessDSMCCPacket (const AVStream *stream, const AVPacket *pkt)
 Process DSMCC object carousel packet. More...
 
float GetMpegAspect (AVCodecContext *context, int aspect_ratio_info, int width, int height)
 
void SeekReset (long long, uint skipFrames, bool doFlush, bool discardFrames) override
 
bool DecoderWillDownmix (const AVCodecContext *ctx)
 
bool DoPassThrough (const AVCodecParameters *par, bool withProfile=true)
 
bool SetupAudioStream (void)
 Reinitializes audio if it needs to be reinitialized. More...
 
void SetupAudioStreamSubIndexes (int streamIndex)
 Reacts to DUAL/STEREO changes on the fly and fix streams. More...
 
void RemoveAudioStreams ()
 remove audio streams from the context used by dvd code during title transitions to remove stale audio streams More...
 
void HandleGopStart (AVPacket *pkt, bool can_reliably_parse_keyframes)
 Update our position map, keyframe distance, and the like. More...
 
bool GenerateDummyVideoFrames (void)
 
bool HasVideo (const AVFormatContext *ic)
 
float normalized_fps (AVStream *stream, AVCodecContext *enc)
 
void av_update_stream_timings_video (AVFormatContext *ic)
 
bool OpenAVCodec (AVCodecContext *avctx, const AVCodec *codec)
 
void UpdateFramesPlayed (void) override
 
bool DoRewindSeek (long long desiredFrame) override
 
void DoFastForwardSeek (long long desiredFrame, bool &needflush) override
 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...
 
virtual void StreamChangeCheck (void)
 
virtual void PostProcessTracks (void)
 
virtual bool IsValidStream (int)
 
int DecodeAudio (AVCodecContext *ctx, uint8_t *buffer, int &data_size, AVPacket *pkt)
 
virtual int ReadPacket (AVFormatContext *ctx, AVPacket *pkt, bool &storePacket)
 
- Protected Member Functions inherited from DecoderBase
void AutoSelectTracks (void)
 
void ResetTracks (void)
 
void FileChanged (void)
 
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

PrivateDecoderm_private_dec {nullptr}
 
bool m_is_db_ignored
 
H264Parserm_h264_parser {nullptr}
 
AVFormatContext * m_ic {nullptr}
 
URLContext m_readcontext
 
int m_frame_decoded {0}
 
VideoFramem_decoded_video_frame {nullptr}
 
AVFRingBufferm_avfRingBuffer {nullptr}
 
struct SwsContext * m_sws_ctx {nullptr}
 
bool m_directrendering {false}
 
bool m_no_dts_hack {false}
 
bool m_dorewind {false}
 
bool m_gopset {false}
 
bool m_seen_gop {false}
 A flag to indicate that we've seen a GOP frame. Used in junction with seq_count. More...
 
int m_seq_count {0}
 A counter used to determine if we need to force a call to HandleGopStart. More...
 
QList< AVPacket * > m_storedPackets
 
int m_prevgoppos {0}
 
bool m_gotVideoFrame {false}
 
bool m_hasVideo {false}
 
bool m_needDummyVideoFrames {false}
 
bool m_skipaudio {false}
 
bool m_allowedquit {false}
 
uint32_t m_start_code_state {0xffffffff}
 
long long m_lastvpts {0}
 
long long m_lastapts {0}
 
long long m_lastccptsu {0}
 
long long m_firstvpts {0}
 
bool m_firstvptsinuse {false}
 
int64_t m_faulty_pts {0}
 
int64_t m_faulty_dts {0}
 
int64_t m_last_pts_for_fault_detection {0}
 
int64_t m_last_dts_for_fault_detection {0}
 
bool m_pts_detected {false}
 
bool m_reordered_pts_detected {false}
 
bool m_pts_selected {true}
 
bool m_use_frame_timing {false}
 
bool m_force_dts_timestamps {false}
 
PlayerFlags playerFlags
 
MythCodecID m_video_codec_id {kCodec_NONE}
 
int m_maxkeyframedist {-1}
 
int m_averror_count {0}
 
uint m_ignore_scte {0}
 
uint m_invert_scte_field {0}
 
uint m_last_scte_field {0}
 
CC608Decoderm_ccd608 {nullptr}
 
CC708Decoderm_ccd708 {nullptr}
 
TeletextDecoderm_ttd {nullptr}
 
int m_cc608_parity_table [256]
 
bool m_ccX08_in_pmt [64+4]
 Lookup table for whether a stream was seen in the PMT entries 0-3 correspond to CEA-608 CC1 through CC4, while entries 4-67 corresport to CEA-708 streams 0 through 64. More...
 
bool m_ccX08_in_tracks [64+4]
 Lookup table for whether a stream is represented in the UI entries 0-3 correspond to CEA-608 CC1 through CC4, while entries 4-67 corresport to CEA-708 streams 0 through 64. More...
 
QList< StreamInfom_pmt_tracks
 StreamInfo for 608 and 708 Captions seen in the PMT descriptor. More...
 
QList< TrackTypem_pmt_track_types
 TrackType (608 or 708) for Captions seen in the PMT descriptor. More...
 
QList< StreamInfom_stream_tracks
 StreamInfo for 608 and 708 Captions seen in the caption stream itself but not seen in the PMT. More...
 
QList< TrackTypem_stream_track_types
 TrackType (608 or 708) for Captions seen in the caption stream itself but not seen in the PMT. More...
 
InteractiveTVm_itv {nullptr}
 MHEG/MHP decoder. More...
 
uint8_t * m_audioSamples {nullptr}
 
bool m_disable_passthru {false}
 
AudioInfo m_audioIn
 
AudioInfo m_audioOut
 
float m_fps {0.0F}
 
bool m_codec_is_mpeg {false}
 
bool m_processFrames {true}
 
bool m_streams_changed {false}
 
int m_audioReadAhead {100}
 
- Protected Attributes inherited from DecoderBase
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
 

Private Member Functions

 AvFormatDecoder (const AvFormatDecoder &)=delete
 
AvFormatDecoderoperator= (const AvFormatDecoder &)=delete
 

Friends

void HandleStreamChange (void *)
 
void HandleDVDStreamChange (void *)
 
void HandleBDStreamChange (void *)
 
int get_avf_buffer (struct AVCodecContext *c, AVFrame *pic, int flags)
 
int get_avf_buffer_vaapi2 (struct AVCodecContext *c, AVFrame *pic, int flags)
 
int get_avf_buffer_nvdec (struct AVCodecContext *c, AVFrame *pic, int flags)
 
void release_avf_buffer (void *opaque, uint8_t *data)
 
int open_avf (URLContext *h, const char *filename, int flags)
 
int read_avf (URLContext *h, uint8_t *buf, int buf_size)
 
int write_avf (URLContext *h, uint8_t *buf, int buf_size)
 
int64_t seek_avf (URLContext *h, int64_t offset, int whence)
 
int close_avf (URLContext *h)
 

Additional Inherited Members

- Protected Types inherited from DecoderBase
typedef struct DecoderBase::posmapentry PosMapEntry
 

Detailed Description

A decoder for video files.

The AvFormatDecoder is used to decode non-NuppleVideo files. It's used as a decoder of last resort after trying the NuppelDecoder

Definition at line 89 of file avformatdecoder.h.

Constructor & Destructor Documentation

◆ AvFormatDecoder() [1/2]

AvFormatDecoder::AvFormatDecoder ( MythPlayer parent,
const ProgramInfo pginfo,
PlayerFlags  flags 
)

Definition at line 417 of file avformatdecoder.cpp.

◆ ~AvFormatDecoder()

AvFormatDecoder::~AvFormatDecoder ( )
virtual

Definition at line 450 of file avformatdecoder.cpp.

◆ AvFormatDecoder() [2/2]

AvFormatDecoder::AvFormatDecoder ( const AvFormatDecoder )
privatedelete

Member Function Documentation

◆ GetDecoders()

void AvFormatDecoder::GetDecoders ( render_opts opts)
static

Definition at line 382 of file avformatdecoder.cpp.

Referenced by VideoDisplayProfile::init_statics().

◆ SetEof()

void AvFormatDecoder::SetEof ( bool  eof)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 905 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ CloseCodecs()

void AvFormatDecoder::CloseCodecs ( )

Definition at line 483 of file avformatdecoder.cpp.

Referenced by CloseContext(), and AvFormatDecoderBD::StreamChangeCheck().

◆ CloseContext()

void AvFormatDecoder::CloseContext ( )

Definition at line 496 of file avformatdecoder.cpp.

Referenced by OpenFile(), and ~AvFormatDecoder().

◆ Reset()

void AvFormatDecoder::Reset ( bool  reset_video_data,
bool  seek_reset,
bool  reset_file 
)
overridevirtual

Reimplemented from DecoderBase.

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 917 of file avformatdecoder.cpp.

Referenced by OpenFile(), AvFormatDecoderBD::Reset(), and AvFormatDecoderDVD::Reset().

◆ CanHandle()

bool AvFormatDecoder::CanHandle ( char  testbuf[kDecoderProbeBufferSize],
const QString &  filename,
int  testbufsize = kDecoderProbeBufferSize 
)
static

Perform an av_probe_input_format on the passed data to see if we can decode it with this class.

Definition at line 936 of file avformatdecoder.cpp.

Referenced by MythBDPlayer::CreateDecoder(), MythDVDPlayer::CreateDecoder(), and MythPlayer::CreateDecoder().

◆ OpenFile()

int AvFormatDecoder::OpenFile ( RingBuffer rbuffer,
bool  novideo,
char  testbuf[kDecoderProbeBufferSize],
int  testbufsize = kDecoderProbeBufferSize 
)
overridevirtual

Open our file and set up or audio and video parameters.

OpenFile opens a ringbuffer for playback.

OpenFile deletes any existing context then use testbuf to guess at the stream type. It then calls ScanStreams to find any valid streams to decode. If possible a position map is also built for quick skipping.

Parameters
rbufferpointer to a valid ringuffer.
novideoif true then no video is sought in ScanSreams.
testbufTemporary buffer for probing the input.
testbufsizeThe size of the test buffer. The minimum of this value or kDecoderProbeBufferSize will be used.

Implements DecoderBase.

Definition at line 1028 of file avformatdecoder.cpp.

◆ GetFrame()

bool AvFormatDecoder::GetFrame ( DecodeType  )
overridevirtual

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

Implements DecoderBase.

Reimplemented in AvFormatDecoderDVD.

Definition at line 5189 of file avformatdecoder.cpp.

Referenced by AvFormatDecoderDVD::GetFrame(), and SeekReset().

◆ IsLastFrameKey()

bool AvFormatDecoder::IsLastFrameKey ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 120 of file avformatdecoder.h.

◆ IsCodecMPEG()

bool AvFormatDecoder::IsCodecMPEG ( void  ) const
inlineoverridevirtual

Reimplemented from DecoderBase.

Definition at line 122 of file avformatdecoder.h.

◆ WriteStoredData()

void AvFormatDecoder::WriteStoredData ( RingBuffer rb,
bool  storevid,
long  timecodeOffset 
)
inlineoverridevirtual

This is a No-op for this class.

Implements DecoderBase.

Definition at line 126 of file avformatdecoder.h.

◆ SetRawAudioState()

void AvFormatDecoder::SetRawAudioState ( bool  state)
inlineoverridevirtual

This is a No-op for this class.

Reimplemented from DecoderBase.

Definition at line 131 of file avformatdecoder.h.

◆ GetRawAudioState()

bool AvFormatDecoder::GetRawAudioState ( void  ) const
inlineoverridevirtual

This is a No-op for this class.

Reimplemented from DecoderBase.

Definition at line 134 of file avformatdecoder.h.

◆ SetRawVideoState()

void AvFormatDecoder::SetRawVideoState ( bool  state)
inlineoverridevirtual

This is a No-op for this class.

Reimplemented from DecoderBase.

Definition at line 137 of file avformatdecoder.h.

◆ GetRawVideoState()

bool AvFormatDecoder::GetRawVideoState ( void  ) const
inlineoverridevirtual

This is a No-op for this class.

Reimplemented from DecoderBase.

Definition at line 140 of file avformatdecoder.h.

◆ UpdateStoredFrameNum()

long AvFormatDecoder::UpdateStoredFrameNum ( long  frame)
inlineoverridevirtual

This is a No-op for this class.

Implements DecoderBase.

Definition at line 143 of file avformatdecoder.h.

◆ GetCodecDecoderName()

QString AvFormatDecoder::GetCodecDecoderName ( void  ) const
overridevirtual

Implements DecoderBase.

Definition at line 5575 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ GetRawEncodingType()

QString AvFormatDecoder::GetRawEncodingType ( void  )
overridevirtual

Reimplemented from DecoderBase.

Definition at line 5582 of file avformatdecoder.cpp.

◆ GetVideoCodecID()

MythCodecID AvFormatDecoder::GetVideoCodecID ( void  ) const
inlineoverridevirtual

Implements DecoderBase.

Definition at line 147 of file avformatdecoder.h.

◆ GetVideoCodecPrivate()

void * AvFormatDecoder::GetVideoCodecPrivate ( void  )
overridevirtual

Reimplemented from DecoderBase.

Definition at line 5590 of file avformatdecoder.cpp.

◆ SetDisablePassThrough()

void AvFormatDecoder::SetDisablePassThrough ( bool  disable)
overridevirtual

Disables AC3/DTS pass through.

Reimplemented from DecoderBase.

Definition at line 5595 of file avformatdecoder.cpp.

◆ ForceSetupAudioStream()

void AvFormatDecoder::ForceSetupAudioStream ( void  )
overridevirtual

Reimplemented from DecoderBase.

Definition at line 5614 of file avformatdecoder.cpp.

Referenced by SetDisablePassThrough().

◆ AddTextData()

void AvFormatDecoder::AddTextData ( unsigned char *  buf,
int  len,
int64_t  timecode,
char  type 
)

◆ GetTrackDesc()

QString AvFormatDecoder::GetTrackDesc ( uint  type,
uint  trackNo 
) const
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4475 of file avformatdecoder.cpp.

Referenced by AutoSelectAudioTrack().

◆ SetTrack()

int AvFormatDecoder::SetTrack ( uint  type,
int  trackNo 
)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4462 of file avformatdecoder.cpp.

Referenced by AvFormatDecoderDVD::PostProcessTracks(), and SetAudioByComponentTag().

◆ ScanStreams()

int AvFormatDecoder::ScanStreams ( bool  novideo)

◆ FindStreamInfo()

int AvFormatDecoder::FindStreamInfo ( void  )

Definition at line 1000 of file avformatdecoder.cpp.

Referenced by OpenFile(), and AvFormatDecoderBD::StreamChangeCheck().

◆ GetNumChapters()

int AvFormatDecoder::GetNumChapters ( void  )
overridevirtual

Reimplemented from DecoderBase.

Definition at line 575 of file avformatdecoder.cpp.

Referenced by GetChapter(), GetChapterTimes(), and GetCurrentChapter().

◆ GetChapterTimes()

void AvFormatDecoder::GetChapterTimes ( QList< long long > &  times)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 582 of file avformatdecoder.cpp.

◆ GetCurrentChapter()

int AvFormatDecoder::GetCurrentChapter ( long long  framesPlayed)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 599 of file avformatdecoder.cpp.

◆ GetChapter()

long long AvFormatDecoder::GetChapter ( int  chapter)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 623 of file avformatdecoder.cpp.

◆ DoRewind()

bool AvFormatDecoder::DoRewind ( long long  desiredFrame,
bool  discardFrames = true 
)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 639 of file avformatdecoder.cpp.

◆ DoFastForward()

bool AvFormatDecoder::DoFastForward ( long long  desiredFrame,
bool  discardFrames = true 
)
overridevirtual

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 from DecoderBase.

Definition at line 653 of file avformatdecoder.cpp.

Referenced by DoRewind().

◆ SetIdrOnlyKeyframes()

void AvFormatDecoder::SetIdrOnlyKeyframes ( bool  value)
inlineoverridevirtual

Reimplemented from DecoderBase.

Definition at line 166 of file avformatdecoder.h.

Referenced by AvFormatDecoder().

◆ NormalizeVideoTimecode() [1/2]

int64_t AvFormatDecoder::NormalizeVideoTimecode ( int64_t  timecode)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 523 of file avformatdecoder.cpp.

Referenced by ProcessVideoFrame().

◆ NormalizeVideoTimecode() [2/2]

int64_t AvFormatDecoder::NormalizeVideoTimecode ( AVStream *  st,
int64_t  timecode 
)
virtual

Definition at line 555 of file avformatdecoder.cpp.

◆ GetTeletextDecoderType()

int AvFormatDecoder::GetTeletextDecoderType ( void  ) const
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4543 of file avformatdecoder.cpp.

◆ GetXDS()

QString AvFormatDecoder::GetXDS ( const QString &  key) const
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4548 of file avformatdecoder.cpp.

◆ GetSubHeader()

QByteArray AvFormatDecoder::GetSubHeader ( uint  trackNo) const
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4553 of file avformatdecoder.cpp.

◆ GetAttachmentData()

void AvFormatDecoder::GetAttachmentData ( uint  trackNo,
QByteArray &  filename,
QByteArray &  data 
)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4567 of file avformatdecoder.cpp.

◆ SetAudioByComponentTag()

bool AvFormatDecoder::SetAudioByComponentTag ( int  tag)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4582 of file avformatdecoder.cpp.

Referenced by OpenFile().

◆ SetVideoByComponentTag()

bool AvFormatDecoder::SetVideoByComponentTag ( int  tag)
overridevirtual

Reimplemented from DecoderBase.

Definition at line 4599 of file avformatdecoder.cpp.

Referenced by OpenFile().

◆ GetTeletextLanguage()

int AvFormatDecoder::GetTeletextLanguage ( uint  lang_idx) const
virtual

Returns TeleText language.

Definition at line 2816 of file avformatdecoder.cpp.

Referenced by MythCCExtractorPlayer::ProcessTeletext().

◆ GetSubtitleLanguage()

int AvFormatDecoder::GetSubtitleLanguage ( uint  subtitle_index,
uint  stream_index 
)
virtual

Returns DVD Subtitle language.

Reimplemented in AvFormatDecoderBD.

Definition at line 2829 of file avformatdecoder.cpp.

Referenced by GetAudioLanguage(), MythCCExtractorPlayer::ProcessDVBSubtitles(), and ScanStreams().

◆ GetCaptionLanguage()

int AvFormatDecoder::GetCaptionLanguage ( TrackTypes  trackType,
int  service_num 
)
virtual

◆ GetAudioLanguage()

int AvFormatDecoder::GetAudioLanguage ( uint  audio_index,
uint  stream_index 
)
virtual

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 2867 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ GetAudioTrackType()

AudioTrackType AvFormatDecoder::GetAudioTrackType ( uint  stream_index)
virtual

Reimplemented in AvFormatDecoderDVD.

Definition at line 2872 of file avformatdecoder.cpp.

Referenced by AvFormatDecoderDVD::GetAudioTrackType(), and ScanStreams().

◆ operator=()

AvFormatDecoder& AvFormatDecoder::operator= ( const AvFormatDecoder )
privatedelete

◆ getRingBuf()

RingBuffer* AvFormatDecoder::getRingBuf ( void  )
inlineprotected

Definition at line 195 of file avformatdecoder.h.

◆ AutoSelectTrack()

int AvFormatDecoder::AutoSelectTrack ( uint  type)
overrideprotectedvirtual

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 from DecoderBase.

Definition at line 4618 of file avformatdecoder.cpp.

◆ ScanATSCCaptionStreams()

void AvFormatDecoder::ScanATSCCaptionStreams ( int  av_index)
protected

Definition at line 1869 of file avformatdecoder.cpp.

Referenced by ScanStreams(), and UpdateCaptionTracksFromStreams().

◆ UpdateATSCCaptionTracks()

void AvFormatDecoder::UpdateATSCCaptionTracks ( void  )
protected

Definition at line 1940 of file avformatdecoder.cpp.

Referenced by ScanStreams(), and UpdateCaptionTracksFromStreams().

◆ UpdateCaptionTracksFromStreams()

void AvFormatDecoder::UpdateCaptionTracksFromStreams ( bool  check_608,
bool  check_708 
)
protected

Definition at line 3289 of file avformatdecoder.cpp.

Referenced by DecodeCCx08(), and ProcessVBIDataPacket().

◆ ScanTeletextCaptions()

void AvFormatDecoder::ScanTeletextCaptions ( int  av_index)
protected

Definition at line 2004 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ ScanRawTextCaptions()

void AvFormatDecoder::ScanRawTextCaptions ( int  av_stream_index)
protected

Definition at line 2057 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ ScanDSMCCStreams()

void AvFormatDecoder::ScanDSMCCStreams ( void  )
protected

Check to see whether there is a Network Boot Ifo sub-descriptor in the PMT which requires the MHEG application to reboot.

Definition at line 2079 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ AutoSelectAudioTrack()

int AvFormatDecoder::AutoSelectAudioTrack ( void  )
protected

Selects the best audio track.

It is primarily needed for DVB recordings

This function will select the best audio track available using the following criteria, in order of decreasing preference:

1) The stream last selected by the user, which is recalled as the Nth stream in the preferred language or the Nth substream when audio is in dual language format (each channel contains a different language track) If it cannot be located we attempt to find a stream in the same language.

2) If we cannot reselect the last user selected stream, then for each preferred language from most preferred to least preferred, we try to find a new stream based on the algorithm below.

3) If we cannot select a stream in a preferred language we try to select a stream irrespective of language based on the algorithm below.

When searching for a new stream (ie. options 2 and 3 above), the following search is carried out in order:

i) If DTS passthrough is enabled then the DTS track with the greatest number of audio channels is selected (the first will be chosen if there are several the same). If DTS passthrough is not enabled this step will be skipped because internal DTS decoding is not currently supported.

ii) If no DTS track is chosen, the AC3 track with the greatest number of audio channels is selected (the first will be chosen if there are several the same). Internal decoding of AC3 is supported, so this will be used irrespective of whether AC3 passthrough is enabled.

iii) Lastly the track with the greatest number of audio channels irrespective of type will be selected.

Returns
track if a track was selected, -1 otherwise

Definition at line 4733 of file avformatdecoder.cpp.

Referenced by AutoSelectTrack(), and ProcessAudioPacket().

◆ filter_max_ch()

int AvFormatDecoder::filter_max_ch ( const AVFormatContext *  ic,
const sinfo_vec_t tracks,
const vector< int > &  fs,
enum AVCodecID  codecId = AV_CODEC_ID_NONE,
int  profile = -1 
)
protected

Definition at line 4657 of file avformatdecoder.cpp.

Referenced by AutoSelectAudioTrack().

◆ DecodeDTVCC()

void AvFormatDecoder::DecodeDTVCC ( const uint8_t *  buf,
uint  buf_size,
bool  scte 
)
protected

Definition at line 3196 of file avformatdecoder.cpp.

Referenced by ProcessVideoFrame().

◆ DecodeCCx08()

void AvFormatDecoder::DecodeCCx08 ( const uint8_t *  buf,
uint  buf_size,
bool  scte 
)
protected

Definition at line 3221 of file avformatdecoder.cpp.

Referenced by DecodeDTVCC(), and ProcessVideoFrame().

◆ InitByteContext()

void AvFormatDecoder::InitByteContext ( bool  forceseek = false)
protected

Definition at line 964 of file avformatdecoder.cpp.

Referenced by OpenFile().

◆ InitVideoCodec()

void AvFormatDecoder::InitVideoCodec ( AVStream *  stream,
AVCodecContext *  enc,
bool  selectedStream = false 
)
protected

Definition at line 1603 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ MpegPreProcessPkt()

void AvFormatDecoder::MpegPreProcessPkt ( AVStream *  stream,
AVPacket *  pkt 
)
protected

Preprocess a packet, setting the video parms if necessary.

Definition at line 3477 of file avformatdecoder.cpp.

Referenced by PreProcessVideoPacket().

◆ H264PreProcessPkt()

int AvFormatDecoder::H264PreProcessPkt ( AVStream *  stream,
AVPacket *  pkt 
)
protected

Definition at line 3566 of file avformatdecoder.cpp.

Referenced by PreProcessVideoPacket().

◆ PreProcessVideoPacket()

bool AvFormatDecoder::PreProcessVideoPacket ( AVStream *  stream,
AVPacket *  pkt 
)
protected

Definition at line 3668 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ ProcessVideoPacket()

bool AvFormatDecoder::ProcessVideoPacket ( AVStream *  stream,
AVPacket *  pkt 
)
protectedvirtual

Reimplemented in AvFormatDecoderDVD.

Definition at line 3730 of file avformatdecoder.cpp.

Referenced by GetFrame(), and AvFormatDecoderDVD::ProcessVideoPacket().

◆ ProcessVideoFrame()

bool AvFormatDecoder::ProcessVideoFrame ( AVStream *  stream,
AVFrame mpa_pic 
)
protectedvirtual

Reimplemented in AvFormatDecoderDVD.

Definition at line 3930 of file avformatdecoder.cpp.

Referenced by GetFrame(), AvFormatDecoderDVD::ProcessVideoFrame(), and ProcessVideoPacket().

◆ ProcessAudioPacket()

bool AvFormatDecoder::ProcessAudioPacket ( AVStream *  stream,
AVPacket *  pkt,
DecodeType  decodetype 
)
protected

Definition at line 4973 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ ProcessSubtitlePacket()

bool AvFormatDecoder::ProcessSubtitlePacket ( AVStream *  stream,
AVPacket *  pkt 
)
protected

Definition at line 4340 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ ProcessRawTextPacket()

bool AvFormatDecoder::ProcessRawTextPacket ( AVPacket *  pkt)
protected

Definition at line 4406 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ ProcessDataPacket()

bool AvFormatDecoder::ProcessDataPacket ( AVStream *  curstream,
AVPacket *  pkt,
DecodeType  decodetype 
)
protectedvirtual

Reimplemented in AvFormatDecoderDVD.

Definition at line 4429 of file avformatdecoder.cpp.

Referenced by GetFrame(), and AvFormatDecoderDVD::ProcessDataPacket().

◆ ProcessVBIDataPacket()

void AvFormatDecoder::ProcessVBIDataPacket ( const AVStream *  stream,
const AVPacket *  pkt 
)
protected

Process ivtv proprietary embedded vertical blanking interval captions.

See also
CC608Decoder, TeletextDecoder

Definition at line 4178 of file avformatdecoder.cpp.

Referenced by ProcessDataPacket().

◆ ProcessDVBDataPacket()

void AvFormatDecoder::ProcessDVBDataPacket ( const AVStream *  stream,
const AVPacket *  pkt 
)
protected

Process DVB Teletext.

See also
TeletextDecoder

Definition at line 4260 of file avformatdecoder.cpp.

Referenced by GetFrame(), and ProcessDataPacket().

◆ ProcessDSMCCPacket()

void AvFormatDecoder::ProcessDSMCCPacket ( const AVStream *  stream,
const AVPacket *  pkt 
)
protected

Process DSMCC object carousel packet.

Definition at line 4303 of file avformatdecoder.cpp.

Referenced by ProcessDataPacket().

◆ GetMpegAspect()

float AvFormatDecoder::GetMpegAspect ( AVCodecContext *  context,
int  aspect_ratio_info,
int  width,
int  height 
)
protected

◆ SeekReset()

void AvFormatDecoder::SeekReset ( long long  newKey,
uint  skipFrames,
bool  doFlush,
bool  discardFrames 
)
overrideprotectedvirtual

Reimplemented from DecoderBase.

Definition at line 772 of file avformatdecoder.cpp.

Referenced by DoFastForward(), Reset(), and StreamChangeCheck().

◆ DecoderWillDownmix()

bool AvFormatDecoder::DecoderWillDownmix ( const AVCodecContext *  ctx)
inlineprotected

Definition at line 5621 of file avformatdecoder.cpp.

Referenced by ProcessAudioPacket(), and SetupAudioStream().

◆ DoPassThrough()

bool AvFormatDecoder::DoPassThrough ( const AVCodecParameters *  par,
bool  withProfile = true 
)
protected

◆ SetupAudioStream()

bool AvFormatDecoder::SetupAudioStream ( void  )
protected

Reinitializes audio if it needs to be reinitialized.

NOTE: The avcodeclock must be held when this is called.

Returns
true if audio changed, false otherwise

Definition at line 5666 of file avformatdecoder.cpp.

Referenced by AutoSelectAudioTrack(), ForceSetupAudioStream(), and SetTrack().

◆ SetupAudioStreamSubIndexes()

void AvFormatDecoder::SetupAudioStreamSubIndexes ( int  streamIndex)
protected

Reacts to DUAL/STEREO changes on the fly and fix streams.

This function should be called when a switch between dual and stereo mpeg audio is detected. Such changes can and will happen at any time.

After this method returns, a new audio stream should be selected using AvFormatDecoder::autoSelectSubtitleTrack().

Parameters
streamIndexav_stream_index of the stream that has changed

Definition at line 2924 of file avformatdecoder.cpp.

Referenced by ProcessAudioPacket().

◆ RemoveAudioStreams()

void AvFormatDecoder::RemoveAudioStreams ( )
protected

remove audio streams from the context used by dvd code during title transitions to remove stale audio streams

Definition at line 2983 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ HandleGopStart()

void AvFormatDecoder::HandleGopStart ( AVPacket *  pkt,
bool  can_reliably_parse_keyframes 
)
protected

Update our position map, keyframe distance, and the like.

Called for key frame packets.

Definition at line 3357 of file avformatdecoder.cpp.

Referenced by H264PreProcessPkt(), MpegPreProcessPkt(), and PreProcessVideoPacket().

◆ GenerateDummyVideoFrames()

bool AvFormatDecoder::GenerateDummyVideoFrames ( void  )
protected

Definition at line 5549 of file avformatdecoder.cpp.

Referenced by GetFrame(), and ProcessDataPacket().

◆ HasVideo()

bool AvFormatDecoder::HasVideo ( const AVFormatContext *  ic)
protected

Definition at line 5523 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ normalized_fps()

float AvFormatDecoder::normalized_fps ( AVStream *  stream,
AVCodecContext *  enc 
)
protected

Definition at line 1386 of file avformatdecoder.cpp.

Referenced by H264PreProcessPkt(), InitVideoCodec(), and MpegPreProcessPkt().

◆ av_update_stream_timings_video()

void AvFormatDecoder::av_update_stream_timings_video ( AVFormatContext *  ic)
protected

Definition at line 5819 of file avformatdecoder.cpp.

Referenced by OpenFile().

◆ OpenAVCodec()

bool AvFormatDecoder::OpenAVCodec ( AVCodecContext *  avctx,
const AVCodec *  codec 
)
protected

Definition at line 2769 of file avformatdecoder.cpp.

Referenced by ScanStreams().

◆ UpdateFramesPlayed()

void AvFormatDecoder::UpdateFramesPlayed ( void  )
overrideprotectedvirtual

Reimplemented from DecoderBase.

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 2800 of file avformatdecoder.cpp.

◆ DoRewindSeek()

bool AvFormatDecoder::DoRewindSeek ( long long  desiredFrame)
overrideprotectedvirtual

Reimplemented from DecoderBase.

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 2805 of file avformatdecoder.cpp.

◆ DoFastForwardSeek()

void AvFormatDecoder::DoFastForwardSeek ( long long  desiredFrame,
bool needflush 
)
overrideprotectedvirtual

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 from DecoderBase.

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 2810 of file avformatdecoder.cpp.

◆ StreamChangeCheck()

void AvFormatDecoder::StreamChangeCheck ( void  )
protectedvirtual

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 5506 of file avformatdecoder.cpp.

Referenced by GetFrame().

◆ PostProcessTracks()

virtual void AvFormatDecoder::PostProcessTracks ( void  )
inlineprotectedvirtual

Reimplemented in AvFormatDecoderDVD.

Definition at line 274 of file avformatdecoder.h.

Referenced by ScanStreams().

◆ IsValidStream()

virtual bool AvFormatDecoder::IsValidStream ( int  )
inlineprotectedvirtual

Reimplemented in AvFormatDecoderBD.

Definition at line 275 of file avformatdecoder.h.

Referenced by AvFormatDecoderBD::IsValidStream(), and ScanStreams().

◆ DecodeAudio()

int AvFormatDecoder::DecodeAudio ( AVCodecContext *  ctx,
uint8_t *  buffer,
int &  data_size,
AVPacket *  pkt 
)
protected

◆ ReadPacket()

int AvFormatDecoder::ReadPacket ( AVFormatContext *  ctx,
AVPacket *  pkt,
bool storePacket 
)
protectedvirtual

Reimplemented in AvFormatDecoderDVD, and AvFormatDecoderBD.

Definition at line 5516 of file avformatdecoder.cpp.

Referenced by GetFrame().

Friends And Related Function Documentation

◆ HandleStreamChange

void HandleStreamChange ( void *  )
friend

Definition at line 986 of file avformatdecoder.cpp.

Referenced by OpenFile().

◆ HandleDVDStreamChange

void HandleDVDStreamChange ( void *  )
friend

◆ HandleBDStreamChange

void HandleBDStreamChange ( void *  )
friend

◆ get_avf_buffer

int get_avf_buffer ( struct AVCodecContext *  c,
AVFrame pic,
int  flags 
)
friend

Definition at line 3004 of file avformatdecoder.cpp.

Referenced by InitVideoCodec().

◆ get_avf_buffer_vaapi2

int get_avf_buffer_vaapi2 ( struct AVCodecContext *  c,
AVFrame pic,
int  flags 
)
friend

Referenced by InitVideoCodec().

◆ get_avf_buffer_nvdec

int get_avf_buffer_nvdec ( struct AVCodecContext *  c,
AVFrame pic,
int  flags 
)
friend

Referenced by InitVideoCodec().

◆ release_avf_buffer

void release_avf_buffer ( void *  opaque,
uint8_t *  data 
)
friend

Definition at line 3037 of file avformatdecoder.cpp.

◆ open_avf

int open_avf ( URLContext *  h,
const char *  filename,
int  flags 
)
friend

◆ read_avf

int read_avf ( URLContext *  h,
uint8_t *  buf,
int  buf_size 
)
friend

◆ write_avf

int write_avf ( URLContext *  h,
uint8_t *  buf,
int  buf_size 
)
friend

◆ seek_avf

int64_t seek_avf ( URLContext *  h,
int64_t  offset,
int  whence 
)
friend

◆ close_avf

int close_avf ( URLContext *  h)
friend

Member Data Documentation

◆ m_private_dec

PrivateDecoder* AvFormatDecoder::m_private_dec {nullptr}
protected

◆ m_is_db_ignored

bool AvFormatDecoder::m_is_db_ignored
protected

Definition at line 284 of file avformatdecoder.h.

Referenced by OpenFile(), and ScanStreams().

◆ m_h264_parser

H264Parser* AvFormatDecoder::m_h264_parser {nullptr}
protected

◆ m_ic

AVFormatContext* AvFormatDecoder::m_ic {nullptr}
protected

◆ m_readcontext

URLContext AvFormatDecoder::m_readcontext
protected

Definition at line 291 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), and InitByteContext().

◆ m_frame_decoded

int AvFormatDecoder::m_frame_decoded {0}
protected

Definition at line 293 of file avformatdecoder.h.

Referenced by GetFrame().

◆ m_decoded_video_frame

VideoFrame* AvFormatDecoder::m_decoded_video_frame {nullptr}
protected

◆ m_avfRingBuffer

AVFRingBuffer* AvFormatDecoder::m_avfRingBuffer {nullptr}
protected

Definition at line 295 of file avformatdecoder.h.

Referenced by InitByteContext(), OpenFile(), and ~AvFormatDecoder().

◆ m_sws_ctx

struct SwsContext* AvFormatDecoder::m_sws_ctx {nullptr}
protected

Definition at line 297 of file avformatdecoder.h.

Referenced by ProcessVideoFrame(), and ~AvFormatDecoder().

◆ m_directrendering

bool AvFormatDecoder::m_directrendering {false}
protected

Definition at line 298 of file avformatdecoder.h.

Referenced by get_avf_buffer(), InitVideoCodec(), and ProcessVideoFrame().

◆ m_no_dts_hack

bool AvFormatDecoder::m_no_dts_hack {false}
protected

Definition at line 300 of file avformatdecoder.h.

Referenced by DoFastForward(), and SeekReset().

◆ m_dorewind

bool AvFormatDecoder::m_dorewind {false}
protected

Definition at line 301 of file avformatdecoder.h.

Referenced by DoFastForward(), and DoRewind().

◆ m_gopset

bool AvFormatDecoder::m_gopset {false}
protected

◆ m_seen_gop

bool AvFormatDecoder::m_seen_gop {false}
protected

A flag to indicate that we've seen a GOP frame. Used in junction with seq_count.

Definition at line 305 of file avformatdecoder.h.

Referenced by MpegPreProcessPkt(), PreProcessVideoPacket(), and Reset().

◆ m_seq_count

int AvFormatDecoder::m_seq_count {0}
protected

A counter used to determine if we need to force a call to HandleGopStart.

Definition at line 307 of file avformatdecoder.h.

Referenced by MpegPreProcessPkt(), PreProcessVideoPacket(), and Reset().

◆ m_storedPackets

QList<AVPacket*> AvFormatDecoder::m_storedPackets
protected

◆ m_prevgoppos

int AvFormatDecoder::m_prevgoppos {0}
protected

Definition at line 311 of file avformatdecoder.h.

Referenced by H264PreProcessPkt(), HandleGopStart(), MpegPreProcessPkt(), and SeekReset().

◆ m_gotVideoFrame

bool AvFormatDecoder::m_gotVideoFrame {false}
protected

◆ m_hasVideo

bool AvFormatDecoder::m_hasVideo {false}
protected

Definition at line 315 of file avformatdecoder.h.

Referenced by GetFrame().

◆ m_needDummyVideoFrames

bool AvFormatDecoder::m_needDummyVideoFrames {false}
protected

Definition at line 316 of file avformatdecoder.h.

Referenced by GenerateDummyVideoFrames(), and GetFrame().

◆ m_skipaudio

bool AvFormatDecoder::m_skipaudio {false}
protected

Definition at line 317 of file avformatdecoder.h.

Referenced by GetFrame(), and ProcessAudioPacket().

◆ m_allowedquit

bool AvFormatDecoder::m_allowedquit {false}
protected

Definition at line 318 of file avformatdecoder.h.

Referenced by GetFrame(), ProcessAudioPacket(), and ProcessDataPacket().

◆ m_start_code_state

uint32_t AvFormatDecoder::m_start_code_state {0xffffffff}
protected

Definition at line 320 of file avformatdecoder.h.

Referenced by MpegPreProcessPkt().

◆ m_lastvpts

long long AvFormatDecoder::m_lastvpts {0}
protected

◆ m_lastapts

long long AvFormatDecoder::m_lastapts {0}
protected

◆ m_lastccptsu

long long AvFormatDecoder::m_lastccptsu {0}
protected

◆ m_firstvpts

long long AvFormatDecoder::m_firstvpts {0}
protected

◆ m_firstvptsinuse

bool AvFormatDecoder::m_firstvptsinuse {false}
protected

◆ m_faulty_pts

int64_t AvFormatDecoder::m_faulty_pts {0}
protected

◆ m_faulty_dts

int64_t AvFormatDecoder::m_faulty_dts {0}
protected

◆ m_last_pts_for_fault_detection

int64_t AvFormatDecoder::m_last_pts_for_fault_detection {0}
protected

◆ m_last_dts_for_fault_detection

int64_t AvFormatDecoder::m_last_dts_for_fault_detection {0}
protected

◆ m_pts_detected

bool AvFormatDecoder::m_pts_detected {false}
protected

◆ m_reordered_pts_detected

bool AvFormatDecoder::m_reordered_pts_detected {false}
protected

◆ m_pts_selected

bool AvFormatDecoder::m_pts_selected {true}
protected

Definition at line 334 of file avformatdecoder.h.

Referenced by ProcessVideoPacket().

◆ m_use_frame_timing

bool AvFormatDecoder::m_use_frame_timing {false}
protected

◆ m_force_dts_timestamps

bool AvFormatDecoder::m_force_dts_timestamps {false}
protected

Definition at line 339 of file avformatdecoder.h.

Referenced by OpenFile(), and ProcessVideoPacket().

◆ playerFlags

PlayerFlags AvFormatDecoder::playerFlags
protected

Definition at line 341 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), and ScanStreams().

◆ m_video_codec_id

MythCodecID AvFormatDecoder::m_video_codec_id {kCodec_NONE}
protected

◆ m_maxkeyframedist

int AvFormatDecoder::m_maxkeyframedist {-1}
protected

Definition at line 344 of file avformatdecoder.h.

Referenced by HandleGopStart().

◆ m_averror_count

int AvFormatDecoder::m_averror_count {0}
protected

Definition at line 345 of file avformatdecoder.h.

Referenced by InitVideoCodec(), ProcessVideoPacket(), and ScanStreams().

◆ m_ignore_scte

uint AvFormatDecoder::m_ignore_scte {0}
protected

Definition at line 348 of file avformatdecoder.h.

Referenced by ProcessVideoFrame().

◆ m_invert_scte_field

uint AvFormatDecoder::m_invert_scte_field {0}
protected

Definition at line 349 of file avformatdecoder.h.

Referenced by DecodeCCx08().

◆ m_last_scte_field

uint AvFormatDecoder::m_last_scte_field {0}
protected

Definition at line 350 of file avformatdecoder.h.

Referenced by DecodeCCx08().

◆ m_ccd608

CC608Decoder* AvFormatDecoder::m_ccd608 {nullptr}
protected

◆ m_ccd708

CC708Decoder* AvFormatDecoder::m_ccd708 {nullptr}
protected

◆ m_ttd

TeletextDecoder* AvFormatDecoder::m_ttd {nullptr}
protected

◆ m_cc608_parity_table

int AvFormatDecoder::m_cc608_parity_table[256]
protected

Definition at line 354 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), DecodeCCx08(), and ProcessVBIDataPacket().

◆ m_ccX08_in_pmt

bool AvFormatDecoder::m_ccX08_in_pmt[64+4]
protected

Lookup table for whether a stream was seen in the PMT entries 0-3 correspond to CEA-608 CC1 through CC4, while entries 4-67 corresport to CEA-708 streams 0 through 64.

Definition at line 358 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), ScanATSCCaptionStreams(), and UpdateCaptionTracksFromStreams().

◆ m_ccX08_in_tracks

bool AvFormatDecoder::m_ccX08_in_tracks[64+4]
protected

Lookup table for whether a stream is represented in the UI entries 0-3 correspond to CEA-608 CC1 through CC4, while entries 4-67 corresport to CEA-708 streams 0 through 64.

Definition at line 362 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), UpdateATSCCaptionTracks(), and UpdateCaptionTracksFromStreams().

◆ m_pmt_tracks

QList<StreamInfo> AvFormatDecoder::m_pmt_tracks
protected

StreamInfo for 608 and 708 Captions seen in the PMT descriptor.

Definition at line 364 of file avformatdecoder.h.

Referenced by GetCaptionLanguage(), ScanATSCCaptionStreams(), and UpdateATSCCaptionTracks().

◆ m_pmt_track_types

QList<TrackType> AvFormatDecoder::m_pmt_track_types
protected

TrackType (608 or 708) for Captions seen in the PMT descriptor.

Definition at line 366 of file avformatdecoder.h.

Referenced by GetCaptionLanguage(), ScanATSCCaptionStreams(), and UpdateATSCCaptionTracks().

◆ m_stream_tracks

QList<StreamInfo> AvFormatDecoder::m_stream_tracks
protected

StreamInfo for 608 and 708 Captions seen in the caption stream itself but not seen in the PMT.

Definition at line 369 of file avformatdecoder.h.

Referenced by GetCaptionLanguage(), UpdateATSCCaptionTracks(), and UpdateCaptionTracksFromStreams().

◆ m_stream_track_types

QList<TrackType> AvFormatDecoder::m_stream_track_types
protected

TrackType (608 or 708) for Captions seen in the caption stream itself but not seen in the PMT.

Definition at line 372 of file avformatdecoder.h.

Referenced by GetCaptionLanguage(), UpdateATSCCaptionTracks(), and UpdateCaptionTracksFromStreams().

◆ m_itv

InteractiveTV* AvFormatDecoder::m_itv {nullptr}
protected

MHEG/MHP decoder.

Definition at line 375 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), OpenFile(), ProcessDataPacket(), ProcessDSMCCPacket(), and ScanDSMCCStreams().

◆ m_audioSamples

uint8_t* AvFormatDecoder::m_audioSamples {nullptr}
protected

Definition at line 378 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), ProcessAudioPacket(), and ~AvFormatDecoder().

◆ m_disable_passthru

bool AvFormatDecoder::m_disable_passthru {false}
protected

Definition at line 379 of file avformatdecoder.h.

Referenced by DoPassThrough(), and SetDisablePassThrough().

◆ m_audioIn

AudioInfo AvFormatDecoder::m_audioIn
protected

Definition at line 381 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), ScanStreams(), and SetupAudioStream().

◆ m_audioOut

AudioInfo AvFormatDecoder::m_audioOut
protected

Definition at line 382 of file avformatdecoder.h.

Referenced by ProcessAudioPacket(), and SetupAudioStream().

◆ m_fps

float AvFormatDecoder::m_fps {0.0F}
protected

◆ m_codec_is_mpeg

bool AvFormatDecoder::m_codec_is_mpeg {false}
protected

Definition at line 385 of file avformatdecoder.h.

Referenced by IsCodecMPEG(), and ScanStreams().

◆ m_processFrames

bool AvFormatDecoder::m_processFrames {true}
protected

Definition at line 386 of file avformatdecoder.h.

Referenced by GetFrame(), and OpenFile().

◆ m_streams_changed

bool AvFormatDecoder::m_streams_changed {false}
protected

◆ m_audioReadAhead

int AvFormatDecoder::m_audioReadAhead {100}
protected

Definition at line 389 of file avformatdecoder.h.

Referenced by AvFormatDecoder(), and GetFrame().


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