Added a field for specifying a factor that the timecode factory might need, e.g. in MPEG2 field-vs-frame situations.

This commit is contained in:
Moritz Bunkus 2005-06-10 12:31:57 +00:00
parent 309b6e2cdf
commit e64f94534a
2 changed files with 6 additions and 4 deletions

View File

@ -98,7 +98,7 @@ struct packet_t {
KaxBlock *block; KaxBlock *block;
KaxCluster *cluster; KaxCluster *cluster;
unsigned char *data; unsigned char *data;
int length, ref_priority; int length, ref_priority, time_factor;
int64_t timecode, bref, fref, duration, packet_num, assigned_timecode; int64_t timecode, bref, fref, duration, packet_num, assigned_timecode;
int64_t unmodified_assigned_timecode, unmodified_duration; int64_t unmodified_assigned_timecode, unmodified_duration;
bool duration_mandatory, superseeded, gap_following; bool duration_mandatory, superseeded, gap_following;
@ -111,7 +111,7 @@ struct packet_t {
packet_t(): packet_t():
group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), group(NULL), block(NULL), cluster(NULL), data(NULL), length(0),
ref_priority(0), ref_priority(0), time_factor(1),
timecode(0), bref(0), fref(0), duration(0), timecode(0), bref(0), fref(0), duration(0),
packet_num(0), packet_num(0),
assigned_timecode(0), unmodified_assigned_timecode(0), assigned_timecode(0), unmodified_assigned_timecode(0),
@ -125,7 +125,7 @@ struct packet_t {
int64_t n_bref = -1, int64_t n_bref = -1,
int64_t n_fref = -1): int64_t n_fref = -1):
group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), group(NULL), block(NULL), cluster(NULL), data(NULL), length(0),
ref_priority(0), ref_priority(0), time_factor(1),
timecode(n_timecode), bref(n_bref), fref(n_fref), timecode(n_timecode), bref(n_bref), fref(n_fref),
duration(n_duration), duration(n_duration),
packet_num(0), packet_num(0),
@ -140,7 +140,7 @@ struct packet_t {
int64_t n_bref = -1, int64_t n_bref = -1,
int64_t n_fref = -1): int64_t n_fref = -1):
group(NULL), block(NULL), cluster(NULL), data(NULL), length(0), group(NULL), block(NULL), cluster(NULL), data(NULL), length(0),
ref_priority(0), ref_priority(0), time_factor(1),
timecode(n_timecode), bref(n_bref), fref(n_fref), timecode(n_timecode), bref(n_bref), fref(n_fref),
duration(n_duration), duration(n_duration),
packet_num(0), packet_num(0),

View File

@ -225,6 +225,8 @@ mpeg1_2_video_packetizer_c::process(packet_cptr packet) {
packet->duration = frame->duration; packet->duration = frame->duration;
packet->bref = frame->firstRef; packet->bref = frame->firstRef;
packet->fref = frame->secondRef; packet->fref = frame->secondRef;
packet->time_factor =
MPEG2_PICTURE_TYPE_FRAME == frame->pictureStructure ? 1 : 2;
video_packetizer_c::process(packet); video_packetizer_c::process(packet);
frame->data = NULL; frame->data = NULL;
delete frame; delete frame;