/cts/tests/tests/media/src/android/media/cts/ |
D | MediaCodecCapabilitiesTest.java | 315 private boolean checkDecoder(String mime, int profile, int level) { in checkDecoder() argument 316 if (!hasDecoder(mime, profile, level)) { in checkDecoder() 317 MediaUtils.skipTest(TAG, "no " + mime + " decoder for profile " in checkDecoder() 324 private boolean hasDecoder(String mime, int profile, int level) { in hasDecoder() argument 325 return supports(mime, false /* isEncoder */, profile, level, false /* defaultOnly */); in hasDecoder() 328 private boolean hasEncoder(String mime, int profile, int level) { in hasEncoder() argument 329 return supports(mime, true /* isEncoder */, profile, level, false /* defaultOnly */); in hasEncoder() 334 private boolean checkDecodeWithDefaultPlayer(String mime, int profile, int level) { in checkDecodeWithDefaultPlayer() argument 335 if (!supports(mime, false /* isEncoder */, profile, level, true /* defaultOnly */)) { in checkDecodeWithDefaultPlayer() 343 String mime, boolean isEncoder, int profile, int level, in supports() argument [all …]
|
D | NativeEncoderTest.java | 76 private boolean testEncode(int res, String mime, int width, int height) { in testEncode() argument 81 mime, width, height); in testEncode() 84 String mime, int width, int height); in testEncodeSurfaceNative() argument 112 private boolean testEncodeDynamicSyncFrame(int res, String mime, int width, int height) { in testEncodeDynamicSyncFrame() argument 117 mime, width, height); in testEncodeDynamicSyncFrame() 120 String mime, int width, int height); in testEncodeSurfaceDynamicSyncFrameNative() argument 148 private boolean testEncodeDynamicBitrate(int res, String mime, int width, int height) { in testEncodeDynamicBitrate() argument 153 mime, width, height); in testEncodeDynamicBitrate() 156 String mime, int width, int height); in testEncodeSurfaceDynamicBitrateNative() argument 184 private boolean testEncodePersistentSurface(int res, String mime, int width, int height) { in testEncodePersistentSurface() argument [all …]
|
D | DecoderConformanceTest.java | 104 private List<String> readCodecTestVectors(String mime) throws Exception { in readCodecTestVectors() argument 105 String tag = MIMETYPE_TO_TAG.get(mime); in readCodecTestVectors() 110 private List<String> readVectorMD5Sums(String mime, String vectorName) throws Exception { in readVectorMD5Sums() argument 111 String tag = MIMETYPE_TO_TAG.get(mime); in readVectorMD5Sums() 134 …private Status decodeTestVector(String mime, String decoderName, String vectorName) throws Excepti… in decodeTestVector() argument 142 MediaCodecInfo.CodecCapabilities caps = codecInfo.getCapabilitiesForType(mime); in decodeTestVector() 149 frameMD5Sums = readVectorMD5Sums(mime, vectorName); in decodeTestVector() 167 void decodeTestVectors(String mime, boolean isGoog) throws Exception { in decodeTestVectors() argument 169 format.setString(MediaFormat.KEY_MIME, mime); in decodeTestVectors() 172 List<String> testVectors = readCodecTestVectors(mime); in decodeTestVectors() [all …]
|
D | MediaCodecClearKeyPlayer.java | 200 String mime = format.getString(MediaFormat.KEY_MIME); in prepareAudio() local 201 if (!mime.startsWith("audio/")) { in prepareAudio() 205 Log.d(TAG, "audio track #" + i + " " + format + " " + mime + in prepareAudio() 238 String mime = format.getString(MediaFormat.KEY_MIME); in prepareVideo() local 239 if (!mime.startsWith("video/")) { in prepareVideo() 245 Log.d(TAG, "video track #" + i + " " + format + " " + mime + in prepareVideo() 248 if (mScrambled && mime.startsWith("video/")) { in prepareVideo() 296 String mime = format.getString(android.media.MediaFormat.KEY_MIME); in initCasAndDescrambler() local 297 Log.d(TAG, "track "+ trackId + ": " + mime); in initCasAndDescrambler() 298 if ("video/scrambled".equals(mime) || "audio/scrambled".equals(mime)) { in initCasAndDescrambler() [all …]
|
D | MediaCodecTunneledPlayer.java | 124 String mime = format.getString(MediaFormat.KEY_MIME); in prepareAudio() local 126 if (!mime.startsWith("audio/")) { in prepareAudio() 130 Log.d(TAG, "audio track #" + i + " " + format + " " + mime + in prepareAudio() 158 String mime = format.getString(MediaFormat.KEY_MIME); in prepareVideo() local 160 if (!mime.startsWith("video/")) { in prepareVideo() 166 Log.d(TAG, "video track #" + i + " " + format + " " + mime + in prepareVideo() 236 String mime = format.getString(MediaFormat.KEY_MIME); in addTrack() local 237 boolean isVideo = mime.startsWith("video/"); in addTrack() 238 boolean isAudio = mime.startsWith("audio/"); in addTrack() 248 Log.e(TAG,"addTrack - Could not find Tunneled playback codec for "+mime+ in addTrack() [all …]
|
D | CodecState.java | 84 String mime = mFormat.getString(MediaFormat.KEY_MIME); in CodecState() local 85 Log.d(TAG, "CodecState::onOutputFormatChanged " + mime); in CodecState() 86 mIsAudio = mime.startsWith("audio/"); in CodecState() 275 String mime = mOutputFormat.getString(MediaFormat.KEY_MIME); in onOutputFormatChanged() local 277 Log.d(TAG, "CodecState::onOutputFormatChanged " + mime); in onOutputFormatChanged() 280 if (mime.startsWith("audio/")) { in onOutputFormatChanged() 303 if (mime.startsWith("video/")) { in onOutputFormatChanged()
|
D | NativeDecoderTest.java | 150 String mime = format.getString(MediaFormat.KEY_MIME); in getSampleSizes() local 151 if (mime.startsWith("audio/")) { in getSampleSizes() 156 } else if (mime.startsWith("video/")) { in getSampleSizes() 162 fail("unexpected mime type: " + mime); in getSampleSizes() 206 String mime = format.getString(MediaFormat.KEY_MIME); in testExtractorFileDurationNative() local 207 if (mime.startsWith("audio/")) { in testExtractorFileDurationNative() 209 } else if (mime.startsWith("video/")) { in testExtractorFileDurationNative() 305 String mime = format[i].getString(MediaFormat.KEY_MIME); in getDecodedData() local 306 if (mime.startsWith("audio/") || mime.startsWith("video/")) { in getDecodedData() 307 codec[i] = MediaCodec.createDecoderByType(mime); in getDecodedData() [all …]
|
D | MediaCodecTest.java | 505 for (String mime : mimes) { in testReleaseAfterFlush() 506 if (!MediaUtils.checkEncoder(mime)) { in testReleaseAfterFlush() 509 testReleaseAfterFlush(mime); in testReleaseAfterFlush() 513 private void testReleaseAfterFlush(String mime) throws IOException, InterruptedException { in testReleaseAfterFlush() argument 519 MediaCodec encoder = MediaCodec.createEncoderByType(mime); in testReleaseAfterFlush() 520 runReleaseAfterFlush(mime, encoder, buffersExhausted, codecFlushed, numBuffers); in testReleaseAfterFlush() 523 encoder = MediaCodec.createEncoderByType(mime); in testReleaseAfterFlush() 529 runReleaseAfterFlush(mime, encoder, buffersExhausted, codecFlushed, numBuffers); in testReleaseAfterFlush() 542 encoder = MediaCodec.createEncoderByType(mime); in testReleaseAfterFlush() 546 … new ReleaseAfterFlushCallback(mime, encoder, buffersExhausted, codecFlushed, nBuffs); in testReleaseAfterFlush() [all …]
|
D | MediaCodecListTest.java | 85 AudioCodec(String mime, boolean isEncoder, int sampleRate) { in AudioCodec() argument 86 super(mime, isEncoder, MediaFormat.createAudioFormat( in AudioCodec() 87 mime, sampleRate, 1 /* channelCount */)); in AudioCodec() 92 VideoCodec(String mime, boolean isEncoder) { in VideoCodec() argument 94 super(mime, isEncoder, MediaFormat.createVideoFormat( in VideoCodec() 95 mime, 176 /* width */, 144 /* height */)); in VideoCodec()
|
D | AdaptivePlaybackTest.java | 1388 public CodecFamily(Context context, String mime, int ... resources) { 1395 assert media.getMime().equals(mime): 1397 " mime type instead of " + mime; 1417 if (type.equals(mime)) { 1420 codecInfo.getCapabilitiesForType(mime), 1436 Context context, String mime, boolean isGoogle, int ... resources) { 1437 for (Codec c: new CodecFamily(context, mime, resources)) { 1447 Context context, String mime, int ...resources) { 1448 return new CodecFamily(context, mime, resources); 1454 Context context, String mime, int ...resources) { [all …]
|
D | VideoEncoderTest.java | 153 String mime = mFormat.getString(MediaFormat.KEY_MIME); in playAll() local 161 CodecCapabilities caps = info.getCapabilitiesForType(mime); in playAll() 232 String mime = fmt.getString(MediaFormat.KEY_MIME).toLowerCase(); in open() local 233 if (mime.startsWith("video/")) { in open() 875 Encoder(String name, String mime, CodecCapabilities caps) { in Encoder() argument 877 mMime = mime; in Encoder() 1167 private Encoder[] goog(String mime) { in goog() argument 1168 return encoders(mime, true /* goog */); in goog() 1171 private Encoder[] other(String mime) { in other() argument 1172 return encoders(mime, false /* goog */); in other() [all …]
|
D | VideoDecoderPerfTest.java | 88 String mime = format.getString(MediaFormat.KEY_MIME); in decode() local 108 MediaPerfUtils.verifyAchievableFrameRates(name, mime, width, height, measuredFps); in decode() 123 String mime = format.getString(MediaFormat.KEY_MIME); in doDecode() local 129 } else if (!mime.equals(MediaFormat.MIMETYPE_VIDEO_VP8) in doDecode() 130 && !mime.equals(MediaFormat.MIMETYPE_VIDEO_VP9)) { in doDecode() 176 … VideoCapabilities cap = codec.getCodecInfo().getCapabilitiesForType(mime).getVideoCapabilities(); in doDecode()
|
D | DecoderTestAacDrc.java | 420 String mime = format.getString(MediaFormat.KEY_MIME); in decodeToMemory() local 421 assertTrue("not an audio file", mime.startsWith("audio/")); in decodeToMemory() 425 codec = MediaCodec.createDecoderByType(mime); in decodeToMemory()
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | MediaStoreIntentsTest.java | 80 for (String mime : mimes) { in testViewImageFile() 84 intent.setDataAndType(uri, mime); in testViewImageFile() 98 for (String mime : mimes) { in testViewVideoFile() 102 intent.setDataAndType(uri, mime); in testViewVideoFile() 116 for (String mime : mimes) { in testViewAudioFile() 120 intent.setDataAndType(uri, mime); in testViewAudioFile()
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | MediaUtils.java | 219 String mime = format.getString(MediaFormat.KEY_MIME); in getCodecNames() local 223 caps = info.getCapabilitiesForType(mime); in getCodecNames() 254 public static String[] getDecoderNamesForMime(String mime) { in getDecoderNamesForMime() argument 256 format.setString(MediaFormat.KEY_MIME, mime); in getDecoderNamesForMime() 260 public static String[] getEncoderNamesForMime(String mime) { in getEncoderNamesForMime() argument 262 format.setString(MediaFormat.KEY_MIME, mime); in getEncoderNamesForMime() 306 public static boolean supports(String codecName, String mime, int w, int h) { in supports() argument 311 VideoCapabilities vidCap = getVideoCapabilities(codecName, mime); in supports() 331 String mime = format.getString(MediaFormat.KEY_MIME); in supports() local 334 cap = codec.getCodecInfo().getCapabilitiesForType(mime); in supports() [all …]
|
D | MediaPerfUtils.java | 57 String mime = configFormat.getString(MediaFormat.KEY_MIME); in addPerformanceHeadersToLog() local 63 log.addValue("mime_type", mime, ResultType.NEUTRAL, ResultUnit.NONE); in addPerformanceHeadersToLog() 77 MediaUtils.getVideoCapabilities(codecName, mime) in addPerformanceHeadersToLog() 150 String name, String mime, int w, int h, double... measuredFps) { in verifyAchievableFrameRates() argument 152 MediaUtils.getVideoCapabilities(name, mime).getAchievableFrameRatesFor(w, h); in verifyAchievableFrameRates() 153 String kind = "achievable frame rates for " + name + " " + mime + " " + w + "x" + h; in verifyAchievableFrameRates() 161 Log.d(TAG, name + " " + mime + " " + w + "x" + h + in verifyAchievableFrameRates()
|
/cts/tests/tests/graphics/jni/ |
D | MediaTestHelpers.cpp | 111 const char *mime; in createMediaCodec() local 114 ASSERT(AMediaFormat_getString(format, AMEDIAFORMAT_KEY_MIME, &mime)); in createMediaCodec() 116 if (!strncmp(mime, "video/", 6)) { in createMediaCodec() 124 mCodec = AMediaCodec_createDecoderByType(mime); in createMediaCodec()
|
/cts/tests/tests/media/libaudiojni/ |
D | appendix-b-1-2-recording.cpp | 149 mime.formatType = SL_DATAFORMAT_MIME; in TestAudioRecording() 150 mime.mimeType = (SLchar *) "audio/x-wav"; in TestAudioRecording() 151 mime.containerType = SL_CONTAINERTYPE_WAV; in TestAudioRecording() 153 audioSink.pFormat = (void *)&mime; in TestAudioRecording()
|
/cts/tests/tests/media/libmediandkjni/ |
D | native-media-jni.cpp | 254 const char *mime; in testExtractor() local 255 if (!AMediaFormat_getString(format, AMEDIAFORMAT_KEY_MIME, &mime)) { in testExtractor() 258 } else if (!strncmp(mime, "audio/", 6)) { in testExtractor() 268 } else if (!strncmp(mime, "video/", 6)) { in testExtractor() 279 ALOGE("expected audio or video mime type, got %s", mime); in testExtractor() 470 const char *mime; in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() local 471 if (!AMediaFormat_getString(format, AMEDIAFORMAT_KEY_MIME, &mime)) { in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 474 } else if (!strncmp(mime, "audio/", 6) || !strncmp(mime, "video/", 6)) { in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 475 codec[i] = AMediaCodec_createDecoderByType(mime); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 490 ALOGE("expected audio or video mime type, got %s", mime); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() [all …]
|
D | native_media_decoder_source.cpp | 93 const char *mime; in setDataSourceFd() local 100 if (!AMediaFormat_getString(format, AMEDIAFORMAT_KEY_MIME, &mime)) { in setDataSourceFd() 105 } else if (!strncmp(mime, "video/", 6)) { in setDataSourceFd() 108 mMime = mime; in setDataSourceFd() 111 ALOGE("expected video mime type, got %s", mime); in setDataSourceFd()
|
D | native-mediadrm-jni.cpp | 264 static bool isVideo(const char* mime) { in isVideo() argument 265 return !strncmp(mime, "video/", 6) ? true : false; in isVideo() 268 static bool isAudio(const char* mime) { in isAudio() argument 269 return !strncmp(mime, "audio/", 6) ? true : false; in isAudio() 273 const char* mime, const AMediaCrypto* crypto, in addTrack() argument 276 *codec = AMediaCodec_createDecoderByType(mime); in addTrack() 278 ALOGE("cannot create codec for %s", mime); in addTrack() 301 const char* mime = ""; in addTracks() local 303 trackFormat, AMEDIAFORMAT_KEY_MIME, &mime)) { in addTracks() 308 } else if (isAudio(mime) || isVideo(mime)) { in addTracks() [all …]
|
D | native_media_encoder_jni.cpp | 118 const char *mime; in prepare() local 119 AMediaFormat_getString(config, AMEDIAFORMAT_KEY_MIME, &mime); in prepare() 121 AMediaCodec *enc = AMediaCodec_createEncoderByType(mime); in prepare() 261 std::string mime, in createMediaFormat() argument 268 AMediaFormat_setString(config.get(), AMEDIAFORMAT_KEY_MIME, mime.c_str()); in createMediaFormat() 315 std::string mime = cmime; in runNativeEncoderTest() local 320 mime, w, h, kColorFormatSurface, in runNativeEncoderTest()
|
/cts/tests/tests/drm/src/android/drm/cts/ |
D | DrmSupportInfoTest.java | 141 String mime = (String) mimes.next(); in checkAddValidMimeType() local 142 assertEquals(mime, mimeType); in checkAddValidMimeType()
|
/cts/tools/cts-media/ |
D | get_achievable_rates.py | 138 yield ' <MediaCodec name="%s" type="%s" update="true">' % (comp.name, comp.mime) 247 for mime, encoder, goog in sorted(set(self.kind.values())): 249 if self.kind[codec] != (mime, encoder, goog): 253 xmlInfo[dev][(not encoder, goog, mime, codec)][size].append(p95) 282 mime = a['mime_type'] 299 self.kind[codec] = (mime, 'decode_to' not in a, codec.lower().startswith('omx.google.'))
|
/cts/tests/tests/security/src/android/security/cts/ |
D | StagefrightTest.java | 1192 String mime = format.getString(MediaFormat.KEY_MIME); in doStagefrightTestMediaCodec() local 1200 MediaCodecInfo.CodecCapabilities caps = info.getCapabilitiesForType(mime); in doStagefrightTestMediaCodec() 1211 Log.w(TAG, "no codecs for track " + t + ", type " + mime); in doStagefrightTestMediaCodec() 1225 if (mime.startsWith("video/")) { in doStagefrightTestMediaCodec() 1432 …private void doStagefrightTestRawBlob(int rid, String mime, int initWidth, int initHeight) throws … in doStagefrightTestRawBlob() argument 1488 MediaCodecInfo.CodecCapabilities caps = info.getCapabilitiesForType(mime); in doStagefrightTestRawBlob() 1498 Log.w(TAG, "no codecs for mime type " + mime); in doStagefrightTestRawBlob() 1505 MediaFormat format = MediaFormat.createVideoFormat(mime, initWidth, initHeight); in doStagefrightTestRawBlob() 1546 private void doStagefrightTestRawBlob(int rid, String mime, int initWidth, int initHeight, in doStagefrightTestRawBlob() argument 1602 MediaCodecInfo.CodecCapabilities caps = info.getCapabilitiesForType(mime); in doStagefrightTestRawBlob() [all …]
|