MythTV
master
|
#include <mpeg2fix.h>
Public Member Functions | |
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) | |
~MPEG2fixup () | |
int | Start () |
void | AddRangeList (const QStringList &rangelist, int type) |
int | BuildKeyframeIndex (const QString &file, frm_pos_map_t &posMap, frm_pos_map_t &durMap) |
void | SetAllAudio (bool keep) |
Static Public Member Functions | |
static void | ShowRangeMap (frm_dir_map_t *mapPtr, QString msg) |
static void | dec2x33 (int64_t *pts1, int64_t pts2) |
static void | inc2x33 (int64_t *pts1, int64_t pts2) |
static int64_t | udiff2x33 (int64_t pts1, int64_t pts2) |
static int64_t | diff2x33 (int64_t pts1, int64_t pts2) |
static int64_t | add2x33 (int64_t pts1, int64_t pts2) |
static int | cmp2x33 (int64_t pts1, int64_t pts2) |
Static Protected Member Functions | |
static void * | ReplexStart (void *data) |
Protected Attributes | |
MPEG2replex | m_rx |
Private Member Functions | |
void | InitReplex () |
void | FrameInfo (MPEG2frame *f) |
int | AddFrame (MPEG2frame *f) |
bool | InitAV (const QString &inputfile, const char *type, int64_t offset) |
void | ScanAudio () |
int | ProcessVideo (MPEG2frame *vf, mpeg2dec_t *dec) |
void | WriteFrame (const QString &filename, MPEG2frame *f) |
void | WriteFrame (const QString &filename, AVPacket *pkt) |
bool | BuildFrame (AVPacket *pkt, const QString &fname) |
MPEG2frame * | GetPoolFrame (AVPacket *pkt) |
MPEG2frame * | GetPoolFrame (MPEG2frame *f) |
int | GetFrame (AVPacket *pkt) |
bool | FindStart () |
MPEG2frame * | FindFrameNum (int frameNum) |
void | RenumberFrames (int start_pos, int delta) |
void | StoreSecondary () |
int | PlaybackSecondary () |
MPEG2frame * | DecodeToFrame (int frameNum, int skip_reset) |
int | ConvertToI (FrameList *orderedFrames, int headPos) |
int | InsertFrame (int frameNum, int64_t deltaPTS, int64_t ptsIncrement, int64_t initPTS) |
void | AddSequence (MPEG2frame *frame1, MPEG2frame *frame2) |
void | InitialPTSFixup (MPEG2frame *curFrame, int64_t &origvPTS, int64_t &PTSdiscrep, int numframes, bool fix) const |
int | GetStreamType (int id) const |
AVCodecContext * | getCodecContext (uint id) |
AVCodecParserContext * | getCodecParserContext (uint id) |
Static Private Member Functions | |
static int | FindMPEG2Header (const uint8_t *buf, int size, uint8_t code) |
static void | WriteYUV (const QString &filename, const mpeg2_info_t *info) |
static void | WriteData (const QString &filename, uint8_t *data, int size) |
static void | SetRepeat (MPEG2frame *vf, int nb_fields, bool topff) |
static void | SetRepeat (uint8_t *ptr, int size, int fields, bool topff) |
static FrameList | ReorderDTStoPTS (FrameList *dtsOrder, int pos) |
static void | SetFrameNum (uint8_t *ptr, int num) |
static int | GetFrameNum (const MPEG2frame *frame) |
static int | GetFrameTypeN (const MPEG2frame *frame) |
static char | GetFrameTypeT (const MPEG2frame *frame) |
static int | GetNbFields (const MPEG2frame *frame) |
static void | dumpList (FrameList *list) |
Private Attributes | |
int(* | m_checkAbort )() |
void(* | m_updateStatus )(float percent_done) |
FrameList | m_vSecondary |
bool | m_useSecondary {false} |
FrameList | m_vFrame |
FrameMap | m_aFrame |
FrameQueue | m_framePool |
FrameQueue | m_unreadFrames |
int | m_displayFrame {0} |
mpeg2dec_t * | m_headerDecoder {nullptr} |
mpeg2dec_t * | m_imgDecoder {nullptr} |
frm_dir_map_t | m_delMap |
frm_dir_map_t | m_saveMap |
pthread_t | m_thread {} |
MythCodecMap | m_codecMap {} |
AVFormatContext * | m_inputFC {nullptr} |
AVFrame * | m_picture {nullptr} |
int | m_vidId {-1} |
int | m_extCount {0} |
QMap< int, int > | m_audMap |
int64_t | m_ptsIncrement {0} |
bool | m_mkvFile {false} |
bool | m_discard {false} |
bool | m_noRepeat |
bool | m_fixPts |
int | m_maxFrames |
QString | m_infile |
const char * | m_format {nullptr} |
bool | m_allAudio {false} |
bool | m_fileEnd {false} |
bool | m_realFileEnd {false} |
QDateTime | m_statusTime |
bool | m_showProgress {false} |
uint64_t | m_fileSize {0} |
int | m_frameNum {0} |
int | m_statusUpdateTime {5} |
uint64_t | m_lastWrittenPos {0} |
Definition at line 122 of file mpeg2fix.h.
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(*)(float) | update_func = nullptr , |
||
int(*)() | check_func = nullptr |
||
) |
Definition at line 234 of file mpeg2fix.cpp.
MPEG2fixup::~MPEG2fixup | ( | ) |
Definition at line 308 of file mpeg2fix.cpp.
int MPEG2fixup::Start | ( | ) |
Definition at line 2086 of file mpeg2fix.cpp.
void MPEG2fixup::AddRangeList | ( | const QStringList & | rangelist, |
int | type | ||
) |
Definition at line 1948 of file mpeg2fix.cpp.
|
static |
Definition at line 1991 of file mpeg2fix.cpp.
Referenced by Start().
int MPEG2fixup::BuildKeyframeIndex | ( | const QString & | file, |
frm_pos_map_t & | posMap, | ||
frm_pos_map_t & | durMap | ||
) |
Definition at line 2872 of file mpeg2fix.cpp.
Referenced by BuildKeyframeIndex().
|
inline |
Definition at line 135 of file mpeg2fix.h.
|
static |
Definition at line 371 of file mpeg2fix.cpp.
Referenced by Start().
|
static |
Definition at line 376 of file mpeg2fix.cpp.
Referenced by InsertFrame().
|
static |
Definition at line 381 of file mpeg2fix.cpp.
|
static |
Definition at line 392 of file mpeg2fix.cpp.
Referenced by FindStart(), InitialPTSFixup(), PTSOffsetQueue::SetNextPos(), and Start().
|
static |
Definition at line 417 of file mpeg2fix.cpp.
Referenced by Start().
|
static |
Definition at line 425 of file mpeg2fix.cpp.
Referenced by diff2x33(), FindStart(), and Start().
|
staticprotected |
Definition at line 528 of file mpeg2fix.cpp.
Referenced by MPEG2fixup().
|
staticprivate |
Definition at line 448 of file mpeg2fix.cpp.
Referenced by BuildFrame().
|
private |
Definition at line 590 of file mpeg2fix.cpp.
Referenced by Start().
|
private |
Definition at line 662 of file mpeg2fix.cpp.
Referenced by AddFrame().
|
private |
Definition at line 678 of file mpeg2fix.cpp.
Referenced by Start().
|
private |
Definition at line 785 of file mpeg2fix.cpp.
Referenced by BuildKeyframeIndex(), and Start().
|
private |
|
private |
Definition at line 920 of file mpeg2fix.cpp.
Referenced by AddSequence(), ConvertToI(), DecodeToFrame(), GetFrame(), InsertFrame(), PlaybackSecondary(), and WriteFrame().
|
private |
Definition at line 1044 of file mpeg2fix.cpp.
Referenced by AddSequence(), BuildFrame(), and Start().
|
private |
Definition at line 1064 of file mpeg2fix.cpp.
|
staticprivate |
Definition at line 1090 of file mpeg2fix.cpp.
Referenced by BuildFrame(), and WriteFrame().
|
staticprivate |
Definition at line 1132 of file mpeg2fix.cpp.
Referenced by BuildFrame(), ProcessVideo(), and WriteFrame().
|
private |
Definition at line 1150 of file mpeg2fix.cpp.
Referenced by ConvertToI(), and InsertFrame().
|
private |
Definition at line 1350 of file mpeg2fix.cpp.
Referenced by DecodeToFrame(), GetFrame(), GetPoolFrame(), InsertFrame(), and WriteFrame().
|
private |
Definition at line 1373 of file mpeg2fix.cpp.
|
private |
Definition at line 1387 of file mpeg2fix.cpp.
Referenced by FindStart(), and Start().
|
private |
Definition at line 1504 of file mpeg2fix.cpp.
Referenced by Start().
|
staticprivate |
Definition at line 1637 of file mpeg2fix.cpp.
Referenced by BuildFrame(), and Start().
|
staticprivate |
Definition at line 1644 of file mpeg2fix.cpp.
|
private |
Definition at line 1674 of file mpeg2fix.cpp.
Referenced by DecodeToFrame().
|
private |
Definition at line 1685 of file mpeg2fix.cpp.
Referenced by InsertFrame(), and Start().
|
private |
Definition at line 1697 of file mpeg2fix.cpp.
Referenced by Start().
|
private |
Definition at line 1713 of file mpeg2fix.cpp.
Referenced by ConvertToI().
|
private |
Definition at line 1726 of file mpeg2fix.cpp.
Referenced by ConvertToI(), and InsertFrame().
|
private |
Definition at line 1803 of file mpeg2fix.cpp.
Referenced by Start().
|
private |
Definition at line 1872 of file mpeg2fix.cpp.
Referenced by Start().
|
private |
Definition at line 898 of file mpeg2fix.cpp.
Referenced by Start(), and WriteFrame().
Definition at line 2010 of file mpeg2fix.cpp.
Referenced by Start().
|
private |
Definition at line 2027 of file mpeg2fix.cpp.
Referenced by Start().
|
staticprivate |
Definition at line 893 of file mpeg2fix.cpp.
Referenced by ConvertToI(), DecodeToFrame(), InsertFrame(), PlaybackSecondary(), and RenumberFrames().
|
inlinestaticprivate |
Definition at line 180 of file mpeg2fix.h.
Referenced by ConvertToI(), dumpList(), FindFrameNum(), InitialPTSFixup(), InsertFrame(), RenumberFrames(), and Start().
|
inlinestaticprivate |
Definition at line 184 of file mpeg2fix.h.
Referenced by AddFrame(), and GetFrameTypeT().
|
inlinestaticprivate |
Definition at line 188 of file mpeg2fix.h.
Referenced by ConvertToI(), dumpList(), InsertFrame(), ReorderDTStoPTS(), Start(), and StoreSecondary().
|
inlinestaticprivate |
Definition at line 194 of file mpeg2fix.h.
Referenced by dumpList(), InitialPTSFixup(), InsertFrame(), and Start().
|
inlineprivate |
Definition at line 198 of file mpeg2fix.h.
Referenced by AddFrame(), and InitReplex().
|
inlineprivate |
Definition at line 203 of file mpeg2fix.h.
Referenced by InitReplex(), and Start().
|
inlineprivate |
Definition at line 209 of file mpeg2fix.h.
Referenced by Start().
|
staticprivate |
Definition at line 2066 of file mpeg2fix.cpp.
|
protected |
Definition at line 146 of file mpeg2fix.h.
Referenced by AddFrame(), FrameInfo(), InitReplex(), MPEG2fixup(), ReplexStart(), and Start().
|
inlineprivate |
Definition at line 218 of file mpeg2fix.h.
Referenced by GetFrame(), and MPEG2fixup().
|
inlineprivate |
Definition at line 219 of file mpeg2fix.h.
Referenced by GetFrame(), and MPEG2fixup().
|
private |
Definition at line 219 of file mpeg2fix.h.
Referenced by PlaybackSecondary(), StoreSecondary(), and ~MPEG2fixup().
Definition at line 222 of file mpeg2fix.h.
Referenced by AddRangeList(), MPEG2fixup(), Start(), and StoreSecondary().
|
private |
Definition at line 224 of file mpeg2fix.h.
Referenced by ConvertToI(), DecodeToFrame(), FindFrameNum(), FindStart(), GetFrame(), InitReplex(), InsertFrame(), RenumberFrames(), Start(), StoreSecondary(), WriteFrame(), and ~MPEG2fixup().
|
private |
Definition at line 225 of file mpeg2fix.h.
Referenced by FindStart(), GetFrame(), InitAV(), InitReplex(), Start(), and ~MPEG2fixup().
|
private |
Definition at line 226 of file mpeg2fix.h.
Referenced by DecodeToFrame(), FindStart(), GetFrame(), GetPoolFrame(), Start(), StoreSecondary(), WriteFrame(), and ~MPEG2fixup().
|
private |
Definition at line 227 of file mpeg2fix.h.
Referenced by GetFrame(), and Start().
|
private |
Definition at line 228 of file mpeg2fix.h.
Referenced by DecodeToFrame(), and Start().
|
private |
Definition at line 229 of file mpeg2fix.h.
Referenced by AddSequence(), ConvertToI(), GetFrame(), InsertFrame(), MPEG2fixup(), ProcessVideo(), and ~MPEG2fixup().
|
private |
Definition at line 230 of file mpeg2fix.h.
Referenced by BuildFrame(), DecodeToFrame(), MPEG2fixup(), PlaybackSecondary(), and ~MPEG2fixup().
|
private |
Definition at line 232 of file mpeg2fix.h.
Referenced by AddRangeList(), MPEG2fixup(), and Start().
|
private |
Definition at line 233 of file mpeg2fix.h.
Referenced by AddRangeList(), and Start().
|
private |
Definition at line 235 of file mpeg2fix.h.
Referenced by MPEG2fixup(), and Start().
|
private |
Definition at line 237 of file mpeg2fix.h.
Referenced by getCodecContext().
|
private |
Definition at line 238 of file mpeg2fix.h.
Referenced by BuildKeyframeIndex(), getCodecContext(), getCodecParserContext(), GetFrame(), GetStreamType(), InitAV(), InitReplex(), Start(), and ~MPEG2fixup().
|
private |
Definition at line 239 of file mpeg2fix.h.
Referenced by BuildFrame(), and ~MPEG2fixup().
|
private |
Definition at line 241 of file mpeg2fix.h.
Referenced by AddFrame(), BuildKeyframeIndex(), FindStart(), GetFrame(), InitAV(), and Start().
|
private |
Definition at line 242 of file mpeg2fix.h.
Referenced by AddFrame(), FrameInfo(), InitAV(), and InitReplex().
|
private |
Definition at line 243 of file mpeg2fix.h.
Referenced by AddFrame(), InitAV(), and InitReplex().
|
private |
Definition at line 244 of file mpeg2fix.h.
Referenced by InitialPTSFixup(), and Start().
Definition at line 245 of file mpeg2fix.h.
Referenced by BuildKeyframeIndex(), and InitAV().
Definition at line 247 of file mpeg2fix.h.
Referenced by AddRangeList(), MPEG2fixup(), and Start().
|
private |
Definition at line 249 of file mpeg2fix.h.
Referenced by Start().
|
private |
Definition at line 250 of file mpeg2fix.h.
Referenced by Start().
|
private |
Definition at line 251 of file mpeg2fix.h.
Referenced by Start().
|
private |
Definition at line 252 of file mpeg2fix.h.
Referenced by Start().
|
private |
Definition at line 253 of file mpeg2fix.h.
Referenced by Start().
Definition at line 254 of file mpeg2fix.h.
Referenced by InitAV(), and SetAllAudio().
Definition at line 257 of file mpeg2fix.h.
Referenced by GetFrame(), and Start().
Definition at line 258 of file mpeg2fix.h.
Referenced by GetFrame().
|
private |
Definition at line 261 of file mpeg2fix.h.
Referenced by GetFrame(), and MPEG2fixup().
Definition at line 262 of file mpeg2fix.h.
Referenced by GetFrame(), and MPEG2fixup().
|
private |
Definition at line 263 of file mpeg2fix.h.
Referenced by GetFrame(), and MPEG2fixup().
|
private |
Definition at line 264 of file mpeg2fix.h.
Referenced by GetFrame().
|
private |
Definition at line 265 of file mpeg2fix.h.
Referenced by GetFrame(), and MPEG2fixup().
|
private |
Definition at line 266 of file mpeg2fix.h.
Referenced by AddFrame().