Home
last modified time | relevance | path

Searched refs:mCodec (Results 1 – 25 of 42) sorted by relevance

12

/frameworks/base/media/java/android/media/
DAmrInputStream.java38 MediaCodec mCodec; field in AmrInputStream
72 mCodec = MediaCodec.createByCodecName(name); in AmrInputStream()
73 mCodec.configure(format, in AmrInputStream()
77 mCodec.start(); in AmrInputStream()
79 if (mCodec != null) { in AmrInputStream()
80 mCodec.release(); in AmrInputStream()
82 mCodec = null; in AmrInputStream()
110 if (mCodec == null) { in read()
121 int index = mCodec.dequeueInputBuffer(0); in read()
135 ByteBuffer buf = mCodec.getInputBuffer(index); in read()
[all …]
DEncoderCapabilities.java48 public final int mCodec; // @see android.media.MediaRecorder.VideoEncoder field in EncoderCapabilities.VideoEncoderCap
68 mCodec = codec; in VideoEncoderCap()
93 … public final int mCodec; // @see android.media.MediaRecorder.AudioEncoder field in EncoderCapabilities.AudioEncoderCap
103 mCodec = codec; in AudioEncoderCap()
/frameworks/av/media/ndk/
DNdkMediaCodec.cpp75 AMediaCodec* mCodec; member in CodecHandler
84 sp<android::MediaCodec> mCodec; member
100 mCodec = codec; in CodecHandler()
108 if (mCodec->mRequestedActivityNotification) { in onMessageReceived()
112 mCodec->mCodec->requestActivityNotification(mCodec->mActivityNotification); in onMessageReceived()
113 mCodec->mRequestedActivityNotification = true; in onMessageReceived()
123 if (generation != mCodec->mGeneration) { in onMessageReceived()
128 mCodec->mRequestedActivityNotification = false; in onMessageReceived()
131 if (mCodec->mCallback) { in onMessageReceived()
132 mCodec->mCallback(mCodec, mCodec->mCallbackUserData); in onMessageReceived()
[all …]
/frameworks/av/media/tests/benchmark/src/native/decoder/
DDecoder.cpp46 if (mediaCodec == mCodec && mediaCodec) { in onInputAvailable()
55 uint8_t *buf = AMediaCodec_getInputBuffer(mCodec, bufIdx, &bufSize); in onInputAvailable()
79 media_status_t status = AMediaCodec_queueInputBuffer(mCodec, bufIdx, 0 /* offset */, in onInputAvailable()
95 if (mediaCodec == mCodec && mediaCodec) { in onOutputAvailable()
105 uint8_t *buf = AMediaCodec_getOutputBuffer(mCodec, bufIdx, &bufSize); in onOutputAvailable()
112 AMediaCodec_releaseOutputBuffer(mCodec, bufIdx, false); in onOutputAvailable()
127 if (mediaCodec == mCodec && mediaCodec) { in onFormatChanged()
135 if (mediaCodec == mCodec && mediaCodec) { in onError()
149 return AMediaCodec_getOutputFormat(mCodec); in getFormat()
165 mCodec = createMediaCodec(mFormat, mime, codecName, false /*isEncoder*/); in decode()
[all …]
DDecoder.h33 : mCodec(nullptr), in Decoder()
80 AMediaCodec *mCodec;
/frameworks/av/media/tests/benchmark/src/native/encoder/
DEncoder.cpp26 if (mediaCodec == mCodec && mediaCodec) { in onInputAvailable()
35 char *buf = (char *)AMediaCodec_getInputBuffer(mCodec, bufIdx, &bufSize); in onInputAvailable()
104 media_status_t status = AMediaCodec_queueInputBuffer(mCodec, bufIdx, 0 /* offset */, in onInputAvailable()
120 if (mediaCodec == mCodec && mediaCodec) { in onOutputAvailable()
129 AMediaCodec_releaseOutputBuffer(mCodec, bufIdx, false); in onOutputAvailable()
143 if (mediaCodec == mCodec && mediaCodec) { in onFormatChanged()
151 if (mediaCodec == mCodec && mediaCodec) { in onError()
168 if (!mCodec) return; in deInitCodec()
170 AMediaCodec_stop(mCodec); in deInitCodec()
171 AMediaCodec_delete(mCodec); in deInitCodec()
[all …]
DEncoder.h49 : mCodec(nullptr), in Encoder()
85 AMediaCodec *mCodec;
/frameworks/av/cmds/stagefright/
Dmediafilter.cpp133 sp<MediaCodec> mCodec; member
168 status_t err = filterState->mCodec->dequeueInputBuffer( in tryCopyDecodedBuffer()
192 vidState->mCodec->getOutputFormat(&srcFormat); in tryCopyDecodedBuffer()
193 filterState->mCodec->getInputFormat(&destFormat); in tryCopyDecodedBuffer()
228 filterState->mCodec->flush(); in tryCopyDecodedBuffer()
230 err = filterState->mCodec->queueInputBuffer( in tryCopyDecodedBuffer()
241 err = filterState->mCodec->queueInputBuffer( in tryCopyDecodedBuffer()
246 err = vidState->mCodec->releaseOutputBuffer(outIndex); in tryCopyDecodedBuffer()
261 status_t err = filterState->mCodec->dequeueOutputBuffer( in tryDrainOutputBuffer()
272 filterState->mCodec->flush(); in tryDrainOutputBuffer()
[all …]
Dcodec.cpp58 sp<MediaCodec> mCodec; member
123 state->mCodec = MediaCodec::CreateByType( in decode()
126 CHECK(state->mCodec != NULL); in decode()
128 err = state->mCodec->configure( in decode()
147 sp<MediaCodec> codec = state->mCodec; in decode()
172 err = state->mCodec->dequeueInputBuffer(&index, kTimeout); in decode()
190 err = state->mCodec->queueInputBuffer( in decode()
211 state->mCodec->dequeueInputBuffer(&index, kTimeout); in decode()
216 err = state->mCodec->queueInputBuffer( in decode()
258 status_t err = state->mCodec->dequeueOutputBuffer( in decode()
[all …]
DSimplePlayer.cpp318 state->mCodec = MediaCodec::CreateByType( in onPrepare()
321 CHECK(state->mCodec != NULL); in onPrepare()
323 err = state->mCodec->configure( in onPrepare()
343 status_t err = state->mCodec->start(); in onPrepare()
346 err = state->mCodec->getInputBuffers(&state->mBuffers[0]); in onPrepare()
349 err = state->mCodec->getOutputBuffers(&state->mBuffers[1]); in onPrepare()
356 err = state->mCodec->dequeueInputBuffer(&index, -1ll); in onPrepare()
365 err = state->mCodec->queueInputBuffer( in onPrepare()
404 CHECK_EQ(state->mCodec->release(), (status_t)OK); in onReset()
426 err = state->mCodec->dequeueInputBuffer(&index); in onDoMoreStuff()
[all …]
/frameworks/av/media/libstagefright/
DACodec.cpp268 ACodec *mCodec; member
5725 mCodec(codec) { in BaseState()
5734 ++mCodec->mStateGeneration; in stateExited()
5775 status_t err = mCodec->handleSetSurface(static_cast<Surface *>(obj.get())); in onMessageReceived()
5789 mCodec->signalError(OMX_ErrorUndefined, INVALID_OPERATION); in onMessageReceived()
5797 mCodec->mGraphicBufferSource.clear(); in onMessageReceived()
5798 mCodec->signalError(OMX_ErrorResourcesLost, DEAD_OBJECT); in onMessageReceived()
5805 mCodec->mComponentName.c_str()); in onMessageReceived()
5806 status_t err = mCodec->mOMXNode->freeNode(); in onMessageReceived()
5808 mCodec->mComponentName.c_str(), err); in onMessageReceived()
[all …]
DSimpleDecodingSource.cpp124 : mCodec(codec), in SimpleDecodingSource()
130 mCodec->getName(&mComponentName); in SimpleDecodingSource()
134 mCodec->release(); in ~SimpleDecodingSource()
144 status_t res = mCodec->start(); in start()
172 status_t res1 = mCodec->stop(); in stop()
174 mCodec->release(); in stop()
239 mCodec->flush(); in doRead()
253 res = mCodec->dequeueInputBuffer(&in_ix, kTimeoutWaitForInputUs); in doRead()
261 res = mCodec->getInputBuffer(in_ix, &in_buffer); in doRead()
285 if (mCodec->queueInputBuffer( in doRead()
[all …]
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DDisplaySinkService.java51 private MediaCodec mCodec; field in DisplaySinkService
144 if (mCodec != null) { in updateSurfaceFromUi()
145 mCodec.stop(); in updateSurfaceFromUi()
146 mCodec = null; in updateSurfaceFromUi()
155 mCodec = MediaCodec.createDecoderByType("video/avc"); in updateSurfaceFromUi()
160 mCodec.configure(format, mSurface, null, 0); in updateSurfaceFromUi()
161 mCodec.start(); in updateSurfaceFromUi()
179 if (mCodec == null) { in decode()
195 final int index = mCodec.dequeueInputBuffer(0); in provideCodecInputLocked()
200 mCodecInputBuffers = mCodec.getInputBuffers(); in provideCodecInputLocked()
[all …]
/frameworks/av/media/tests/benchmark/MediaBenchmarkTest/src/main/java/com/android/media/benchmark/library/
DEncoder.java40 private MediaCodec mCodec; field in Encoder
124 mCodec = createCodec(codecName, mime); in encode()
125 if (mCodec == null) { in encode()
130 mCodec.configure(encodeFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); in encode()
132 Log.e(TAG, "Failed to configure " + mCodec.getName() + " encoder."); in encode()
140 MediaFormat format = mCodec.getInputFormat(); in encode()
151 mCodec.setCallback(new MediaCodec.Callback() { in encode()
191 mCodec.start(); in encode()
208 int inputBufferId = mCodec.dequeueInputBuffer(kQueueDequeueTimeoutUs); in encode()
215 onInputAvailable(mCodec, inputBufferId); in encode()
[all …]
DDecoder.java37 private MediaCodec mCodec; field in Decoder
113 mCodec = createCodec(codecName, format); in decode()
114 if (mCodec == null) { in decode()
118 mCodec.setCallback(new MediaCodec.Callback() { in decode()
161 mCodec.configure(format, null, null, isEncoder); in decode()
162 mCodec.start(); in decode()
180 int inputBufferId = mCodec.dequeueInputBuffer(kQueueDequeueTimeoutUs); in decode()
188 onInputAvailable(inputBufferId, mCodec); in decode()
193 mCodec.dequeueOutputBuffer(outputBufferInfo, kQueueDequeueTimeoutUs); in decode()
196 MediaFormat outFormat = mCodec.getOutputFormat(); in decode()
[all …]
/frameworks/av/media/libmedia/include/media/
DMediaProfiles.h205 : mCodec(codec), in VideoCodec()
212 mCodec = copy.mCodec; in VideoCodec()
221 video_encoder mCodec; member
230 : mCodec(codec), in AudioCodec()
236 mCodec = copy.mCodec; in AudioCodec()
244 audio_encoder mCodec; member
288 : mCodec(codec), in VideoEncoderCap()
296 video_encoder mCodec; member
309 : mCodec(codec), in AudioEncoderCap()
316 audio_encoder mCodec; member
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
DScreenInternalAudioRecorder.java46 private MediaCodec mCodec; field in ScreenInternalAudioRecorder
117 mCodec = MediaCodec.createEncoderByType(MediaFormat.MIMETYPE_AUDIO_AAC); in setupSimple()
124 mCodec.configure(medFormat, in setupSimple()
211 int bufferIndex = mCodec.dequeueInputBuffer(TIMEOUT); in encode()
216 ByteBuffer buff = mCodec.getInputBuffer(bufferIndex); in encode()
224 mCodec.queueInputBuffer(bufferIndex, 0, bytesToRead, mPresentationTime, 0); in encode()
233 int bufferIndex = mCodec.dequeueInputBuffer(TIMEOUT); in endStream()
234 mCodec.queueInputBuffer(bufferIndex, 0, 0, mPresentationTime, in endStream()
242 int bufferIndex = mCodec.dequeueOutputBuffer(bufferInfo, TIMEOUT); in writeOutput()
244 mTrackId = mMuxer.addTrack(mCodec.getOutputFormat()); in writeOutput()
[all …]
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerDecoder.cpp103 if (mCodec != NULL) { in ~Decoder()
104 mCodec->release(); in ~Decoder()
243 if (mCodec != NULL && mSurface != NULL) { in onMessageReceived()
251 err = mCodec->setSurface(surface); in onMessageReceived()
287 CHECK(mCodec == NULL); in onConfigure()
304 mCodec = MediaCodec::CreateByType( in onConfigure()
308 if (mCodec != NULL) { in onConfigure()
309 mCodec->getName(&mComponentName); in onConfigure()
311 mCodec->release(); in onConfigure()
313 mCodec = MediaCodec::CreateByComponentName( in onConfigure()
[all …]
/frameworks/opt/net/voip/src/java/android/net/rtp/
DAudioStream.java46 private AudioCodec mCodec; field in AudioStream
109 return mCodec; in getCodec()
126 mCodec = codec; in setCodec()
161 if (mCodec != null && type == mCodec.type) { in setDtmfType()
/frameworks/base/libs/hwui/hwui/
DImageDecoder.cpp28 const skcms_ICCProfile* encodedProfile = mCodec->getICCProfile(); in getDefaultColorSpace()
41 : mCodec(std::move(codec)) in ImageDecoder()
43 , mTargetSize(mCodec->getInfo().dimensions()) in ImageDecoder()
45 , mOutColorType(mCodec->computeOutputColorType(kN32_SkColorType)) in ImageDecoder()
81 int sampleSize = mCodec->computeSampleSize(&decodeSize); in setTargetSize()
161 return mCodec->getInfo().alphaType() == kOpaque_SkAlphaType; in opaque()
165 return mCodec->getInfo().colorType() == kGray_8_SkColorType; in gray()
190 auto result = mCodec->getAndroidPixels(decodeInfo, decodePixels, decodeRowBytes, &options); in decode()
/frameworks/base/services/backup/java/com/android/server/backup/utils/
DDataStreamFileCodec.java36 private final DataStreamCodec<T> mCodec; field in DataStreamFileCodec
44 mCodec = codec; in DataStreamFileCodec()
58 return mCodec.deserialize(dataInputStream); in deserialize()
74 mCodec.serialize(t, dataOutputStream); in serialize()
/frameworks/base/native/graphics/jni/
Dimagedecoder.cpp203 return toDecoder(info)->mCodec->getInfo().width(); in AImageDecoderHeaderInfo_getWidth()
210 return toDecoder(info)->mCodec->getInfo().height(); in AImageDecoderHeaderInfo_getHeight()
217 return getMimeType(toDecoder(info)->mCodec->getEncodedFormat()); in AImageDecoderHeaderInfo_getMimeType()
229 SkColorType colorType = imageDecoder->mCodec->computeOutputColorType(kN32_SkColorType); in AImageDecoderHeaderInfo_getDataSpace()
256 return getFormat(toDecoder(info)->mCodec->computeOutputColorType(kN32_SkColorType)); in AImageDecoderHeaderInfo_getAndroidBitmapFormat()
263 switch (toDecoder(info)->mCodec->getInfo().alphaType()) { in AImageDecoderHeaderInfo_getAlphaFlags()
300 SkISize size = toDecoder(decoder)->mCodec->getSampledDimensions(sampleSize); in AImageDecoder_computeSampledSize()
/frameworks/base/libs/hwui/jni/
DAnimatedImageDrawable.cpp54 if (imageDecoder->mCodec->getEncodedFormat() != SkEncodedImageFormat::kWEBP) { in AnimatedImageDrawable_nCreate()
55 const int frameCount = imageDecoder->mCodec->codec()->getFrameCount(); in AnimatedImageDrawable_nCreate()
58 if (!imageDecoder->mCodec->codec()->getFrameInfo(i, &frameInfo)) { in AnimatedImageDrawable_nCreate()
69 auto info = imageDecoder->mCodec->getInfo().makeWH(width, height) in AnimatedImageDrawable_nCreate()
97 sk_sp<SkAnimatedImage> animatedImg = SkAnimatedImage::Make(std::move(imageDecoder->mCodec), in AnimatedImageDrawable_nCreate()
/frameworks/base/media/jni/
Dandroid_media_MediaCodec.cpp201 mCodec = MediaCodec::CreateByType(mLooper, name, encoder, &mInitStatus); in JMediaCodec()
202 if (mCodec == nullptr || mCodec->getName(&mNameAtCreation) != OK) { in JMediaCodec()
206 mCodec = MediaCodec::CreateByComponentName(mLooper, name, &mInitStatus); in JMediaCodec()
209 CHECK((mCodec != NULL) != (mInitStatus != OK)); in JMediaCodec()
222 if (mCodec != NULL) { in release()
223 mCodec->release(); in release()
237 if (mCodec != NULL) { in releaseAsync()
241 mCodec->releaseAsync(notify); in releaseAsync()
280 return mCodec->setOnFrameRenderedNotification(mOnFrameRenderedNotification); in enableOnFrameRenderedListener()
292 return mCodec->setCallback(mCallbackNotification); in setCallback()
[all …]
/frameworks/av/media/libmedia/
DMediaProfiles.cpp166 ALOGV("codec = %d", codec.mCodec); in logVideoCodec()
177 ALOGV("codec = %d", codec.mCodec); in logAudioCodec()
187 ALOGV("codec = %d", cap.mCodec); in logVideoEncoderCap()
198 ALOGV("codec = %d", cap.mCodec); in logAudioEncoderCap()
208 ALOGV("codec = %d", cap.mCodec); in logVideoDecoderCap()
215 ALOGV("codec = %d", cap.mCodec); in logAudioDecoderCap()
976 encoders.add(mVideoEncoders[i]->mCodec); in getVideoEncoders()
986 if (mVideoEncoders[i]->mCodec == codec) { in getVideoEncoderParamByName()
1013 encoders.add(mAudioEncoders[i]->mCodec); in getAudioEncoders()
1023 if (mAudioEncoders[i]->mCodec == codec) { in getAudioEncoderParamByName()
[all …]

12