Java Code Examples for com.google.android.exoplayer2.RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES

The following examples show how to use com.google.android.exoplayer2.RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EventLogger.java    From GSYVideoPlayer with Apache License 2.0 6 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
    switch (formatSupport) {
        case RendererCapabilities.FORMAT_HANDLED:
            return "YES";
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
            return "NO_EXCEEDS_CAPABILITIES";
        case RendererCapabilities.FORMAT_UNSUPPORTED_DRM:
            return "NO_UNSUPPORTED_DRM";
        case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
            return "NO_UNSUPPORTED_TYPE";
        case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
            return "NO";
        default:
            return "?";
    }
}
 
Example 2
Source File: EventLogger.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
  switch (formatSupport) {
    case RendererCapabilities.FORMAT_HANDLED:
      return "YES";
    case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
      return "NO_EXCEEDS_CAPABILITIES";
    case RendererCapabilities.FORMAT_UNSUPPORTED_DRM:
      return "NO_UNSUPPORTED_DRM";
    case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
      return "NO_UNSUPPORTED_TYPE";
    case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
      return "NO";
    default:
      return "?";
  }
}
 
Example 3
Source File: MappingTrackSelector.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the extent to which a renderer can play the tracks that are mapped to it.
 *
 * @param rendererIndex The renderer index.
 * @return One of {@link #RENDERER_SUPPORT_PLAYABLE_TRACKS}, {@link
 *     #RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS}, {@link
 *     #RENDERER_SUPPORT_UNSUPPORTED_TRACKS} and {@link #RENDERER_SUPPORT_NO_TRACKS}.
 */
public @RendererSupport int getRendererSupport(int rendererIndex) {
  int bestRendererSupport = RENDERER_SUPPORT_NO_TRACKS;
  int[][] rendererFormatSupport = rendererFormatSupports[rendererIndex];
  for (int i = 0; i < rendererFormatSupport.length; i++) {
    for (int j = 0; j < rendererFormatSupport[i].length; j++) {
      int trackRendererSupport;
      switch (rendererFormatSupport[i][j] & RendererCapabilities.FORMAT_SUPPORT_MASK) {
        case RendererCapabilities.FORMAT_HANDLED:
          return RENDERER_SUPPORT_PLAYABLE_TRACKS;
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
          trackRendererSupport = RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS;
          break;
        default:
          trackRendererSupport = RENDERER_SUPPORT_UNSUPPORTED_TRACKS;
          break;
      }
      bestRendererSupport = Math.max(bestRendererSupport, trackRendererSupport);
    }
  }
  return bestRendererSupport;
}
 
Example 4
Source File: MappingTrackSelector.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the extent to which a renderer can play the tracks that are mapped to it.
 *
 * @param rendererIndex The renderer index.
 * @return One of {@link #RENDERER_SUPPORT_PLAYABLE_TRACKS}, {@link
 *     #RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS}, {@link
 *     #RENDERER_SUPPORT_UNSUPPORTED_TRACKS} and {@link #RENDERER_SUPPORT_NO_TRACKS}.
 */
public @RendererSupport int getRendererSupport(int rendererIndex) {
  int bestRendererSupport = RENDERER_SUPPORT_NO_TRACKS;
  int[][] rendererFormatSupport = rendererFormatSupports[rendererIndex];
  for (int i = 0; i < rendererFormatSupport.length; i++) {
    for (int j = 0; j < rendererFormatSupport[i].length; j++) {
      int trackRendererSupport;
      switch (rendererFormatSupport[i][j] & RendererCapabilities.FORMAT_SUPPORT_MASK) {
        case RendererCapabilities.FORMAT_HANDLED:
          return RENDERER_SUPPORT_PLAYABLE_TRACKS;
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
          trackRendererSupport = RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS;
          break;
        default:
          trackRendererSupport = RENDERER_SUPPORT_UNSUPPORTED_TRACKS;
          break;
      }
      bestRendererSupport = Math.max(bestRendererSupport, trackRendererSupport);
    }
  }
  return bestRendererSupport;
}
 
Example 5
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
  switch (formatSupport) {
    case RendererCapabilities.FORMAT_HANDLED:
      return "YES";
    case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
      return "NO_EXCEEDS_CAPABILITIES";
    case RendererCapabilities.FORMAT_UNSUPPORTED_DRM:
      return "NO_UNSUPPORTED_DRM";
    case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
      return "NO_UNSUPPORTED_TYPE";
    case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
      return "NO";
    default:
      return "?";
  }
}
 
Example 6
Source File: MappingTrackSelector.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Returns the extent to which a renderer can play the tracks that are mapped to it.
 *
 * @param rendererIndex The renderer index.
 * @return One of {@link #RENDERER_SUPPORT_PLAYABLE_TRACKS}, {@link
 *     #RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS}, {@link
 *     #RENDERER_SUPPORT_UNSUPPORTED_TRACKS} and {@link #RENDERER_SUPPORT_NO_TRACKS}.
 */
public @RendererSupport int getRendererSupport(int rendererIndex) {
  int bestRendererSupport = RENDERER_SUPPORT_NO_TRACKS;
  int[][] rendererFormatSupport = rendererFormatSupports[rendererIndex];
  for (int i = 0; i < rendererFormatSupport.length; i++) {
    for (int j = 0; j < rendererFormatSupport[i].length; j++) {
      int trackRendererSupport;
      switch (rendererFormatSupport[i][j] & RendererCapabilities.FORMAT_SUPPORT_MASK) {
        case RendererCapabilities.FORMAT_HANDLED:
          return RENDERER_SUPPORT_PLAYABLE_TRACKS;
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
          trackRendererSupport = RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS;
          break;
        default:
          trackRendererSupport = RENDERER_SUPPORT_UNSUPPORTED_TRACKS;
          break;
      }
      bestRendererSupport = Math.max(bestRendererSupport, trackRendererSupport);
    }
  }
  return bestRendererSupport;
}
 
Example 7
Source File: MappingTrackSelector.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
/**
 * Returns the extent to which a renderer can play the tracks that are mapped to it.
 *
 * @param rendererIndex The renderer index.
 * @return The {@link RendererSupport}.
 */
@RendererSupport
public int getRendererSupport(int rendererIndex) {
  @RendererSupport int bestRendererSupport = RENDERER_SUPPORT_NO_TRACKS;
  @Capabilities int[][] rendererFormatSupport = rendererFormatSupports[rendererIndex];
  for (@Capabilities int[] trackGroupFormatSupport : rendererFormatSupport) {
    for (@Capabilities int trackFormatSupport : trackGroupFormatSupport) {
      int trackRendererSupport;
      switch (RendererCapabilities.getFormatSupport(trackFormatSupport)) {
        case RendererCapabilities.FORMAT_HANDLED:
          return RENDERER_SUPPORT_PLAYABLE_TRACKS;
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
          trackRendererSupport = RENDERER_SUPPORT_EXCEEDS_CAPABILITIES_TRACKS;
          break;
        case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
        case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
        case RendererCapabilities.FORMAT_UNSUPPORTED_DRM:
          trackRendererSupport = RENDERER_SUPPORT_UNSUPPORTED_TRACKS;
          break;
        default:
          throw new IllegalStateException();
      }
      bestRendererSupport = Math.max(bestRendererSupport, trackRendererSupport);
    }
  }
  return bestRendererSupport;
}
 
Example 8
Source File: EventLogger.java    From TigerVideo with Apache License 2.0 5 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
    switch (formatSupport) {
        case RendererCapabilities.FORMAT_HANDLED:
            return "YES";
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
            return "NO_EXCEEDS_CAPABILITIES";
        case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
            return "NO_UNSUPPORTED_TYPE";
        case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
            return "NO";
        default:
            return "?";
    }
}
 
Example 9
Source File: EventLogger.java    From mimi-reader with Apache License 2.0 5 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
    switch (formatSupport) {
        case RendererCapabilities.FORMAT_HANDLED:
            return "YES";
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
            return "NO_EXCEEDS_CAPABILITIES";
        case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
            return "NO_UNSUPPORTED_TYPE";
        case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
            return "NO";
        default:
            return "?";
    }
}
 
