Class DefaultMediaCodecAdapterFactory

    • Constructor Detail

      • DefaultMediaCodecAdapterFactory

        public DefaultMediaCodecAdapterFactory()
    • Method Detail

      • forceEnableAsynchronous

        public DefaultMediaCodecAdapterFactory forceEnableAsynchronous()
        Forces this factory to always create AsynchronousMediaCodecAdapter instances, provided the device API level is >= 23. For devices with API level < 23, the factory will create SynchronousMediaCodecAdapters.
        Returns:
        This factory, for convenience.
      • experimentalSetSynchronizeCodecInteractionsWithQueueingEnabled

        public void experimentalSetSynchronizeCodecInteractionsWithQueueingEnabled​(boolean enabled)
        Enable synchronizing codec interactions with asynchronous buffer queueing.

        This method is experimental, and will be renamed or removed in a future release.

        Parameters:
        enabled - Whether codec interactions will be synchronized with asynchronous buffer queueing.
      • experimentalSetImmediateCodecStartAfterFlushEnabled

        public void experimentalSetImmediateCodecStartAfterFlushEnabled​(boolean enabled)
        Enable calling MediaCodec.start() immediately after MediaCodec.flush() on the playback thread, when operating the codec in asynchronous mode. If disabled, MediaCodec.start() will be called by the callback thread after pending callbacks are handled.

        By default, this feature is enabled.

        This method is experimental, and will be renamed or removed in a future release.

        Parameters:
        enabled - Whether MediaCodec.start() will be called on the playback thread immediately after MediaCodec.flush().