[PATCH 5/7] extend MXFIndexTableSegment
Maksym Veremeyenko
verem
Sat Jul 3 13:01:01 CEST 2010
---
libavformat/mxfdec.c | 40 ++++++++++++++++++++++++++++++++++------
1 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index b9cf5a7..cf5fe91 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -107,6 +107,12 @@ typedef struct {
typedef struct {
UID uid;
enum MXFMetadataSetType type;
+ int edit_unit_byte_count;
+ int index_sid;
+ int body_sid;
+ AVRational index_edit_rate;
+ uint64_t index_start_position;
+ uint64_t index_duration;
} MXFIndexTableSegment;
typedef struct {
@@ -524,13 +530,35 @@ static int mxf_read_source_package(void *arg, ByteIOContext *pb, int tag, int si
static int mxf_read_index_table_segment(void *arg, ByteIOContext *pb, int tag, int size, UID uid)
{
+ MXFIndexTableSegment *segment = (MXFIndexTableSegment *)arg;
+
switch(tag) {
- case 0x3F05: dprintf(NULL, "EditUnitByteCount %d\n", get_be32(pb)); break;
- case 0x3F06: dprintf(NULL, "IndexSID %d\n", get_be32(pb)); break;
- case 0x3F07: dprintf(NULL, "BodySID %d\n", get_be32(pb)); break;
- case 0x3F0B: dprintf(NULL, "IndexEditRate %d/%d\n", get_be32(pb), get_be32(pb)); break;
- case 0x3F0C: dprintf(NULL, "IndexStartPosition %lld\n", get_be64(pb)); break;
- case 0x3F0D: dprintf(NULL, "IndexDuration %lld\n", get_be64(pb)); break;
+ case 0x3F05:
+ segment->edit_unit_byte_count = get_be32(pb);
+ dprintf(NULL, "EditUnitByteCount %d\n", segment->edit_unit_byte_count);
+ break;
+ case 0x3F06:
+ segment->index_sid = get_be32(pb);
+ dprintf(NULL, "IndexSID %d\n", segment->index_sid);
+ break;
+ case 0x3F07:
+ segment->body_sid = get_be32(pb);
+ dprintf(NULL, "BodySID %d\n", segment->body_sid);
+ break;
+ case 0x3F0B:
+ segment->index_edit_rate.num = get_be32(pb);
+ segment->index_edit_rate.den = get_be32(pb);
+ dprintf(NULL, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,
+ segment->index_edit_rate.num);
+ break;
+ case 0x3F0C:
+ segment->index_start_position = get_be64(pb);
+ dprintf(NULL, "IndexStartPosition %lld\n", segment->index_start_position);
+ break;
+ case 0x3F0D:
+ segment->index_duration = get_be64(pb);
+ dprintf(NULL, "IndexDuration %lld\n", segment->index_duration);
+ break;
}
return 0;
}
--
1.7.3.5
--------------050108020200050600030407
Content-Type: text/x-patch;
name="0006-extend-MXFTrack-with-wrapping-field.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="0006-extend-MXFTrack-with-wrapping-field.patch"
More information about the ffmpeg-devel
mailing list