From 6af6cbec2af842c450a8a609325f6c460af7fdbb Mon Sep 17 00:00:00 2001 From: sheenachhabra Date: Thu, 9 Feb 2023 17:52:56 +0000 Subject: [PATCH] Move VideoBoxesTest.java The existing implementation depends on an internal library (Mp4Slicer) to assert the output. We have removed the dependency on internal library and used golden data to compare the output. PiperOrigin-RevId: 508401527 --- testdata/src/test/assets/muxerdumps/README.md | 7 +++++++ .../test/assets/muxerdumps/video_sample_entry_box_av1.dump | 1 + .../assets/muxerdumps/video_sample_entry_box_h264.dump | 1 + .../assets/muxerdumps/video_sample_entry_box_h265.dump | 1 + .../muxerdumps/video_sample_entry_box_h265_hdr10.dump | 1 + 5 files changed, 11 insertions(+) create mode 100644 testdata/src/test/assets/muxerdumps/README.md create mode 100644 testdata/src/test/assets/muxerdumps/video_sample_entry_box_av1.dump create mode 100644 testdata/src/test/assets/muxerdumps/video_sample_entry_box_h264.dump create mode 100644 testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265.dump create mode 100644 testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265_hdr10.dump diff --git a/testdata/src/test/assets/muxerdumps/README.md b/testdata/src/test/assets/muxerdumps/README.md new file mode 100644 index 0000000000..2a4495e540 --- /dev/null +++ b/testdata/src/test/assets/muxerdumps/README.md @@ -0,0 +1,7 @@ +# Muxer dump files + +To generate a new dump file or to update an existing one: + +1. Change `DumpFileAsserts#DUMP_FILE_ACTION` to `WRITE_TO_LOCAL` (for Robolectric tests) or `WRITE_TO_DEVICE` (for Instrumentation tests). +2. Re-run the test. +3. Change `DumpFileAsserts#DUMP_FILE_ACTION` back to `COMPARE_WITH_EXISTING`. diff --git a/testdata/src/test/assets/muxerdumps/video_sample_entry_box_av1.dump b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_av1.dump new file mode 100644 index 0000000000..bc8cd9a540 --- /dev/null +++ b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_av1.dump @@ -0,0 +1 @@ +VideoSampleEntryBox = 0000007d61763031000000000000000100000000000000000000000000000000000a000c004800000048000000000000000100202020202020202020202020202020202020202020202020202020202020200018ffff0000001761763143812000000a09200000019cdbfff30400000010706173700001000000010000 diff --git a/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h264.dump b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h264.dump new file mode 100644 index 0000000000..3190c1278c --- /dev/null +++ b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h264.dump @@ -0,0 +1 @@ +VideoSampleEntryBox = 0000009661766331000000000000000100000000000000000000000000000000000a000c004800000048000000000000000100202020202020202020202020202020202020202020202020202020202020200018ffff000000306176634301f4000affe1001867f4000a919b2bf3cb3640000003004000000c83c489658001000568ebe3c44800000010706173700001000000010000 diff --git a/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265.dump b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265.dump new file mode 100644 index 0000000000..0d4dc2a369 --- /dev/null +++ b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265.dump @@ -0,0 +1 @@ +VideoSampleEntryBox = 000000d66876633100000000000000010000000000000000000000000000000000300020004800000048000000000000000100202020202020202020202020202020202020202020202020202020202020200018ffff00000070687663430104080000009fc8000000001ef000fcfcf8f800000f03200001001740010c01ffff0408000003009fc800000300001e95980921000100254201010408000003009fc800000300001ec1882165959ae4cae68080000003008000000c8422000100064401c173d08900000010706173700001000000010000 diff --git a/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265_hdr10.dump b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265_hdr10.dump new file mode 100644 index 0000000000..d501042085 --- /dev/null +++ b/testdata/src/test/assets/muxerdumps/video_sample_entry_box_h265_hdr10.dump @@ -0,0 +1 @@ +VideoSampleEntryBox = 000000dd6876633100000000000000010000000000000000000000000000000001000100004800000048000000000000000100202020202020202020202020202020202020202020202020202020202020200018ffff00000077687663430102200000009000000000003cf000fcfdfafa00000f03200001001840010c01ffff02200000030090000003000003003c959809210001002a42010102200000030090000003000003003ca008080404d96566924cae69c2000003000200000300321022000100074401c172b4624000000010706173700001000000010000