Following API allows user to probe device capabilities (supported codecs, pixel formats, sample formats, resolutions, channel counts, etc). It is build on top op AVOption API. Queried capabilities make it possible to set up converters of video or audio parameters that fit to the device.
List of capabilities that can be queried:
- Capabilities valid for both audio and video devices:
- codec: supported audio/video codecs. type: AV_OPT_TYPE_INT (AVCodecID value)
- Capabilities valid for audio devices:
- sample_format: supported sample formats. type: AV_OPT_TYPE_INT (AVSampleFormat value)
- sample_rate: supported sample rates. type: AV_OPT_TYPE_INT
- channels: supported number of channels. type: AV_OPT_TYPE_INT
- channel_layout: supported channel layouts. type: AV_OPT_TYPE_INT64
- Capabilities valid for video devices:
- pixel_format: supported pixel formats. type: AV_OPT_TYPE_INT (AVPixelFormat value)
- window_size: supported window sizes (describes size of the window size presented to the user). type: AV_OPT_TYPE_IMAGE_SIZE
- frame_size: supported frame sizes (describes size of provided video frames). type: AV_OPT_TYPE_IMAGE_SIZE
- fps: supported fps values type: AV_OPT_TYPE_RATIONAL
Value of the capability may be set by user using av_opt_set() function and AVDeviceCapabilitiesQuery object. Following queries will limit results to the values matching already set capabilities. For example, setting a codec may impact number of formats or fps values returned during next query. Setting invalid value may limit results to zero.
Example of the usage basing on opengl output device:
int ret;
goto fail;
goto fail;
goto fail;
goto fail;
fail:
Structure describes device capabilities.
It is used by devices in conjunction with av_device_capabilities AVOption table to implement capabilities probing API based on AVOption API. Should not be used directly.