|
MythTV master
|
A decoder for media files. More...
#include <libmythtv/decoders/avformatdecoder.h>
Public Member Functions | |
| AvFormatDecoder (MythPlayer *parent, const ProgramInfo &pginfo, PlayerFlags flags) | |
| ~AvFormatDecoder () override | |
| AvFormatDecoder (const AvFormatDecoder &)=delete | |
| AvFormatDecoder & | operator= (const AvFormatDecoder &)=delete |
| void | UpdateFramesPlayed (void) override |
| void | SetEof (bool eof) override |
| MythCodecMap * | CodecMap (void) |
| void | CloseCodecs () |
| void | CloseContext () |
| void | Reset (bool reset_video_data, bool seek_reset, bool reset_file) override |
| int | OpenFile (MythMediaBuffer *Buffer, bool novideo, TestBufferVec &testbuf) override |
| Open our file and set up or audio and video parameters. More... | |
| bool | GetFrame (DecodeType Type, bool &Retry) override |
| Demux, preprocess and possibly decode a frame of video/audio. More... | |
| bool | IsLastFrameKey (void) const override |
| QString | GetCodecDecoderName (void) const override |
| QString | GetRawEncodingType (void) override |
| MythCodecID | GetVideoCodecID (void) const 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) override |
| int | SetTrack (uint Type, int TrackNo) override |
| int | ScanStreams (bool novideo) |
| int | GetNumChapters () override |
| void | GetChapterTimes (QList< std::chrono::seconds > ×) 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 | SeekReset (long long newkey, uint skipFrames, bool doFlush, bool discardFrames) override |
| void | SetIdrOnlyKeyframes (bool value) override |
| std::chrono::milliseconds | NormalizeVideoTimecode (std::chrono::milliseconds timecode) override |
| virtual std::chrono::milliseconds | NormalizeVideoTimecode (AVStream *st, std::chrono::milliseconds timecode) |
| int | GetTeletextDecoderType (void) const override |
| QString | GetXDS (const QString &Key) const override |
| QByteArray | GetSubHeader (uint TrackNo) override |
| void | GetAttachmentData (uint TrackNo, QByteArray &Filename, QByteArray &Data) override |
| bool | SetAudioByComponentTag (int Tag) override |
| bool | SetVideoByComponentTag (int Tag) override |
| virtual int | GetTeletextLanguage (uint Index) |
| Returns TeleText language. More... | |
| virtual int | GetSubtitleLanguage (uint, uint StreamIndex) |
| Returns DVD Subtitle language. More... | |
| virtual int | GetCaptionLanguage (TrackType TrackType, int ServiceNum) |
| Return ATSC Closed Caption Language. More... | |
| virtual int | GetAudioLanguage (uint AudioIndex, uint StreamIndex) |
| virtual AudioTrackType | GetAudioTrackType (uint StreamIndex) |
Public Member Functions inherited from DecoderBase | |
| DecoderBase (MythPlayer *parent, const ProgramInfo &pginfo) | |
| virtual | ~DecoderBase () |
| void | SetRenderFormats (const VideoFrameTypes *RenderFormats) |
| virtual void | Reset (bool reset_video_data, bool seek_reset, bool reset_file) |
| virtual int | OpenFile (MythMediaBuffer *Buffer, bool novideo, TestBufferVec &testbuf)=0 |
| virtual void | SetEofState (EofState eof) |
| virtual void | SetEof (bool eof) |
| EofState | GetEof (void) |
| void | SetSeekSnap (uint64_t snap) |
| uint64_t | GetSeekSnap (void) const |
| void | SetLiveTVMode (bool live) |
| void | SetProgramInfo (const ProgramInfo &pginfo) |
| virtual void | SetDisablePassThrough (bool disable) |
| Disables AC3/DTS pass through. More... | |
| virtual void | ForceSetupAudioStream (void) |
| virtual void | SetWatchingRecording (bool mode) |
| virtual bool | GetFrame (DecodeType Type, bool &Retry)=0 |
| Demux, preprocess and possibly decode a frame of video/audio. More... | |
| MythPlayer * | GetPlayer () |
| virtual int | GetNumChapters (void) |
| virtual int | GetCurrentChapter (long long) |
| virtual void | GetChapterTimes (QList< std::chrono::seconds > &) |
| virtual long long | GetChapter (int) |
| virtual bool | DoRewind (long long desiredFrame, bool discardFrames=true) |
| virtual bool | DoFastForward (long long desiredFrame, bool discardFrames=true) |
| Skips ahead or rewinds to desiredFrame. More... | |
| virtual void | SetIdrOnlyKeyframes (bool) |
| std::chrono::milliseconds | TranslatePositionFrameToMs (long long position, float fallback_framerate, const frm_dir_map_t &cutlist) |
| uint64_t | TranslatePositionMsToFrame (std::chrono::milliseconds dur_ms, float fallback_framerate, const frm_dir_map_t &cutlist) |
| float | GetVideoAspect (void) const |
| virtual std::chrono::milliseconds | NormalizeVideoTimecode (std::chrono::milliseconds timecode) |
| virtual bool | IsLastFrameKey (void) const =0 |
| virtual double | GetFPS (void) const |
| uint | GetRawBitrate (void) const |
| Returns the estimated bitrate if the video were played at normal speed. More... | |
| virtual void | UpdateFramesPlayed (void) |
| long long | GetFramesRead (void) const |
| long long | GetFramesPlayed (void) const |
| void | SetFramesPlayed (long long newValue) |
| virtual QString | GetCodecDecoderName (void) const =0 |
| virtual QString | GetRawEncodingType (void) |
| virtual MythCodecID | GetVideoCodecID (void) const =0 |
| virtual void | ResetPosMap (void) |
| virtual bool | SyncPositionMap (void) |
| Updates the position map used for skipping frames. More... | |
| virtual bool | PosMapFromDb (void) |
| virtual bool | PosMapFromEnc (void) |
| Queries encoder for position map data that has not been committed to the DB yet. More... | |
| virtual bool | FindPosition (long long desired_value, bool search_adjusted, int &lower_bound, int &upper_bound) |
| uint64_t | SavePositionMapDelta (long long first_frame, long long last_frame) |
| virtual void | SeekReset (long long newkey, uint skipFrames, bool doFlush, bool discardFrames) |
| void | SetTranscoding (bool value) |
| bool | IsErrored () const |
| bool | HasPositionMap (void) const |
| void | SetWaitForChange (void) |
| bool | GetWaitForChange (void) const |
| void | SetReadAdjust (long long adjust) |
| void | SetDecodeAllSubtitles (bool DecodeAll) |
| virtual QStringList | GetTracks (uint Type) |
| virtual uint | GetTrackCount (uint Type) |
| virtual int | GetTrackLanguageIndex (uint Type, uint TrackNo) |
| virtual QString | GetTrackDesc (uint Type, uint TrackNo) |
| virtual int | SetTrack (uint Type, int TrackNo) |
| int | GetTrack (uint Type) |
| StreamInfo | GetTrackInfo (uint Type, uint TrackNo) |
| int | ChangeTrack (uint Type, int Dir) |
| int | NextTrack (uint Type) |
| virtual int | GetTeletextDecoderType (void) const |
| virtual QString | GetXDS (const QString &) const |
| virtual QByteArray | GetSubHeader (uint) |
| virtual void | GetAttachmentData (uint, QByteArray &, QByteArray &) |
| virtual bool | SetAudioByComponentTag (int) |
| virtual bool | SetVideoByComponentTag (int) |
| void | SaveTotalDuration (void) |
| void | ResetTotalDuration (void) |
| void | SaveTotalFrames (void) |
| void | TrackTotalDuration (bool track) |
| int | GetfpsMultiplier (void) const |
| MythCodecContext * | GetMythCodecContext (void) |
Static Public Member Functions | |
| static bool | CanHandle (TestBufferVec &testbuf, const QString &filename) |
| Perform an av_probe_input_format on the passed data to see if we can decode it with this class. More... | |
| static int | GetMaxReferenceFrames (AVCodecContext *Context) |
| static void | streams_changed (void *data, int avprogram_id) |
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) |
| static AVPixelFormat | GetBestVideoFormat (AVPixelFormat *Formats, const VideoFrameTypes *RenderFormats) |
| Find a suitable frame format that is mutually acceptable to the decoder and render device. More... | |
Protected Member Functions | |
| 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 (AVBufferRef *pmt_section) |
| 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 std::vector< int > &fs, enum AVCodecID codecId=AV_CODEC_ID_NONE, int profile=-1) |
| int | selectBestAudioTrack (int lang_key, const std::vector< int > &ftype) |
| void | DecodeCCx08 (const uint8_t *buf, uint buf_size) |
| void | InitVideoCodec (AVStream *stream, AVCodecContext *codecContext, bool selectedStream=false) |
| void | MpegPreProcessPkt (AVCodecContext *codecContext, AVStream *stream, AVPacket *pkt) |
| Preprocess a packet, setting the video parms if necessary. More... | |
| int | H264PreProcessPkt (AVCodecContext *codecContext, AVStream *stream, AVPacket *pkt) |
| bool | PreProcessVideoPacket (AVCodecContext *codecContext, AVStream *stream, AVPacket *pkt) |
| virtual bool | ProcessVideoPacket (AVCodecContext *codecContext, AVStream *stream, AVPacket *pkt, bool &Retry) |
| virtual bool | ProcessVideoFrame (AVCodecContext *codecContext, AVStream *Stream, AVFrame *AvFrame) |
| bool | ProcessAudioPacket (AVCodecContext *codecContext, AVStream *stream, AVPacket *pkt, DecodeType decodetype) |
| bool | ProcessSubtitlePacket (AVCodecContext *codecContext, AVStream *stream, AVPacket *pkt) |
| bool | ProcessRawTextPacket (AVPacket *Packet) |
| 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... | |
| 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 () |
| float | GetVideoFrameRate (AVStream *Stream, AVCodecContext *Context, bool Sanitise=false) |
| bool | OpenAVCodec (AVCodecContext *avctx, const AVCodec *codec) |
| 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) |
| bool | FlagIsSet (PlayerFlags arg) |
| int | autoSelectVideoTrack (int &scanerror) |
| void | remove_tracks_not_in_same_AVProgram (int stream_index) |
| int | get_current_AVStream_index (TrackType type) |
| AVProgram * | get_current_AVProgram () |
| bool | do_av_seek (long long desiredFrame, bool discardFrames, int flags) |
Protected Member Functions inherited from DecoderBase | |
| int | BestTrack (uint Type, bool forcedPreferred, int preferredLanguage=0) |
| Determine the best track according to weights. More... | |
| virtual int | AutoSelectTrack (uint Type) |
| Select best track. More... | |
| void | AutoSelectTracks (void) |
| void | ResetTracks (void) |
| void | FileChanged (void) |
| virtual bool | DoRewindSeek (long long desiredFrame) |
| virtual void | DoFastForwardSeek (long long desiredFrame, bool &needflush) |
| Seeks to the keyframe just before the desiredFrame if exact seeks is enabled, or the frame just after it if exact seeks is not enabled. More... | |
| long long | ConditionallyUpdatePosMap (long long desiredFrame) |
| long long | GetLastFrameInPosMap (void) const |
| unsigned long | GetPositionMapSize (void) const |
| long long | GetKey (const PosMapEntry &entry) const |
Static Protected Member Functions | |
| static void | av_update_stream_timings_video (AVFormatContext *ic) |
Protected Attributes | |
| bool | m_isDbIgnored |
| AVCParser * | m_avcParser {nullptr} |
| AVFormatContext * | m_ic {nullptr} |
| MythCodecMap | m_codecMap |
| int | m_frameDecoded {0} |
| MythVideoFrame * | m_decodedVideoFrame {nullptr} |
| MythAVFormatBuffer * | m_avfRingBuffer {nullptr} |
| struct SwsContext * | m_swsCtx {nullptr} |
| bool | m_directRendering {false} |
| bool | m_gopSet {false} |
| bool | m_seenGop {false} |
| A flag to indicate that we've seen a GOP frame. Used in junction with seq_count. More... | |
| int | m_seqCount {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_startCodeState {0xffffffff} |
| std::chrono::milliseconds | m_lastVPts {0ms} |
| std::chrono::milliseconds | m_lastAPts {0ms} |
| std::chrono::microseconds | m_lastCcPtsu {0ms} |
| std::chrono::milliseconds | m_firstVPts {0ms} |
| bool | m_firstVPtsInuse {false} |
| PlayerFlags | m_playerFlags |
| MythCodecID | m_videoCodecId {kCodec_NONE} |
| int | m_maxKeyframeDist {-1} |
| int | m_averrorCount {0} |
| CC608Decoder * | m_ccd608 {nullptr} |
| CC708Decoder * | m_ccd708 {nullptr} |
| TeletextDecoder * | m_ttd {nullptr} |
| std::array< bool, 68 > | m_ccX08InPmt {} |
| 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... | |
| std::array< bool, 68 > | m_ccX08InTracks {} |
| 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< StreamInfo > | m_pmtTracks |
| StreamInfo for 608 and 708 Captions seen in the PMT descriptor. More... | |
| QList< TrackType > | m_pmtTrackTypes |
| TrackType (608 or 708) for Captions seen in the PMT descriptor. More... | |
| QList< StreamInfo > | m_streamTracks |
| StreamInfo for 608 and 708 Captions seen in the caption stream itself but not seen in the PMT. More... | |
| QList< TrackType > | m_streamTrackTypes |
| TrackType (608 or 708) for Captions seen in the caption stream itself but not seen in the PMT. More... | |
| InteractiveTV * | m_itv {nullptr} |
| MHEG/MHP decoder. More... | |
| uint8_t * | m_audioSamples {nullptr} |
| bool | m_disablePassthru {false} |
| AudioInfo | m_audioIn |
| AudioInfo | m_audioOut |
| bool | m_processFrames {true} |
| bool | m_streamsChanged { false } |
| bool | m_resetHardwareDecoders { false } |
| std::chrono::milliseconds | m_audioReadAhead {100ms} |
| QRecursiveMutex | m_avCodecLock |
Protected Attributes inherited from DecoderBase | |
| MythPlayer * | m_parent {nullptr} |
| ProgramInfo * | m_playbackInfo {nullptr} |
| AudioPlayer * | m_audio {nullptr} |
| MythMediaBuffer * | m_ringBuffer {nullptr} |
| double | m_fps {29.97} |
| int | m_fpsMultiplier {1} |
| int | m_fpsSkip {0} |
| uint | m_bitrate {4000} |
| int | m_currentWidth {640} |
| int | m_currentHeight {480} |
| float | m_currentAspect {1.33333F} |
| long long | m_framesPlayed {0} |
| long long | m_framesRead {0} |
| uint64_t | m_frameCounter {0} |
| MythAVRational | m_totalDuration {0} |
| int | m_keyframeDist {-1} |
| long long | m_lastKey {0} |
| long long | m_indexOffset {0} |
| MythAVCopy | m_copyFrame |
| bool | m_nextDecodedFrameIsKeyFrame { false } |
| EofState | m_atEof {kEofStateNone} |
| bool | m_trackTotalDuration {false} |
| 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} |
| QRecursiveMutex | m_positionMapLock |
| std::vector< PosMapEntry > | m_positionMap |
| frm_pos_map_t | m_frameToDurMap |
| frm_pos_map_t | m_durToFrameMap |
| QDateTime | m_lastPositionMapUpdate |
| uint64_t | m_seekSnap {UINT64_MAX} |
| bool | m_dontSyncPositionMap {false} |
| bool | m_livetv {false} |
| bool | m_watchingRecording {false} |
| bool | m_hasKeyFrameAdjustTable {false} |
| bool | m_errored {false} |
| bool | m_waitingForChange {false} |
| bool | m_justAfterChange {false} |
| long long | m_readAdjust {0} |
| int | m_videoRotation {0} |
| uint | m_stereo3D {0} |
| QRecursiveMutex | m_trackLock |
| bool | m_decodeAllSubtitles { false } |
| std::array< int, kTrackTypeCount > | m_currentTrack {} |
| std::array< sinfo_vec_t, kTrackTypeCount > | m_tracks |
| std::array< StreamInfo, kTrackTypeCount > | m_wantedTrack |
| std::array< StreamInfo, kTrackTypeCount > | m_selectedTrack |
| std::array< StreamInfo, kTrackTypeCount > | m_selectedForcedTrack |
| std::vector< int > | m_languagePreference |
| language preferences for auto-selection of streams More... | |
| MythCodecContext * | m_mythCodecCtx { nullptr } |
| MythVideoProfile | m_videoDisplayProfile |
| const VideoFrameTypes * | m_renderFormats { &MythVideoFrame::kDefaultRenderFormats } |
Friends | |
| int | get_avf_buffer (struct AVCodecContext *c, AVFrame *pic, int flags) |
A decoder for media files.
Definition at line 75 of file avformatdecoder.h.
| AvFormatDecoder::AvFormatDecoder | ( | MythPlayer * | parent, |
| const ProgramInfo & | pginfo, | ||
| PlayerFlags | flags | ||
| ) |
Definition at line 368 of file avformatdecoder.cpp.
|
override |
Definition at line 398 of file avformatdecoder.cpp.
|
delete |
| void AvFormatDecoder::AddTextData | ( | unsigned char * | buf, |
| int | len, | ||
| int64_t | timecode, | ||
| char | type | ||
| ) |
|
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.
Definition at line 4196 of file avformatdecoder.cpp.
Referenced by AutoSelectTrack(), and ProcessAudioPacket().
|
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
Reimplemented from DecoderBase.
Definition at line 4040 of file avformatdecoder.cpp.
Referenced by ProcessVBIDataPacket(), ScanStreams(), and UpdateATSCCaptionTracks().
|
protected |
Definition at line 1890 of file avformatdecoder.cpp.
Referenced by ScanStreams().
|
staticprotected |
Definition at line 5190 of file avformatdecoder.cpp.
Referenced by OpenFile().
|
static |
Perform an av_probe_input_format on the passed data to see if we can decode it with this class.
Definition at line 831 of file avformatdecoder.cpp.
Referenced by MythDVDPlayer::CreateDecoder(), MythPlayer::CreateDecoder(), and MythBDPlayer::CreateDecoder().
| void AvFormatDecoder::CloseCodecs | ( | ) |
Definition at line 434 of file avformatdecoder.cpp.
Referenced by CloseContext(), and MythBDDecoder::StreamChangeCheck().
| void AvFormatDecoder::CloseContext | ( | ) |
Definition at line 448 of file avformatdecoder.cpp.
Referenced by OpenFile(), and ~AvFormatDecoder().
| MythCodecMap * AvFormatDecoder::CodecMap | ( | void | ) |
Definition at line 429 of file avformatdecoder.cpp.
Referenced by MythMMALContext::GetSupportedCodec().
|
protected |
|
protected |
Definition at line 2785 of file avformatdecoder.cpp.
Referenced by ProcessVideoFrame().
|
inlineprotected |
Definition at line 4991 of file avformatdecoder.cpp.
Referenced by ProcessAudioPacket(), and SetupAudioStream().
|
protected |
Definition at line 623 of file avformatdecoder.cpp.
Referenced by DoFastForward(), and DoRewind().
|
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 601 of file avformatdecoder.cpp.
|
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.
| desiredFrame | frame we are attempting to seek to. |
| needflush | set to true if a seek is made. |
Reimplemented from DecoderBase.
Reimplemented in MythDVDDecoder.
Definition at line 2495 of file avformatdecoder.cpp.
|
protected |
Definition at line 5014 of file avformatdecoder.cpp.
Referenced by AutoSelectAudioTrack(), filter_max_ch(), ProcessAudioPacket(), and SetupAudioStream().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 589 of file avformatdecoder.cpp.
|
overrideprotectedvirtual |
Reimplemented from DecoderBase.
Reimplemented in MythDVDDecoder.
Definition at line 2490 of file avformatdecoder.cpp.
|
protected |
Definition at line 4078 of file avformatdecoder.cpp.
Referenced by selectBestAudioTrack().
|
inlineprotected |
Definition at line 222 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), InitVideoCodec(), and ProcessVideoFrame().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 4985 of file avformatdecoder.cpp.
Referenced by SetDisablePassThrough().
|
protected |
Definition at line 4928 of file avformatdecoder.cpp.
Referenced by GetFrame(), and ProcessDataPacket().
|
protected |
Definition at line 5250 of file avformatdecoder.cpp.
Referenced by HasVideo().
|
protected |
Definition at line 5241 of file avformatdecoder.cpp.
Referenced by get_current_AVProgram().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 3993 of file avformatdecoder.cpp.
Reimplemented in MythBDDecoder, and MythDVDDecoder.
Definition at line 2548 of file avformatdecoder.cpp.
Referenced by ScanStreams().
|
virtual |
Reimplemented in MythDVDDecoder.
Definition at line 2553 of file avformatdecoder.cpp.
Referenced by MythDVDDecoder::GetAudioTrackType(), and ScanStreams().
|
virtual |
Return ATSC Closed Caption Language.
Definition at line 2518 of file avformatdecoder.cpp.
Referenced by MythCCExtractorPlayer::Process608Captions(), MythCCExtractorPlayer::Process708Captions(), and UpdateCaptionTracksFromStreams().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 573 of file avformatdecoder.cpp.
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 532 of file avformatdecoder.cpp.
|
overridevirtual |
Implements DecoderBase.
Definition at line 4953 of file avformatdecoder.cpp.
Referenced by autoSelectVideoTrack().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 549 of file avformatdecoder.cpp.
|
overridevirtual |
Demux, preprocess and possibly decode a frame of video/audio.
Implements DecoderBase.
Reimplemented in MythDVDDecoder.
Definition at line 4570 of file avformatdecoder.cpp.
Referenced by MythDVDDecoder::GetFrame(), and SeekReset().
|
static |
Definition at line 1361 of file avformatdecoder.cpp.
Referenced by MythVAAPIContext::InitialiseContext(), MythVAAPIContext::InitialiseContext2(), and InitVideoCodec().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 525 of file avformatdecoder.cpp.
Referenced by GetChapter(), GetChapterTimes(), and GetCurrentChapter().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 4958 of file avformatdecoder.cpp.
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 3981 of file avformatdecoder.cpp.
Returns DVD Subtitle language.
Reimplemented in MythBDDecoder.
Definition at line 2511 of file avformatdecoder.cpp.
Referenced by GetAudioLanguage(), MythCCExtractorPlayer::ProcessDVBSubtitles(), and ScanStreams().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 3971 of file avformatdecoder.cpp.
|
virtual |
Returns TeleText language.
Definition at line 2501 of file avformatdecoder.cpp.
Referenced by MythCCExtractorPlayer::ProcessTeletext().
Reimplemented from DecoderBase.
Definition at line 3894 of file avformatdecoder.cpp.
|
inlineoverridevirtual |
Implements DecoderBase.
Definition at line 110 of file avformatdecoder.h.
Referenced by MythMMALContext::GetBuffer().
|
protected |
Definition at line 1200 of file avformatdecoder.cpp.
Referenced by autoSelectVideoTrack(), H264PreProcessPkt(), InitVideoCodec(), and MpegPreProcessPkt().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 3976 of file avformatdecoder.cpp.
|
protected |
Definition at line 3109 of file avformatdecoder.cpp.
Referenced by PreProcessVideoPacket().
|
protected |
Update our position map, keyframe distance, and the like.
Called for key frame packets.
Definition at line 2893 of file avformatdecoder.cpp.
Referenced by H264PreProcessPkt(), MpegPreProcessPkt(), and PreProcessVideoPacket().
|
protected |
Definition at line 4901 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protected |
Definition at line 1395 of file avformatdecoder.cpp.
Referenced by autoSelectVideoTrack().
|
inlineoverridevirtual |
Implements DecoderBase.
Definition at line 106 of file avformatdecoder.h.
|
inlineprotectedvirtual |
Reimplemented in MythBDDecoder.
Definition at line 215 of file avformatdecoder.h.
Referenced by MythBDDecoder::IsValidStream(), and ScanStreams().
|
protected |
Preprocess a packet, setting the video parms if necessary.
Definition at line 3015 of file avformatdecoder.cpp.
Referenced by PreProcessVideoPacket().
|
virtual |
Definition at line 503 of file avformatdecoder.cpp.
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 469 of file avformatdecoder.cpp.
Referenced by ProcessVideoFrame().
|
protected |
Definition at line 2456 of file avformatdecoder.cpp.
Referenced by autoSelectVideoTrack(), and ScanStreams().
|
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.
| rbuffer | pointer to a valid ringuffer. |
| novideo | if true then no video is sought in ScanSreams. |
| testbuf | Temporary buffer for probing the input. |
| testbufsize | The size of the test buffer. The minimum of this value or kDecoderProbeBufferSize will be used. |
Implements DecoderBase.
Definition at line 898 of file avformatdecoder.cpp.
|
delete |
|
inlineprotectedvirtual |
Reimplemented in MythDVDDecoder.
Definition at line 214 of file avformatdecoder.h.
Referenced by ScanStreams().
|
protected |
Definition at line 3211 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protected |
Definition at line 4376 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protectedvirtual |
Reimplemented in MythDVDDecoder.
Definition at line 3854 of file avformatdecoder.cpp.
Referenced by GetFrame(), and MythDVDDecoder::ProcessDataPacket().
|
protected |
Process DSMCC object carousel packet.
Definition at line 3712 of file avformatdecoder.cpp.
Referenced by ProcessDataPacket().
|
protected |
Process DVB Teletext.
Definition at line 3655 of file avformatdecoder.cpp.
Referenced by GetFrame(), and ProcessDataPacket().
|
protected |
Definition at line 3833 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protected |
Definition at line 3750 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protected |
Process ivtv proprietary embedded vertical blanking interval captions.
Definition at line 3570 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protectedvirtual |
Reimplemented in MythDVDDecoder.
Definition at line 3383 of file avformatdecoder.cpp.
Referenced by MythDVDDecoder::ProcessVideoFrame(), and ProcessVideoPacket().
|
protectedvirtual |
Reimplemented in MythDVDDecoder.
Definition at line 3269 of file avformatdecoder.cpp.
Referenced by GetFrame(), and MythDVDDecoder::ProcessVideoPacket().
|
protectedvirtual |
Reimplemented in MythBDDecoder, and MythDVDDecoder.
Definition at line 4893 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
protected |
Definition at line 2075 of file avformatdecoder.cpp.
Referenced by ScanStreams().
|
protected |
remove audio streams from the context used by dvd code during title transitions to remove stale audio streams
Definition at line 2644 of file avformatdecoder.cpp.
Referenced by ScanStreams().
|
overridevirtual |
Reimplemented from DecoderBase.
Reimplemented in MythDVDDecoder.
Definition at line 812 of file avformatdecoder.cpp.
Referenced by OpenFile(), MythBDDecoder::Reset(), and MythDVDDecoder::Reset().
|
protected |
Definition at line 1600 of file avformatdecoder.cpp.
Referenced by autoSelectVideoTrack(), and UpdateCaptionTracksFromStreams().
|
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 1825 of file avformatdecoder.cpp.
Referenced by ScanStreams().
|
protected |
Definition at line 1802 of file avformatdecoder.cpp.
Referenced by ScanStreams().
| int AvFormatDecoder::ScanStreams | ( | bool | novideo | ) |
Definition at line 2113 of file avformatdecoder.cpp.
Referenced by OpenFile(), StreamChangeCheck(), MythBDDecoder::StreamChangeCheck(), and MythDVDDecoder::StreamChangeCheck().
|
protected |
Definition at line 1745 of file avformatdecoder.cpp.
Referenced by ScanStreams().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 673 of file avformatdecoder.cpp.
Referenced by do_av_seek(), DoFastForward(), Reset(), MythBDDecoder::Reset(), and MythDVDDecoder::Reset().
|
protected |
Definition at line 4108 of file avformatdecoder.cpp.
Referenced by AutoSelectAudioTrack().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 4007 of file avformatdecoder.cpp.
Referenced by OpenFile().
|
overridevirtual |
Disables AC3/DTS pass through.
Reimplemented from DecoderBase.
Definition at line 4966 of file avformatdecoder.cpp.
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 800 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
inlineoverridevirtual |
Reimplemented from DecoderBase.
Definition at line 128 of file avformatdecoder.h.
Referenced by AvFormatDecoder().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 3882 of file avformatdecoder.cpp.
Referenced by MythDVDDecoder::PostProcessTracks(), and SetAudioByComponentTag().
|
protected |
Reinitializes audio if it needs to be reinitialized.
Definition at line 5041 of file avformatdecoder.cpp.
Referenced by AutoSelectAudioTrack(), ForceSetupAudioStream(), and SetTrack().
|
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().
| streamIndex | av_stream_index of the stream that has changed |
Definition at line 2585 of file avformatdecoder.cpp.
Referenced by ProcessAudioPacket().
|
overridevirtual |
Reimplemented from DecoderBase.
Definition at line 4020 of file avformatdecoder.cpp.
Referenced by OpenFile().
|
protectedvirtual |
Reimplemented in MythBDDecoder, and MythDVDDecoder.
Definition at line 4882 of file avformatdecoder.cpp.
Referenced by GetFrame().
|
static |
Definition at line 858 of file avformatdecoder.cpp.
Referenced by HandleStreamChange().
|
protected |
Definition at line 1676 of file avformatdecoder.cpp.
Referenced by autoSelectVideoTrack(), and UpdateCaptionTracksFromStreams().
|
protected |
Definition at line 2824 of file avformatdecoder.cpp.
Referenced by DecodeCCx08(), and ProcessVBIDataPacket().
|
overridevirtual |
Reimplemented from DecoderBase.
Reimplemented in MythDVDDecoder.
Definition at line 2485 of file avformatdecoder.cpp.
|
friend |
Definition at line 2686 of file avformatdecoder.cpp.
Referenced by InitVideoCodec().
|
protected |
Definition at line 263 of file avformatdecoder.h.
Referenced by GetFrame(), ProcessAudioPacket(), and ProcessDataPacket().
|
protected |
Definition at line 309 of file avformatdecoder.h.
Referenced by AvFormatDecoder(), ScanStreams(), and SetupAudioStream().
|
protected |
Definition at line 310 of file avformatdecoder.h.
Referenced by ProcessAudioPacket(), and SetupAudioStream().
|
protected |
Definition at line 318 of file avformatdecoder.h.
Referenced by AvFormatDecoder(), and GetFrame().
|
protected |
Definition at line 306 of file avformatdecoder.h.
Referenced by ProcessAudioPacket(), and ~AvFormatDecoder().
|
protected |
Definition at line 320 of file avformatdecoder.h.
Referenced by CloseCodecs(), OpenAVCodec(), OpenFile(), ProcessAudioPacket(), ProcessDSMCCPacket(), ProcessSubtitlePacket(), ProcessVideoPacket(), ReadPacket(), MythBDDecoder::ReadPacket(), MythDVDDecoder::ReadPacket(), RemoveAudioStreams(), ScanStreams(), and SeekReset().
|
protected |
Definition at line 234 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), CloseContext(), H264PreProcessPkt(), SetIdrOnlyKeyframes(), and ~AvFormatDecoder().
|
protected |
Definition at line 277 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), InitVideoCodec(), and ProcessVideoPacket().
|
protected |
Definition at line 243 of file avformatdecoder.h.
Referenced by CloseContext(), OpenFile(), and ~AvFormatDecoder().
|
protected |
Definition at line 280 of file avformatdecoder.h.
Referenced by AvFormatDecoder(), DecodeCCx08(), GetXDS(), ProcessVBIDataPacket(), UpdateCaptionTracksFromStreams(), and ~AvFormatDecoder().
|
protected |
Definition at line 281 of file avformatdecoder.h.
Referenced by DecodeCCx08(), UpdateCaptionTracksFromStreams(), and ~AvFormatDecoder().
|
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 286 of file avformatdecoder.h.
Referenced by ScanATSCCaptionStreams(), and UpdateCaptionTracksFromStreams().
|
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 290 of file avformatdecoder.h.
Referenced by UpdateATSCCaptionTracks(), and UpdateCaptionTracksFromStreams().
|
protected |
Definition at line 237 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), CloseCodecs(), CodecMap(), GetFrame(), GetSubHeader(), GetTrackDesc(), OpenFile(), RemoveAudioStreams(), ScanStreams(), SeekReset(), and SetupAudioStream().
|
protected |
Definition at line 242 of file avformatdecoder.h.
Referenced by GenerateDummyVideoFrames(), GetFrame(), ProcessVideoFrame(), and SeekReset().
|
protected |
Definition at line 246 of file avformatdecoder.h.
Referenced by InitVideoCodec(), and ProcessVideoFrame().
|
protected |
Definition at line 307 of file avformatdecoder.h.
Referenced by DoPassThrough(), and SetDisablePassThrough().
|
protected |
Definition at line 270 of file avformatdecoder.h.
Referenced by H264PreProcessPkt(), MpegPreProcessPkt(), ProcessVideoFrame(), and SeekReset().
|
protected |
Definition at line 271 of file avformatdecoder.h.
Referenced by H264PreProcessPkt(), MpegPreProcessPkt(), ProcessAudioPacket(), ProcessVideoFrame(), and SeekReset().
|
protected |
Definition at line 241 of file avformatdecoder.h.
Referenced by GetFrame().
|
protected |
Definition at line 248 of file avformatdecoder.h.
Referenced by H264PreProcessPkt(), HandleGopStart(), MpegPreProcessPkt(), OpenFile(), and SeekReset().
|
protected |
Definition at line 259 of file avformatdecoder.h.
Referenced by GenerateDummyVideoFrames(), GetFrame(), PreProcessVideoPacket(), and ProcessVideoFrame().
|
protected |
Definition at line 260 of file avformatdecoder.h.
Referenced by GetFrame().
|
protected |
Definition at line 236 of file avformatdecoder.h.
Referenced by AutoSelectAudioTrack(), autoSelectVideoTrack(), CloseCodecs(), CloseContext(), do_av_seek(), get_current_AVProgram(), GetAttachmentData(), MythBDDecoder::GetAudioLanguage(), MythDVDDecoder::GetAudioLanguage(), MythDVDDecoder::GetAudioTrackType(), GetAudioTrackType(), GetChapter(), GetChapterTimes(), GetCurrentChapter(), GetFrame(), GetNumChapters(), GetRawEncodingType(), GetSubHeader(), MythBDDecoder::GetSubtitleLanguage(), GetSubtitleLanguage(), GetTrackDesc(), GetVideoFrameRate(), NormalizeVideoTimecode(), OpenFile(), MythDVDDecoder::PostProcessTracks(), MythDVDDecoder::ReadPacket(), remove_tracks_not_in_same_AVProgram(), RemoveAudioStreams(), ScanATSCCaptionStreams(), ScanRawTextCaptions(), ScanStreams(), ScanTeletextCaptions(), SeekReset(), selectBestAudioTrack(), SetAudioByComponentTag(), SetEof(), SetupAudioStream(), SetVideoByComponentTag(), MythDVDDecoder::StreamChangeCheck(), and streams_changed().
|
protected |
Definition at line 232 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), and OpenFile().
|
protected |
MHEG/MHP decoder.
Definition at line 303 of file avformatdecoder.h.
Referenced by OpenFile(), ProcessDataPacket(), ProcessDSMCCPacket(), and ScanDSMCCStreams().
|
protected |
Definition at line 268 of file avformatdecoder.h.
Referenced by GetFrame(), H264PreProcessPkt(), MpegPreProcessPkt(), ProcessAudioPacket(), and SeekReset().
|
protected |
Definition at line 269 of file avformatdecoder.h.
Referenced by DecodeCCx08(), GetFrame(), H264PreProcessPkt(), MpegPreProcessPkt(), ProcessVBIDataPacket(), and SeekReset().
|
protected |
Definition at line 267 of file avformatdecoder.h.
Referenced by GenerateDummyVideoFrames(), GetFrame(), H264PreProcessPkt(), MpegPreProcessPkt(), ProcessVideoFrame(), and SeekReset().
|
protected |
Definition at line 276 of file avformatdecoder.h.
Referenced by HandleGopStart().
|
protected |
Definition at line 261 of file avformatdecoder.h.
Referenced by GenerateDummyVideoFrames(), and GetFrame().
|
protected |
Definition at line 273 of file avformatdecoder.h.
Referenced by AvFormatDecoder(), and FlagIsSet().
|
protected |
StreamInfo for 608 and 708 Captions seen in the PMT descriptor.
Definition at line 292 of file avformatdecoder.h.
Referenced by GetCaptionLanguage(), ScanATSCCaptionStreams(), and UpdateATSCCaptionTracks().
|
protected |
TrackType (608 or 708) for Captions seen in the PMT descriptor.
Definition at line 294 of file avformatdecoder.h.
Referenced by GetCaptionLanguage(), ScanATSCCaptionStreams(), and UpdateATSCCaptionTracks().
|
protected |
Definition at line 256 of file avformatdecoder.h.
Referenced by H264PreProcessPkt(), HandleGopStart(), MpegPreProcessPkt(), and SeekReset().
|
protected |
Definition at line 312 of file avformatdecoder.h.
Referenced by GetFrame(), and OpenFile().
|
protected |
Definition at line 315 of file avformatdecoder.h.
Referenced by ProcessVideoPacket(), and ScanStreams().
|
protected |
A flag to indicate that we've seen a GOP frame. Used in junction with seq_count.
Definition at line 250 of file avformatdecoder.h.
Referenced by MpegPreProcessPkt(), PreProcessVideoPacket(), and Reset().
|
protected |
A counter used to determine if we need to force a call to HandleGopStart.
Definition at line 252 of file avformatdecoder.h.
Referenced by MpegPreProcessPkt(), PreProcessVideoPacket(), and Reset().
|
protected |
Definition at line 262 of file avformatdecoder.h.
Referenced by GetFrame().
|
protected |
Definition at line 265 of file avformatdecoder.h.
Referenced by MpegPreProcessPkt().
|
protected |
Definition at line 254 of file avformatdecoder.h.
Referenced by GetFrame(), ProcessVideoPacket(), MythDVDDecoder::ReadPacket(), SeekReset(), and ~AvFormatDecoder().
|
protected |
Definition at line 314 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), GetFrame(), InitVideoCodec(), ProcessVideoPacket(), StreamChangeCheck(), MythBDDecoder::StreamChangeCheck(), and MythDVDDecoder::StreamChangeCheck().
|
protected |
StreamInfo for 608 and 708 Captions seen in the caption stream itself but not seen in the PMT.
Definition at line 297 of file avformatdecoder.h.
Referenced by GetCaptionLanguage(), UpdateATSCCaptionTracks(), and UpdateCaptionTracksFromStreams().
|
protected |
TrackType (608 or 708) for Captions seen in the caption stream itself but not seen in the PMT.
Definition at line 300 of file avformatdecoder.h.
Referenced by GetCaptionLanguage(), UpdateATSCCaptionTracks(), and UpdateCaptionTracksFromStreams().
|
protected |
Definition at line 245 of file avformatdecoder.h.
Referenced by ProcessVideoFrame(), and ~AvFormatDecoder().
|
protected |
Definition at line 282 of file avformatdecoder.h.
Referenced by GetTeletextDecoderType(), ProcessDVBDataPacket(), ProcessVBIDataPacket(), and ~AvFormatDecoder().
|
protected |
Definition at line 274 of file avformatdecoder.h.
Referenced by autoSelectVideoTrack(), GetCodecDecoderName(), GetVideoCodecID(), InitVideoCodec(), and ProcessVideoPacket().