tree: 46aff3f28d6f249ea1a41301d83372e06a2a5f8d [path history] [tgz]
  1. common/
  2. jni/
  3. res/
  4. src/
  5. Android.bp
  6. AndroidManifest.xml
  7. AndroidTest.xml
  8. copy_media.sh
  9. DynamicConfig.xml
  10. OWNERS
  11. README.md
tests/media/README.md

Media V2 CTS Tests

Current 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.

The 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.

The test vectors used by the test suite is available at link and is downloaded automatically while running tests. Manual installation of these can be done using copy_media.sh script in this directory.

All Big Buck Bunny(bbb) test vectors are of 8-bit format. They are downloaded from link and resampled according to the test requirements. All Cosmos Laundromat(cosmat) test vectors are of 10-bit format. They are downloaded from link and resampled according to the test requirements. VideoEncoderParamTest uses stefan_sif_yuv420p_30fps.yuv. This is downloaded from link.

The 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, ...).

Commands

$ atest android.mediav2.cts
$ atest android.mediav2.cts.CodecEncoderTest android.mediav2.cts.CodecDecoderTest
$ atest android.mediav2.cts.MuxerTest android.mediav2.cts.MuxerUnitTest
$ atest android.mediav2.cts.ExtractorTest android.mediav2.cts.ExtractorUnitTest

Features

All tests accepts attributes that offer selective run of tests.

Select codecs by name

To 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.

Example: To limit the tests to run for codecs whose names start with c2.android.

atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.

Example: To limit the tests to run for c2.android.hevc.decoder

atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.hevc.decoder

Select codecs using regular expressions

To 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.

Example: To limit the tests to run for c2.android.avc.encoder and c2.exynos.hevc.encoder

atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-filter:="c2\.android\.avc\.encoder\|c2\.exynos\.hevc\.encoder"

Select codecs by type

To select codecs by type, media-type-sel can be passed to media codec tests to select one or more codecs.

Example: To limit media codec decoder tests to mp3 and vorbis decoder

atest android.mediav2.cts.CodecDecoderTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:media-type-sel:=mp3,vorbis

Select extractors by type

To select extractors by type, ext-sel can be passed to extractor tests to select one or more extractors.

Example: To limit extractor tests to mp4 and webm types

atest android.mediav2.cts.ExtractorTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:ext-sel:=mp4,webm

Select muxers by type

To select muxers by type, mux-sel can be passed to muxer tests to select one or more muxers.

Example: To limit muxer tests to mp4 and webm types

atest android.mediav2.cts.MuxerTest -- --module-arg  CtsMediaV2TestCases:instrumentation-arg:mux-sel:=mp4,webm

Appendix

Identifier for codec-selMime
defaultall
vp8mimetype_video_vp8
vp9mimetype_video_vp9
av1mimetype_video_av1
avcmimetype_video_avc
hevcmimetype_video_hevc
mpeg4mimetype_video_mpeg4
h263mimetype_video_h263
mpeg2mimetype_video_mpeg2
vrawmimetype_video_raw
amrnbmimetype_audio_amr_nb
amrwbmimetype_audio_amr_wb
mp3mimetype_audio_mpeg
aacmimetype_audio_aac
vorbismimetype_audio_vorbis
opusmimetype_audio_opus
g711alawmimetype_audio_g711_alaw
g711mlawmimetype_audio_g711_mlaw
arawmimetype_audio_raw
flacmimetype_audio_flac
gsmmimetype_audio_msgsm
Identifier for ext-selExtractor format
mp4Mpeg4
webmMatroska
3gpMpeg4
mkvMatroska
oggOgg
Identifier for mux-selMuxer Format
mp4muxer_output_mpeg4
webmmuxer_output_webm
3gpmuxer_output_3gpp
oggmuxer_output_ogg