1## Media V2 CTS Tests 2Current folder comprises of files necessary for testing media extractor, media muxer, media codec SDK and NDK Api. These test aims to test all codecs advertised in MediaCodecList, available muxers and extractors. The aim of these tests is not verify the CDD requirements but to test components, their plugins and their interactions with media framework. The test vectors used by the test suite is available at [link](https://storage.googleapis.com/android_media/cts/tests/media/CtsMediaV2TestCases.zip) and is downloaded automatically while running tests. The test suite looks to cover sdk/ndk api in normal and error scenarios. Error scenarios are seperated from regular usage and are placed under class *UnitTest (MuxerUnitTest, ExtractorUnitTest, ...). 3 4### Commands 5```sh 6$ atest android.mediav2.cts 7$ atest android.mediav2.cts.CodecEncoderTest android.mediav2.cts.CodecDecoderTest 8$ atest android.mediav2.cts.MuxerTest android.mediav2.cts.MuxerUnitTest 9$ atest android.mediav2.cts.ExtractorTest android.mediav2.cts.ExtractorUnitTest 10``` 11 12### Features 13All tests accepts attributes that offer selective run of tests. Media codec tests parses the value of key *codec-sel* to determine the list of components on which the tests are to be tried. Similarly for Media extractor and media muxer parses the value of keys *ext-sel* and *mux-sel* to determine the list of components on which the tests are to be tried. 14 15To limit media codec decoder tests to mp3 and vorbis decoder, 16```sh 17adb shell am instrument -w -r -e codec-sel 'mp3;vorbis' -e debug false -e class 'android.mediav2.cts.CodecDecoderTest' android.mediav2.cts.test/androidx.test.runner.AndroidJUnitRunner 18``` 19### Appendix 20| Identifier for codec-sel | Mime | 21| ------ | ------ | 22|default|all| 23|vp8|mimetype_video_vp8| 24|vp9|mimetype_video_vp9| 25|av1|mimetype_video_av1| 26|avc|mimetype_video_avc| 27|hevc|mimetype_video_hevc| 28|mpeg4|mimetype_video_mpeg4| 29|h263|mimetype_video_h263| 30|mpeg2|mimetype_video_mpeg2| 31|vraw|mimetype_video_raw| 32|amrnb|mimetype_audio_amr_nb| 33|amrwb|mimetype_audio_amr_wb| 34|mp3|mimetype_audio_mpeg| 35|aac|mimetype_audio_aac| 36|vorbis|mimetype_audio_vorbis| 37|opus|mimetype_audio_opus| 38|g711alaw|mimetype_audio_g711_alaw| 39|g711mlaw|mimetype_audio_g711_mlaw| 40|araw|mimetype_audio_raw| 41|flac|mimetype_audio_flac| 42|gsm|mimetype_audio_msgsm| 43 44 45| Identifier for ext-sel | Extractor format | 46| ------ | ------ | 47|mp4|Mpeg4| 48|webm|Matroska| 49|3gp|Mpeg4| 50|mkv|Matroska| 51|ogg|Ogg| 52 53 54| Identifier for mux-sel | Muxer Format | 55| ------ | ------ | 56|mp4|muxer_output_mpeg4| 57|webm|muxer_output_webm| 58|3gp|muxer_output_3gpp| 59|ogg|muxer_output_ogg| 60