MythTV  master
mpeg2fix.h
Go to the documentation of this file.
1 // POSIX
2 #include <pthread.h>
3 
4 // C++
5 #include <cstdlib>
6 
7 #include "libmythbase/mythconfig.h"
8 
9 extern "C"
10 {
11 //AVFormat/AVCodec
12 #include "libavcodec/avcodec.h"
13 #include "libavformat/avformat.h"
14 
15 //libmpeg2
16 #if CONFIG_LIBMPEG2EXTERNAL
17 #include <mpeg2dec/mpeg2.h>
18 #else
19 #include "libmythmpeg2/mpeg2.h"
20 #endif
21 }
22 
23 //replex
26 
27 // Qt
28 #include <QMap>
29 #include <QList>
30 #include <QQueue>
31 #include <QStringList>
32 #include <QDateTime>
33 
34 // MythTV
36 #include "libmythtv/mythavutil.h"
37 
38 // MythTranscode
39 #include "transcodedefs.h"
40 
44 };
45 
47 {
48  public:
49  explicit MPEG2frame(int size);
50  ~MPEG2frame();
51  void ensure_size(int size) const;
52  void set_pkt(AVPacket *newpkt) const;
53 
54  AVPacket *m_pkt {nullptr};
55  bool m_isSequence {false};
56  bool m_isGop {false};
57  uint8_t *m_framePos {nullptr};
58  uint8_t *m_gopPos {nullptr};
59  mpeg2_sequence_t m_mpeg2_seq;
60  mpeg2_gop_t m_mpeg2_gop;
61  mpeg2_picture_t m_mpeg2_pic;
62 };
63 
64 struct poq_idx_t {
65  int64_t newPTS;
66  int64_t pos_pts;
67  int framenum;
68  bool type;
69 };
70 
72 {
73  public:
74  PTSOffsetQueue(int vidid, QList<int> keys, int64_t initPTS);
75  void SetNextPTS(int64_t newPTS, int64_t atPTS);
76  void SetNextPos(int64_t newPTS, AVPacket *pkt);
77  int64_t Get(int idx, AVPacket *pkt);
78  int64_t UpdateOrigPTS(int idx, int64_t &origPTS, AVPacket *pkt);
79  private:
80  QMap<int, QList<poq_idx_t> > m_offset;
81  QMap<int, QList<poq_idx_t> > m_orig;
82  QList<int> m_keyList;
83  int m_vidId;
84 };
85 
86 //container for all multiplex related variables
87 using RingbufferArray = std::array<ringbuffer,N_AUDIO>;
88 using ExtTypeIntArray = std::array<int,N_AUDIO>;
89 using AudioFrameArray = std::array<audio_frame_t,N_AUDIO>;
90 
92 {
93  public:
94  MPEG2replex() = default;
95  ~MPEG2replex();
96  void Start();
97  int WaitBuffers();
98  int m_done {0};
99  QString m_outfile;
100  int m_otype {0};
105  int m_extCount {0};
108 
109  pthread_mutex_t m_mutex {};
110  pthread_cond_t m_cond {};
113 
114  private:
115  multiplex_t *m_mplex {nullptr};
116 };
117 
118 using FrameList = QList<MPEG2frame *>;
119 using FrameQueue = QQueue<MPEG2frame *>;
120 using FrameMap = QMap<int, FrameList *>;
121 
123 {
124  public:
125  MPEG2fixup(const QString &inf, const QString &outf,
126  frm_dir_map_t *deleteMap, const char *fmt, bool norp,
127  bool fixPTS, int maxf, bool showprog, int otype,
128  void (*update_func)(float) = nullptr, int (*check_func)() = nullptr);
129  ~MPEG2fixup();
130  int Start();
131  void AddRangeList(const QStringList& rangelist, int type);
132  static void ShowRangeMap(frm_dir_map_t *mapPtr, QString msg);
133  int BuildKeyframeIndex(const QString &file, frm_pos_map_t &posMap, frm_pos_map_t &durMap);
134 
135  void SetAllAudio(bool keep) { m_allAudio = keep; }
136 
137  static void dec2x33(int64_t *pts1, int64_t pts2);
138  static void inc2x33(int64_t *pts1, int64_t pts2);
139  static int64_t udiff2x33(int64_t pts1, int64_t pts2);
140  static int64_t diff2x33(int64_t pts1, int64_t pts2);
141  static int64_t add2x33(int64_t pts1, int64_t pts2);
142  static int cmp2x33(int64_t pts1, int64_t pts2);
143 
144  protected:
145  static void *ReplexStart(void *data);
147 
148  private:
149  static int FindMPEG2Header(const uint8_t *buf, int size, uint8_t code);
150  void InitReplex();
151  void FrameInfo(MPEG2frame *f);
152  int AddFrame(MPEG2frame *f);
153  bool InitAV(const QString& inputfile, const char *type, int64_t offset);
154  void ScanAudio();
155  int ProcessVideo(MPEG2frame *vf, mpeg2dec_t *dec);
156  void WriteFrame(const QString& filename, MPEG2frame *f);
157  void WriteFrame(const QString& filename, AVPacket *pkt);
158  static void WriteYUV(const QString& filename, const mpeg2_info_t *info);
159  static void WriteData(const QString& filename, uint8_t *data, int size);
160  bool BuildFrame(AVPacket *pkt, const QString& fname);
161  MPEG2frame *GetPoolFrame(AVPacket *pkt);
163  int GetFrame(AVPacket *pkt);
164  bool FindStart();
165  static void SetRepeat(MPEG2frame *vf, int nb_fields, bool topff);
166  static void SetRepeat(uint8_t *ptr, int size, int fields, bool topff);
167  MPEG2frame *FindFrameNum(int frameNum);
168  void RenumberFrames(int start_pos, int delta);
169  void StoreSecondary();
170  int PlaybackSecondary();
171  MPEG2frame *DecodeToFrame(int frameNum, int skip_reset);
172  int ConvertToI(FrameList *orderedFrames, int headPos);
173  int InsertFrame(int frameNum, int64_t deltaPTS,
174  int64_t ptsIncrement, int64_t initPTS);
175  void AddSequence(MPEG2frame *frame1, MPEG2frame *frame2);
176  static FrameList ReorderDTStoPTS(FrameList *dtsOrder, int pos);
177  void InitialPTSFixup(MPEG2frame *curFrame, int64_t &origvPTS,
178  int64_t &PTSdiscrep, int numframes, bool fix) const;
179  static void SetFrameNum(uint8_t *ptr, int num);
180  static int GetFrameNum(const MPEG2frame *frame)
181  {
182  return frame->m_mpeg2_pic.temporal_reference;
183  }
184  static int GetFrameTypeN(const MPEG2frame *frame)
185  {
186  return frame->m_mpeg2_pic.flags & PIC_MASK_CODING_TYPE;
187  }
188  static char GetFrameTypeT(const MPEG2frame *frame)
189  {
190  int type = GetFrameTypeN(frame);
191  return (type == 1 ? 'I' :
192  (type == 2 ? 'P' : (type == 3 ? 'B' : 'X')));
193  }
194  static int GetNbFields(const MPEG2frame *frame)
195  {
196  return frame->m_mpeg2_pic.nb_fields;
197  }
198  int GetStreamType(int id) const
199  {
200  return (m_inputFC->streams[id]->codecpar->codec_id == AV_CODEC_ID_AC3) ?
201  AV_CODEC_ID_AC3 : AV_CODEC_ID_MP2;
202  }
203  AVCodecContext *getCodecContext(uint id)
204  {
205  if (id >= m_inputFC->nb_streams)
206  return nullptr;
207  return m_codecMap.GetCodecContext(m_inputFC->streams[id]);
208  }
209  AVCodecParserContext *getCodecParserContext(uint id)
210  {
211  if (id >= m_inputFC->nb_streams)
212  return nullptr;
213  return av_stream_get_parser(m_inputFC->streams[id]);
214  }
215 
216  static void dumpList(FrameList *list);
217 
218  int (*m_checkAbort)() {nullptr};
219  void (*m_updateStatus)(float percent_done) {nullptr};
220 
222  bool m_useSecondary {false};
223 
228  int m_displayFrame {0};
229  mpeg2dec_t *m_headerDecoder {nullptr};
230  mpeg2dec_t *m_imgDecoder {nullptr};
231 
234 
235  pthread_t m_thread {};
236 
238  AVFormatContext *m_inputFC {nullptr};
239  AVFrame *m_picture {nullptr};
240 
241  int m_vidId {-1};
242  int m_extCount {0};
243  QMap <int, int> m_audMap;
244  int64_t m_ptsIncrement {0};
245  bool m_mkvFile {false};
246 
247  bool m_discard {false};
248  //control options
250  bool m_fixPts;
252  QString m_infile;
253  const char *m_format {nullptr};
254  bool m_allAudio {false};
255 
256  //complete?
257  bool m_fileEnd {false};
258  bool m_realFileEnd {false};
259 
260  //progress indicators
261  QDateTime m_statusTime;
262  bool m_showProgress {false};
263  uint64_t m_fileSize {0};
264  int m_frameNum {0};
266  uint64_t m_lastWrittenPos {0};
267 };
268 
269 #ifdef NO_MYTH
270  #include <QDateTime>
271  #include <iostream>
272 
273  extern int verboseMask;
274  #undef LOG
275  #define LOG(mask,level,args...) \
276  do { \
277  if ((verboseMask & mask) != 0) \
278  { \
279  cout << args << endl; \
280  } \
281  } while (0)
282 
283  // Be sure to keep these the same as in libmythbase/exitcodes.h or expect
284  // odd behavior eventually
285  #define GENERIC_EXIT_OK 0
286  #define GENERIC_EXIT_NOT_OK 128
287  #define GENERIC_EXIT_WRITE_FRAME_ERROR 149
288  #define GENERIC_EXIT_DEADLOCK 150
289 #else
290  #include "libmythbase/exitcodes.h"
291  #include "libmyth/mythcontext.h"
292 #endif
293 
294 /*
295  * vim:ts=4:sw=4:ai:et:si:sts=4
296  */
MPEG2fixup::m_mkvFile
bool m_mkvFile
Definition: mpeg2fix.h:245
poq_idx_t::pos_pts
int64_t pos_pts
Definition: mpeg2fix.h:66
MPEG2fixup::m_delMap
frm_dir_map_t m_delMap
Definition: mpeg2fix.h:232
MPEG2frame::m_isGop
bool m_isGop
Definition: mpeg2fix.h:56
MPEG2fixup::MPEG2fixup
MPEG2fixup(const QString &inf, const QString &outf, frm_dir_map_t *deleteMap, const char *fmt, bool norp, bool fixPTS, int maxf, bool showprog, int otype, void(*update_func)(float)=nullptr, int(*check_func)()=nullptr)
Definition: mpeg2fix.cpp:237
MPEG2fixup::FrameInfo
void FrameInfo(MPEG2frame *f)
Definition: mpeg2fix.cpp:669
MPEG2fixup::SetFrameNum
static void SetFrameNum(uint8_t *ptr, int num)
Definition: mpeg2fix.cpp:900
MPEG2fixup::m_vidId
int m_vidId
Definition: mpeg2fix.h:241
MPEG2replex::m_extframe
AudioFrameArray m_extframe
Definition: mpeg2fix.h:111
ringbuffer.h
MPEG2frame::m_mpeg2_seq
mpeg2_sequence_t m_mpeg2_seq
Definition: mpeg2fix.h:59
MPEG2fixup::cmp2x33
static int cmp2x33(int64_t pts1, int64_t pts2)
Definition: mpeg2fix.cpp:432
MPEG2fixup::ReplexStart
static void * ReplexStart(void *data)
Definition: mpeg2fix.cpp:535
MPEG2fixup::InsertFrame
int InsertFrame(int frameNum, int64_t deltaPTS, int64_t ptsIncrement, int64_t initPTS)
Definition: mpeg2fix.cpp:1876
MPEG2fixup::m_displayFrame
int m_displayFrame
Definition: mpeg2fix.h:228
poq_idx_t::type
bool type
Definition: mpeg2fix.h:68
poq_idx_t
Definition: mpeg2fix.h:64
MPF_TYPE_CUTLIST
@ MPF_TYPE_CUTLIST
Definition: mpeg2fix.h:42
MPEG2fixup::m_rx
MPEG2replex m_rx
Definition: mpeg2fix.h:146
MPEG2fixup::m_vSecondary
FrameList m_vSecondary
Definition: mpeg2fix.h:219
MythCodecMap::GetCodecContext
AVCodecContext * GetCodecContext(const AVStream *Stream, const AVCodec *Codec=nullptr, bool NullCodec=false)
Definition: mythavutil.cpp:287
MPEG2fixup::m_frameNum
int m_frameNum
Definition: mpeg2fix.h:264
ExtTypeIntArray
std::array< int, N_AUDIO > ExtTypeIntArray
Definition: mpeg2fix.h:88
ringbuffer
Definition: ringbuffer.h:39
MPEG2fixup::m_showProgress
bool m_showProgress
Definition: mpeg2fix.h:262
MPEG2fixup::AddFrame
int AddFrame(MPEG2frame *f)
Definition: mpeg2fix.cpp:685
sequence_t
Definition: element.h:87
MPEG2fixup::WriteYUV
static void WriteYUV(const QString &filename, const mpeg2_info_t *info)
Definition: mpeg2fix.cpp:1097
PTSOffsetQueue::m_keyList
QList< int > m_keyList
Definition: mpeg2fix.h:82
AudioFrameArray
std::array< audio_frame_t, N_AUDIO > AudioFrameArray
Definition: mpeg2fix.h:89
MPEG2fixup::udiff2x33
static int64_t udiff2x33(int64_t pts1, int64_t pts2)
Definition: mpeg2fix.cpp:388
MPEG2fixup::InitAV
bool InitAV(const QString &inputfile, const char *type, int64_t offset)
Definition: mpeg2fix.cpp:792
MPEG2fixup::m_infile
QString m_infile
Definition: mpeg2fix.h:252
FrameMap
QMap< int, FrameList * > FrameMap
Definition: mpeg2fix.h:120
MPEG2fixup::m_framePool
FrameQueue m_framePool
Definition: mpeg2fix.h:226
MPEG2fixup::WriteData
static void WriteData(const QString &filename, uint8_t *data, int size)
Definition: mpeg2fix.cpp:1136
MPEG2fixup::GetFrameNum
static int GetFrameNum(const MPEG2frame *frame)
Definition: mpeg2fix.h:180
MPEG2fixup::ScanAudio
void ScanAudio()
MPEG2fixup::ReorderDTStoPTS
static FrameList ReorderDTStoPTS(FrameList *dtsOrder, int pos)
Definition: mpeg2fix.cpp:2014
MPEG2fixup::GetFrameTypeT
static char GetFrameTypeT(const MPEG2frame *frame)
Definition: mpeg2fix.h:188
MPEG2fixup::m_maxFrames
int m_maxFrames
Definition: mpeg2fix.h:251
MPEG2frame::m_pkt
AVPacket * m_pkt
Definition: mpeg2fix.h:54
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:119
MPEG2fixup::m_inputFC
AVFormatContext * m_inputFC
Definition: mpeg2fix.h:238
MPEG2fixup::StoreSecondary
void StoreSecondary()
Definition: mpeg2fix.cpp:1701
MPEG2replex::m_indexVrbuf
ringbuffer m_indexVrbuf
Definition: mpeg2fix.h:103
FrameList
QList< MPEG2frame * > FrameList
Definition: mpeg2fix.h:118
poq_idx_t::framenum
int framenum
Definition: mpeg2fix.h:67
PTSOffsetQueue::m_offset
QMap< int, QList< poq_idx_t > > m_offset
Definition: mpeg2fix.h:80
MPEG2replex::MPEG2replex
MPEG2replex()=default
poq_idx_t::newPTS
int64_t newPTS
Definition: mpeg2fix.h:65
PTSOffsetQueue::SetNextPos
void SetNextPos(int64_t newPTS, AVPacket *pkt)
Definition: mpeg2fix.cpp:194
MPEG2replex
Definition: mpeg2fix.h:91
MPEG2fixup::BuildKeyframeIndex
int BuildKeyframeIndex(const QString &file, frm_pos_map_t &posMap, frm_pos_map_t &durMap)
Definition: mpeg2fix.cpp:2876
build_compdb.file
file
Definition: build_compdb.py:55
MPEG2fixup::ConvertToI
int ConvertToI(FrameList *orderedFrames, int headPos)
Definition: mpeg2fix.cpp:1807
MPEG2fixup::m_statusUpdateTime
int m_statusUpdateTime
Definition: mpeg2fix.h:265
MPEG2replex::m_extCount
int m_extCount
Definition: mpeg2fix.h:105
MPEG2frame::~MPEG2frame
~MPEG2frame()
Definition: mpeg2fix.cpp:109
PTSOffsetQueue::Get
int64_t Get(int idx, AVPacket *pkt)
Definition: mpeg2fix.cpp:153
MPEG2fixup::m_fileEnd
bool m_fileEnd
Definition: mpeg2fix.h:257
programtypes.h
MPEG2fixup::AddSequence
void AddSequence(MPEG2frame *frame1, MPEG2frame *frame2)
Definition: mpeg2fix.cpp:905
PTSOffsetQueue::m_orig
QMap< int, QList< poq_idx_t > > m_orig
Definition: mpeg2fix.h:81
MPEG2fixup
Definition: mpeg2fix.h:122
MPEG2fixup::m_codecMap
MythCodecMap m_codecMap
Definition: mpeg2fix.h:237
MPEG2replex::WaitBuffers
int WaitBuffers()
Definition: mpeg2fix.cpp:496
MPEG2replex::m_cond
pthread_cond_t m_cond
Definition: mpeg2fix.h:110
AVFrame
struct AVFrame AVFrame
Definition: BorderDetector.h:15
MPEG2fixup::FindMPEG2Header
static int FindMPEG2Header(const uint8_t *buf, int size, uint8_t code)
Definition: mpeg2fix.cpp:455
MPEG2fixup::m_format
const char * m_format
Definition: mpeg2fix.h:253
MPEG2fixup::~MPEG2fixup
~MPEG2fixup()
Definition: mpeg2fix.cpp:315
transcodedefs.h
MPEG2frame::ensure_size
void ensure_size(int size) const
Definition: mpeg2fix.cpp:114
MPEG2fixup::WriteFrame
void WriteFrame(const QString &filename, MPEG2frame *f)
Definition: mpeg2fix.cpp:1051
MPEG2replex::~MPEG2replex
~MPEG2replex()
Definition: mpeg2fix.cpp:480
MPEG2fixup::m_headerDecoder
mpeg2dec_t * m_headerDecoder
Definition: mpeg2fix.h:229
MPEG2fixup::SetAllAudio
void SetAllAudio(bool keep)
Definition: mpeg2fix.h:135
MPEG2frame::m_mpeg2_pic
mpeg2_picture_t m_mpeg2_pic
Definition: mpeg2fix.h:61
MPEG2fixup::m_fileSize
uint64_t m_fileSize
Definition: mpeg2fix.h:263
MPEG2fixup::dumpList
static void dumpList(FrameList *list)
Definition: mpeg2fix.cpp:2070
verboseMask
uint64_t verboseMask
Definition: logging.cpp:101
MPEG2fixup::add2x33
static int64_t add2x33(int64_t pts1, int64_t pts2)
Definition: mpeg2fix.cpp:424
MPEG2fixup::InitReplex
void InitReplex()
Definition: mpeg2fix.cpp:597
MPFListType
MPFListType
Definition: mpeg2fix.h:41
MPEG2replex::m_exttype
ExtTypeIntArray m_exttype
Definition: mpeg2fix.h:106
MPEG2fixup::GetFrameTypeN
static int GetFrameTypeN(const MPEG2frame *frame)
Definition: mpeg2fix.h:184
MPEG2fixup::ProcessVideo
int ProcessVideo(MPEG2frame *vf, mpeg2dec_t *dec)
Definition: mpeg2fix.cpp:927
MPEG2frame::set_pkt
void set_pkt(AVPacket *newpkt) const
Definition: mpeg2fix.cpp:130
MPEG2replex::m_seq_head
sequence_t m_seq_head
Definition: mpeg2fix.h:112
MPEG2frame::m_mpeg2_gop
mpeg2_gop_t m_mpeg2_gop
Definition: mpeg2fix.h:60
MPEG2frame
Definition: mpeg2fix.h:46
PTSOffsetQueue
Definition: mpeg2fix.h:71
MPEG2fixup::diff2x33
static int64_t diff2x33(int64_t pts1, int64_t pts2)
Definition: mpeg2fix.cpp:399
MPEG2fixup::m_updateStatus
void(* m_updateStatus)(float percent_done)
Definition: mpeg2fix.h:219
MPEG2fixup::ShowRangeMap
static void ShowRangeMap(frm_dir_map_t *mapPtr, QString msg)
Definition: mpeg2fix.cpp:1995
MPEG2fixup::m_noRepeat
bool m_noRepeat
Definition: mpeg2fix.h:249
MPEG2fixup::DecodeToFrame
MPEG2frame * DecodeToFrame(int frameNum, int skip_reset)
Definition: mpeg2fix.cpp:1730
MPEG2fixup::m_fixPts
bool m_fixPts
Definition: mpeg2fix.h:250
MPEG2frame::m_framePos
uint8_t * m_framePos
Definition: mpeg2fix.h:57
MythCodecMap
Definition: mythavutil.h:29
MPEG2fixup::m_saveMap
frm_dir_map_t m_saveMap
Definition: mpeg2fix.h:233
uint
unsigned int uint
Definition: compat.h:79
MPEG2fixup::getCodecParserContext
AVCodecParserContext * getCodecParserContext(uint id)
Definition: mpeg2fix.h:209
MPEG2fixup::m_realFileEnd
bool m_realFileEnd
Definition: mpeg2fix.h:258
MPEG2fixup::InitialPTSFixup
void InitialPTSFixup(MPEG2frame *curFrame, int64_t &origvPTS, int64_t &PTSdiscrep, int numframes, bool fix) const
Definition: mpeg2fix.cpp:2031
MPEG2replex::m_mplex
multiplex_t * m_mplex
Definition: mpeg2fix.h:115
frm_pos_map_t
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
MPEG2replex::m_mutex
pthread_mutex_t m_mutex
Definition: mpeg2fix.h:109
PTSOffsetQueue::PTSOffsetQueue
PTSOffsetQueue(int vidid, QList< int > keys, int64_t initPTS)
Definition: mpeg2fix.cpp:137
MPEG2fixup::m_thread
pthread_t m_thread
Definition: mpeg2fix.h:235
MPEG2fixup::m_ptsIncrement
int64_t m_ptsIncrement
Definition: mpeg2fix.h:244
MPEG2fixup::inc2x33
static void inc2x33(int64_t *pts1, int64_t pts2)
Definition: mpeg2fix.cpp:383
MPEG2fixup::AddRangeList
void AddRangeList(const QStringList &rangelist, int type)
Definition: mpeg2fix.cpp:1952
MPEG2fixup::FindStart
bool FindStart()
Definition: mpeg2fix.cpp:1508
MPEG2fixup::m_audMap
QMap< int, int > m_audMap
Definition: mpeg2fix.h:243
MPEG2fixup::m_aFrame
FrameMap m_aFrame
Definition: mpeg2fix.h:225
multiplex.h
MPEG2fixup::GetNbFields
static int GetNbFields(const MPEG2frame *frame)
Definition: mpeg2fix.h:194
MPEG2fixup::m_discard
bool m_discard
Definition: mpeg2fix.h:247
MPEG2fixup::dec2x33
static void dec2x33(int64_t *pts1, int64_t pts2)
Definition: mpeg2fix.cpp:378
MPEG2replex::m_vrBuf
ringbuffer m_vrBuf
Definition: mpeg2fix.h:101
MPEG2fixup::GetFrame
int GetFrame(AVPacket *pkt)
Definition: mpeg2fix.cpp:1391
PTSOffsetQueue::UpdateOrigPTS
int64_t UpdateOrigPTS(int idx, int64_t &origPTS, AVPacket *pkt)
Definition: mpeg2fix.cpp:216
MPEG2fixup::FindFrameNum
MPEG2frame * FindFrameNum(int frameNum)
Definition: mpeg2fix.cpp:1678
MPEG2replex::m_exttypcnt
ExtTypeIntArray m_exttypcnt
Definition: mpeg2fix.h:107
PTSOffsetQueue::SetNextPTS
void SetNextPTS(int64_t newPTS, int64_t atPTS)
Definition: mpeg2fix.cpp:181
FrameQueue
QQueue< MPEG2frame * > FrameQueue
Definition: mpeg2fix.h:119
mythavutil.h
MPEG2fixup::BuildFrame
bool BuildFrame(AVPacket *pkt, const QString &fname)
Definition: mpeg2fix.cpp:1154
MPEG2fixup::GetStreamType
int GetStreamType(int id) const
Definition: mpeg2fix.h:198
mythcontext.h
MPEG2fixup::m_useSecondary
bool m_useSecondary
Definition: mpeg2fix.h:222
MPEG2fixup::Start
int Start()
Definition: mpeg2fix.cpp:2090
PTSOffsetQueue::m_vidId
int m_vidId
Definition: mpeg2fix.h:83
MPEG2fixup::m_unreadFrames
FrameQueue m_unreadFrames
Definition: mpeg2fix.h:227
MPEG2frame::m_isSequence
bool m_isSequence
Definition: mpeg2fix.h:55
MPEG2fixup::m_lastWrittenPos
uint64_t m_lastWrittenPos
Definition: mpeg2fix.h:266
MPEG2replex::m_extrbuf
RingbufferArray m_extrbuf
Definition: mpeg2fix.h:102
MPEG2fixup::m_extCount
int m_extCount
Definition: mpeg2fix.h:242
MPEG2fixup::m_imgDecoder
mpeg2dec_t * m_imgDecoder
Definition: mpeg2fix.h:230
MPEG2replex::m_indexExtrbuf
RingbufferArray m_indexExtrbuf
Definition: mpeg2fix.h:104
RingbufferArray
std::array< ringbuffer, N_AUDIO > RingbufferArray
Definition: mpeg2fix.h:87
multiplex_t
Definition: multiplex.h:41
MPEG2fixup::m_statusTime
QDateTime m_statusTime
Definition: mpeg2fix.h:261
MPEG2replex::Start
void Start()
Definition: mpeg2fix.cpp:546
exitcodes.h
build_compdb.filename
filename
Definition: build_compdb.py:21
MPEG2fixup::m_allAudio
bool m_allAudio
Definition: mpeg2fix.h:254
MPEG2fixup::getCodecContext
AVCodecContext * getCodecContext(uint id)
Definition: mpeg2fix.h:203
MPEG2fixup::GetPoolFrame
MPEG2frame * GetPoolFrame(AVPacket *pkt)
Definition: mpeg2fix.cpp:1354
MPF_TYPE_SAVELIST
@ MPF_TYPE_SAVELIST
Definition: mpeg2fix.h:43
MPEG2fixup::m_picture
AVFrame * m_picture
Definition: mpeg2fix.h:239
MPEG2frame::m_gopPos
uint8_t * m_gopPos
Definition: mpeg2fix.h:58
MPEG2fixup::m_checkAbort
int(* m_checkAbort)()
Definition: mpeg2fix.h:218
MPEG2fixup::m_vFrame
FrameList m_vFrame
Definition: mpeg2fix.h:224
MPEG2replex::m_otype
int m_otype
Definition: mpeg2fix.h:100
MPEG2replex::m_outfile
QString m_outfile
Definition: mpeg2fix.h:99
MPEG2fixup::PlaybackSecondary
int PlaybackSecondary()
Definition: mpeg2fix.cpp:1717
MPEG2frame::MPEG2frame
MPEG2frame(int size)
Definition: mpeg2fix.cpp:102
MPEG2fixup::RenumberFrames
void RenumberFrames(int start_pos, int delta)
Definition: mpeg2fix.cpp:1689
MPEG2replex::m_done
int m_done
Definition: mpeg2fix.h:98
MPEG2fixup::SetRepeat
static void SetRepeat(MPEG2frame *vf, int nb_fields, bool topff)
Definition: mpeg2fix.cpp:1641