/cts/tests/tests/net/src/android/net/rtp/cts/ |
D | AudioCodecTest.java | 23 private void assertEquals(AudioCodec codec, int type, String rtpmap, String fmtp) { in assertEquals() argument 25 assertEquals(codec.type, type); in assertEquals() 27 assertTrue(codec.type >= 96 && codec.type <= 127); in assertEquals() 29 assertEquals(codec.rtpmap.compareToIgnoreCase(rtpmap), 0); in assertEquals() 30 assertEquals(codec.fmtp, fmtp); in assertEquals() 68 for (AudioCodec codec : codecs) { in testGetCodecs() 69 assertFalse(types[codec.type]); in testGetCodecs() 70 types[codec.type] = true; in testGetCodecs()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | ResourceManagerTestActivityBase.java | 45 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument 46 Log.d(TAG, "onInputBufferAvailable " + codec.toString()); in onInputBufferAvailable() 51 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument 52 Log.d(TAG, "onOutputBufferAvailable " + codec.toString()); in onOutputBufferAvailable() 56 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument 57 Log.d(TAG, "onError " + codec.toString() + " errorCode " + e.getErrorCode()); in onError() 61 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument 62 Log.d(TAG, "onOutputFormatChanged " + codec.toString()); in onOutputFormatChanged() 161 MediaCodec codec = null; in allocateCodecs() local 165 codec = MediaCodec.createByCodecName(name); in allocateCodecs() [all …]
|
D | EncoderTest.java | 179 MediaCodec codec, ByteBuffer[] inputBuffers, int index, in queueInputBuffer() argument 227 codec.queueInputBuffer(index, 0 /* offset */, size, timeUs, 0 /* flags */); in queueInputBuffer() 233 MediaCodec codec, ByteBuffer[] outputBuffers, in dequeueOutputBuffer() argument 235 codec.releaseOutputBuffer(index, false /* render */); in dequeueOutputBuffer() 301 MediaCodec codec; in testEncoder() local 303 codec = MediaCodec.createByCodecName(componentName); in testEncoder() 309 codec.configure( in testEncoder() 318 codec.start(); in testEncoder() 319 ByteBuffer[] codecInputBuffers = codec.getInputBuffers(); in testEncoder() 320 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in testEncoder() [all …]
|
D | MediaCodecCapabilitiesTest.java | 397 String codec = mAllCodecs.findDecoderForFormat(format); in testHaveAdaptiveVideoDecoderForAllSupportedFormats() local 399 "could not find adaptive decoder for " + mime, codec != null); in testHaveAdaptiveVideoDecoderForAllSupportedFormats() 500 MediaCodec codec = null; in testAllNonTunneledVideoCodecsSupportFlexibleYUV() local 503 codec = MediaCodec.createByCodecName(info.getName()); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() 510 codec.configure(format, null /* surface */, null /* crypto */, in testAllNonTunneledVideoCodecsSupportFlexibleYUV() 511 isEncoder ? codec.CONFIGURE_FLAG_ENCODE : 0); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() 513 isEncoder ? codec.getInputFormat() : codec.getOutputFormat(); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() 517 codec.start(); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() 518 int ix = codec.dequeueInputBuffer(TIMEOUT_US); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() 521 codec.getInputImage(ix)); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() [all …]
|
D | DecoderTest.java | 1244 MediaCodec codec; 1259 codec = MediaCodec.createDecoderByType(mime); 1275 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */); 1277 codec.start(); 1278 codecInputBuffers = codec.getInputBuffers(); 1279 codecOutputBuffers = codec.getOutputBuffers(); 1282 codec.stop(); 1283 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */); 1284 codec.start(); 1285 codecInputBuffers = codec.getInputBuffers(); [all …]
|
D | MediaCodecTest.java | 148 MediaCodec codec; in verifyException() local 153 codec = createCodecByType(null, isEncoder); in verifyException() 158 codec = createCodecByType("foobarplan9", isEncoder); // invalid type in verifyException() 163 codec = MediaCodec.createByCodecName("foobarplan9"); // invalid name in verifyException() 168 codec = createCodecByType(format.getString(MediaFormat.KEY_MIME), isEncoder); in verifyException() 172 codec.start(); in verifyException() 180 codec.flush(); in verifyException() 187 MediaCodecInfo codecInfo = codec.getCodecInfo(); // obtaining the codec info now is fine. in verifyException() 189 int bufIndex = codec.dequeueInputBuffer(0); in verifyException() 200 int bufIndex = codec.dequeueOutputBuffer(info, 0); in verifyException() [all …]
|
D | NativeDecoderTest.java | 235 MediaCodec[] codec = new MediaCodec[numtracks]; in getDecodedData() local 243 codec[i] = MediaCodec.createDecoderByType(mime); in getDecodedData() 244 codec[i].configure(format[i], null, null, 0); in getDecodedData() 245 codec[i].start(); in getDecodedData() 246 inbuffers[i] = codec[i].getInputBuffers(); in getDecodedData() 247 outbuffers[i] = codec[i].getOutputBuffers(); in getDecodedData() 263 int bufidx = codec[t].dequeueInputBuffer(5000); in getDecodedData() 277 codec[t].queueInputBuffer(bufidx, 0, sampleSize, presentationTimeUs, in getDecodedData() 283 for (int tt = 0; tt < codec.length; tt++) { in getDecodedData() 287 int bufidx = codec[tt].dequeueInputBuffer(5000); in getDecodedData() [all …]
|
D | VideoDecoderPerfTest.java | 150 MediaCodec codec = MediaCodec.createByCodecName(name); in doDecode() local 151 … VideoCapabilities cap = codec.getCodecInfo().getCapabilitiesForType(mime).getVideoCapabilities(); in doDecode() 153 codec.configure(format, surface, null /* crypto */, 0 /* flags */); in doDecode() 154 codec.start(); in doDecode() 155 codecInputBuffers = codec.getInputBuffers(); in doDecode() 156 codecOutputBuffers = codec.getOutputBuffers(); in doDecode() 157 mDecInputFormat = codec.getInputFormat(); in doDecode() 173 int inputBufIndex = codec.dequeueInputBuffer(kTimeOutUs); in doDecode() 192 codec.queueInputBuffer( in doDecode() 206 int outputBufIndex = codec.dequeueOutputBuffer(info, kTimeOutUs); in doDecode() [all …]
|
D | MediaCodecTunneledPlayer.java | 239 MediaCodec codec; in addTrack() local 253 codec = MediaCodec.createByCodecName(codecName); in addTrack() 254 if (codec == null) { in addTrack() 265 codec = MediaCodec.createDecoderByType(mime); in addTrack() 266 if (codec == null) { in addTrack() 272 codec.configure( in addTrack() 279 trackIndex, format, codec, true, mTunneled, mAudioSessionId); in addTrack() 283 trackIndex, format, codec, true, mTunneled, mAudioSessionId); in addTrack()
|
D | MediaSyncTest.java | 740 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument 744 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument 747 || mSignaledEos || mDecoder != codec) { in onInputBufferAvailable() 751 ByteBuffer buffer = codec.getInputBuffer(index); in onInputBufferAvailable() 757 codec.queueInputBuffer( in onInputBufferAvailable() 768 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument 770 if (mEos || mDecoder != codec) { in onOutputBufferAvailable() 778 ByteBuffer outputByteBuffer = codec.getOutputBuffer(index); in onOutputBufferAvailable() 792 codec.releaseOutputBuffer(index, info.presentationTimeUs * 1000); in onOutputBufferAvailable() 795 codec.releaseOutputBuffer(index, false); in onOutputBufferAvailable() [all …]
|
D | MediaCodecListTest.java | 179 MediaCodec codec = MediaCodec.createByCodecName(info.getName()); in testComponentInstantiation() local 181 assertEquals(codec.getName(), info.getName()); in testComponentInstantiation() 183 assertEquals(codec.getCodecInfo(), info); in testComponentInstantiation() 185 codec.release(); in testComponentInstantiation() 186 codec = null; in testComponentInstantiation() 321 String codec = requiredCodec.mMimeTypeName in areRequiredCodecTypesSupported() local 323 Log.e(TAG, "Media codec (" + codec + ") is not supported"); in areRequiredCodecTypesSupported()
|
D | Vp8CodecTestBase.java | 840 public void onInputBufferAvailable(MediaCodec codec, int index) { 877 public void onOutputBufferAvailable(MediaCodec codec, 928 public void onError(MediaCodec codec, CodecException e) { 936 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { 1308 MediaEncoderAsync codec = new MediaEncoderAsync(); in encode() local 1309 codec.createCodec(0, properties.codecName, format, in encode() 1354 codec.forceSyncFrame(); in encode() 1363 codec.updateBitrate(newBitrate); in encode() 1375 inputConsumed = codec.feedInput(srcFrame, sawInputEOS); in encode() 1383 MediaEncoderOutput out = codec.getOutput(); in encode() [all …]
|
D | MediaCodecClearKeyPlayer.java | 319 MediaCodec codec; in addTrack() local 322 codec = MediaCodec.createByCodecName( in addTrack() 325 codec = MediaCodec.createDecoderByType(mime); in addTrack() 328 codec.configure( in addTrack() 337 trackIndex, format, codec, true, false, in addTrack() 342 trackIndex, format, codec, true, false, in addTrack()
|
D | AdaptivePlaybackTest.java | 862 MediaCodec codec = null; 864 codec = MediaCodec.createByCodecName(codecName); 868 Log.i(TAG, "using codec: " + codec.getName()); 869 mCodec = codec; 878 codec.setOnFrameRenderedListener(this, null); 881 public void onFrameRendered(MediaCodec codec, long presentationTimeUs, long nanoTime) { 1176 Decoder codec = new Decoder(codecName); 1177 codec.configureAndStart(media.getFormat(), s /* surface */); 1179 int numframes = codec.queueInputBufferRange( 1187 codec.stop(); [all …]
|
D | VideoEncoderTest.java | 97 public void onOutputBufferAvailable(MediaCodec codec, int ix, BufferInfo info) { in play() 98 codec.releaseOutputBuffer(ix, info.size > 0); in play() 105 public void onInputBufferAvailable(MediaCodec codec, int ix) { in play() 110 codec.getInputBuffer(ix).put(el.first); in play() 114 + codec.getInputBuffer(ix).remaining() in play() 115 + "-byte input buffer of " + codec.getName() in play() 116 + " configured for " + codec.getInputFormat()); in play() 120 codec.queueInputBuffer( in play() 124 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in play() 128 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in play() [all …]
|
D | EncodeDecodeTest.java | 386 String codec = mcl.findEncoderForFormat(format); in encodeDecodeVideoFromBuffer() local 387 if (codec == null) { in encodeDecodeVideoFromBuffer() 392 if (VERBOSE) Log.d(TAG, "found codec: " + codec); in encodeDecodeVideoFromBuffer() 402 encoder = MediaCodec.createByCodecName(codec); in encodeDecodeVideoFromBuffer() 458 String codec = mcl.findEncoderForFormat(format); in encodeDecodeVideoFromSurfaceToSurface() local 459 if (codec == null) { in encodeDecodeVideoFromSurfaceToSurface() 464 if (VERBOSE) Log.d(TAG, "found codec: " + codec); in encodeDecodeVideoFromSurfaceToSurface() 493 encoder = MediaCodec.createByCodecName(codec); in encodeDecodeVideoFromSurfaceToSurface()
|
D | CodecState.java | 62 MediaCodec codec, in CodecState() argument 76 mCodec = codec; in CodecState()
|
D | MediaRecorderTest.java | 415 int fileFormat, int codec) throws Exception { in testRecordAudioInRawFormat() argument 422 mMediaRecorder.setAudioEncoder(codec); in testRecordAudioInRawFormat() 574 int codec = MediaRecorder.VideoEncoder.H264; in setupRecorder() local 575 int frameRate = getMaxFrameRateForCodec(codec); in setupRecorder() 813 private static int getMaxFrameRateForCodec(int codec) { in getMaxFrameRateForCodec() argument 815 if (cap.mCodec == codec) { in getMaxFrameRateForCodec()
|
D | EncodeVirtualDisplayTest.java | 219 String codec = mcl.findEncoderForFormat(encoderFormat); in encodeVirtualDisplayTest() local 220 if (codec == null) { in encodeVirtualDisplayTest() 226 encoder = MediaCodec.createByCodecName(codec); in encodeVirtualDisplayTest()
|
/cts/tests/tests/media/libmediandkjni/ |
D | native-media-jni.cpp | 233 AMediaCodec **codec = new AMediaCodec*[numtracks]; in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() local 249 codec[i] = AMediaCodec_createDecoderByType(mime); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 250 AMediaCodec_configure(codec[i], format, NULL /* surface */, NULL /* crypto */, 0); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 251 AMediaCodec_start(codec[i]); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 265 ssize_t bufidx = AMediaCodec_dequeueInputBuffer(codec[t], 5000); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 269 uint8_t *buf = AMediaCodec_getInputBuffer(codec[t], bufidx, &bufsize); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 280 AMediaCodec_queueInputBuffer(codec[t], bufidx, 0, sampleSize, presentationTimeUs, in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 290 int bufidx = AMediaCodec_dequeueInputBuffer(codec[tt], 5000); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 292 AMediaCodec_queueInputBuffer(codec[tt], bufidx, 0, 0, 0, in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() 304 int status = AMediaCodec_dequeueOutputBuffer(codec[tt], &info, 1); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() [all …]
|
D | Android.mk | 25 codec-utils-jni.cpp \
|
/cts/tests/video/src/android/video/cts/ |
D | CodecInfo.java | 59 MediaCodec codec; in getSupportedFormatInfo() local 61 codec = MediaCodec.createByCodecName(codecName); in getSupportedFormatInfo() 66 CodecCapabilities cap = codec.getCodecInfo().getCapabilitiesForType(mimeType); in getSupportedFormatInfo() 69 codec.release(); in getSupportedFormatInfo() 89 codec.release(); in getSupportedFormatInfo()
|
D | VideoEncoderDecoderTest.java | 783 MediaCodec codec = null; in runEncoder() local 785 codec = MediaCodec.createByCodecName(encoderName); in runEncoder() 787 codec.configure( in runEncoder() 794 codec.release(); in runEncoder() 800 codec.start(); in runEncoder() 801 mEncInputFormat = codec.getInputFormat(); in runEncoder() 802 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in runEncoder() 803 MediaFormat inputFormat = codec.getInputFormat(); in runEncoder() 821 index = codec.dequeueInputBuffer(VIDEO_CODEC_WAIT_TIME_US /* timeoutUs */); in runEncoder() 833 Image image = codec.getInputImage(index); in runEncoder() [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | StagefrightTest.java | 380 MediaCodec codec = MediaCodec.createByCodecName(codecName); in doStagefrightTestMediaCodec() local 385 codec.configure(format, surface, null, 0); in doStagefrightTestMediaCodec() 386 codec.start(); in doStagefrightTestMediaCodec() 392 int bufidx = codec.dequeueInputBuffer(5000); in doStagefrightTestMediaCodec() 394 int n = ex.readSampleData(codec.getInputBuffer(bufidx), 0); in doStagefrightTestMediaCodec() 400 codec.queueInputBuffer(bufidx, 0, n, time, flags); in doStagefrightTestMediaCodec() 403 int status = codec.dequeueOutputBuffer(info, 5000); in doStagefrightTestMediaCodec() 412 codec.releaseOutputBuffer(status, true); in doStagefrightTestMediaCodec() 424 codec.release(); in doStagefrightTestMediaCodec()
|
/cts/tools/cts-media/ |
D | get_achievable_rates.py | 67 self.codec = None 76 return None not in (self.codec, self.mime, self.size) 208 self.codec = result['codec'] 217 self.codec = result['codec'] 242 self.codec = result['codec'] 251 self.codec = result['codec'] 347 … lambda e: Comp(is_decoder=e.is_decoder, google='.google.' in e.codec, mime=e.mime, name=e.codec))
|