From 396c1483ead918413ce312bdec34b56b9365bcc7 Mon Sep 17 00:00:00 2001 From: Philip de Nier Date: Thu, 28 Mar 2024 15:02:21 +0000 Subject: [PATCH] Set random access index table entry flag The flag by default is set to 80h, which indicates random access for the edit unit. This commit sets that default flag to 80h for the intra-coded / data essence types that didn't have it already set. --- src/mxf_op1a/OP1ADataTrack.cpp | 2 +- src/mxf_op1a/OP1ARDD36Track.cpp | 2 +- src/mxf_op1a/OP1ATimedTextTrack.cpp | 2 +- src/mxf_op1a/OP1AVC2Track.cpp | 2 +- src/rdd9_mxf/RDD9DataTrack.cpp | 2 +- test/imf/test_rdd36_1.md5 | 2 +- test/imf/test_rdd36_2.md5 | 2 +- test/imf/test_timed_text_1.md5 | 2 +- test/imf/test_timed_text_2.md5 | 2 +- test/mxf_op1a/rdd36_422.md5 | 2 +- test/mxf_op1a/rdd36_422_itu2020.md5 | 2 +- test/mxf_op1a/rdd36_4444.md5 | 2 +- test/mxf_op1a/vc2.md5 | 2 +- test/rdd6/test3.md5 | 2 +- test/timed_text/test_1.md5 | 2 +- test/timed_text/test_10.md5 | 2 +- test/timed_text/test_2.md5 | 2 +- test/timed_text/test_3.md5 | 2 +- test/timed_text/test_4.md5 | 2 +- test/timed_text/test_5.md5 | 2 +- test/timed_text/test_6.md5 | 2 +- test/timed_text/test_7.md5 | 2 +- test/timed_text/test_9.md5 | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/mxf_op1a/OP1ADataTrack.cpp b/src/mxf_op1a/OP1ADataTrack.cpp index 0d579368..1ae4f33a 100644 --- a/src/mxf_op1a/OP1ADataTrack.cpp +++ b/src/mxf_op1a/OP1ADataTrack.cpp @@ -85,7 +85,7 @@ void OP1ADataTrack::WriteSamplesInt(const unsigned char *data, uint32_t size, ui mCPManager->WriteSamples(mTrackIndex, data, size, num_samples); if (!mConstantDataSize && !mMaxDataSize) - mIndexTable->AddIndexEntry(mTrackIndex, mPosition, 0, 0, 0, true, false); + mIndexTable->AddIndexEntry(mTrackIndex, mPosition, 0, 0, 0x80, true, false); mPosition++; } diff --git a/src/mxf_op1a/OP1ARDD36Track.cpp b/src/mxf_op1a/OP1ARDD36Track.cpp index bb2b3a27..0624de9d 100644 --- a/src/mxf_op1a/OP1ARDD36Track.cpp +++ b/src/mxf_op1a/OP1ARDD36Track.cpp @@ -90,7 +90,7 @@ void OP1ARDD36Track::WriteSamplesInt(const unsigned char *data, uint32_t size, u } mCPManager->WriteSamples(mTrackIndex, data, size, num_samples); - mIndexTable->AddIndexEntry(mTrackIndex, mPosition, 0, 0, 0, true, false); + mIndexTable->AddIndexEntry(mTrackIndex, mPosition, 0, 0, 0x80, true, false); mPosition++; } diff --git a/src/mxf_op1a/OP1ATimedTextTrack.cpp b/src/mxf_op1a/OP1ATimedTextTrack.cpp index 83332e32..a515433b 100644 --- a/src/mxf_op1a/OP1ATimedTextTrack.cpp +++ b/src/mxf_op1a/OP1ATimedTextTrack.cpp @@ -121,7 +121,7 @@ void OP1ATimedTextTrack::WriteIndexTable(File *mxf_file, Partition *index_partit index_segment.setIndexSID(mIndexSID); index_segment.setBodySID(mBodySID); index_segment.setEditUnitByteCount(0); - index_segment.appendIndexEntry(0, 0, 0, 0, vector(), vector()); + index_segment.appendIndexEntry(0, 0, 0x80, 0, vector(), vector()); index_segment.write(mxf_file, index_partition, 0); } diff --git a/src/mxf_op1a/OP1AVC2Track.cpp b/src/mxf_op1a/OP1AVC2Track.cpp index aed3938f..d62f791d 100644 --- a/src/mxf_op1a/OP1AVC2Track.cpp +++ b/src/mxf_op1a/OP1AVC2Track.cpp @@ -94,7 +94,7 @@ void OP1AVC2Track::WriteSamplesInt(const unsigned char *data, uint32_t size, uin mWriterHelper.ProcessFrame(data, size, &data_array, &array_size); mCPManager->WriteSample(mTrackIndex, data_array, array_size); - mIndexTable->AddIndexEntry(mTrackIndex, mWriterHelper.GetProcessFrameCount() - 1, 0, 0, 0, true, false); + mIndexTable->AddIndexEntry(mTrackIndex, mWriterHelper.GetProcessFrameCount() - 1, 0, 0, 0x80, true, false); } void OP1AVC2Track::CompleteWrite() diff --git a/src/rdd9_mxf/RDD9DataTrack.cpp b/src/rdd9_mxf/RDD9DataTrack.cpp index c1582b6a..41074234 100644 --- a/src/rdd9_mxf/RDD9DataTrack.cpp +++ b/src/rdd9_mxf/RDD9DataTrack.cpp @@ -85,7 +85,7 @@ void RDD9DataTrack::WriteSamplesInt(const unsigned char *data, uint32_t size, ui mCPManager->WriteSamples(mTrackIndex, data, size, num_samples); if (!mConstantDataSize && !mMaxDataSize) - mIndexTable->AddIndexEntry(mTrackIndex, mPosition, 0, 0, 0, true); + mIndexTable->AddIndexEntry(mTrackIndex, mPosition, 0, 0, 0x80, true); mPosition++; } diff --git a/test/imf/test_rdd36_1.md5 b/test/imf/test_rdd36_1.md5 index 38bca78b..05b5e7a5 100644 --- a/test/imf/test_rdd36_1.md5 +++ b/test/imf/test_rdd36_1.md5 @@ -1 +1 @@ -12699b79cc1a650272484b35f84138b7 \ No newline at end of file +3acbc8890630ec93e6a5df250329941e \ No newline at end of file diff --git a/test/imf/test_rdd36_2.md5 b/test/imf/test_rdd36_2.md5 index ac0e8d59..5ae2336e 100644 --- a/test/imf/test_rdd36_2.md5 +++ b/test/imf/test_rdd36_2.md5 @@ -1 +1 @@ -7d18f1541cb15931fd0c595782d675ef \ No newline at end of file +95c61d08221cda9e8830cd7db8e63a1b \ No newline at end of file diff --git a/test/imf/test_timed_text_1.md5 b/test/imf/test_timed_text_1.md5 index e5fbdbca..0c3e1be3 100644 --- a/test/imf/test_timed_text_1.md5 +++ b/test/imf/test_timed_text_1.md5 @@ -1 +1 @@ -f1de0c5f1ce50a6a318759d59b3447fc \ No newline at end of file +4a7be872d08d0c7888b248af1e0edec7 \ No newline at end of file diff --git a/test/imf/test_timed_text_2.md5 b/test/imf/test_timed_text_2.md5 index e5fbdbca..0c3e1be3 100644 --- a/test/imf/test_timed_text_2.md5 +++ b/test/imf/test_timed_text_2.md5 @@ -1 +1 @@ -f1de0c5f1ce50a6a318759d59b3447fc \ No newline at end of file +4a7be872d08d0c7888b248af1e0edec7 \ No newline at end of file diff --git a/test/mxf_op1a/rdd36_422.md5 b/test/mxf_op1a/rdd36_422.md5 index 8a08de93..dc3aba80 100644 --- a/test/mxf_op1a/rdd36_422.md5 +++ b/test/mxf_op1a/rdd36_422.md5 @@ -1 +1 @@ -e812963248ca564aa674d018a70e8126 \ No newline at end of file +193bf8a8c71447893fc16be1984774e2 \ No newline at end of file diff --git a/test/mxf_op1a/rdd36_422_itu2020.md5 b/test/mxf_op1a/rdd36_422_itu2020.md5 index 83f3cbfd..5b8ddc1b 100644 --- a/test/mxf_op1a/rdd36_422_itu2020.md5 +++ b/test/mxf_op1a/rdd36_422_itu2020.md5 @@ -1 +1 @@ -2d9f8fae5c3ac35f36fa87b7e7c2f775 \ No newline at end of file +84365f12d4d447d267a15cb533287ec9 \ No newline at end of file diff --git a/test/mxf_op1a/rdd36_4444.md5 b/test/mxf_op1a/rdd36_4444.md5 index 4f36027d..2d4ced00 100644 --- a/test/mxf_op1a/rdd36_4444.md5 +++ b/test/mxf_op1a/rdd36_4444.md5 @@ -1 +1 @@ -6c4d3c5cb5ddc0809b5bc37c188cbeb0 \ No newline at end of file +19eae5f0a0e92abce795d13d04beafa6 \ No newline at end of file diff --git a/test/mxf_op1a/vc2.md5 b/test/mxf_op1a/vc2.md5 index 607d1246..bbb4fe97 100644 --- a/test/mxf_op1a/vc2.md5 +++ b/test/mxf_op1a/vc2.md5 @@ -1 +1 @@ -fa630b0f6cd3f728423e9bd1f3f8b000 \ No newline at end of file +3822bc4fd04636bccf9cd6eec822e5f8 \ No newline at end of file diff --git a/test/rdd6/test3.md5 b/test/rdd6/test3.md5 index e90703fc..3a986e69 100644 --- a/test/rdd6/test3.md5 +++ b/test/rdd6/test3.md5 @@ -1 +1 @@ -726a2adb3a8befd58b358122125d5b96 \ No newline at end of file +b91a0bd9862ca7221a69e2d88b918565 \ No newline at end of file diff --git a/test/timed_text/test_1.md5 b/test/timed_text/test_1.md5 index a644d003..087cb918 100644 --- a/test/timed_text/test_1.md5 +++ b/test/timed_text/test_1.md5 @@ -1 +1 @@ -b966c37759ab39ccb3c16efe1a398aac \ No newline at end of file +c23f74620cb1a0c5190668f98ddec949 \ No newline at end of file diff --git a/test/timed_text/test_10.md5 b/test/timed_text/test_10.md5 index 3b262df0..254e5c89 100644 --- a/test/timed_text/test_10.md5 +++ b/test/timed_text/test_10.md5 @@ -1 +1 @@ -74e83126d14612acb06c9d29a533497e \ No newline at end of file +b7b9c9c9cb099abf7bb28db78ff520ce \ No newline at end of file diff --git a/test/timed_text/test_2.md5 b/test/timed_text/test_2.md5 index 56fc7f0f..c6a91139 100644 --- a/test/timed_text/test_2.md5 +++ b/test/timed_text/test_2.md5 @@ -1 +1 @@ -9367fd12af13130cd6c6bfae54961cda \ No newline at end of file +df83cc4ff397305a3d31217961e20748 \ No newline at end of file diff --git a/test/timed_text/test_3.md5 b/test/timed_text/test_3.md5 index f935323f..05d711ed 100644 --- a/test/timed_text/test_3.md5 +++ b/test/timed_text/test_3.md5 @@ -1 +1 @@ -b538c2e6aa0682f763c01774b5dc6403 \ No newline at end of file +b1316e823a2231a6e5e36b9ca2f83030 \ No newline at end of file diff --git a/test/timed_text/test_4.md5 b/test/timed_text/test_4.md5 index 4963e1e1..7a897d2a 100644 --- a/test/timed_text/test_4.md5 +++ b/test/timed_text/test_4.md5 @@ -1 +1 @@ -58f3cde2827bf946aae1810c2bf22eb1 \ No newline at end of file +e01ab8abe22425ebb0eab6685726202d \ No newline at end of file diff --git a/test/timed_text/test_5.md5 b/test/timed_text/test_5.md5 index ef99b96f..83b497d0 100644 --- a/test/timed_text/test_5.md5 +++ b/test/timed_text/test_5.md5 @@ -1 +1 @@ -48d74cb2d54e9c0d9fdded4738721563 \ No newline at end of file +d8a9d440fffecd04edfd556b4190132e \ No newline at end of file diff --git a/test/timed_text/test_6.md5 b/test/timed_text/test_6.md5 index 258613f2..0c7271c9 100644 --- a/test/timed_text/test_6.md5 +++ b/test/timed_text/test_6.md5 @@ -1 +1 @@ -1bccbf669bcdc9edd7be8c75027f8208 \ No newline at end of file +846b1b1de4dddcd7c3e1eeacec55a0bc \ No newline at end of file diff --git a/test/timed_text/test_7.md5 b/test/timed_text/test_7.md5 index aaec624a..4fae1d36 100644 --- a/test/timed_text/test_7.md5 +++ b/test/timed_text/test_7.md5 @@ -1 +1 @@ -7af5f601d535a4ad485f0d1627f91b04 \ No newline at end of file +f2ee69b86be88ba526259e1b544e460e \ No newline at end of file diff --git a/test/timed_text/test_9.md5 b/test/timed_text/test_9.md5 index 56fc7f0f..c6a91139 100644 --- a/test/timed_text/test_9.md5 +++ b/test/timed_text/test_9.md5 @@ -1 +1 @@ -9367fd12af13130cd6c6bfae54961cda \ No newline at end of file +df83cc4ff397305a3d31217961e20748 \ No newline at end of file