Home
last modified time | relevance | path

Searched refs:MediaCodec (Results 1 – 25 of 47) sorted by relevance

12

/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/
DTrackDecoder.java20 import android.media.MediaCodec;
21 import android.media.MediaCodec.BufferInfo;
47 private MediaCodec mMediaCodec;
58 protected abstract MediaCodec initMediaCodec(MediaFormat format); in initMediaCodec()
67 MediaCodec codec, ByteBuffer[] buffers, int bufferIndex, BufferInfo info); in onDataAvailable()
102 protected MediaCodec getMediaCodec() { in getMediaCodec()
123 inputBufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in feedInput()
148 inputBufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in tryEnqueueEndOfStream()
157 if ((outputInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) { in drainOutputBuffer()
167 } else if (outputBufferIndex == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) { in drainOutputBuffer()
[all …]
DAudioTrackDecoder.java20 import android.media.MediaCodec;
21 import android.media.MediaCodec.BufferInfo;
61 protected MediaCodec initMediaCodec(MediaFormat format) { in initMediaCodec()
62 MediaCodec mediaCodec; in initMediaCodec()
64 mediaCodec = MediaCodec.createDecoderByType( in initMediaCodec()
77 MediaCodec codec, ByteBuffer[] buffers, int bufferIndex, BufferInfo info) { in onDataAvailable()
DGpuVideoTrackDecoder.java22 import android.media.MediaCodec;
23 import android.media.MediaCodec.BufferInfo;
89 protected MediaCodec initMediaCodec(MediaFormat format) { in initMediaCodec()
90 MediaCodec mediaCodec; in initMediaCodec()
92 mediaCodec = MediaCodec.createDecoderByType( in initMediaCodec()
107 MediaCodec codec, ByteBuffer[] buffers, int bufferIndex, BufferInfo info) { in onDataAvailable()
DCpuVideoTrackDecoder.java20 import android.media.MediaCodec;
21 import android.media.MediaCodec.BufferInfo;
66 protected MediaCodec initMediaCodec(MediaFormat format) { in initMediaCodec()
68 MediaCodec mediaCodec = findDecoderCodec(format, new int[] { in initMediaCodec()
81 MediaCodec codec, ByteBuffer[] buffers, int bufferIndex, BufferInfo info) { in onDataAvailable()
184 private static MediaCodec findDecoderCodec(MediaFormat format, int[] requiredColorFormats) { in findDecoderCodec()
219 return MediaCodec.createByCodecName(bestCodec); in findDecoderCodec()
/frameworks/av/media/libstagefright/
DMediaCodec.cpp92 explicit ResourceManagerClient(MediaCodec* codec) : mMediaCodec(codec) {} in ResourceManagerClient()
95 sp<MediaCodec> codec = mMediaCodec.promote(); in reclaimResource()
115 sp<MediaCodec> codec = mMediaCodec.promote(); in getName()
132 wp<MediaCodec> mMediaCodec;
137 MediaCodec::ResourceManagerServiceProxy::ResourceManagerServiceProxy(pid_t pid) in ResourceManagerServiceProxy()
139 if (mPid == MediaCodec::kNoPid) { in ResourceManagerServiceProxy()
144 MediaCodec::ResourceManagerServiceProxy::~ResourceManagerServiceProxy() { in ~ResourceManagerServiceProxy()
150 void MediaCodec::ResourceManagerServiceProxy::init() { in init()
161 void MediaCodec::ResourceManagerServiceProxy::binderDied(const wp<IBinder>& /*who*/) { in binderDied()
167 void MediaCodec::ResourceManagerServiceProxy::addResource( in addResource()
[all …]
DSimpleDecodingSource.cpp59 sp<MediaCodec> codec; in Create()
69 codec = MediaCodec::CreateByComponentName(looper, componentName); in Create()
96 const sp<MediaCodec> &codec, const sp<IMediaSource> &source, const sp<ALooper> &looper, in SimpleDecodingSource()
261 0 /* pts */, MediaCodec::BUFFER_FLAG_EOS) != OK) { in doRead()
355 if (out_flags & MediaCodec::BUFFER_FLAG_EOS) { in doRead()
DMediaCodecSource.cpp491 mEncoder = MediaCodec::CreateByComponentName( in initEncoder()
507 MediaCodec::CONFIGURE_FLAG_ENCODE); in initEncoder()
715 flags = MediaCodec::BUFFER_FLAG_EOS; in feedEncoderInputBuffers()
833 if (cbID == MediaCodec::CB_INPUT_AVAILABLE) { in onMessageReceived()
839 } else if (cbID == MediaCodec::CB_OUTPUT_FORMAT_CHANGED) { in onMessageReceived()
848 } else if (cbID == MediaCodec::CB_OUTPUT_AVAILABLE) { in onMessageReceived()
861 if (flags & MediaCodec::BUFFER_FLAG_EOS) { in onMessageReceived()
879 if (!(flags & MediaCodec::BUFFER_FLAG_CODECCONFIG)) { in onMessageReceived()
926 if (flags & MediaCodec::BUFFER_FLAG_SYNCFRAME) { in onMessageReceived()
938 } else if (cbID == MediaCodec::CB_ERROR) { in onMessageReceived()
DMediaCodecListOverrides.cpp141 Vector<sp<MediaCodec>> codecs; in doProfileCodecs()
150 sp<MediaCodec> codec = MediaCodec::CreateByComponentName(looper, name.c_str(), &err); in doProfileCodecs()
157 uint32_t flags = isEncoder ? MediaCodec::CONFIGURE_FLAG_ENCODE : 0; in doProfileCodecs()
/frameworks/base/media/java/android/media/
DAmrInputStream.java23 import android.media.MediaCodec.BufferInfo;
37 MediaCodec mCodec;
70 mCodec = MediaCodec.createByCodecName(name); in AmrInputStream()
74 MediaCodec.CONFIGURE_FLAG_ENCODE); in AmrInputStream()
130 mSawInputEOS ? MediaCodec.BUFFER_FLAG_END_OF_STREAM : 0 /* flags */); in read()
143 if ((mInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0) { in read()
DMediaCodec.java1474 final public class MediaCodec { class
1609 private MediaCodec mCodec;
1611 public EventHandler(@NonNull MediaCodec codec, @NonNull Looper looper) { in EventHandler()
1626 mCallback = (MediaCodec.Callback) msg.obj; in handleMessage()
1670 BufferInfo info = (MediaCodec.BufferInfo) msg.obj; in handleCallback()
1681 mCallback.onError(mCodec, (MediaCodec.CodecException) msg.obj); in handleCallback()
1732 public static MediaCodec createDecoderByType(@NonNull String type) in createDecoderByType()
1734 return new MediaCodec(type, true /* nameIsType */, false /* encoder */); in createDecoderByType()
1750 public static MediaCodec createEncoderByType(@NonNull String type) in createEncoderByType()
1752 return new MediaCodec(type, true /* nameIsType */, true /* encoder */); in createEncoderByType()
[all …]
DMediaMuxer.java22 import android.media.MediaCodec;
23 import android.media.MediaCodec.BufferInfo;
291 int offset, int size, long presentationTimeUs, @MediaCodec.BufferFlag int flags); in nativeWriteSampleData()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DDisplaySourceService.java26 import android.media.MediaCodec;
27 import android.media.MediaCodec.BufferInfo;
195 MediaCodec codec; in run()
197 codec = MediaCodec.createEncoderByType("video/avc"); in run()
202 codec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE); in run()
227 private void stream(MediaCodec codec) { in stream()
244 } else if (index == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) { in stream()
246 } else if (index == MediaCodec.INFO_TRY_AGAIN_LATER) { in stream()
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DDisplaySinkService.java25 import android.media.MediaCodec;
26 import android.media.MediaCodec.BufferInfo;
51 private MediaCodec mCodec;
155 mCodec = MediaCodec.createDecoderByType("video/avc"); in updateSurfaceFromUi()
223 } else if (index != MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED in consumeCodecOutputLocked()
224 && index != MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { in consumeCodecOutputLocked()
/frameworks/av/media/libstagefright/include/
DSimpleDecodingSource.h34 struct MediaCodec;
73 const sp<MediaCodec> &codec, const sp<IMediaSource> &source, const sp<ALooper> &looper,
76 sp<MediaCodec> mCodec;
DMediaCodec.h55 struct MediaCodec : public AHandler { struct
77 static sp<MediaCodec> CreateByType( argument
81 static sp<MediaCodec> CreateByComponentName(
200 virtual ~MediaCodec();
370 MediaCodec(const sp<ALooper> &looper, pid_t pid, uid_t uid); argument
441 DISALLOW_EVIL_CONSTRUCTORS(MediaCodec); argument
DMediaCodecSource.h32 struct MediaCodec;
128 sp<MediaCodec> mEncoder;
/frameworks/av/cmds/stagefright/
Dmediafilter.cpp133 sp<MediaCodec> mCodec;
306 if (flags & MediaCodec::BUFFER_FLAG_EOS) { in tryDrainOutputBuffer()
355 state->mCodec = MediaCodec::CreateByType( in decode()
398 filterState->mCodec = MediaCodec::CreateByComponentName( in decode()
405 filterState->mCodec = MediaCodec::CreateByComponentName( in decode()
412 filterState->mCodec = MediaCodec::CreateByComponentName( in decode()
425 filterState->mCodec = MediaCodec::CreateByComponentName( in decode()
437 filterState->mCodec = MediaCodec::CreateByComponentName( in decode()
449 filterState->mCodec = MediaCodec::CreateByComponentName( in decode()
474 sp<MediaCodec> codec = state->mCodec; in decode()
[all …]
DSimplePlayer.h27 struct MediaCodec;
75 sp<MediaCodec> mCodec;
Dcodec.cpp58 sp<MediaCodec> mCodec;
123 state->mCodec = MediaCodec::CreateByType( in decode()
147 sp<MediaCodec> codec = state->mCodec; in decode()
221 MediaCodec::BUFFER_FLAG_EOS); in decode()
288 if (flags & MediaCodec::BUFFER_FLAG_EOS) { in decode()
/frameworks/av/cmds/screenrecord/
Dscreenrecord.cpp150 static status_t prepareEncoder(float displayFps, sp<MediaCodec>* pCodec, in prepareEncoder()
172 sp<MediaCodec> codec = MediaCodec::CreateByType(looper, kMimeTypeAvc, true); in prepareEncoder()
180 MediaCodec::CONFIGURE_FLAG_ENCODE); in prepareEncoder()
318 static status_t runEncoder(const sp<MediaCodec>& encoder, in runEncoder()
358 if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) != 0) { in runEncoder()
402 if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) == 0) { in runEncoder()
433 if ((flags & MediaCodec::BUFFER_FLAG_EOS) != 0) { in runEncoder()
568 sp<MediaCodec> encoder; in recordScreen()
/frameworks/av/media/libstagefright/wifi-display/source/
DConverter.h27 struct MediaCodec;
105 sp<MediaCodec> mEncoder;
DConverter.cpp150 mEncoder = MediaCodec::CreateByType( in initEncoder()
209 MediaCodec::CONFIGURE_FLAG_ENCODE); in initEncoder()
230 MediaCodec::CONFIGURE_FLAG_ENCODE); in initEncoder()
637 flags = MediaCodec::BUFFER_FLAG_EOS; in feedEncoderInputBuffers()
709 if (flags & MediaCodec::BUFFER_FLAG_EOS) { in doMoreWork()
755 if (flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) { in doMoreWork()
781 if (flags & MediaCodec::BUFFER_FLAG_EOS) { in doMoreWork()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerDecoder.cpp148 case MediaCodec::CB_INPUT_AVAILABLE: in onMessageReceived()
157 case MediaCodec::CB_OUTPUT_AVAILABLE: in onMessageReceived()
175 case MediaCodec::CB_OUTPUT_FORMAT_CHANGED: in onMessageReceived()
184 case MediaCodec::CB_ERROR: in onMessageReceived()
296 mCodec = MediaCodec::CreateByType( in onConfigure()
305 mCodec = MediaCodec::CreateByComponentName( in onConfigure()
721 bool eos = flags & MediaCodec::BUFFER_FLAG_EOS; in handleAnOutputBuffer()
973 MediaCodec::BUFFER_FLAG_EOS); in onInputBufferFetched()
1007 flags |= MediaCodec::BUFFER_FLAG_EOS; in onInputBufferFetched()
1009 flags |= MediaCodec::BUFFER_FLAG_CODECCONFIG; in onInputBufferFetched()
DNuPlayerDecoderBase.h28 struct MediaCodec;
/frameworks/base/media/jni/
Dandroid_media_MediaCodec.h36 struct MediaCodec;
150 sp<MediaCodec> mCodec;

12