MythTV  master
avformatdecoder.h
Go to the documentation of this file.
1 
2 #ifndef AVFORMATDECODER_H_
3 #define AVFORMATDECODER_H_
4 
5 #include <cstdint>
6 
7 #include <QString>
8 #include <QMap>
9 #include <QList>
10 
11 #include "programinfo.h"
12 #include "format.h"
13 #include "decoderbase.h"
14 #include "privatedecoder.h"
15 #include "audiooutputsettings.h"
16 #include "audiooutpututil.h"
17 #include "spdifencoder.h"
18 #include "vbilut.h"
19 #include "H264Parser.h"
20 #include "videodisplayprofile.h"
21 #include "mythplayer.h"
22 
23 extern "C" {
24 #include "mythframe.h"
25 #include "libavcodec/avcodec.h"
26 #include "libavformat/avformat.h"
27 }
28 
29 #include "avfringbuffer.h"
30 
31 class TeletextDecoder;
32 class CC608Decoder;
33 class CC708Decoder;
34 class SubtitleReader;
35 class InteractiveTV;
36 class ProgramInfo;
37 class MythSqlDatabase;
38 
39 struct SwsContext;
40 
41 extern "C" void HandleStreamChange(void*);
42 extern "C" void HandleDVDStreamChange(void*);
43 extern "C" void HandleBDStreamChange(void*);
44 
45 class AudioInfo
46 {
47  public:
49  codec_id(AV_CODEC_ID_NONE), format(FORMAT_NONE), sample_size(-2),
50  sample_rate(-1), channels(-1), codec_profile(0),
52  {;}
53 
54  AudioInfo(AVCodecID id, AudioFormat fmt, int sr, int ch, bool passthru,
55  int original_ch, int profile = 0) :
56  codec_id(id), format(fmt),
57  sample_size(ch * AudioOutputSettings::SampleSize(fmt)),
59  do_passthru(passthru), original_channels(original_ch)
60  {
61  }
62 
63  AVCodecID codec_id;
68  bool operator==(const AudioInfo &o) const
69  {
70  return (codec_id==o.codec_id && channels==o.channels &&
75  }
76  QString toString() const
77  {
78  return QString("id(%1) %2Hz %3ch %4bps %5 (profile %6)")
79  .arg(ff_codec_id_string(codec_id),4).arg(sample_rate,6)
81  .arg((do_passthru) ? "pt":"",3).arg(codec_profile);
82  }
83 };
84 
86 
90 {
91  friend void HandleStreamChange(void*);
92  friend void HandleDVDStreamChange(void*);
93  friend void HandleBDStreamChange(void*);
94  public:
95  static void GetDecoders(render_opts &opts);
96  AvFormatDecoder(MythPlayer *parent, const ProgramInfo &pginfo,
97  PlayerFlags flags);
98  virtual ~AvFormatDecoder();
99 
100  void SetEof(bool eof) override; // DecoderBase
101 
102  void CloseCodecs();
103  void CloseContext();
104  void Reset(bool reset_video_data, bool seek_reset,
105  bool reset_file) override; // DecoderBase
106 
109  static bool CanHandle(char testbuf[kDecoderProbeBufferSize],
110  const QString &filename,
111  int testbufsize = kDecoderProbeBufferSize);
112 
114  int OpenFile(RingBuffer *rbuffer, bool novideo,
115  char testbuf[kDecoderProbeBufferSize],
116  int testbufsize = kDecoderProbeBufferSize) override; // DecoderBase
117 
118  bool GetFrame(DecodeType) override; // DecoderBase
119 
120  bool IsLastFrameKey(void) const override { return false; } // DecoderBase
121 
122  bool IsCodecMPEG(void) const override // DecoderBase
123  { return m_codec_is_mpeg; }
124 
126  void WriteStoredData(RingBuffer *rb, bool storevid,
127  long timecodeOffset) override // DecoderBase
128  { (void)rb; (void)storevid; (void)timecodeOffset;}
129 
131  void SetRawAudioState(bool state) override { (void)state; } // DecoderBase
132 
134  bool GetRawAudioState(void) const override { return false; } // DecoderBase
135 
137  void SetRawVideoState(bool state) override { (void)state; } // DecoderBase
138 
140  bool GetRawVideoState(void) const override { return false; } // DecoderBase
141 
143  long UpdateStoredFrameNum(long frame) override { (void)frame; return 0;} // DecoderBase
144 
145  QString GetCodecDecoderName(void) const override; // DecoderBase
146  QString GetRawEncodingType(void) override; // DecoderBase
147  MythCodecID GetVideoCodecID(void) const override { return m_video_codec_id; } // DecoderBase
148  void *GetVideoCodecPrivate(void) override; // DecoderBase
149 
150  void SetDisablePassThrough(bool disable) override; // DecoderBase
151  void ForceSetupAudioStream(void) override; // DecoderBase
152  void AddTextData(unsigned char *buf, int len, int64_t timecode, char type);
153 
154  QString GetTrackDesc(uint type, uint trackNo) const override; // DecoderBase
155  int SetTrack(uint type, int trackNo) override; // DecoderBase
156 
157  int ScanStreams(bool novideo);
158  int FindStreamInfo(void);
159 
160  int GetNumChapters() override; // DecoderBase
161  void GetChapterTimes(QList<long long> &times) override; // DecoderBase
162  int GetCurrentChapter(long long framesPlayed) override; // DecoderBase
163  long long GetChapter(int chapter) override; // DecoderBase
164  bool DoRewind(long long desiredFrame, bool discardFrames = true) override; // DecoderBase
165  bool DoFastForward(long long desiredFrame, bool discardFrames = true) override; // DecoderBase
166  void SetIdrOnlyKeyframes(bool value) override // DecoderBase
167  { m_h264_parser->use_I_forKeyframes(!value); }
168 
169  int64_t NormalizeVideoTimecode(int64_t timecode) override; // DecoderBase
170  virtual int64_t NormalizeVideoTimecode(AVStream *st, int64_t timecode);
171 
172  int GetTeletextDecoderType(void) const override; // DecoderBase
173 
174  QString GetXDS(const QString&) const override; // DecoderBase
175  QByteArray GetSubHeader(uint trackNo) const override; // DecoderBase
176  void GetAttachmentData(uint trackNo, QByteArray &filename,
177  QByteArray &data) override; // DecoderBase
178 
179  // MHEG stuff
180  bool SetAudioByComponentTag(int tag) override; // DecoderBase
181  bool SetVideoByComponentTag(int tag) override; // DecoderBase
182 
183  // Stream language info
184  virtual int GetTeletextLanguage(uint lang_idx) const;
185  virtual int GetSubtitleLanguage(uint subtitle_index, uint stream_index);
186  virtual int GetCaptionLanguage(TrackTypes trackType, int service_num);
187  virtual int GetAudioLanguage(uint audio_index, uint stream_index);
188  virtual AudioTrackType GetAudioTrackType(uint stream_index);
189 
190  private:
191  AvFormatDecoder(const AvFormatDecoder &) = delete; // not copyable
192  AvFormatDecoder &operator=(const AvFormatDecoder &) = delete; // not copyable
193 
194  protected:
195  RingBuffer *getRingBuf(void) { return ringBuffer; }
196 
197  int AutoSelectTrack(uint type) override; // DecoderBase
198 
199  void ScanATSCCaptionStreams(int av_index);
200  void UpdateATSCCaptionTracks(void);
201  void UpdateCaptionTracksFromStreams(bool check_608, bool check_708);
202  void ScanTeletextCaptions(int av_index);
203  void ScanRawTextCaptions(int av_stream_index);
204  void ScanDSMCCStreams(void);
205  int AutoSelectAudioTrack(void);
206  int filter_max_ch(const AVFormatContext *ic,
207  const sinfo_vec_t &tracks,
208  const vector<int> &fs,
209  enum AVCodecID codecId = AV_CODEC_ID_NONE,
210  int profile = -1);
211 
212  friend int get_avf_buffer(struct AVCodecContext *c, AVFrame *pic,
213  int flags);
214  friend int get_avf_buffer_vaapi2(struct AVCodecContext *c, AVFrame *pic,
215  int flags);
216  friend int get_avf_buffer_nvdec(struct AVCodecContext *c, AVFrame *pic,
217  int flags);
218  friend void release_avf_buffer(void *opaque, uint8_t *data);
219 
220  friend int open_avf(URLContext *h, const char *filename, int flags);
221  friend int read_avf(URLContext *h, uint8_t *buf, int buf_size);
222  friend int write_avf(URLContext *h, uint8_t *buf, int buf_size);
223  friend int64_t seek_avf(URLContext *h, int64_t offset, int whence);
224  friend int close_avf(URLContext *h);
225 
226  void DecodeDTVCC(const uint8_t *buf, uint buf_size, bool scte);
227  void DecodeCCx08(const uint8_t *buf, uint buf_size, bool scte);
228  void InitByteContext(bool forceseek = false);
229  void InitVideoCodec(AVStream *stream, AVCodecContext *enc,
230  bool selectedStream = false);
231 
233  void MpegPreProcessPkt(AVStream *stream, AVPacket *pkt);
234  int H264PreProcessPkt(AVStream *stream, AVPacket *pkt);
235  bool PreProcessVideoPacket(AVStream *stream, AVPacket *pkt);
236  virtual bool ProcessVideoPacket(AVStream *stream, AVPacket *pkt);
237  virtual bool ProcessVideoFrame(AVStream *stream, AVFrame *mpa_pic);
238  bool ProcessAudioPacket(AVStream *stream, AVPacket *pkt,
239  DecodeType decodetype);
240  bool ProcessSubtitlePacket(AVStream *stream, AVPacket *pkt);
241  bool ProcessRawTextPacket(AVPacket *pkt);
242  virtual bool ProcessDataPacket(AVStream *curstream, AVPacket *pkt,
243  DecodeType decodetype);
244 
245  void ProcessVBIDataPacket(const AVStream *stream, const AVPacket *pkt);
246  void ProcessDVBDataPacket(const AVStream *stream, const AVPacket *pkt);
247  void ProcessDSMCCPacket(const AVStream *stream, const AVPacket *pkt);
248 
249  float GetMpegAspect(AVCodecContext *context, int aspect_ratio_info,
250  int width, int height);
251 
252  void SeekReset(long long, uint skipFrames, bool doFlush, bool discardFrames) override; // DecoderBase
253 
254  inline bool DecoderWillDownmix(const AVCodecContext *ctx);
255  bool DoPassThrough(const AVCodecParameters *par, bool withProfile=true);
256  bool SetupAudioStream(void);
257  void SetupAudioStreamSubIndexes(int streamIndex);
258  void RemoveAudioStreams();
259 
262  void HandleGopStart(AVPacket *pkt, bool can_reliably_parse_keyframes);
263 
264  bool GenerateDummyVideoFrames(void);
265  bool HasVideo(const AVFormatContext *ic);
266  float normalized_fps(AVStream *stream, AVCodecContext *enc);
267  void av_update_stream_timings_video(AVFormatContext *ic);
268  bool OpenAVCodec(AVCodecContext *avctx, const AVCodec *codec);
269 
270  void UpdateFramesPlayed(void) override; // DecoderBase
271  bool DoRewindSeek(long long desiredFrame) override; // DecoderBase
272  void DoFastForwardSeek(long long desiredFrame, bool &needflush) override; // DecoderBase
273  virtual void StreamChangeCheck(void);
274  virtual void PostProcessTracks(void) { }
275  virtual bool IsValidStream(int /*streamid*/) {return true;}
276 
277  int DecodeAudio(AVCodecContext *ctx, uint8_t *buffer, int &data_size,
278  AVPacket *pkt);
279 
280  virtual int ReadPacket(AVFormatContext *ctx, AVPacket *pkt, bool &storePacket);
281 
283 
285 
287 
288  AVFormatContext *m_ic {nullptr};
289  // AVFormatParameters params;
290 
291  URLContext m_readcontext {};
292 
296 
297  struct SwsContext *m_sws_ctx {nullptr};
298  bool m_directrendering {false};
299 
300  bool m_no_dts_hack {false};
301  bool m_dorewind {false};
302 
303  bool m_gopset {false};
305  bool m_seen_gop {false};
307  int m_seq_count {0};
308 
309  QList<AVPacket*> m_storedPackets;
310 
311  int m_prevgoppos {0};
312 
313  // GetFrame
314  bool m_gotVideoFrame {false};
315  bool m_hasVideo {false};
317  bool m_skipaudio {false};
318  bool m_allowedquit {false};
319 
320  uint32_t m_start_code_state {0xffffffff};
321 
322  long long m_lastvpts {0};
323  long long m_lastapts {0};
324  long long m_lastccptsu {0};
325  long long m_firstvpts {0};
326  bool m_firstvptsinuse {false};
327 
328  int64_t m_faulty_pts {0};
329  int64_t m_faulty_dts {0};
332  bool m_pts_detected {false};
334  bool m_pts_selected {true};
335  // set use_frame_timing true to utilize the pts values in returned
336  // frames. Set fale to use deprecated method.
337  bool m_use_frame_timing {false};
338 
340 
343 
346 
347  // Caption/Subtitle/Teletext decoders
351  CC608Decoder *m_ccd608 {nullptr};
352  CC708Decoder *m_ccd708 {nullptr};
353  TeletextDecoder *m_ttd {nullptr};
354  int m_cc608_parity_table[256] {0};
358  bool m_ccX08_in_pmt[64+4] {};
362  bool m_ccX08_in_tracks[64+4] {};
364  QList<StreamInfo> m_pmt_tracks;
366  QList<TrackType> m_pmt_track_types;
369  QList<StreamInfo> m_stream_tracks;
372  QList<TrackType> m_stream_track_types;
373 
375  InteractiveTV *m_itv {nullptr};
376 
377  // Audio
378  uint8_t *m_audioSamples {nullptr};
379  bool m_disable_passthru {false};
380 
383 
384  float m_fps {0.0F};
385  bool m_codec_is_mpeg {false};
386  bool m_processFrames {true};
387  bool m_streams_changed {false};
388  // Value in milliseconds, from setting AudioReadAhead
389  int m_audioReadAhead {100};
390 };
391 
392 #endif
393 
394 /* vim: set expandtab tabstop=4 shiftwidth=4: */
uint32_t m_start_code_state
bool IsCodecMPEG(void) const override
virtual bool ProcessDataPacket(AVStream *curstream, AVPacket *pkt, DecodeType decodetype)
int AutoSelectTrack(uint type) override
Select best track.
bool ProcessSubtitlePacket(AVStream *stream, AVPacket *pkt)
int original_channels
MythCodecID m_video_codec_id
bool ProcessAudioPacket(AVStream *stream, AVPacket *pkt, DecodeType decodetype)
void SetDisablePassThrough(bool disable) override
Disables AC3/DTS pass through.
QString GetTrackDesc(uint type, uint trackNo) const override
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 GetAttachmentData(uint trackNo, QByteArray &filename, QByteArray &data) override
struct SwsContext * m_sws_ctx
void DecodeDTVCC(const uint8_t *buf, uint buf_size, bool scte)
PlayerFlags
Definition: mythplayer.h:88
uint8_t * m_audioSamples
void use_I_forKeyframes(bool val)
Definition: H264Parser.h:188
InteractiveTV * m_itv
MHEG/MHP decoder.
MythCodecID
Definition: mythcodecid.h:10
int AutoSelectAudioTrack(void)
Selects the best audio track.
friend int get_avf_buffer(struct AVCodecContext *c, AVFrame *pic, int flags)
int64_t m_last_dts_for_fault_detection
struct AVFrame AVFrame
long long m_firstvpts
QList< StreamInfo > m_stream_tracks
StreamInfo for 608 and 708 Captions seen in the caption stream itself but not seen in the PMT.
H264Parser * m_h264_parser
virtual int GetCaptionLanguage(TrackTypes trackType, int service_num)
Return ATSC Closed Caption Language.
AudioTrackType
Definition: decoderbase.h:55
void RemoveAudioStreams()
remove audio streams from the context used by dvd code during title transitions to remove stale audio...
bool SetVideoByComponentTag(int tag) override
QString GetCodecDecoderName(void) const override
void SetupAudioStreamSubIndexes(int streamIndex)
Reacts to DUAL/STEREO changes on the fly and fix streams.
friend int64_t seek_avf(URLContext *h, int64_t offset, int whence)
int DecodeAudio(AVCodecContext *ctx, uint8_t *buffer, int &data_size, AVPacket *pkt)
CC708Decoder * m_ccd708
int64_t m_last_pts_for_fault_detection
int OpenFile(RingBuffer *rbuffer, bool novideo, char testbuf[kDecoderProbeBufferSize], int testbufsize=kDecoderProbeBufferSize) override
Open our file and set up or audio and video parameters.
friend int write_avf(URLContext *h, uint8_t *buf, int buf_size)
TrackTypes
Track types.
Definition: decoderbase.h:26
bool m_seen_gop
A flag to indicate that we've seen a GOP frame. Used in junction with seq_count.
virtual bool ProcessVideoPacket(AVStream *stream, AVPacket *pkt)
AudioInfo m_audioOut
unsigned int uint
Definition: compat.h:140
void ForceSetupAudioStream(void) override
bool OpenAVCodec(AVCodecContext *avctx, const AVCodec *codec)
AudioInfo(AVCodecID id, AudioFormat fmt, int sr, int ch, bool passthru, int original_ch, int profile=0)
virtual int GetTeletextLanguage(uint lang_idx) const
Returns TeleText language.
virtual int GetSubtitleLanguage(uint subtitle_index, uint stream_index)
Returns DVD Subtitle language.
static int FormatToBits(AudioFormat format)
PrivateDecoder * m_private_dec
void av_update_stream_timings_video(AVFormatContext *ic)
float GetMpegAspect(AVCodecContext *context, int aspect_ratio_info, int width, int height)
void MpegPreProcessPkt(AVStream *stream, AVPacket *pkt)
Preprocess a packet, setting the video parms if necessary.
VideoFrame * m_decoded_video_frame
friend int close_avf(URLContext *h)
int H264PreProcessPkt(AVStream *stream, AVPacket *pkt)
friend void HandleStreamChange(void *)
void UpdateFramesPlayed(void) override
friend int get_avf_buffer_nvdec(struct AVCodecContext *c, AVFrame *pic, int flags)
void UpdateCaptionTracksFromStreams(bool check_608, bool check_708)
virtual ~AvFormatDecoder()
void WriteStoredData(RingBuffer *rb, bool storevid, long timecodeOffset) override
This is a No-op for this class.
AVFRingBuffer * m_avfRingBuffer
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 C...
void HandleGopStart(AVPacket *pkt, bool can_reliably_parse_keyframes)
Update our position map, keyframe distance, and the like.
RingBuffer * ringBuffer
Definition: decoderbase.h:298
bool HasVideo(const AVFormatContext *ic)
int m_cc608_parity_table[256]
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 thro...
bool GetRawAudioState(void) const override
This is a No-op for this class.
Holds information on recordings and videos.
Definition: programinfo.h:66
void SetEof(bool eof) override
int m_seq_count
A counter used to determine if we need to force a call to HandleGopStart.
bool DoRewind(long long desiredFrame, bool discardFrames=true) override
void HandleDVDStreamChange(void *)
friend int read_avf(URLContext *h, uint8_t *buf, int buf_size)
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:85
void ProcessVBIDataPacket(const AVStream *stream, const AVPacket *pkt)
Process ivtv proprietary embedded vertical blanking interval captions.
const int kDecoderProbeBufferSize
Definition: decoderbase.h:23
void ProcessDVBDataPacket(const AVStream *stream, const AVPacket *pkt)
Process DVB Teletext.
friend int open_avf(URLContext *h, const char *filename, int flags)
PlayerFlags playerFlags
QString toString() const
void GetChapterTimes(QList< long long > &times) override
void * GetVideoCodecPrivate(void) override
void InitVideoCodec(AVStream *stream, AVCodecContext *enc, bool selectedStream=false)
CC608Decoder * m_ccd608
void ScanRawTextCaptions(int av_stream_index)
AVFormatContext * m_ic
bool ProcessRawTextPacket(AVPacket *pkt)
void UpdateATSCCaptionTracks(void)
void DecodeCCx08(const uint8_t *buf, uint buf_size, bool scte)
int SetTrack(uint type, int trackNo) override
static void GetDecoders(render_opts &opts)
A decoder for video files.
QList< TrackType > m_pmt_track_types
TrackType (608 or 708) for Captions seen in the PMT descriptor.
void ScanATSCCaptionStreams(int av_index)
virtual bool ProcessVideoFrame(AVStream *stream, AVFrame *mpa_pic)
void SeekReset(long long, uint skipFrames, bool doFlush, bool discardFrames) override
void SetRawVideoState(bool state) override
This is a No-op for this class.
long long GetChapter(int chapter) override
virtual void StreamChangeCheck(void)
QByteArray GetSubHeader(uint trackNo) const override
void HandleBDStreamChange(void *)
bool GetRawVideoState(void) const override
This is a No-op for this class.
bool do_passthru
virtual int GetAudioLanguage(uint audio_index, uint stream_index)
friend void HandleDVDStreamChange(void *)
QString GetXDS(const QString &) const override
int GetTeletextDecoderType(void) const override
AudioFormat format
QList< TrackType > m_stream_track_types
TrackType (608 or 708) for Captions seen in the caption stream itself but not seen in the PMT.
bool operator==(const AudioInfo &o) const
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...
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.
enum DecodeTypes DecodeType
QList< StreamInfo > m_pmt_tracks
StreamInfo for 608 and 708 Captions seen in the PMT descriptor.
void InitByteContext(bool forceseek=false)
int FindStreamInfo(void)
void SetRawAudioState(bool state) override
This is a No-op for this class.
int ScanStreams(bool novideo)
bool SetupAudioStream(void)
Reinitializes audio if it needs to be reinitialized.
void SetIdrOnlyKeyframes(bool value) override
virtual int ReadPacket(AVFormatContext *ctx, AVPacket *pkt, bool &storePacket)
RingBuffer * getRingBuf(void)
void Reset(bool reset_video_data, bool seek_reset, bool reset_file) override
int GetCurrentChapter(long long framesPlayed) override
vector< StreamInfo > sinfo_vec_t
Definition: decoderbase.h:111
int64_t NormalizeVideoTimecode(int64_t timecode) override
bool DoFastForward(long long desiredFrame, bool discardFrames=true) override
Skips ahead or rewinds to desiredFrame.
virtual void PostProcessTracks(void)
void HandleStreamChange(void *)
QString GetRawEncodingType(void) override
AvFormatDecoder(MythPlayer *parent, const ProgramInfo &pginfo, PlayerFlags flags)
bool GenerateDummyVideoFrames(void)
AvFormatDecoder & operator=(const AvFormatDecoder &)=delete
float normalized_fps(AVStream *stream, AVCodecContext *enc)
TeletextDecoder * m_ttd
friend void HandleBDStreamChange(void *)
bool SetAudioByComponentTag(int tag) override
QList< AVPacket * > m_storedPackets
URLContext m_readcontext
void ScanDSMCCStreams(void)
Check to see whether there is a Network Boot Ifo sub-descriptor in the PMT which requires the MHEG ap...
void ScanTeletextCaptions(int av_index)
Implements a file/stream reader/writer.
bool DoRewindSeek(long long desiredFrame) override
bool IsLastFrameKey(void) const override
void AddTextData(unsigned char *buf, int len, int64_t timecode, char type)
bool DecoderWillDownmix(const AVCodecContext *ctx)
long long m_lastvpts
void ProcessDSMCCPacket(const AVStream *stream, const AVPacket *pkt)
Process DSMCC object carousel packet.
bool GetFrame(DecodeType) override
Demux, preprocess and possibly decode a frame of video/audio.
AVCodecID codec_id
long long m_lastccptsu
bool DoPassThrough(const AVCodecParameters *par, bool withProfile=true)
friend int get_avf_buffer_vaapi2(struct AVCodecContext *c, AVFrame *pic, int flags)
MythCodecID GetVideoCodecID(void) const override
int GetNumChapters() override
friend void release_avf_buffer(void *opaque, uint8_t *data)
This is the interface between an MHEG engine and a MythTV TV object.
Definition: interactivetv.h:12
long long m_lastapts
virtual bool IsValidStream(int)
long UpdateStoredFrameNum(long frame) override
This is a No-op for this class.
bool PreProcessVideoPacket(AVStream *stream, AVPacket *pkt)
virtual AudioTrackType GetAudioTrackType(uint stream_index)