Example 10
Source File: EventLogger.java    From TubiPlayer with MIT License 5 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
    switch (formatSupport) {
        case RendererCapabilities.FORMAT_HANDLED:
            return "YES";
        case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
            return "NO_EXCEEDS_CAPABILITIES";
        case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
            return "NO_UNSUPPORTED_TYPE";
        case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
            return "NO";
        default:
            return "?";
    }
}
 
Example 11
Source File: EventLogger.java    From K-Sonic with MIT License 5 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
  switch (formatSupport) {
    case RendererCapabilities.FORMAT_HANDLED:
      return "YES";
    case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
      return "NO_EXCEEDS_CAPABILITIES";
    case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
      return "NO_UNSUPPORTED_TYPE";
    case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
      return "NO";
    default:
      return "?";
  }
}
 
Example 12
Source File: EventLogger.java    From PowerFileExplorer with GNU General Public License v3.0 5 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
  switch (formatSupport) {
    case RendererCapabilities.FORMAT_HANDLED:
      return "YES";
    case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
      return "NO_EXCEEDS_CAPABILITIES";
    case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
      return "NO_UNSUPPORTED_TYPE";
    case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
      return "NO";
    default:
      return "?";
  }
}
 
Example 13
Source File: EventLogger.java    From evercam-android with GNU Affero General Public License v3.0 5 votes vote down vote up
private static String getFormatSupportString(int formatSupport) {
  switch (formatSupport) {
    case RendererCapabilities.FORMAT_HANDLED:
      return "YES";
    case RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES:
      return "NO_EXCEEDS_CAPABILITIES";
    case RendererCapabilities.FORMAT_UNSUPPORTED_SUBTYPE:
      return "NO_UNSUPPORTED_TYPE";
    case RendererCapabilities.FORMAT_UNSUPPORTED_TYPE:
      return "NO";
    default:
      return "?";
  }
}
 
