• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

common/15-Dec-2024-11,0829,028

jni/15-Dec-2024-10,0338,914

res/raw/14-Jan-2024-

src/android/mediav2/cts/14-Jan-2024-19,95516,223

Android.bpD15-Dec-20242.7 KiB9490

AndroidManifest.xmlD15-Dec-20241.7 KiB4220

AndroidTest-mcts.xmlD15-Dec-20243 KiB5337

AndroidTest.xmlD15-Dec-20242.9 KiB5236

DynamicConfig.xmlD15-Dec-2024179 65

OWNERSD14-Jan-2024276 65

README.mdD15-Dec-20244.5 KiB11588

copy_media.shD15-Dec-20241.3 KiB4824

README.md

1## Media V2 CTS Tests
2Current folder comprises of files necessary for testing media extractor, media muxer, media codec SDK and NDK Api. These tests aims to test all codecs advertised in MediaCodecList, available muxers and extractors.
3
4The aim of these tests is not solely to verify the CDD requirements but also to test components, their plugins and their interactions with media framework.
5
6The test vectors used by the test suite is available at [link](https://dl.google.com/android/xts/cts/tests/media/CtsMediaV2TestCases-4.2.zip) and is downloaded automatically while running tests. Manual installation of these can be done using copy_media.sh script in this directory.
7
8All Big Buck Bunny(bbb) test vectors are of 8-bit format. They are downloaded from [link](https://peach.blender.org/download/) and resampled according to the test requirements.
9All Cosmos Laundromat(cosmat) test vectors are of 10-bit format. They are downloaded from [link](https://media.xiph.org/) and resampled according to the test requirements.
10VideoEncoderParamTest uses stefan_sif_yuv420p_30fps.yuv. This is downloaded from [link](https://media.xiph.org/).
11
12The test suite looks to cover sdk/ndk api in normal and error scenarios. Error scenarios are separated from regular usage and are placed under class *UnitTest (MuxerUnitTest, ExtractorUnitTest, ...).
13
14### Commands
15```sh
16$ atest android.mediav2.cts
17$ atest android.mediav2.cts.CodecEncoderTest android.mediav2.cts.CodecDecoderTest
18$ atest android.mediav2.cts.MuxerTest android.mediav2.cts.MuxerUnitTest
19$ atest android.mediav2.cts.ExtractorTest android.mediav2.cts.ExtractorUnitTest
20```
21
22### Features
23All tests accepts attributes that offer selective run of tests.
24
25#### Select codecs by name
26To select codecs by name, *codec-prefix* can be passed to media codec tests to select one or more codecs that start with a given prefix.
27
28Example: To limit the tests to run for codecs whose names start with c2.android.
29
30```sh
31atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.
32```
33
34Example: To limit the tests to run for c2.android.hevc.decoder
35
36```sh
37atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.hevc.decoder
38```
39
40#### Select codecs using regular expressions
41To select codecs by applying regular expressions, *codec-filter* can be passed to media codec tests to select one or more codecs that match with a specified regular expression pattern.
42
43Example: To limit the tests to run for c2.android.avc.encoder and c2.exynos.hevc.encoder
44
45```sh
46atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-filter:="c2\.android\.avc\.encoder\|c2\.exynos\.hevc\.encoder"
47```
48
49#### Select codecs by type
50To select codecs by type, *media-type-sel* can be passed to media codec tests to select one or more codecs.
51
52Example: To limit media codec decoder tests to mp3 and vorbis decoder
53
54```sh
55atest android.mediav2.cts.CodecDecoderTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:media-type-sel:=mp3,vorbis
56```
57
58#### Select extractors by type
59To select extractors by type, *ext-sel* can be passed to extractor tests to select one or more extractors.
60
61Example: To limit extractor tests to mp4 and webm types
62```sh
63atest android.mediav2.cts.ExtractorTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:ext-sel:=mp4,webm
64```
65
66#### Select muxers by type
67To select muxers by type, *mux-sel* can be passed to muxer tests to select one or more muxers.
68
69Example: To limit muxer tests to mp4 and webm types
70```sh
71atest android.mediav2.cts.MuxerTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:mux-sel:=mp4,webm
72```
73
74### Appendix
75| Identifier for codec-sel | Mime |
76| ------ | ------ |
77|default|all|
78|vp8|mimetype_video_vp8|
79|vp9|mimetype_video_vp9|
80|av1|mimetype_video_av1|
81|avc|mimetype_video_avc|
82|hevc|mimetype_video_hevc|
83|mpeg4|mimetype_video_mpeg4|
84|h263|mimetype_video_h263|
85|mpeg2|mimetype_video_mpeg2|
86|vraw|mimetype_video_raw|
87|amrnb|mimetype_audio_amr_nb|
88|amrwb|mimetype_audio_amr_wb|
89|mp3|mimetype_audio_mpeg|
90|aac|mimetype_audio_aac|
91|vorbis|mimetype_audio_vorbis|
92|opus|mimetype_audio_opus|
93|g711alaw|mimetype_audio_g711_alaw|
94|g711mlaw|mimetype_audio_g711_mlaw|
95|araw|mimetype_audio_raw|
96|flac|mimetype_audio_flac|
97|gsm|mimetype_audio_msgsm|
98
99
100| Identifier for ext-sel | Extractor format |
101| ------ | ------ |
102|mp4|Mpeg4|
103|webm|Matroska|
104|3gp|Mpeg4|
105|mkv|Matroska|
106|ogg|Ogg|
107
108
109| Identifier for mux-sel | Muxer Format |
110| ------ | ------ |
111|mp4|muxer_output_mpeg4|
112|webm|muxer_output_webm|
113|3gp|muxer_output_3gpp|
114|ogg|muxer_output_ogg|
115