Home
last modified time | relevance | path

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

1234567

/frameworks/av/media/module/libmediaformatshaper/
DFormatShaper.cpp44 CodecProperties *codec = (CodecProperties*) shaper; in shapeFormat() local
45 if (codec == nullptr) { in shapeFormat()
48 if (!codec->isRegistered()) { in shapeFormat()
55 std::string mediaType = codec->getMediaType(); in shapeFormat()
58 (void) videoShaper(codec, inFormat, flags); in shapeFormat()
73 CodecProperties *codec = (CodecProperties*) shaper; in setMap() local
74 if (codec == nullptr) { in setMap()
78 if (codec->isRegistered()) { in setMap()
82 codec->setMapping(kind, key, value); in setMap()
88 CodecProperties *codec = (CodecProperties*) shaper; in setFeature() local
[all …]
DManageShapingCodecs.cpp41 CodecProperties *codec = nullptr; in findCodec() local
55 codec = it->second; in findCodec()
58 return codec; in findCodec()
61 CodecProperties *registerCodec(CodecProperties *codec, const char *codecName, in registerCodec() argument
66 if (codec->isRegistered()) { in registerCodec()
89 sCodecTraits.insert({codecKey, codec}); in registerCodec()
90 registeredCodec = codec; in registerCodec()
91 codec->setRegistered(true); in registerCodec()
95 delete codec; in registerCodec()
96 codec = nullptr; in registerCodec()
DVideoShaper.cpp61 int videoShaper(CodecProperties *codec, AMediaFormat* inFormat, int flags) { in videoShaper() argument
62 if (codec == nullptr) { in videoShaper()
65 ALOGV("codec %s inFormat %p flags x%x", codec->getName().c_str(), inFormat, flags); in videoShaper()
69 std::string mediaType = codec->getMediaType(); in videoShaper()
84 (void) VQApply(codec, info, inFormat, flags); in videoShaper()
/frameworks/base/media/java/android/media/
DEncoderProfiles.java85 return codec; in getCodec()
93 if (codec == MediaRecorder.VideoEncoder.H263) { in getMediaType()
95 } else if (codec == MediaRecorder.VideoEncoder.H264) { in getMediaType()
97 } else if (codec == MediaRecorder.VideoEncoder.MPEG_4_SP) { in getMediaType()
99 } else if (codec == MediaRecorder.VideoEncoder.VP8) { in getMediaType()
101 } else if (codec == MediaRecorder.VideoEncoder.HEVC) { in getMediaType()
103 } else if (codec == MediaRecorder.VideoEncoder.VP9) { in getMediaType()
105 } else if (codec == MediaRecorder.VideoEncoder.DOLBY_VISION) { in getMediaType()
107 } else if (codec == MediaRecorder.VideoEncoder.AV1) { in getMediaType()
241 /* package private */ VideoProfile(int codec, in VideoProfile() argument
[all …]
/frameworks/av/media/tests/benchmark/src/native/common/
DBenchmarkCommon.cpp31 void OnInputAvailableCB(AMediaCodec *codec, void *userdata, int32_t index) { in OnInputAvailableCB() argument
35 self->mIOQueue.push([self, codec, index]() { self->onInputAvailable(codec, index); }); in OnInputAvailableCB()
38 void OnOutputAvailableCB(AMediaCodec *codec, void *userdata, int32_t index, in OnOutputAvailableCB() argument
45 self->mIOQueue.push([self, codec, index, bufferInfoCopy]() { in OnOutputAvailableCB()
47 self->onOutputAvailable(codec, index, &bc); in OnOutputAvailableCB()
51 void OnFormatChangedCB(AMediaCodec *codec, void *userdata, AMediaFormat *format) { in OnFormatChangedCB() argument
54 self->mIOQueue.push([self, codec, format]() { self->onFormatChanged(codec, format); }); in OnFormatChangedCB()
57 void OnErrorCB(AMediaCodec *codec, void *userdata, media_status_t err, int32_t actionCode, in OnErrorCB() argument
59 (void)codec; in OnErrorCB()
63 self->mIOQueue.push([self, codec, err]() { self->onError(codec, err); }); in OnErrorCB()
[all …]
DBenchmarkCommon.h88 virtual void onInputAvailable(AMediaCodec *codec, int32_t index) { in onInputAvailable() argument
89 (void)codec; in onInputAvailable()
92 virtual void onFormatChanged(AMediaCodec *codec, AMediaFormat *format) { in onFormatChanged() argument
93 (void)codec; in onFormatChanged()
96 virtual void onError(AMediaCodec *codec, media_status_t err) { in onError() argument
97 (void)codec; in onError()
100 virtual void onOutputAvailable(AMediaCodec *codec, int32_t index, in onOutputAvailable() argument
102 (void)codec; in onOutputAvailable()
121 void OnInputAvailableCB(AMediaCodec *codec, void *userdata, int32_t index);
123 void OnOutputAvailableCB(AMediaCodec *codec, void *userdata, int32_t index,
[all …]
/frameworks/base/packages/SettingsLib/DataStore/tests/src/com/android/settingslib/datastore/
DBackupCodecTest.kt35 for (codec in allCodecs()) { in name() constant
36 assertThat(names).doesNotContain(codec.name) in name()
37 names.add(codec.name) in name()
43 for (codec in allCodecs()) { in fromId() method
44 assertThat(BackupCodec.fromId(codec.id)).isInstanceOf(codec::class.java) in fromId()
56 fun test(codec: BackupCodec, size: Int) { in encode_decode()
61 codec.encode(outputStream).use { it.write(data) } in encode_decode()
65 val result = codec.decode(inputStream).use { it.readBytes() } in encode_decode()
70 for (codec in allCodecs()) { in encode_decode() method
71 test(codec, 0) in encode_decode()
[all …]
DBackupRestoreFileArchiverTest.kt119 for (codec in allCodecs()) { in restoreEntity_forwardCompatibility() constant
123 fileStorage.wrapBackupOutputStream(codec, outputStream).use { it.write(data) } in restoreEntity_forwardCompatibility()
142 fun test(codec: BackupCodec, size: Int) { in restoreEntity()
143 val fileStorage = FileStorage("fs", key, if (size % 2 == 0) codec else null) in restoreEntity()
146 fileStorage.wrapBackupOutputStream(codec, outputStream).use { it.write(data) } in restoreEntity()
160 for (codec in allCodecs()) { in restoreEntity() method
161 for (size in 0 until 100) test(codec, size) in restoreEntity()
162 repeat(10) { test(codec, random.nextInt(100, MAX_DATA_SIZE)) } in restoreEntity()
210 fun test(codec: BackupCodec, size: Int) { in toBackupRestoreEntity_backup()
219 on { defaultCodec() } doReturn codec in toBackupRestoreEntity_backup()
[all …]
/frameworks/av/media/codec2/sfplugin/tests/
DMediaCodec_sanity_test.cpp47 if (codec != nullptr) { in ~MediaCodecSanityTest()
48 codec->release(); in ~MediaCodecSanityTest()
54 sp<MediaCodec> codec; member in android::MediaCodecSanityTest
111 codec = MediaCodec::CreateByComponentName(looper, "c2.android.avc.decoder"); in TEST_P()
121 EXPECT_EQ(codec->configure(cfg, nullptr, nullptr, 0), OK); in TEST_P()
122 EXPECT_EQ(codec->getInputFormat(&ifmt), OK); in TEST_P()
130 EXPECT_EQ(codec->start(), OK); in TEST_P()
132 EXPECT_EQ(codec->dequeueInputBuffer(&ix, 1000000), OK); in TEST_P()
134 EXPECT_EQ(codec->getInputBuffer(ix, &buf), OK); in TEST_P()
140 codec = MediaCodec::CreateByComponentName(looper, "c2.android.vp8.decoder"); in TEST_P()
[all …]
/frameworks/av/media/ndk/fuzzer/
Dndk_async_codec_fuzzer.cpp69 virtual void invokeInputBufferAPI(AMediaCodec* codec, int32_t index) { in invokeInputBufferAPI() argument
70 (void)codec; in invokeInputBufferAPI()
73 virtual void onFormatChanged(AMediaCodec* codec, AMediaFormat* format) { in onFormatChanged() argument
74 (void)codec; in onFormatChanged()
78 virtual void invokeOutputBufferAPI(AMediaCodec* codec, int32_t index, in invokeOutputBufferAPI() argument
80 (void)codec; in invokeOutputBufferAPI()
99 static void onAsyncInputAvailable(AMediaCodec* codec, void* userdata, int32_t index) { in onAsyncInputAvailable() argument
101 self->mIOQueue.push([self, codec, index]() { self->invokeInputBufferAPI(codec, index); }); in onAsyncInputAvailable()
104 static void onAsyncOutputAvailable(AMediaCodec* codec, void* userdata, int32_t index, in onAsyncOutputAvailable() argument
108 self->mIOQueue.push([self, codec, index, bufferInfoCopy]() { in onAsyncOutputAvailable()
[all …]
DNdkMediaCodecFuzzerBase.cpp314 void NdkMediaCodecFuzzerBase::invokeCodecFormatAPI(AMediaCodec* codec) { in invokeCodecFormatAPI() argument
319 codecFormat = AMediaCodec_getInputFormat(codec); in invokeCodecFormatAPI()
323 codecFormat = AMediaCodec_getOutputFormat(codec); in invokeCodecFormatAPI()
332 bufferIndex = AMediaCodec_dequeueOutputBuffer(codec, &info, timeOutUs); in invokeCodecFormatAPI()
337 codecFormat = AMediaCodec_getBufferFormat(codec, bufferIndex); in invokeCodecFormatAPI()
346 void NdkMediaCodecFuzzerBase::invokeInputBufferOperationAPI(AMediaCodec* codec) { in invokeInputBufferOperationAPI() argument
351 bufferIndex = AMediaCodec_dequeueInputBuffer(codec, timeOutUs); in invokeInputBufferOperationAPI()
356 uint8_t* buffer = AMediaCodec_getInputBuffer(codec, bufferIndex, &bufferSize); in invokeInputBufferOperationAPI()
367 AMediaCodec_queueInputBuffer(codec, bufferIndex, 0 /* offset */, bufferSize, 0 /* time */, in invokeInputBufferOperationAPI()
371 AMediaCodec_queueSecureInputBuffer(codec, bufferIndex, 0 /* offset */, cryptoInfo, in invokeInputBufferOperationAPI()
[all …]
/frameworks/proto_logging/stats/atoms/media/
Dmedia_codec_extension_atoms.proto23 import "frameworks/proto_logging/stats/enums/media/codec/enums.proto";
42 * when a client requests to reclaim codec(s) from other process(es).
48 * If multiple codecs are reclaimed to satisfy the current (codec) reclaim
50 * for each codec reclaimed.
59 // Requester Information: Process that triggered codec reclaim event.
67 // The name of the codec that requester needs.
69 optional string codec = 3; field
71 // The number of concurrent instances of this codec, when the
77 optional android.media.codec.ReclaimStatus reclaim_status = 5;
93 * when a client starts a codec.
[all …]
/frameworks/base/media/jni/
Dandroid_media_MediaCodec.cpp1576 JNIEnv *env, jobject thiz, const sp<JMediaCodec> &codec, bool release = true) { in setMediaCodec() argument
1578 if (codec != NULL) { in setMediaCodec()
1579 codec->incStrong(thiz); in setMediaCodec()
1592 env->CallVoidMethod(thiz, gFields.setAndUnlockContextID, (jlong)codec.get()); in setMediaCodec()
1598 sp<JMediaCodec> codec = (JMediaCodec *)env->CallLongMethod(thiz, gFields.lockAndGetContextID); in getMediaCodec() local
1599 env->CallVoidMethod(thiz, gFields.setAndUnlockContextID, (jlong)codec.get()); in getMediaCodec()
1600 return codec; in getMediaCodec()
1605 sp<JMediaCodec> codec = setMediaCodec(env, thiz, nullptr, false /* release */); in android_media_MediaCodec_release() local
1606 if (codec != NULL) { in android_media_MediaCodec_release()
1607 codec->releaseAsync(); in android_media_MediaCodec_release()
[all …]
/frameworks/av/media/module/service.mediatranscoding/tests/TranscodingUidPolicyTestApp/src/com/android/tests/transcoding/
DResourcePolicyTestActivity.java46 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument
47 Log.d(TAG, "onInputBufferAvailable " + codec.toString()); in onInputBufferAvailable()
52 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument
53 Log.d(TAG, "onOutputBufferAvailable " + codec.toString()); in onOutputBufferAvailable()
57 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument
58 Log.d(TAG, "onError " + codec.toString() + " errorCode " + e.getErrorCode()); in onError()
62 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument
63 Log.d(TAG, "onOutputFormatChanged " + codec.toString()); in onOutputFormatChanged()
162 MediaCodec codec = null; in allocateCodecs() local
166 codec = MediaCodec.createByCodecName(name); in allocateCodecs()
[all …]
/frameworks/opt/net/voip/src/java/android/net/rtp/
DAudioCodec.java118 for (AudioCodec codec : sCodecs) { in getCodec()
119 if (clue.startsWith(codec.rtpmap)) { in getCodec()
120 String channels = clue.substring(codec.rtpmap.length()); in getCodec()
122 hint = codec; in getCodec()
128 for (AudioCodec codec : sCodecs) { in getCodec()
129 if (type == codec.type) { in getCodec()
130 hint = codec; in getCodec()
131 rtpmap = codec.rtpmap; in getCodec()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DDisplaySourceService.java195 MediaCodec codec; in run() local
197 codec = MediaCodec.createEncoderByType("video/avc"); in run()
202 codec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); in run()
203 Surface surface = codec.createInputSurface(); in run()
204 codec.start(); in run()
212 stream(codec); in run()
219 codec.signalEndOfInputStream(); in run()
220 codec.stop(); in run()
227 private void stream(MediaCodec codec) { in stream() argument
231 int index = codec.dequeueOutputBuffer(info, TIMEOUT_USEC); in stream()
[all …]
/frameworks/av/media/libmedia/include/media/
DMediaProfiles.h132 VideoCodec(video_encoder codec, int bitrate, int frameWidth, int frameHeight, int frameRate,
137 : mCodec(codec), in mCodec()
224 AudioCodec(audio_encoder codec, int bitrate, int sampleRate, int channels, int profile = -1)
225 : mCodec(codec), in mCodec()
378 int getVideoEncoderParamByName(const char *name, video_encoder codec) const;
397 int getAudioEncoderParamByName(const char *name, audio_encoder codec) const;
433 VideoEncoderCap(video_encoder codec, in VideoEncoderCap()
438 : mCodec(codec), in VideoEncoderCap()
455 AudioEncoderCap(audio_encoder codec, in AudioEncoderCap()
459 : mCodec(codec), in AudioEncoderCap()
[all …]
/frameworks/base/media/jni/soundpool/
DSound.cpp72 std::unique_ptr<AMediaCodec, decltype(&AMediaCodec_delete)> codec{ in decode()
74 if (codec == nullptr in decode()
75 || AMediaCodec_configure(codec.get(), format.get(), in decode()
77 || AMediaCodec_start(codec.get()) != AMEDIA_OK in decode()
87 format.reset(AMediaCodec_getOutputFormat(codec.get())); // update format. in decode()
91 ssize_t bufidx = AMediaCodec_dequeueInputBuffer(codec.get(), 5000); in decode()
96 codec.get(), bufidx, &bufsize); in decode()
112 codec.get(), bufidx, in decode()
127 const ssize_t status = AMediaCodec_dequeueOutputBuffer(codec.get(), &info, 1); in decode()
137 codec.get(), status, nullptr /* out_size */); in decode()
[all …]
/frameworks/av/media/libstagefright/tests/mediacodec/
DMediaTestHelper.cpp30 sp<MediaCodec> codec = new MediaCodec( in CreateCodec() local
32 if (codec->init(name) != OK) { in CreateCodec()
35 return codec; in CreateCodec()
39 void MediaTestHelper::Reclaim(const sp<MediaCodec> &codec, bool force) { in Reclaim() argument
40 codec->reclaim(force); in Reclaim()
/frameworks/base/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/
DBackupRestoreStorage.kt103 val codec = entity.codec() ?: defaultCodec() in <lambda>() constant
107 wrapBackupOutputStream(codec, checkedOutputStream).use { in <lambda>()
151 open fun wrapBackupOutputStream(codec: BackupCodec, outputStream: OutputStream): OutputStream { in <lambda>()
153 outputStream.write(codec.id.toInt()) in <lambda>()
154 return codec.encode(outputStream) in <lambda>()
171 val codec = entity.codec() ?: defaultCodec() in <lambda>() constant
176 entity.restore(restoreContext, wrapRestoreInputStream(codec, checkedInputStream)) in <lambda>()
194 codec: BackupCodec, in <lambda>()
199 val expectedId = codec.id.toInt() in <lambda>()
200 if (id == expectedId) return codec.decode(inputStream) in <lambda>()
DBackupRestoreFileArchiver.kt43 override fun wrapBackupOutputStream(codec: BackupCodec, outputStream: OutputStream) = in <lambda>()
46 override fun wrapRestoreInputStream(codec: BackupCodec, inputStream: InputStream) = inputStream in <lambda>()
67 val codec = BackupCodec.fromId(checkedInputStream.read().toByte()) in <lambda>() constant
68 if (fileStorage != null && fileStorage.defaultCodec().id != codec.id) { in <lambda>()
75 val wrappedInputStream = codec.decode(checkedInputStream) in <lambda>()
110 val codec = defaultCodec() in toBackupRestoreEntity() constant
112 wrapBackupOutputStream(codec, outputStream).use { stream -> in toBackupRestoreEntity()
/frameworks/av/media/module/codecs/g711/fuzzer/
Dg711_dec_fuzzer.cpp51 Codec *codec = new Codec(); in LLVMFuzzerTestOneInput() local
52 if (!codec) { in LLVMFuzzerTestOneInput()
55 codec->decodeFrames(data, size); in LLVMFuzzerTestOneInput()
56 delete codec; in LLVMFuzzerTestOneInput()
/frameworks/av/media/libmedia/
DMediaProfiles.cpp183 MediaProfiles::logVideoCodec(const MediaProfiles::VideoCodec& codec UNUSED) in logVideoCodec()
186 ALOGV("codec = %d (%s)", codec.mCodec, in logVideoCodec()
187 findNameForTag(sVideoEncoderNameMap, NELEM(sVideoEncoderNameMap), codec.mCodec)); in logVideoCodec()
188 ALOGV("bit rate: %d", codec.mBitRate); in logVideoCodec()
189 ALOGV("frame width: %d", codec.mFrameWidth); in logVideoCodec()
190 ALOGV("frame height: %d", codec.mFrameHeight); in logVideoCodec()
191 ALOGV("frame rate: %d", codec.mFrameRate); in logVideoCodec()
192 ALOGV("profile: %d", codec.mProfile); in logVideoCodec()
194 codec.mChromaSubsampling)); in logVideoCodec()
195 ALOGV("bit depth: %d", codec.mBitDepth); in logVideoCodec()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/
DMediaProfileReader.java98 public static int getMinFrameRateForCodec(int codec) { in getMinFrameRateForCodec() argument
99 return getMinOrMaxFrameRateForCodec(codec, false); in getMinFrameRateForCodec()
102 public static int getMaxFrameRateForCodec(int codec) { in getMaxFrameRateForCodec() argument
103 return getMinOrMaxFrameRateForCodec(codec, true); in getMaxFrameRateForCodec()
106 private static int getMinOrMaxFrameRateForCodec(int codec, boolean max) { in getMinOrMaxFrameRateForCodec() argument
108 if (cap.mCodec == codec) { in getMinOrMaxFrameRateForCodec()
114 throw new IllegalArgumentException("Unsupported video codec " + codec); in getMinOrMaxFrameRateForCodec()
/frameworks/av/media/module/codecs/amrnb/fuzzer/
Damrnb_dec_fuzzer.cpp87 Codec *codec = new Codec(); in LLVMFuzzerTestOneInput() local
88 if (!codec) { in LLVMFuzzerTestOneInput()
91 if (codec->initDecoder() == 0) { in LLVMFuzzerTestOneInput()
92 codec->decodeFrames(data, size); in LLVMFuzzerTestOneInput()
94 delete codec; in LLVMFuzzerTestOneInput()

1234567