Package com.google.android.exoplayer2

## Interface RendererCapabilities

- All Known Implementing Classes:
    `BaseRenderer`, `CameraMotionRenderer`, `DecoderAudioRenderer`, `DecoderVideoRenderer`, `FakeAudioRenderer`, `FakeMediaClockRenderer`, `FakeRenderer`, `FakeVideoRenderer`, `FfmpegAudioRenderer`, `LibflacAudioRenderer`, `Libgav1VideoRenderer`, `LibopusAudioRenderer`, `LibvpxVideoRenderer`, `MediaCodecAudioRenderer`, `MediaCodecRenderer`, `MediaCodecVideoRenderer`, `MetadataRenderer`, `NoSampleRenderer`, `TextRenderer`

      public interface RendererCapabilities

  Defines the capabilities of a `Renderer`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static interface` | `RendererCapabilities.AdaptiveSupport` | Level of renderer support for adaptive format switches.
    `static interface` | `RendererCapabilities.Capabilities` | Combined renderer capabilities.
    `static interface` | `RendererCapabilities.FormatSupport` | Deprecated. Use `C.FormatSupport` instead.
    `static interface` | `RendererCapabilities.TunnelingSupport` | Level of renderer support for tunneling.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `ADAPTIVE_NOT_SEAMLESS` | The `Renderer` can adapt between formats, but may suffer a brief discontinuity (~50-100ms) when adaptation occurs.
    `static int` | `ADAPTIVE_NOT_SUPPORTED` | The `Renderer` does not support adaptation between formats.
    `static int` | `ADAPTIVE_SEAMLESS` | The `Renderer` can seamlessly adapt between formats.
    `static int` | `ADAPTIVE_SUPPORT_MASK` | A mask to apply to `RendererCapabilities.Capabilities` to obtain the `RendererCapabilities.AdaptiveSupport` only.
    `static int` | `FORMAT_EXCEEDS_CAPABILITIES` | Deprecated. Use `C.FORMAT_EXCEEDS_CAPABILITIES` instead.
    `static int` | `FORMAT_HANDLED` | Deprecated. Use `C.FORMAT_HANDLED` instead.
    `static int` | `FORMAT_SUPPORT_MASK` | A mask to apply to `RendererCapabilities.Capabilities` to obtain the `C.FormatSupport` only.
    `static int` | `FORMAT_UNSUPPORTED_DRM` | Deprecated. Use `C.FORMAT_UNSUPPORTED_DRM` instead.
    `static int` | `FORMAT_UNSUPPORTED_SUBTYPE` | Deprecated. Use `C.FORMAT_UNSUPPORTED_SUBTYPE` instead.
    `static int` | `FORMAT_UNSUPPORTED_TYPE` | Deprecated. Use `C.FORMAT_UNSUPPORTED_TYPE` instead.
    `static int` | `TUNNELING_NOT_SUPPORTED` | The `Renderer` does not support tunneled output.
    `static int` | `TUNNELING_SUPPORT_MASK` | A mask to apply to `RendererCapabilities.Capabilities` to obtain the `RendererCapabilities.TunnelingSupport` only.
    `static int` | `TUNNELING_SUPPORTED` | The `Renderer` supports tunneled output.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static int` | `create​(int formatSupport)` | Returns `RendererCapabilities.Capabilities` for the given `C.FormatSupport`.
    `static int` | `create​(int formatSupport, int adaptiveSupport, int tunnelingSupport)` | Returns `RendererCapabilities.Capabilities` combining the given `C.FormatSupport`, `RendererCapabilities.AdaptiveSupport` and `RendererCapabilities.TunnelingSupport`.
    `static int` | `getAdaptiveSupport​(int supportFlags)` | Returns the `RendererCapabilities.AdaptiveSupport` from the combined `RendererCapabilities.Capabilities`.
    `static int` | `getFormatSupport​(int supportFlags)` | Returns the `C.FormatSupport` from the combined `RendererCapabilities.Capabilities`.
    `String` | `getName()` | Returns the name of the `Renderer`.
    `int` | `getTrackType()` | Returns the track type that the `Renderer` handles.
    `static int` | `getTunnelingSupport​(int supportFlags)` | Returns the `RendererCapabilities.TunnelingSupport` from the combined `RendererCapabilities.Capabilities`.
    `int` | `supportsFormat​(Format format)` | Returns the extent to which the `Renderer` supports a given format.
    `int` | `supportsMixedMimeTypeAdaptation()` | Returns the extent to which the `Renderer` supports adapting between supported formats that have different MIME types.