Example 14
Source File: MappingTrackSelector.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the extent to which a renderer supports adaptation between supported tracks in a
 * specified {@link TrackGroup}.
 *
 * <p>Tracks for which {@link #getTrackSupport(int, int, int)} returns {@link
 * RendererCapabilities#FORMAT_HANDLED} are always considered. Tracks for which {@link
 * #getTrackSupport(int, int, int)} returns {@link
 * RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES} are also considered if {@code
 * includeCapabilitiesExceededTracks} is set to {@code true}. Tracks for which {@link
 * #getTrackSupport(int, int, int)} returns {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM},
 * {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} or {@link
 * RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE} are never considered.
 *
 * @param rendererIndex The renderer index.
 * @param groupIndex The index of the track group.
 * @param includeCapabilitiesExceededTracks Whether tracks that exceed the capabilities of the
 *     renderer are included when determining support.
 * @return One of {@link RendererCapabilities#ADAPTIVE_SEAMLESS}, {@link
 *     RendererCapabilities#ADAPTIVE_NOT_SEAMLESS} and {@link
 *     RendererCapabilities#ADAPTIVE_NOT_SUPPORTED}.
 */
public int getAdaptiveSupport(
    int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks) {
  int trackCount = rendererTrackGroups[rendererIndex].get(groupIndex).length;
  // Iterate over the tracks in the group, recording the indices of those to consider.
  int[] trackIndices = new int[trackCount];
  int trackIndexCount = 0;
  for (int i = 0; i < trackCount; i++) {
    int fixedSupport = getTrackSupport(rendererIndex, groupIndex, i);
    if (fixedSupport == RendererCapabilities.FORMAT_HANDLED
        || (includeCapabilitiesExceededTracks
        && fixedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES)) {
      trackIndices[trackIndexCount++] = i;
    }
  }
  trackIndices = Arrays.copyOf(trackIndices, trackIndexCount);
  return getAdaptiveSupport(rendererIndex, groupIndex, trackIndices);
}
 
Example 15
Source File: MappingTrackSelector.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the extent to which a renderer supports adaptation between supported tracks in a
 * specified {@link TrackGroup}.
 *
 * <p>Tracks for which {@link #getTrackSupport(int, int, int)} returns {@link
 * RendererCapabilities#FORMAT_HANDLED} are always considered. Tracks for which {@link
 * #getTrackSupport(int, int, int)} returns {@link
 * RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES} are also considered if {@code
 * includeCapabilitiesExceededTracks} is set to {@code true}. Tracks for which {@link
 * #getTrackSupport(int, int, int)} returns {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM},
 * {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} or {@link
 * RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE} are never considered.
 *
 * @param rendererIndex The renderer index.
 * @param groupIndex The index of the track group.
 * @param includeCapabilitiesExceededTracks Whether tracks that exceed the capabilities of the
 *     renderer are included when determining support.
 * @return One of {@link RendererCapabilities#ADAPTIVE_SEAMLESS}, {@link
 *     RendererCapabilities#ADAPTIVE_NOT_SEAMLESS} and {@link
 *     RendererCapabilities#ADAPTIVE_NOT_SUPPORTED}.
 */
public int getAdaptiveSupport(
    int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks) {
  int trackCount = rendererTrackGroups[rendererIndex].get(groupIndex).length;
  // Iterate over the tracks in the group, recording the indices of those to consider.
  int[] trackIndices = new int[trackCount];
  int trackIndexCount = 0;
  for (int i = 0; i < trackCount; i++) {
    int fixedSupport = getTrackSupport(rendererIndex, groupIndex, i);
    if (fixedSupport == RendererCapabilities.FORMAT_HANDLED
        || (includeCapabilitiesExceededTracks
        && fixedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES)) {
      trackIndices[trackIndexCount++] = i;
    }
  }
  trackIndices = Arrays.copyOf(trackIndices, trackIndexCount);
  return getAdaptiveSupport(rendererIndex, groupIndex, trackIndices);
}
 
Example 16
Source File: DefaultTrackSelector.java    From K-Sonic with MIT License 4 votes vote down vote up
protected static boolean isSupported(int formatSupport, boolean allowExceedsCapabilities) {
  int maskedSupport = formatSupport & RendererCapabilities.FORMAT_SUPPORT_MASK;
  return maskedSupport == RendererCapabilities.FORMAT_HANDLED || (allowExceedsCapabilities
      && maskedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES);
}
 
Example 17
Source File: MappingTrackSelector.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the extent to which a renderer supports adaptation between supported tracks in a
 * specified {@link TrackGroup}.
 *
 * <p>Tracks for which {@link #getTrackSupport(int, int, int)} returns {@link
 * RendererCapabilities#FORMAT_HANDLED} are always considered. Tracks for which {@link
 * #getTrackSupport(int, int, int)} returns {@link
 * RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES} are also considered if {@code
 * includeCapabilitiesExceededTracks} is set to {@code true}. Tracks for which {@link
 * #getTrackSupport(int, int, int)} returns {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM},
 * {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} or {@link
 * RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE} are never considered.
 *
 * @param rendererIndex The renderer index.
 * @param groupIndex The index of the track group.
 * @param includeCapabilitiesExceededTracks Whether tracks that exceed the capabilities of the
 *     renderer are included when determining support.
 * @return One of {@link RendererCapabilities#ADAPTIVE_SEAMLESS}, {@link
 *     RendererCapabilities#ADAPTIVE_NOT_SEAMLESS} and {@link
 *     RendererCapabilities#ADAPTIVE_NOT_SUPPORTED}.
 */
public int getAdaptiveSupport(
    int rendererIndex, int groupIndex, boolean includeCapabilitiesExceededTracks) {
  int trackCount = rendererTrackGroups[rendererIndex].get(groupIndex).length;
  // Iterate over the tracks in the group, recording the indices of those to consider.
  int[] trackIndices = new int[trackCount];
  int trackIndexCount = 0;
  for (int i = 0; i < trackCount; i++) {
    int fixedSupport = getTrackSupport(rendererIndex, groupIndex, i);
    if (fixedSupport == RendererCapabilities.FORMAT_HANDLED
        || (includeCapabilitiesExceededTracks
        && fixedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES)) {
      trackIndices[trackIndexCount++] = i;
    }
  }
  trackIndices = Arrays.copyOf(trackIndices, trackIndexCount);
  return getAdaptiveSupport(rendererIndex, groupIndex, trackIndices);
}
 
Example 18
Source File: DefaultTrackSelector.java    From MediaSDK with Apache License 2.0 3 votes vote down vote up
/**
 * Returns true if the {@link FormatSupport} in the given {@link Capabilities} is {@link
 * RendererCapabilities#FORMAT_HANDLED} or if {@code allowExceedsCapabilities} is set and the
 * format support is {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 *
 * @param formatSupport {@link Capabilities}.
 * @param allowExceedsCapabilities Whether to return true if {@link FormatSupport} is {@link
 *     RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 * @return True if {@link FormatSupport} is {@link RendererCapabilities#FORMAT_HANDLED}, or if
 *     {@code allowExceedsCapabilities} is set and the format support is {@link
 *     RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 */
protected static boolean isSupported(
    @Capabilities int formatSupport, boolean allowExceedsCapabilities) {
  @FormatSupport int maskedSupport = RendererCapabilities.getFormatSupport(formatSupport);
  return maskedSupport == RendererCapabilities.FORMAT_HANDLED || (allowExceedsCapabilities
      && maskedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES);
}
 
Example 19
Source File: DefaultTrackSelector.java    From TelePlus-Android with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Applies the {@link RendererCapabilities#FORMAT_SUPPORT_MASK} to a value obtained from
 * {@link RendererCapabilities#supportsFormat(Format)}, returning true if the result is
 * {@link RendererCapabilities#FORMAT_HANDLED} or if {@code allowExceedsCapabilities} is set
 * and the result is {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 *
 * @param formatSupport A value obtained from {@link RendererCapabilities#supportsFormat(Format)}.
 * @param allowExceedsCapabilities Whether to return true if the format support component of the
 *     value is {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 * @return True if the format support component is {@link RendererCapabilities#FORMAT_HANDLED}, or
 *     if {@code allowExceedsCapabilities} is set and the format support component is
 *     {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 */
protected static boolean isSupported(int formatSupport, boolean allowExceedsCapabilities) {
  int maskedSupport = formatSupport & RendererCapabilities.FORMAT_SUPPORT_MASK;
  return maskedSupport == RendererCapabilities.FORMAT_HANDLED || (allowExceedsCapabilities
      && maskedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES);
}
 
Example 20
Source File: DefaultTrackSelector.java    From Telegram with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Applies the {@link RendererCapabilities#FORMAT_SUPPORT_MASK} to a value obtained from
 * {@link RendererCapabilities#supportsFormat(Format)}, returning true if the result is
 * {@link RendererCapabilities#FORMAT_HANDLED} or if {@code allowExceedsCapabilities} is set
 * and the result is {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 *
 * @param formatSupport A value obtained from {@link RendererCapabilities#supportsFormat(Format)}.
 * @param allowExceedsCapabilities Whether to return true if the format support component of the
 *     value is {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 * @return True if the format support component is {@link RendererCapabilities#FORMAT_HANDLED}, or
 *     if {@code allowExceedsCapabilities} is set and the format support component is
 *     {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}.
 */
protected static boolean isSupported(int formatSupport, boolean allowExceedsCapabilities) {
  int maskedSupport = formatSupport & RendererCapabilities.FORMAT_SUPPORT_MASK;
  return maskedSupport == RendererCapabilities.FORMAT_HANDLED || (allowExceedsCapabilities
      && maskedSupport == RendererCapabilities.FORMAT_EXCEEDS_CAPABILITIES);
}