Java Code Examples for com.google.android.exoplayer2.RendererCapabilities#FORMAT_UNSUPPORTED_TYPE
The following examples show how to use
com.google.android.exoplayer2.RendererCapabilities#FORMAT_UNSUPPORTED_TYPE .
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: MappingTrackSelector.java From MediaSDK with Apache License 2.0 | 6 votes |
/** * Finds the renderer to which the provided {@link TrackGroup} should be mapped. * <p> * A {@link TrackGroup} is mapped to the renderer that reports the highest of (listed in * decreasing order of support) {@link RendererCapabilities#FORMAT_HANDLED}, * {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}, * {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM} and * {@link RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE}. In the case that two or more renderers * report the same level of support, the renderer with the lowest index is associated. * <p> * If all renderers report {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} for all of the * tracks in the group, then {@code renderers.length} is returned to indicate that the group was * not mapped to any renderer. * * @param rendererCapabilities The {@link RendererCapabilities} of the renderers. * @param group The track group to map to a renderer. * @return The index of the renderer to which the track group was mapped, or * {@code renderers.length} if it was not mapped to any renderer. * @throws ExoPlaybackException If an error occurs finding a renderer. */ private static int findRenderer(RendererCapabilities[] rendererCapabilities, TrackGroup group) throws ExoPlaybackException { int bestRendererIndex = rendererCapabilities.length; @FormatSupport int bestFormatSupportLevel = RendererCapabilities.FORMAT_UNSUPPORTED_TYPE; for (int rendererIndex = 0; rendererIndex < rendererCapabilities.length; rendererIndex++) { RendererCapabilities rendererCapability = rendererCapabilities[rendererIndex]; for (int trackIndex = 0; trackIndex < group.length; trackIndex++) { @FormatSupport int formatSupportLevel = RendererCapabilities.getFormatSupport( rendererCapability.supportsFormat(group.getFormat(trackIndex))); if (formatSupportLevel > bestFormatSupportLevel) { bestRendererIndex = rendererIndex; bestFormatSupportLevel = formatSupportLevel; if (bestFormatSupportLevel == RendererCapabilities.FORMAT_HANDLED) { // We can't do better. return bestRendererIndex; } } } } return bestRendererIndex; }
Example 2
Source File: EventLogger.java From Telegram with GNU General Public License v2.0 | 6 votes |
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 |
/** * Finds the renderer to which the provided {@link TrackGroup} should be mapped. * <p> * A {@link TrackGroup} is mapped to the renderer that reports the highest of (listed in * decreasing order of support) {@link RendererCapabilities#FORMAT_HANDLED}, * {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}, * {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM} and * {@link RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE}. In the case that two or more renderers * report the same level of support, the renderer with the lowest index is associated. * <p> * If all renderers report {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} for all of the * tracks in the group, then {@code renderers.length} is returned to indicate that the group was * not mapped to any renderer. * * @param rendererCapabilities The {@link RendererCapabilities} of the renderers. * @param group The track group to map to a renderer. * @return The index of the renderer to which the track group was mapped, or * {@code renderers.length} if it was not mapped to any renderer. * @throws ExoPlaybackException If an error occurs finding a renderer. */ private static int findRenderer(RendererCapabilities[] rendererCapabilities, TrackGroup group) throws ExoPlaybackException { int bestRendererIndex = rendererCapabilities.length; int bestFormatSupportLevel = RendererCapabilities.FORMAT_UNSUPPORTED_TYPE; for (int rendererIndex = 0; rendererIndex < rendererCapabilities.length; rendererIndex++) { RendererCapabilities rendererCapability = rendererCapabilities[rendererIndex]; for (int trackIndex = 0; trackIndex < group.length; trackIndex++) { int formatSupportLevel = rendererCapability.supportsFormat(group.getFormat(trackIndex)) & RendererCapabilities.FORMAT_SUPPORT_MASK; if (formatSupportLevel > bestFormatSupportLevel) { bestRendererIndex = rendererIndex; bestFormatSupportLevel = formatSupportLevel; if (bestFormatSupportLevel == RendererCapabilities.FORMAT_HANDLED) { // We can't do better. return bestRendererIndex; } } } } return bestRendererIndex; }
Example 4
Source File: EventLogger.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
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 5
Source File: MappingTrackSelector.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
/** * Finds the renderer to which the provided {@link TrackGroup} should be mapped. * <p> * A {@link TrackGroup} is mapped to the renderer that reports the highest of (listed in * decreasing order of support) {@link RendererCapabilities#FORMAT_HANDLED}, * {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}, * {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM} and * {@link RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE}. In the case that two or more renderers * report the same level of support, the renderer with the lowest index is associated. * <p> * If all renderers report {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} for all of the * tracks in the group, then {@code renderers.length} is returned to indicate that the group was * not mapped to any renderer. * * @param rendererCapabilities The {@link RendererCapabilities} of the renderers. * @param group The track group to map to a renderer. * @return The index of the renderer to which the track group was mapped, or * {@code renderers.length} if it was not mapped to any renderer. * @throws ExoPlaybackException If an error occurs finding a renderer. */ private static int findRenderer(RendererCapabilities[] rendererCapabilities, TrackGroup group) throws ExoPlaybackException { int bestRendererIndex = rendererCapabilities.length; int bestFormatSupportLevel = RendererCapabilities.FORMAT_UNSUPPORTED_TYPE; for (int rendererIndex = 0; rendererIndex < rendererCapabilities.length; rendererIndex++) { RendererCapabilities rendererCapability = rendererCapabilities[rendererIndex]; for (int trackIndex = 0; trackIndex < group.length; trackIndex++) { int formatSupportLevel = rendererCapability.supportsFormat(group.getFormat(trackIndex)) & RendererCapabilities.FORMAT_SUPPORT_MASK; if (formatSupportLevel > bestFormatSupportLevel) { bestRendererIndex = rendererIndex; bestFormatSupportLevel = formatSupportLevel; if (bestFormatSupportLevel == RendererCapabilities.FORMAT_HANDLED) { // We can't do better. return bestRendererIndex; } } } } return bestRendererIndex; }
Example 6
Source File: MappingTrackSelector.java From K-Sonic with MIT License | 6 votes |
/** * Finds the renderer to which the provided {@link TrackGroup} should be associated. * <p> * A {@link TrackGroup} is associated to a renderer that reports * {@link RendererCapabilities#FORMAT_HANDLED} support for one or more of the tracks in the group, * or {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES} if no such renderer exists, or * {@link RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE} if again no such renderer exists. In * the case that two or more renderers report the same level of support, the renderer with the * lowest index is associated. * <p> * If all renderers report {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} for all of the * tracks in the group, then {@code renderers.length} is returned to indicate that no association * was made. * * @param rendererCapabilities The {@link RendererCapabilities} of the renderers. * @param group The {@link TrackGroup} whose associated renderer is to be found. * @return The index of the associated renderer, or {@code renderers.length} if no * association was made. * @throws ExoPlaybackException If an error occurs finding a renderer. */ private static int findRenderer(RendererCapabilities[] rendererCapabilities, TrackGroup group) throws ExoPlaybackException { int bestRendererIndex = rendererCapabilities.length; int bestFormatSupportLevel = RendererCapabilities.FORMAT_UNSUPPORTED_TYPE; for (int rendererIndex = 0; rendererIndex < rendererCapabilities.length; rendererIndex++) { RendererCapabilities rendererCapability = rendererCapabilities[rendererIndex]; for (int trackIndex = 0; trackIndex < group.length; trackIndex++) { int formatSupportLevel = rendererCapability.supportsFormat(group.getFormat(trackIndex)) & RendererCapabilities.FORMAT_SUPPORT_MASK; if (formatSupportLevel > bestFormatSupportLevel) { bestRendererIndex = rendererIndex; bestFormatSupportLevel = formatSupportLevel; if (bestFormatSupportLevel == RendererCapabilities.FORMAT_HANDLED) { // We can't do better. return bestRendererIndex; } } } } return bestRendererIndex; }
Example 7
Source File: EventLogger.java From GSYVideoPlayer with Apache License 2.0 | 6 votes |
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 8
Source File: EventLogger.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
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 9
Source File: MappingTrackSelector.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
/** * Finds the renderer to which the provided {@link TrackGroup} should be mapped. * <p> * A {@link TrackGroup} is mapped to the renderer that reports the highest of (listed in * decreasing order of support) {@link RendererCapabilities#FORMAT_HANDLED}, * {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}, * {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM} and * {@link RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE}. In the case that two or more renderers * report the same level of support, the renderer with the lowest index is associated. * <p> * If all renderers report {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} for all of the * tracks in the group, then {@code renderers.length} is returned to indicate that the group was * not mapped to any renderer. * * @param rendererCapabilities The {@link RendererCapabilities} of the renderers. * @param group The track group to map to a renderer. * @return The index of the renderer to which the track group was mapped, or * {@code renderers.length} if it was not mapped to any renderer. * @throws ExoPlaybackException If an error occurs finding a renderer. */ private static int findRenderer(RendererCapabilities[] rendererCapabilities, TrackGroup group) throws ExoPlaybackException { int bestRendererIndex = rendererCapabilities.length; int bestFormatSupportLevel = RendererCapabilities.FORMAT_UNSUPPORTED_TYPE; for (int rendererIndex = 0; rendererIndex < rendererCapabilities.length; rendererIndex++) { RendererCapabilities rendererCapability = rendererCapabilities[rendererIndex]; for (int trackIndex = 0; trackIndex < group.length; trackIndex++) { int formatSupportLevel = rendererCapability.supportsFormat(group.getFormat(trackIndex)) & RendererCapabilities.FORMAT_SUPPORT_MASK; if (formatSupportLevel > bestFormatSupportLevel) { bestRendererIndex = rendererIndex; bestFormatSupportLevel = formatSupportLevel; if (bestFormatSupportLevel == RendererCapabilities.FORMAT_HANDLED) { // We can't do better. return bestRendererIndex; } } } } return bestRendererIndex; }
Example 10
Source File: EventLogger.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
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 11
Source File: MappingTrackSelector.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
/** * Finds the renderer to which the provided {@link TrackGroup} should be mapped. * <p> * A {@link TrackGroup} is mapped to the renderer that reports the highest of (listed in * decreasing order of support) {@link RendererCapabilities#FORMAT_HANDLED}, * {@link RendererCapabilities#FORMAT_EXCEEDS_CAPABILITIES}, * {@link RendererCapabilities#FORMAT_UNSUPPORTED_DRM} and * {@link RendererCapabilities#FORMAT_UNSUPPORTED_SUBTYPE}. In the case that two or more renderers * report the same level of support, the renderer with the lowest index is associated. * <p> * If all renderers report {@link RendererCapabilities#FORMAT_UNSUPPORTED_TYPE} for all of the * tracks in the group, then {@code renderers.length} is returned to indicate that the group was * not mapped to any renderer. * * @param rendererCapabilities The {@link RendererCapabilities} of the renderers. * @param group The track group to map to a renderer. * @return The index of the renderer to which the track group was mapped, or * {@code renderers.length} if it was not mapped to any renderer. * @throws ExoPlaybackException If an error occurs finding a renderer. */ private static int findRenderer(RendererCapabilities[] rendererCapabilities, TrackGroup group) throws ExoPlaybackException { int bestRendererIndex = rendererCapabilities.length; int bestFormatSupportLevel = RendererCapabilities.FORMAT_UNSUPPORTED_TYPE; for (int rendererIndex = 0; rendererIndex < rendererCapabilities.length; rendererIndex++) { RendererCapabilities rendererCapability = rendererCapabilities[rendererIndex]; for (int trackIndex = 0; trackIndex < group.length; trackIndex++) { int formatSupportLevel = rendererCapability.supportsFormat(group.getFormat(trackIndex)) & RendererCapabilities.FORMAT_SUPPORT_MASK; if (formatSupportLevel > bestFormatSupportLevel) { bestRendererIndex = rendererIndex; bestFormatSupportLevel = formatSupportLevel; if (bestFormatSupportLevel == RendererCapabilities.FORMAT_HANDLED) { // We can't do better. return bestRendererIndex; } } } } return bestRendererIndex; }
Example 12
Source File: EventLogger.java From TubiPlayer with MIT License | 5 votes |
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 ExoPlayer-Offline with Apache License 2.0 | 5 votes |
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: EventLogger.java From LiveVideoBroadcaster with Apache License 2.0 | 5 votes |
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 15
Source File: EventLogger.java From mimi-reader with Apache License 2.0 | 5 votes |
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 16
Source File: EventLogger.java From TigerVideo with Apache License 2.0 | 5 votes |
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 17
Source File: EventLogger.java From K-Sonic with MIT License | 5 votes |
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 18
Source File: EventLogger.java From evercam-android with GNU Affero General Public License v3.0 | 5 votes |
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 19
Source File: EventLogger.java From PowerFileExplorer with GNU General Public License v3.0 | 5 votes |
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 20
Source File: MappingTrackSelector.java From MediaSDK with Apache License 2.0 | 5 votes |
/** * 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; }