/frameworks/av/cmds/screenrecord/ |
H A D | screenrecord.cpp | 78 static AString gCodecName = ""; // codec name override 152 * from the codec. 176 ALOGV("Creating codec"); 177 sp<MediaCodec> codec; local 179 codec = MediaCodec::CreateByType(looper, kMimeTypeAvc, true); 180 if (codec == NULL) { 181 fprintf(stderr, "ERROR: unable to create %s codec instance\n", 186 codec = MediaCodec::CreateByComponentName(looper, gCodecName); 187 if (codec == NULL) { 188 fprintf(stderr, "ERROR: unable to create %s codec instanc [all...] |
/frameworks/av/cmds/stagefright/ |
H A D | codec.cpp | 18 #define LOG_TAG "codec" 147 sp<MediaCodec> codec = state->mCodec; local 149 CHECK_EQ((status_t)OK, codec->start()); 151 CHECK_EQ((status_t)OK, codec->getInputBuffers(&state->mInBuffers)); 152 CHECK_EQ((status_t)OK, codec->getOutputBuffers(&state->mOutBuffers));
|
H A D | mediafilter.cpp | 474 sp<MediaCodec> codec = state->mCodec; local 476 CHECK_EQ((status_t)OK, codec->start()); 478 CHECK_EQ((status_t)OK, codec->getInputBuffers(&state->mInBuffers)); 479 CHECK_EQ((status_t)OK, codec->getOutputBuffers(&state->mOutBuffers));
|
H A D | recordvideo.cpp | 53 fprintf(stderr, " -v video codec: [0] AVC [1] M4V [2] H263 (default: 0)\n"); 54 fprintf(stderr, " -s(oftware) prefer software codec\n"); 176 int codec = 0; local 243 codec = atoi(optarg); 244 if (codec < 0 || codec > 2) { 276 switch (codec) {
|
/frameworks/av/include/media/ |
H A D | MediaProfiles.h | 113 * vid.codec - video encoder. see mediarecorder.h for details. 114 * aud.codec - audio encoder. see mediarecorder.h for details. 156 int getVideoEncoderParamByName(const char *name, video_encoder codec) const; 175 int getAudioEncoderParamByName(const char *name, audio_encoder codec) const; 210 VideoCodec(video_encoder codec, int bitRate, int frameWidth, int frameHeight, int frameRate) argument 211 : mCodec(codec), 235 AudioCodec(audio_encoder codec, int bitRate, int sampleRate, int channels) argument 236 : mCodec(codec), 289 VideoEncoderCap(video_encoder codec, argument 294 : mCodec(codec), 311 AudioEncoderCap(audio_encoder codec, int minBitRate, int maxBitRate, int minSampleRate, int maxSampleRate, int minChannels, int maxChannels) argument 329 VideoDecoderCap(video_decoder codec) argument 336 AudioDecoderCap(audio_decoder codec) argument [all...] |
/frameworks/av/media/libmedia/ |
H A D | MediaProfiles.cpp | 103 MediaProfiles::logVideoCodec(const MediaProfiles::VideoCodec& codec UNUSED) 105 ALOGV("video codec:"); 106 ALOGV("codec = %d", codec.mCodec); 107 ALOGV("bit rate: %d", codec.mBitRate); 108 ALOGV("frame width: %d", codec.mFrameWidth); 109 ALOGV("frame height: %d", codec.mFrameHeight); 110 ALOGV("frame rate: %d", codec.mFrameRate); 114 MediaProfiles::logAudioCodec(const MediaProfiles::AudioCodec& codec UNUSED) 116 ALOGV("audio codec 182 const int codec = findTagForName(sVideoEncoderNameMap, nMappings, atts[1]); local 204 const int codec = findTagForName(sAudioEncoderNameMap, nMappings, atts[1]); local 224 const int codec = findTagForName(sAudioDecoderNameMap, nMappings, atts[1]); local 240 const int codec = findTagForName(sVideoDecoderNameMap, nMappings, atts[1]); local 264 const int codec = findTagForName(sVideoEncoderNameMap, nMappings, atts[1]); local 288 const int codec = findTagForName(sAudioEncoderNameMap, nMappings, atts[1]); local [all...] |
/frameworks/av/media/libmedia/include/media/ |
H A D | MediaProfiles.h | 113 * vid.codec - video encoder. see mediarecorder.h for details. 114 * aud.codec - audio encoder. see mediarecorder.h for details. 156 int getVideoEncoderParamByName(const char *name, video_encoder codec) const; 175 int getAudioEncoderParamByName(const char *name, audio_encoder codec) const; 210 VideoCodec(video_encoder codec, int bitRate, int frameWidth, int frameHeight, int frameRate) argument 211 : mCodec(codec), 235 AudioCodec(audio_encoder codec, int bitRate, int sampleRate, int channels) argument 236 : mCodec(codec), 289 VideoEncoderCap(video_encoder codec, argument 294 : mCodec(codec), 311 AudioEncoderCap(audio_encoder codec, int minBitRate, int maxBitRate, int minSampleRate, int maxSampleRate, int minChannels, int maxChannels) argument 329 VideoDecoderCap(video_decoder codec) argument 336 AudioDecoderCap(audio_decoder codec) argument [all...] |
/frameworks/av/media/libstagefright/ |
H A D | ACodec.cpp | 262 explicit BaseState(ACodec *codec, const sp<AState> &parentState = NULL); 340 explicit UninitializedState(ACodec *codec); 358 explicit LoadedState(ACodec *codec); 381 explicit LoadedToIdleState(ACodec *codec); 397 explicit IdleToExecutingState(ACodec *codec); 411 explicit ExecutingState(ACodec *codec); 441 explicit OutputPortSettingsChangedState(ACodec *codec); 458 explicit ExecutingToIdleState(ACodec *codec); 480 explicit IdleToLoadedState(ACodec *codec); 495 explicit FlushingState(ACodec *codec); 5461 BaseState(ACodec *codec, const sp<AState> &parentState) argument 6358 UninitializedState(ACodec *codec) argument 6525 LoadedState(ACodec *codec) argument 6840 LoadedToIdleState(ACodec *codec) argument 6952 IdleToExecutingState(ACodec *codec) argument 7020 ExecutingState(ACodec *codec) argument 7824 OutputPortSettingsChangedState( ACodec *codec) argument 7962 ExecutingToIdleState(ACodec *codec) argument 8080 IdleToLoadedState(ACodec *codec) argument 8141 FlushingState(ACodec *codec) argument [all...] |
H A D | MediaCodec.cpp | 67 static const char *kCodecKeyName = "codec"; 72 static const char *kCodecCodec = "android.media.mediacodec.codec"; /* e.g. OMX.google.aac.decoder */ 124 explicit ResourceManagerClient(MediaCodec* codec) : mMediaCodec(codec) {} argument 127 sp<MediaCodec> codec = mMediaCodec.promote(); local 128 if (codec == NULL) { 129 // codec is already gone. 132 status_t err = codec->reclaim(); 134 ALOGD("Wait for the client to release codec."); 137 err = codec 147 sp<MediaCodec> codec = mMediaCodec.promote(); local 453 sp<MediaCodec> codec = new MediaCodec(looper, pid, uid); local 471 sp<MediaCodec> codec = new MediaCodec(looper, pid, uid); local [all...] |
H A D | MediaCodecListOverrides.cpp | 45 // a limit to avoid allocating unreasonable number of codec instances in the measurement. 143 ALOGV("doProfileCodecs for codec #%zu", codecs.size()); 148 sp<MediaCodec> codec = MediaCodec::CreateByComponentName(looper, name.c_str(), &err); local 150 ALOGV("Failed to create codec: %s", name.c_str()); 157 err = codec->configure(format, nativeWindow, crypto, flags); 159 ALOGV("Failed to configure codec: %s with mime: %s", name.c_str(), mime.c_str()); 160 codec->release(); 164 err = codec->start(); 166 ALOGV("Failed to start codec: %s with mime: %s", name.c_str(), mime.c_str()); 167 codec 290 AString codec = local [all...] |
H A D | OmxInfoBuilder.cpp | 62 sp<ACodec> codec = new ACodec(); local 63 status_t err = codec->queryCapabilities( 109 ALOGE("Fail to obtain codec roles from IOmxStore."); 136 // codec name -> index into swCodecs/hwCodecs 201 ALOGW("Fail to add mime %s to codec %s", 233 ALOGW("Fail to add mime %s to codec %s "
|
H A D | SimpleDecodingSource.cpp | 69 sp<MediaCodec> codec; local 70 auto configure = [=](const sp<MediaCodec> &codec, const AString &componentName) 72 if (codec != NULL) { 73 ALOGI("Successfully allocated codec '%s'", componentName.c_str()); 75 status_t err = codec->configure(format, surface, NULL /* crypto */, 0 /* flags */); 78 err = codec->getOutputFormat(&outFormat); 81 return new SimpleDecodingSource(codec, source, looper, 87 ALOGD("Failed to configure codec '%s'", componentName.c_str()); 88 codec->release(); 94 codec 120 SimpleDecodingSource( const sp<MediaCodec> &codec, const sp<MediaSource> &source, const sp<ALooper> &looper, bool usingSurface, bool isVorbis, const sp<AMessage> &format) argument [all...] |
/frameworks/av/media/libstagefright/codecs/hevcdec/ |
H A D | SoftHEVC.cpp | 38 /** Function and structure definitions to keep code similar for each codec */ 73 // INPUT_BUF_SIZE is given by HEVC codec as minimum input size 238 /* Set number of cores/threads to be used by the codec */ 335 /* Set number of cores/threads to be used by the codec */ 338 /* Get codec version */ 661 /* If in flush mode and no output is returned by the codec, 666 * from the codec, then signal EOS on output port */ 711 android::SoftHEVC *codec = new android::SoftHEVC(name, callbacks, appData, component); local 712 if (codec->init() != android::OK) { 713 android::sp<android::SoftOMXComponent> release = codec; [all...] |
/frameworks/av/media/libstagefright/httplive/ |
H A D | M3UParser.cpp | 445 AString codec(codecs, offset, commaPos - offset); 446 codec.trim(); 447 // return true only if a codec of type `key` ("audio"/"video") 449 if (codecIsType(codec, key)) { 1336 bool M3UParser::codecIsType(const AString &codec, const char *type) { argument 1337 if (codec.size() < 4) { 1340 const char *c = codec.c_str();
|
/frameworks/av/media/libstagefright/omx/1.0/ |
H A D | Omx.cpp | 119 const auto& codec = mParser.getCodecMap().find(name.c_str()); local 120 if (codec == mParser.getCodecMap().cend()) { 126 for (const auto& quirk : codec->second.quirkSet) {
|
/frameworks/av/media/libstagefright/omx/ |
H A D | OMXNodeInstance.cpp | 140 sp<ABuffer> codec = getBuffer(header, true /* limit */); local 142 memcpy(getPointer() + header->nOffset, codec->data(), codec->size()); 155 // return the codec buffer 525 // submit any more buffers to the codec. 1498 // codec was configured.
|
H A D | SoftOMXPlugin.cpp | 99 // -- the codec process (where this happens) will have a slightly larger 132 sp<SoftOMXComponent> codec = local 135 if (codec == NULL) { 142 OMX_ERRORTYPE err = codec->initCheck(); 150 codec->incStrong(this); 151 codec->setLibHandle(libHandle);
|
/frameworks/av/media/libstagefright/omx/tests/ |
H A D | OMXHarness.cpp | 615 sp<MediaSource> codec = SimpleDecodingSource::Create( local 618 CHECK(codec != NULL); 620 CHECK_EQ(codec->start(), (status_t)OK); 684 err = codec->read(&buffer, &options); 743 CHECK_EQ(codec->stop(), (status_t)OK); 753 CHECK_EQ(codec->stop(), (status_t)OK);
|
/frameworks/av/media/libstagefright/webm/ |
H A D | WebmElement.cpp | 64 const char *codec, 71 ls.push_back(new WebmString(kMkvCodecId, codec)); 343 const char *codec, 360 codec, 59 populateCommonTrackEntries( int num, uint64_t uid, bool lacing, const char *lang, const char *codec, TrackTypes type, List<sp<WebmElement> > &ls) argument 342 VideoTrackEntry( const char *codec, uint64_t width, uint64_t height, const sp<MetaData> &meta, uint64_t uid, bool lacing, const char *lang) argument
|
H A D | WebmWriter.cpp | 94 const char *codec; local 99 codec = "V_VP8"; 104 codec = "V_VP9"; 106 ALOGE("Unsupported codec: %s", mimeType); 109 return WebmElement::VideoTrackEntry(codec, width, height, md);
|
/frameworks/av/media/ndk/ |
H A D | NdkMediaCodec.cpp | 77 explicit CodecHandler(AMediaCodec *codec); 81 typedef void (*OnCodecEvent)(AMediaCodec *codec, void *userdata); 99 CodecHandler::CodecHandler(AMediaCodec *codec) { argument 100 mCodec = codec; 299 static void requestActivityNotification(AMediaCodec *codec) { argument 300 (new AMessage(kWhatRequestActivityNotifications, codec->mHandler))->post(); 323 if (mData->mCodec == NULL) { // failed to create codec 750 AMediaCodec* codec, 768 status_t err = codec->mCodec->queueSecureInputBuffer(idx, 749 AMediaCodec_queueSecureInputBuffer( AMediaCodec* codec, size_t idx, off_t offset, AMediaCodecCryptoInfo* crypto, uint64_t time, uint32_t flags) argument
|
/frameworks/base/core/jni/android/graphics/ |
H A D | BitmapFactory.cpp | 238 // Create the codec. 240 std::unique_ptr<SkAndroidCodec> codec; local 252 codec = SkAndroidCodec::MakeFromCodec(std::move(c)); 253 if (!codec) { 268 SkISize size = codec->getSampledDimensions(sampleSize); 275 if (needsFineScale(codec->getInfo().dimensions(), size, sampleSize)) { 277 scaledWidth = codec->getInfo().width() / sampleSize; 278 scaledHeight = codec->getInfo().height() / sampleSize; 282 SkColorType decodeColorType = codec->computeOutputColorType(prefColorType); 283 sk_sp<SkColorSpace> decodeColorSpace = codec [all...] |
H A D | ImageDecoder.cpp | 87 auto codec = SkCodec::MakeFromStream(std::move(stream), &result, decoder->mPeeker.get()); local 91 if (!codec) { 105 const bool animated = codec->getFrameCount() > 1; 110 decoder->mCodec = SkAndroidCodec::MakeFromCodec(std::move(codec), 207 SkAndroidCodec* codec = decoder->mCodec.get(); local 210 const int sampleSize = codec->computeSampleSize(&decodeSize); 212 SkImageInfo decodeInfo = codec->getInfo().makeWH(decodeSize.width(), decodeSize.height()); 257 colorType = codec->computeOutputColorType(colorType); 260 colorSpace = codec->computeOutputColorSpace(colorType, colorSpace); 292 auto result = codec 499 auto* codec = reinterpret_cast<ImageDecoder*>(nativePtr)->mCodec.get(); local [all...] |
/frameworks/base/media/java/android/media/ |
H A D | EncoderCapabilities.java | 52 private VideoEncoderCap(int codec, argument 57 mCodec = codec; 88 private AudioEncoderCap(int codec, argument 92 mCodec = codec;
|
H A D | MediaCodec.java | 56 In broad terms, a codec processes input data to generate output data. It processes data 58 (or receive) an empty input buffer, fill it up with data and send it to the codec for 59 processing. The codec uses up the data and transforms it into one of its empty output buffers. 61 back to the codec. 67 a {@link Surface} for raw video data to improve codec performance. Surface uses native video 93 short[] getSamplesForChannel(MediaCodec codec, int bufferId, int channelIx) { 94 ByteBuffer outputBuffer = codec.getOutputBuffer(bufferId); 95 MediaFormat format = codec.getOutputFormat(bufferId); 205 During its life a codec conceptually exists in one of three states: Stopped, Executing or 215 When you create a codec usin 1636 EventHandler(@onNull MediaCodec codec, @NonNull Looper looper) argument 3419 onFrameRendered( @onNull MediaCodec codec, long presentationTimeUs, long nanoTime) argument 3482 onInputBufferAvailable(@onNull MediaCodec codec, int index) argument 3491 onOutputBufferAvailable( @onNull MediaCodec codec, int index, @NonNull BufferInfo info) argument 3500 onError(@onNull MediaCodec codec, @NonNull CodecException e) argument 3508 onOutputFormatChanged( @onNull MediaCodec codec, @NonNull MediaFormat format) argument [all...] |