Android APIs
public static final class

MediaCodecInfo.VideoCapabilities

extends Object
java.lang.Object
   ↳ android.media.MediaCodecInfo.VideoCapabilities

Class Overview

A class that supports querying the video capabilities of a codec.

Summary

Public Methods
boolean areSizeAndRateSupported(int width, int height, double frameRate)
Returns whether a given video size (width and height) and frameRate combination is supported.
Range<Integer> getBitrateRange()
Returns the range of supported bitrates in bits/second.
int getHeightAlignment()
Returns the alignment requirement for video height (in pixels).
Range<Integer> getSupportedFrameRates()
Returns the range of supported frame rates.
Range<Double> getSupportedFrameRatesFor(int width, int height)
Returns the range of supported video frame rates for a video size.
Range<Integer> getSupportedHeights()
Returns the range of supported video heights.
Range<Integer> getSupportedHeightsFor(int width)
Returns the range of supported video heights for a video width
Range<Integer> getSupportedWidths()
Returns the range of supported video widths.
Range<Integer> getSupportedWidthsFor(int height)
Returns the range of supported video widths for a video height.
int getWidthAlignment()
Returns the alignment requirement for video width (in pixels).
boolean isSizeSupported(int width, int height)
Returns whether a given video size (width and height) is supported.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean areSizeAndRateSupported (int width, int height, double frameRate)

Added in API level 21

Returns whether a given video size (width and height) and frameRate combination is supported.

public Range<Integer> getBitrateRange ()

Added in API level 21

Returns the range of supported bitrates in bits/second.

public int getHeightAlignment ()

Added in API level 21

Returns the alignment requirement for video height (in pixels). This is a power-of-2 value that video height must be a multiple of.

public Range<Integer> getSupportedFrameRates ()

Added in API level 21

Returns the range of supported frame rates.

This is not a performance indicator. Rather, it expresses the limits specified in the coding standard, based on the complexities of encoding material for later playback at a certain frame rate, or the decoding of such material in non-realtime.

public Range<Double> getSupportedFrameRatesFor (int width, int height)

Added in API level 21

Returns the range of supported video frame rates for a video size.

This is not a performance indicator. Rather, it expresses the limits specified in the coding standard, based on the complexities of encoding material of a given size for later playback at a certain frame rate, or the decoding of such material in non-realtime.

Parameters
width the width of the video
height the height of the video

public Range<Integer> getSupportedHeights ()

Added in API level 21

Returns the range of supported video heights.

public Range<Integer> getSupportedHeightsFor (int width)

Added in API level 21

Returns the range of supported video heights for a video width

Parameters
width the width of the video

public Range<Integer> getSupportedWidths ()

Added in API level 21

Returns the range of supported video widths.

public Range<Integer> getSupportedWidthsFor (int height)

Added in API level 21

Returns the range of supported video widths for a video height.

Parameters
height the height of the video

public int getWidthAlignment ()

Added in API level 21

Returns the alignment requirement for video width (in pixels). This is a power-of-2 value that video width must be a multiple of.

public boolean isSizeSupported (int width, int height)

Added in API level 21

Returns whether a given video size (width and height) is supported.