- - ### Field Detail

    - #### FORMAT_SUPPORT_MASK

          static final int FORMAT_SUPPORT_MASK

      A mask to apply to `RendererCapabilities.Capabilities` to obtain the `C.FormatSupport` only.
      See Also:
        Constant Field Values

    - #### FORMAT_HANDLED

          @Deprecated
          static final int FORMAT_HANDLED

      Deprecated.
      Use `C.FORMAT_HANDLED` instead.
      See Also:
        Constant Field Values

    - #### FORMAT_EXCEEDS_CAPABILITIES

          @Deprecated
          static final int FORMAT_EXCEEDS_CAPABILITIES

      Deprecated.
      Use `C.FORMAT_EXCEEDS_CAPABILITIES` instead.
      See Also:
        Constant Field Values

    - #### FORMAT_UNSUPPORTED_DRM

          @Deprecated
          static final int FORMAT_UNSUPPORTED_DRM

      Deprecated.
      Use `C.FORMAT_UNSUPPORTED_DRM` instead.
      See Also:
        Constant Field Values

    - #### FORMAT_UNSUPPORTED_SUBTYPE

          @Deprecated
          static final int FORMAT_UNSUPPORTED_SUBTYPE

      Deprecated.
      Use `C.FORMAT_UNSUPPORTED_SUBTYPE` instead.
      See Also:
        Constant Field Values

    - #### FORMAT_UNSUPPORTED_TYPE

          @Deprecated
          static final int FORMAT_UNSUPPORTED_TYPE

      Deprecated.
      Use `C.FORMAT_UNSUPPORTED_TYPE` instead.
      See Also:
        Constant Field Values

    - #### ADAPTIVE_SUPPORT_MASK

          static final int ADAPTIVE_SUPPORT_MASK

      A mask to apply to `RendererCapabilities.Capabilities` to obtain the `RendererCapabilities.AdaptiveSupport` only.
      See Also:
        Constant Field Values

    - #### ADAPTIVE_SEAMLESS

          static final int ADAPTIVE_SEAMLESS

      The `Renderer` can seamlessly adapt between formats.
      See Also:
        Constant Field Values

    - #### ADAPTIVE_NOT_SEAMLESS

          static final int ADAPTIVE_NOT_SEAMLESS

      The `Renderer` can adapt between formats, but may suffer a brief discontinuity (~50-100ms) when adaptation occurs.
      See Also:
        Constant Field Values

    - #### ADAPTIVE_NOT_SUPPORTED

          static final int ADAPTIVE_NOT_SUPPORTED

      The `Renderer` does not support adaptation between formats.
      See Also:
        Constant Field Values

    - #### TUNNELING_SUPPORT_MASK

          static final int TUNNELING_SUPPORT_MASK

      A mask to apply to `RendererCapabilities.Capabilities` to obtain the `RendererCapabilities.TunnelingSupport` only.
      See Also:
        Constant Field Values

    - #### TUNNELING_SUPPORTED

          static final int TUNNELING_SUPPORTED

      The `Renderer` supports tunneled output.
      See Also:
        Constant Field Values

    - #### TUNNELING_NOT_SUPPORTED

          static final int TUNNELING_NOT_SUPPORTED

      The `Renderer` does not support tunneled output.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### create

          @Capabilities
          static int create​(@FormatSupport
                            int formatSupport)

      Returns `RendererCapabilities.Capabilities` for the given `C.FormatSupport`.

      The `RendererCapabilities.AdaptiveSupport` is set to `ADAPTIVE_NOT_SUPPORTED` and {`RendererCapabilities.TunnelingSupport` is set to `TUNNELING_NOT_SUPPORTED`.

      Parameters:
        `formatSupport` - The `C.FormatSupport`.
      Returns:
        The combined `RendererCapabilities.Capabilities` of the given `C.FormatSupport`, `ADAPTIVE_NOT_SUPPORTED` and `TUNNELING_NOT_SUPPORTED`.

    - #### create

          @Capabilities
          static int create​(@FormatSupport
                            int formatSupport,
                            @AdaptiveSupport
                            int adaptiveSupport,
                            @TunnelingSupport
                            int tunnelingSupport)

      Returns `RendererCapabilities.Capabilities` combining the given `C.FormatSupport`, `RendererCapabilities.AdaptiveSupport` and `RendererCapabilities.TunnelingSupport`.
      Parameters:
        `formatSupport` - The `C.FormatSupport`.
        `adaptiveSupport` - The `RendererCapabilities.AdaptiveSupport`.
        `tunnelingSupport` - The `RendererCapabilities.TunnelingSupport`.
      Returns:
        The combined `RendererCapabilities.Capabilities`.

    - #### getFormatSupport

          @FormatSupport
          static int getFormatSupport​(@Capabilities
                                      int supportFlags)

      Returns the `C.FormatSupport` from the combined `RendererCapabilities.Capabilities`.
      Parameters:
        `supportFlags` - The combined `RendererCapabilities.Capabilities`.
      Returns:
        The `C.FormatSupport` only.

    - #### getAdaptiveSupport

          @AdaptiveSupport
          static int getAdaptiveSupport​(@Capabilities
                                        int supportFlags)

      Returns the `RendererCapabilities.AdaptiveSupport` from the combined `RendererCapabilities.Capabilities`.
      Parameters:
        `supportFlags` - The combined `RendererCapabilities.Capabilities`.
      Returns:
        The `RendererCapabilities.AdaptiveSupport` only.

    - #### getTunnelingSupport

          @TunnelingSupport
          static int getTunnelingSupport​(@Capabilities
                                         int supportFlags)

      Returns the `RendererCapabilities.TunnelingSupport` from the combined `RendererCapabilities.Capabilities`.
      Parameters:
        `supportFlags` - The combined `RendererCapabilities.Capabilities`.
      Returns:
        The `RendererCapabilities.TunnelingSupport` only.

    - #### getName

          String getName()

      Returns the name of the `Renderer`.

    - #### getTrackType

          int getTrackType()

      Returns the track type that the `Renderer` handles. For example, a video renderer will return `C.TRACK_TYPE_VIDEO`, an audio renderer will return `C.TRACK_TYPE_AUDIO`, a text renderer will return `C.TRACK_TYPE_TEXT`, and so on.
      Returns:
        One of the `TRACK_TYPE_*` constants defined in `C`.
      See Also:
        `Renderer.getTrackType()`

    - #### supportsFormat

          @Capabilities
          int supportsFormat​(Format format)
                      throws ExoPlaybackException

      Returns the extent to which the `Renderer` supports a given format.
      Parameters:
        `format` - The format.
      Returns:
        The `RendererCapabilities.Capabilities` for this format.
      Throws:
        `ExoPlaybackException` - If an error occurs.

    - #### supportsMixedMimeTypeAdaptation

          @AdaptiveSupport
          int supportsMixedMimeTypeAdaptation()
                                       throws ExoPlaybackException

      Returns the extent to which the `Renderer` supports adapting between supported formats that have different MIME types.
      Returns:
        The `RendererCapabilities.AdaptiveSupport` for adapting between supported formats that have different MIME types.
      Throws:
        `ExoPlaybackException` - If an error occurs.