• Home
Name Date Size #Lines LOC

..--

jni/03-May-2024-9,6988,706

res/03-May-2024-2510

src/android/mediav2/cts/03-May-2024-18,19815,130

Android.bpD03-May-20241.4 KiB5148

AndroidManifest.xmlD03-May-20241.8 KiB4523

AndroidTest.xmlD03-May-20242.1 KiB4025

DynamicConfig.xmlD03-May-2024190 65

OWNERSD03-May-2024353 1210

README.mdD03-May-20244 KiB10581

copy_media.shD03-May-20241.4 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://storage.googleapis.com/android_media/cts/tests/media/CtsMediaV2TestCases-2.4.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.
10
11The 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, ...).
12
13### Commands
14```sh
15$ atest android.mediav2.cts
16$ atest android.mediav2.cts.CodecEncoderTest android.mediav2.cts.CodecDecoderTest
17$ atest android.mediav2.cts.MuxerTest android.mediav2.cts.MuxerUnitTest
18$ atest android.mediav2.cts.ExtractorTest android.mediav2.cts.ExtractorUnitTest
19```
20
21### Features
22All tests accepts attributes that offer selective run of tests.
23
24#### Select codecs by name
25To 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.
26
27Example: To limit the tests to run for codecs whose names start with c2.android.
28
29```sh
30atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.
31```
32
33Example: To limit the tests to run for c2.android.hevc.decoder
34
35```sh
36atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.hevc.decoder
37```
38
39#### Select codecs by type
40To select codecs by type, *mime-sel* can be passed to media codec tests to select one or more codecs.
41
42Example: To limit media codec decoder tests to mp3 and vorbis decoder
43
44```sh
45atest android.mediav2.cts.CodecDecoderTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:mime-sel:=mp3,vorbis
46```
47
48#### Select extractors by type
49To select extractors by type, *ext-sel* can be passed to extractor tests to select one or more extractors.
50
51Example: To limit extractor tests to mp4 and webm types
52```sh
53atest android.mediav2.cts.ExtractorTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:ext-sel:=mp4,webm
54```
55
56#### Select muxers by type
57To select muxers by type, *mux-sel* can be passed to muxer tests to select one or more muxers.
58
59Example: To limit muxer tests to mp4 and webm types
60```sh
61atest android.mediav2.cts.MuxerTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:mux-sel:=mp4,webm
62```
63
64### Appendix
65| Identifier for codec-sel | Mime |
66| ------ | ------ |
67|default|all|
68|vp8|mimetype_video_vp8|
69|vp9|mimetype_video_vp9|
70|av1|mimetype_video_av1|
71|avc|mimetype_video_avc|
72|hevc|mimetype_video_hevc|
73|mpeg4|mimetype_video_mpeg4|
74|h263|mimetype_video_h263|
75|mpeg2|mimetype_video_mpeg2|
76|vraw|mimetype_video_raw|
77|amrnb|mimetype_audio_amr_nb|
78|amrwb|mimetype_audio_amr_wb|
79|mp3|mimetype_audio_mpeg|
80|aac|mimetype_audio_aac|
81|vorbis|mimetype_audio_vorbis|
82|opus|mimetype_audio_opus|
83|g711alaw|mimetype_audio_g711_alaw|
84|g711mlaw|mimetype_audio_g711_mlaw|
85|araw|mimetype_audio_raw|
86|flac|mimetype_audio_flac|
87|gsm|mimetype_audio_msgsm|
88
89
90| Identifier for ext-sel | Extractor format |
91| ------ | ------ |
92|mp4|Mpeg4|
93|webm|Matroska|
94|3gp|Mpeg4|
95|mkv|Matroska|
96|ogg|Ogg|
97
98
99| Identifier for mux-sel | Muxer Format |
100| ------ | ------ |
101|mp4|muxer_output_mpeg4|
102|webm|muxer_output_webm|
103|3gp|muxer_output_3gpp|
104|ogg|muxer_output_ogg|
105