Lines Matching defs:MediaCodec

46  MediaCodec class can be used to access low-level media codecs, i.e. encoder/decoder components.
54 alt="MediaCodec buffer flow diagram"></object></center>
93 short[] getSamplesForChannel(MediaCodec codec, int bufferId, int channelIx) {
213 alt="MediaCodec state diagram"></object></center>
240 Use {@link MediaCodecList} to create a MediaCodec for a specific {@link MediaFormat}. When
397 the {@link Callback#onInputBufferAvailable MediaCodec.Callback.onInput}/{@link
457 alt="MediaCodec state diagram for asynchronous operation"></object></center>
459 MediaCodec is typically used like this in asynchronous mode:
461 MediaCodec codec = MediaCodec.createByCodecName(name);
463 codec.setCallback(new MediaCodec.Callback() {
465 void onInputBufferAvailable(MediaCodec mc, int inputBufferId) {
473 void onOutputBufferAvailable(MediaCodec mc, int outputBufferId, &hellip;) {
483 void onOutputFormatChanged(MediaCodec mc, MediaFormat format) {
516 MediaCodec is typically used like this in synchronous mode:
518 MediaCodec codec = MediaCodec.createByCodecName(name);
538 } else if (outputBufferId == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
557 MediaCodec codec = MediaCodec.createByCodecName(name);
574 } else if (outputBufferId == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {
576 } else if (outputBufferId == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {
756 which you must catch or declare to pass up. MediaCodec methods throw {@code
781 This sections summarizes the valid API calls in each state and the API history of the MediaCodec
1482 final public class MediaCodec {
1552 // in MediaCodec.h !
1634 private MediaCodec mCodec;
1636 public EventHandler(@NonNull MediaCodec codec, @NonNull Looper looper) {
1651 mCallback = (MediaCodec.Callback) msg.obj;
1695 BufferInfo info = (MediaCodec.BufferInfo) msg.obj;
1706 mCallback.onError(mCodec, (MediaCodec.CodecException) msg.obj);
1757 public static MediaCodec createDecoderByType(@NonNull String type)
1759 return new MediaCodec(type, true /* nameIsType */, false /* encoder */);
1775 public static MediaCodec createEncoderByType(@NonNull String type)
1777 return new MediaCodec(type, true /* nameIsType */, true /* encoder */);
1790 public static MediaCodec createByCodecName(@NonNull String name)
1792 return new MediaCodec(
1796 private MediaCodec(
1822 * Call this if an {@link MediaCodec.CodecException#isRecoverable unrecoverable}
1987 * {@link MediaCodec} or {@link MediaRecorder} instances, but can only be used by at
2064 * @throws MediaCodec.CodecException upon codec error. Note that some codec errors
2122 * @throws MediaCodec.CodecException upon codec error.
2148 "android.media.MediaCodec.error_" + sign + Math.abs(errorCode);
2313 * will be automatically submitted by MediaCodec directly after
2346 * @throws MediaCodec.CodecException upon codec error.
2522 * a {@link MediaCodec.CryptoInfo} instance.
2541 * Set the encryption pattern on a {@link MediaCodec.CryptoInfo} instance.
2542 * See {@link MediaCodec.CryptoInfo.Pattern}.
2592 * @throws MediaCodec.CodecException upon codec error.
2632 * @throws MediaCodec.CodecException upon codec error.
2693 * @throws MediaCodec.CodecException upon codec error.
2732 * @throws MediaCodec.CodecException upon codec error.
2793 * @throws MediaCodec.CodecException upon codec error.
2816 * @throws MediaCodec.CodecException upon codec error.
2830 * @throws MediaCodec.CodecException upon codec error.
2845 * @throws MediaCodec.CodecException upon codec error.
3058 * @throws MediaCodec.CodecException upon codec error.
3089 * @throws MediaCodec.CodecException upon codec error.
3116 * @throws MediaCodec.CodecException upon codec error.
3145 * @throws MediaCodec.CodecException upon codec error.
3174 * @throws MediaCodec.CodecException upon codec error.
3202 * @throws MediaCodec.CodecException upon codec error.
3268 * available for the media being handled by this instance of MediaCodec
3330 * Sets an asynchronous callback for actionable MediaCodec events.
3350 public void setCallback(@Nullable /* MediaCodec. */ Callback cb, @Nullable Handler handler) {
3382 * Sets an asynchronous callback for actionable MediaCodec events on the default
3391 public void setCallback(@Nullable /* MediaCodec. */ Callback cb) {
3398 * @see MediaCodec#setOnFrameRenderedListener
3409 * @param codec the MediaCodec instance
3420 @NonNull MediaCodec codec, long presentationTimeUs, long nanoTime);
3472 * MediaCodec callback interface. Used to notify the user asynchronously
3473 * of various MediaCodec events.
3479 * @param codec The MediaCodec object.
3482 public abstract void onInputBufferAvailable(@NonNull MediaCodec codec, int index);
3487 * @param codec The MediaCodec object.
3489 * @param info Info regarding the available output buffer {@link MediaCodec.BufferInfo}.
3492 @NonNull MediaCodec codec, int index, @NonNull BufferInfo info);
3495 * Called when the MediaCodec encountered an error
3497 * @param codec The MediaCodec object.
3498 * @param e The {@link MediaCodec.CodecException} object describing the error.
3500 public abstract void onError(@NonNull MediaCodec codec, @NonNull CodecException e);
3505 * @param codec The MediaCodec object.
3509 @NonNull MediaCodec codec, @NonNull MediaFormat format);
3776 * from the {@link MediaCodec#getMetrics} return value.
3783 * from the {@link MediaCodec#getMetrics} return value.
3790 * from the {@link MediaCodec#getMetrics} return value.
3810 * as an encoder or decoder from the {@link MediaCodec#getMetrics} return value.
3818 * in secure (DRM) mode from the {@link MediaCodec#getMetrics} return value.
3825 * from the {@link MediaCodec#getMetrics} return value.
3832 * from the {@link MediaCodec#getMetrics} return value.
3839 * from the {@link MediaCodec#getMetrics} return.