aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/avdevice.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-12-13 20:25:42 +0100
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-12-14 23:55:41 +0100
commit279412c83340584a32f08a4afa0f81fb50061853 (patch)
treea6d30c6807be98fdb31e1375e77492c4820a6478 /libavdevice/avdevice.c
parent829099545bf32c28236f8caa5558b81d25efcf91 (diff)
downloadffmpeg-279412c83340584a32f08a4afa0f81fb50061853.tar.gz
lavd/avdevice: use better option types for caps options
Using dedicated types allows to use format/layout names, not just raw int values. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavdevice/avdevice.c')
-rw-r--r--libavdevice/avdevice.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 755f251727..fda3cd0354 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -32,16 +32,16 @@
const AVOption av_device_capabilities[] = {
{ "codec", "codec", OFFSET(codec), AV_OPT_TYPE_INT,
{.i64 = AV_CODEC_ID_NONE}, AV_CODEC_ID_NONE, INT_MAX, E|D|A|V },
- { "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_INT,
- {.i64 = AV_SAMPLE_FMT_NONE}, -1, INT_MAX, E|D|A },
+ { "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_SAMPLE_FMT,
+ {.i64 = AV_SAMPLE_FMT_NONE}, AV_SAMPLE_FMT_NONE, INT_MAX, E|D|A },
{ "sample_rate", "sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT,
{.i64 = -1}, -1, INT_MAX, E|D|A },
{ "channels", "channels", OFFSET(channels), AV_OPT_TYPE_INT,
{.i64 = -1}, -1, INT_MAX, E|D|A },
- { "channel_layout", "channel layout", OFFSET(channel_layout), AV_OPT_TYPE_INT64,
+ { "channel_layout", "channel layout", OFFSET(channel_layout), AV_OPT_TYPE_CHANNEL_LAYOUT,
{.i64 = -1}, -1, INT_MAX, E|D|A },
- { "pixel_format", "pixel format", OFFSET(pixel_format), AV_OPT_TYPE_INT,
- {.i64 = AV_PIX_FMT_NONE}, -1, INT_MAX, E|D|V },
+ { "pixel_format", "pixel format", OFFSET(pixel_format), AV_OPT_TYPE_PIXEL_FMT,
+ {.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, INT_MAX, E|D|V },
{ "window_size", "window size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE,
{.str = NULL}, -1, INT_MAX, E|D|V },
{ "frame_size", "frame size", OFFSET(frame_width), AV_OPT_TYPE_IMAGE_SIZE,