Home
last modified time | relevance | path

Searched refs:codec (Results 1 – 25 of 54) sorted by relevance

123

/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/
Dpoc.cpp45 AMediaCodec *codec; in main() local
50 codec = AMediaCodec_createCodecByName("c2.android.av1-aom.decoder"); in main()
51 if (!codec) { in main()
59 AMediaCodec_delete(codec); in main()
66 AMediaCodec_configure(codec, format, nullptr, nullptr, isEncoder); in main()
67 AMediaCodec_start(codec); in main()
76 AMediaCodec_dequeueInputBuffer(codec, DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS); in main()
80 uint8_t *buf = AMediaCodec_getInputBuffer(codec, inIdx, &bufSize); in main()
91 status = AMediaCodec_queueInputBuffer(codec, inIdx, 0, bytesRead, 0, bufferFlags); in main()
105 AMediaCodec_dequeueOutputBuffer(codec, &info, DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS); in main()
[all …]
/cts/tests/tests/net/src/android/net/rtp/cts/
DAudioCodecTest.java23 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/
DResourceManagerTestActivityBase.java45 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 …]
DMediaCodecTest.java189 MediaCodec codec; in verifyException() local
194 codec = createCodecByType(null, isEncoder); in verifyException()
199 codec = createCodecByType("foobarplan9", isEncoder); // invalid type in verifyException()
204 codec = MediaCodec.createByCodecName("foobarplan9"); // invalid name in verifyException()
209 codec = createCodecByType(format.getString(MediaFormat.KEY_MIME), isEncoder); in verifyException()
213 codec.start(); in verifyException()
221 codec.flush(); in verifyException()
228 MediaCodecInfo codecInfo = codec.getCodecInfo(); // obtaining the codec info now is fine. in verifyException()
230 int bufIndex = codec.dequeueInputBuffer(0); in verifyException()
241 int bufIndex = codec.dequeueOutputBuffer(info, 0); in verifyException()
[all …]
DEncoderTest.java210 MediaCodec codec, ByteBuffer[] inputBuffers, int index, in queueInputBuffer() argument
258 codec.queueInputBuffer(index, 0 /* offset */, size, timeUs, 0 /* flags */); in queueInputBuffer()
264 MediaCodec codec, ByteBuffer[] outputBuffers, in dequeueOutputBuffer() argument
266 codec.releaseOutputBuffer(index, false /* render */); in dequeueOutputBuffer()
332 MediaCodec codec; in testEncoder() local
334 codec = MediaCodec.createByCodecName(componentName); in testEncoder()
340 codec.configure( in testEncoder()
349 codec.start(); in testEncoder()
350 ByteBuffer[] codecInputBuffers = codec.getInputBuffers(); in testEncoder()
351 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in testEncoder()
[all …]
DMediaCodecCapabilitiesTest.java434 String codec = mAllCodecs.findDecoderForFormat(format); in testHaveAdaptiveVideoDecoderForAllSupportedFormats() local
436 "could not find adaptive decoder for " + mime, codec != null); in testHaveAdaptiveVideoDecoderForAllSupportedFormats()
586 MediaCodec codec = null; in testAllAdvertisedVideoEncoderBitrateModes() local
588 codec = MediaCodec.createByCodecName(info.getName()); in testAllAdvertisedVideoEncoderBitrateModes()
589 codec.configure(format, null /* surface */, null /* crypto */, in testAllAdvertisedVideoEncoderBitrateModes()
592 if (codec != null) { in testAllAdvertisedVideoEncoderBitrateModes()
593 codec.release(); in testAllAdvertisedVideoEncoderBitrateModes()
632 MediaCodec codec = null; in testAllNonTunneledVideoCodecsSupportFlexibleYUV() local
636 codec = MediaCodec.createByCodecName(info.getName()); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
643 codec.configure(format, null /* surface */, null /* crypto */, in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
[all …]
DDecoderTestAacDrc.java547 MediaCodec codec; in decodeToMemory() local
563 codec = MediaCodec.createDecoderByType(mime); in decodeToMemory()
565 codec = MediaCodec.createByCodecName(decoderName); in decodeToMemory()
581 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */); in decodeToMemory()
587 final int targetLevelFromCodec = codec.getOutputFormat() in decodeToMemory()
596 codec.start(); in decodeToMemory()
597 codecInputBuffers = codec.getInputBuffers(); in decodeToMemory()
598 codecOutputBuffers = codec.getOutputBuffers(); in decodeToMemory()
606 codec.setParameters(b); in decodeToMemory()
623 int inputBufIndex = codec.dequeueInputBuffer(kTimeOutUs); in decodeToMemory()
[all …]
DDecoderTest.java308 MediaCodec codec = MediaCodec.createByCodecName(codecInfo.getName()); in verifyChannelsAndRates() local
313 codec.reset(); in verifyChannelsAndRates()
318 codec.configure(desiredFormat, null, null, 0); in verifyChannelsAndRates()
324 MediaFormat actual = codec.getInputFormat(); in verifyChannelsAndRates()
333 codec.release(); in verifyChannelsAndRates()
1062 MediaCodec codec, int index, BufferInfo info) { in testHdrMetadata()
1067 MediaFormat bufferFormat = codec.getOutputFormat(index); in testHdrMetadata()
1074 codec.releaseOutputBuffer(index, true); in testHdrMetadata()
1087 codec.releaseOutputBuffer(index, true); in testHdrMetadata()
1098 public void onInputBufferAvailable(MediaCodec codec, int index) { in testHdrMetadata()
[all …]
DNdkInputSurface.java92 public void configure(MediaCodec codec) { in configure() argument
93 throw new UnsupportedOperationException(codec.toString()); in configure()
97 public void configure(NdkMediaCodec codec) { in configure() argument
98 codec.setInputSurface(mNativeWindow); in configure()
DSdkMediaCodec.java34 public SdkMediaCodec(MediaCodec codec, boolean async) { in SdkMediaCodec() argument
35 this.mCodec = codec; in SdkMediaCodec()
39 public SdkMediaCodec(MediaCodec codec) { in SdkMediaCodec() argument
40 this(codec, false); in SdkMediaCodec()
DDecoderTestXheAac.java1240 MediaCodec codec;
1256 codec = MediaCodec.createDecoderByType(mime);
1258 codec = MediaCodec.createByCodecName(decoderName);
1283 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */);
1288 int albumModeFromCodec = codec.getOutputFormat()
1295 final int effectTypeFromCodec = codec.getOutputFormat()
1302 final int targetLevelFromCodec = codec.getOutputFormat()
1311 codec.start();
1312 codecInputBuffers = codec.getInputBuffers();
1313 codecOutputBuffers = codec.getOutputBuffers();
[all …]
DInputSurfaceInterface.java32 void configure(MediaCodec codec); in configure() argument
34 void configure(NdkMediaCodec codec); in configure() argument
DMediaCodecBlockModelTest.java215 … public void onInputSlot(MediaCodec codec, int index, LinearInputBlock input) throws Exception; in onInputSlot() argument
276 … public void onInputSlot(MediaCodec codec, int index, LinearInputBlock input) throws Exception { in onInputSlot() argument
282 String[] codecNames = new String[]{ codec.getName() }; in onInputSlot()
322 MediaCodec.QueueRequest request = codec.getQueueRequest(index); in onInputSlot()
358 public boolean onOutputSlot(MediaCodec codec, int index) throws Exception; in onOutputSlot() argument
368 public boolean onOutputSlot(MediaCodec codec, int index) throws Exception { in onOutputSlot() argument
369 MediaCodec.OutputFrame frame = codec.getOutputFrame(index); in onOutputSlot()
381 codec.releaseOutputBuffer(index, false); in onOutputSlot()
401 public boolean onOutputSlot(MediaCodec codec, int index) throws Exception { in onOutputSlot() argument
402 MediaCodec.OutputFrame frame = codec.getOutputFrame(index); in onOutputSlot()
[all …]
DMediaCodecTunneledPlayer.java239 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()
DSurfaceEncodeTimestampTest.java409 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument
410 if (codec != mEncoder) return; in onOutputFormatChanged()
415 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument
416 if (codec != mEncoder) return; in onInputBufferAvailable()
421 public void onOutputBufferAvailable(MediaCodec codec, int index, BufferInfo info) { in onOutputBufferAvailable() argument
422 if (codec != mEncoder || mOutputEOS) return; in onOutputBufferAvailable()
438 codec.releaseOutputBuffer(index, false); in onOutputBufferAvailable()
446 public void onError(MediaCodec codec, CodecException e) { in onError() argument
447 if (codec != mEncoder) return; in onError()
/cts/tests/tests/media/libmediandkjni/
Dnative-media-jni.cpp504 AMediaCodec **codec = new AMediaCodec*[numtracks]; in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() local
522 codec[i] = AMediaCodec_createDecoderByType(mime); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
523 AMediaCodec_configure(codec[i], format, NULL /* surface */, NULL /* crypto */, 0); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
531 AMediaCodec_setAsyncNotifyCallback(codec[i], aCB, &callbackData[i]); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
533 AMediaCodec_start(codec[i]); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
551 bufidx = AMediaCodec_dequeueInputBuffer(codec[t], 5000); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
556 uint8_t *buf = AMediaCodec_getInputBuffer(codec[t], bufidx, &bufsize); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
567 AMediaCodec_queueInputBuffer(codec[t], bufidx, 0, sampleSize, presentationTimeUs, in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
581 bufidx = AMediaCodec_dequeueInputBuffer(codec[tt], 5000); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
584 AMediaCodec_queueInputBuffer(codec[tt], bufidx, 0, 0, 0, in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
[all …]
Dnative-mediadrm-jni.cpp327 const ANativeWindow* window, AMediaCodec** codec) { in addTrack() argument
329 *codec = AMediaCodec_createDecoderByType(mime); in addTrack()
330 if (codec == NULL) { in addTrack()
335 AMediaCodec_configure(*codec, format, in addTrack()
342 AMediaCodec** codec) { in addTracks() argument
367 addTrack(trackFormat, mime, crypto, window, codec); in addTracks()
368 AMediaCodec_start(*codec); in addTracks()
369 AMediaCodec_flush(*codec); in addTracks()
385 static void fillDecoder(AMediaCodec* codec, AMediaExtractor* extractor, in fillDecoder() argument
389 ssize_t bufferIndex = AMediaCodec_dequeueInputBuffer(codec, 2000); in fillDecoder()
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/
Dpoc.cpp96 Codec *codec = new Codec(); in main() local
97 if (!codec) { in main()
102 if (codec->initDecoder()) { in main()
103 codec->decodeFrames((UCHAR *)(data), static_cast<UINT>(size)); in main()
106 delete codec; in main()
/cts/tests/video/src/android/video/cts/
DCodecInfo.java59 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()
DVideoEncoderDecoderTest.java914 MediaCodec codec = null; in runEncoder() local
916 codec = MediaCodec.createByCodecName(encoderName); in runEncoder()
918 codec.configure( in runEncoder()
925 codec.release(); in runEncoder()
931 codec.start(); in runEncoder()
932 mEncInputFormat = codec.getInputFormat(); in runEncoder()
933 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in runEncoder()
934 MediaFormat inputFormat = codec.getInputFormat(); in runEncoder()
952 index = codec.dequeueInputBuffer(VIDEO_CODEC_WAIT_TIME_US /* timeoutUs */); in runEncoder()
964 Image image = codec.getInputImage(index); in runEncoder()
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/
Dpoc.cpp169 Codec *codec = new Codec(); in main() local
170 if (!codec) { in main()
174 if (codec->initDecoder()) { in main()
198 codec->decodeFrames(rawData, rawDataSize); in main()
202 delete codec; in main()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/
Dpoc.cpp31 auto codec = SkAndroidCodec::MakeFromData(bytes); in decode() local
32 if (!codec) { in decode()
36 auto size = codec->getSampledDimensions(sampleSize); in decode()
46 codec->getAndroidPixels(bm.info(), bm.getPixels(), bm.rowBytes(), &options); in decode()
/cts/tests/media/
DREADME.md2 Current folder comprises of files necessary for testing media extractor, media muxer, media codec S…
13 …ts attributes that offer selective run of tests. Media codec tests parses the value of key *codec-…
15 To limit media codec decoder tests to mp3 and vorbis decoder,
17 adb shell am instrument -w -r -e codec-sel 'mp3;vorbis' -e debug false -e class 'android.mediav2.…
20 | Identifier for codec-sel | Mime |
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/
Dpoc.cpp125 Codec codec = Codec(); in main() local
126 if (codec.initDecoder()) { in main()
127 codec.decodeFrames(data, length); in main()
129 return codec.validateQmfDomainBounds(); in main()
/cts/tests/media/jni/
DNativeCodecTestBase.cpp23 static void onAsyncInputAvailable(AMediaCodec* codec, void* userdata, int32_t index) { in onAsyncInputAvailable() argument
24 (void)codec; in onAsyncInputAvailable()
31 static void onAsyncOutputAvailable(AMediaCodec* codec, void* userdata, int32_t index, in onAsyncOutputAvailable() argument
33 (void)codec; in onAsyncOutputAvailable()
40 static void onAsyncFormatChanged(AMediaCodec* codec, void* userdata, AMediaFormat* format) { in onAsyncFormatChanged() argument
41 (void)codec; in onAsyncFormatChanged()
47 static void onAsyncError(AMediaCodec* codec, void* userdata, media_status_t error, in onAsyncError() argument
49 (void)codec; in onAsyncError()
181 media_status_t CodecAsyncHandler::setCallBack(AMediaCodec* codec, bool isCodecInAsyncMode) { in setCallBack() argument
186 status = AMediaCodec_setAsyncNotifyCallback(codec, callBack, this); in setCallBack()

123