/frameworks/av/media/libmediaformatshaper/ |
D | FormatShaper.cpp | 44 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 …]
|
D | ManageShapingCodecs.cpp | 41 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()
|
D | VideoShaper.cpp | 61 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()
|
D | VQApply.cpp | 55 int VQApply(CodecProperties *codec, vqOps_t *info, AMediaFormat* inFormat, int flags) { in VQApply() argument 56 ALOGV("codecName %s inFormat %p flags x%x", codec->getName().c_str(), inFormat, flags); in VQApply() 73 (void) codec->getFeatureValue("_vq_eligible.device", &isVQEligible); in VQApply() 106 if (codec->supportedMinimumQuality() > 0) { in VQApply() 109 codec->supportedMinimumQuality()); in VQApply() 114 (void) codec->getFeatureValue("_quality.target", &qualityTarget); in VQApply() 138 double minimumBpp = codec->getBpp(width, height); in VQApply() 141 int64_t bitrateCeiling = bitrateFloor * codec->getPhaseOut(); in VQApply() 164 int32_t qpmax = codec->targetQpMax(width, height); in VQApply() 183 if (!codec->supportsQp()) { in VQApply() [all …]
|
/frameworks/base/media/java/android/media/ |
D | EncoderProfiles.java | 82 return codec; in getCodec() 90 if (codec == MediaRecorder.VideoEncoder.H263) { in getMediaType() 92 } else if (codec == MediaRecorder.VideoEncoder.H264) { in getMediaType() 94 } else if (codec == MediaRecorder.VideoEncoder.MPEG_4_SP) { in getMediaType() 96 } else if (codec == MediaRecorder.VideoEncoder.VP8) { in getMediaType() 98 } else if (codec == MediaRecorder.VideoEncoder.HEVC) { in getMediaType() 194 /* package private */ VideoProfile(int codec, in VideoProfile() argument 200 this.codec = codec; in VideoProfile() 208 private int codec; field in EncoderProfiles.VideoProfile 247 return codec; in getCodec() [all …]
|
/frameworks/av/media/tests/benchmark/src/native/common/ |
D | BenchmarkCommon.cpp | 31 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 …]
|
D | BenchmarkCommon.h | 88 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/av/media/codec2/sfplugin/tests/ |
D | MediaCodec_sanity_test.cpp | 47 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/services/mediatranscoding/tests/TranscodingUidPolicyTestApp/src/com/android/tests/transcoding/ |
D | ResourcePolicyTestActivity.java | 46 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/ |
D | AudioCodec.java | 118 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/media/jni/ |
D | android_media_MediaCodec.cpp | 1244 JNIEnv *env, jobject thiz, const sp<JMediaCodec> &codec, bool release = true) { in setMediaCodec() argument 1246 if (codec != NULL) { in setMediaCodec() 1247 codec->incStrong(thiz); in setMediaCodec() 1260 env->CallVoidMethod(thiz, gFields.setAndUnlockContextID, (jlong)codec.get()); in setMediaCodec() 1266 sp<JMediaCodec> codec = (JMediaCodec *)env->CallLongMethod(thiz, gFields.lockAndGetContextID); in getMediaCodec() local 1267 env->CallVoidMethod(thiz, gFields.setAndUnlockContextID, (jlong)codec.get()); in getMediaCodec() 1268 return codec; in getMediaCodec() 1273 sp<JMediaCodec> codec = setMediaCodec(env, thiz, nullptr, false /* release */); in android_media_MediaCodec_release() local 1274 if (codec != NULL) { in android_media_MediaCodec_release() 1275 codec->releaseAsync(); in android_media_MediaCodec_release() [all …]
|
/frameworks/av/media/libmedia/include/media/ |
D | MediaProfiles.h | 119 VideoCodec(video_encoder codec, int bitrate, int frameWidth, int frameHeight, int frameRate, 121 : mCodec(codec), in mCodec() 187 AudioCodec(audio_encoder codec, int bitrate, int sampleRate, int channels, int profile = -1) 188 : mCodec(codec), in mCodec() 341 int getVideoEncoderParamByName(const char *name, video_encoder codec) const; 360 int getAudioEncoderParamByName(const char *name, audio_encoder codec) const; 396 VideoEncoderCap(video_encoder codec, in VideoEncoderCap() 401 : mCodec(codec), in VideoEncoderCap() 418 AudioEncoderCap(audio_encoder codec, in AudioEncoderCap() 422 : mCodec(codec), in AudioEncoderCap() [all …]
|
/frameworks/base/media/jni/soundpool/ |
D | Sound.cpp | 72 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/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/ |
D | DisplaySourceService.java | 195 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/libstagefright/tests/mediacodec/ |
D | MediaTestHelper.cpp | 30 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()
|
D | MediaCodecTest.cpp | 239 sp<MediaCodec> codec = SetupMediaCodec( in TEST() local 241 ASSERT_NE(nullptr, codec) << "Codec must not be null"; in TEST() 246 std::thread([codec, &reclaimCompleted]{ in TEST() 248 MediaTestHelper::Reclaim(codec, true /* force */); in TEST() 251 std::thread([codec, &counter, &releaseCompleted]{ in TEST() 258 codec->release(); in TEST() 337 sp<MediaCodec> codec = SetupMediaCodec( in TEST() local 339 ASSERT_NE(nullptr, codec) << "Codec must not be null"; in TEST() 342 codec->configure(new AMessage, nullptr, nullptr, 0); in TEST() 343 codec->start(); in TEST() [all …]
|
/frameworks/base/libs/hwui/hwui/ |
D | ImageDecoder.cpp | 48 ImageDecoder::ImageDecoder(std::unique_ptr<SkAndroidCodec> codec, sk_sp<SkPngChunkReader> peeker, in ImageDecoder() argument 50 : mCodec(std::move(codec)) in ImageDecoder() 52 , mDecodeSize(mCodec->codec()->dimensions()) in ImageDecoder() 197 return SkEncodedOriginSwapsWidthHeight(mCodec->codec()->getOrigin()); in swapWidthHeight() 202 ? mCodec->codec()->dimensions().height() in width() 203 : mCodec->codec()->dimensions().width(); in width() 208 ? mCodec->codec()->dimensions().width() in height() 209 : mCodec->codec()->dimensions().height(); in height() 221 return mCodec->codec()->getFrameCount() > 1; in isAnimated() 250 const int frameCount = mCodec->codec()->getFrameCount(); in advanceFrame() [all …]
|
/frameworks/av/media/codecs/g711/fuzzer/ |
D | g711_dec_fuzzer.cpp | 51 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/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/ |
D | MediaProfileReader.java | 98 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/opt/net/voip/src/java/android/net/sip/ |
D | SipAudioCall.java | 749 for (AudioCodec codec : AudioCodec.getCodecs()) { 750 media.setRtpPayload(codec.type, codec.rtpmap, codec.fmtp); 763 AudioCodec codec = null; 765 if ((codec == null) && (media.getPort() > 0) 770 codec = AudioCodec.getCodec(type, media.getRtpmap(type), 772 if (codec != null) { 776 if (codec != null) { 779 reply.setRtpPayload(codec.type, codec.rtpmap, codec.fmtp); 784 if ((type != codec.type) && (rtpmap != null) 811 if (codec == null) { [all …]
|
/frameworks/av/media/libmedia/ |
D | MediaProfiles.cpp | 164 MediaProfiles::logVideoCodec(const MediaProfiles::VideoCodec& codec UNUSED) in logVideoCodec() 167 ALOGV("codec = %d", codec.mCodec); in logVideoCodec() 168 ALOGV("bit rate: %d", codec.mBitRate); in logVideoCodec() 169 ALOGV("frame width: %d", codec.mFrameWidth); in logVideoCodec() 170 ALOGV("frame height: %d", codec.mFrameHeight); in logVideoCodec() 171 ALOGV("frame rate: %d", codec.mFrameRate); in logVideoCodec() 172 ALOGV("profile: %d", codec.mProfile); in logVideoCodec() 176 MediaProfiles::logAudioCodec(const MediaProfiles::AudioCodec& codec UNUSED) in logAudioCodec() 179 ALOGV("codec = %d", codec.mCodec); in logAudioCodec() 180 ALOGV("bit rate: %d", codec.mBitRate); in logAudioCodec() [all …]
|
/frameworks/av/media/codecs/amrnb/fuzzer/ |
D | amrnb_dec_fuzzer.cpp | 87 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()
|
/frameworks/av/media/libstagefright/ |
D | SimpleDecodingSource.cpp | 70 sp<MediaCodec> codec; in Create() local 71 auto configure = [=](const sp<MediaCodec> &codec, const AString &componentName) in Create() 73 if (codec != NULL) { in Create() 76 status_t err = codec->configure(format, surface, NULL /* crypto */, 0 /* flags */); in Create() 79 err = codec->getOutputFormat(&outFormat); in Create() 82 return new SimpleDecodingSource(codec, source, looper, in Create() 89 codec->release(); in Create() 95 codec = MediaCodec::CreateByComponentName(looper, desiredCodec); in Create() 96 return configure(codec, desiredCodec); in Create() 107 codec = MediaCodec::CreateByComponentName(looper, componentName); in Create() [all …]
|
/frameworks/av/media/codecs/amrnb/enc/fuzzer/ |
D | amrnb_enc_fuzzer.cpp | 96 Codec *codec = new Codec(); in LLVMFuzzerTestOneInput() local 97 if (!codec) { in LLVMFuzzerTestOneInput() 100 if (codec->initEncoder(data) == 0) { in LLVMFuzzerTestOneInput() 101 codec->encodeFrames(data, size); in LLVMFuzzerTestOneInput() 103 delete codec; in LLVMFuzzerTestOneInput()
|
/frameworks/av/media/codecs/amrwb/dec/fuzzer/ |
D | amrwb_dec_fuzzer.cpp | 101 Codec *codec = new Codec(); in LLVMFuzzerTestOneInput() local 102 if (!codec) { in LLVMFuzzerTestOneInput() 105 if (codec->initDecoder()) { in LLVMFuzzerTestOneInput() 106 codec->decodeFrames(data, size); in LLVMFuzzerTestOneInput() 108 delete codec; in LLVMFuzzerTestOneInput()
|