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