OSDN Git Service

lavd: add categories to device implementations
authorLukasz Marek <lukasz.m.luki@gmail.com>
Sat, 22 Feb 2014 22:32:51 +0000 (23:32 +0100)
committerLukasz Marek <lukasz.m.luki@gmail.com>
Mon, 3 Mar 2014 22:34:46 +0000 (23:34 +0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
28 files changed:
libavdevice/alsa-audio-dec.c
libavdevice/alsa-audio-enc.c
libavdevice/bktr.c
libavdevice/caca.c
libavdevice/decklink_enc_c.c
libavdevice/dshow.c
libavdevice/dv1394.c
libavdevice/fbdev_dec.c
libavdevice/fbdev_enc.c
libavdevice/iec61883.c
libavdevice/jack_audio.c
libavdevice/lavfi.c
libavdevice/libcdio.c
libavdevice/libdc1394.c
libavdevice/openal-dec.c
libavdevice/opengl_enc.c
libavdevice/oss_audio.c
libavdevice/pulse_audio_dec.c
libavdevice/pulse_audio_enc.c
libavdevice/sdl.c
libavdevice/sndio_dec.c
libavdevice/sndio_enc.c
libavdevice/v4l.c
libavdevice/v4l2.c
libavdevice/v4l2enc.c
libavdevice/vfwcap.c
libavdevice/x11grab.c
libavdevice/xv.c

index 03154b0..2cdf356 100644 (file)
@@ -143,6 +143,7 @@ static const AVClass alsa_demuxer_class = {
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_alsa_demuxer = {
index bf56fc4..e42cc8f 100644 (file)
@@ -142,6 +142,13 @@ audio_get_output_timestamp(AVFormatContext *s1, int stream,
     *dts = s->timestamp - delay;
 }
 
+static const AVClass alsa_muxer_class = {
+    .class_name     = "ALSA muxer",
+    .item_name      = av_default_item_name,
+    .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
+};
+
 AVOutputFormat ff_alsa_muxer = {
     .name           = "alsa",
     .long_name      = NULL_IF_CONFIG_SMALL("ALSA audio output"),
@@ -154,4 +161,5 @@ AVOutputFormat ff_alsa_muxer = {
     .write_uncoded_frame = audio_write_frame,
     .get_output_timestamp = audio_get_output_timestamp,
     .flags          = AVFMT_NOFILE,
+    .priv_class     = &alsa_muxer_class,
 };
index 4e25aa6..50dcc7d 100644 (file)
@@ -334,6 +334,7 @@ static const AVClass bktr_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_bktr_demuxer = {
index 0a74701..a118064 100644 (file)
@@ -224,6 +224,7 @@ static const AVClass caca_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
 AVOutputFormat ff_caca_muxer = {
index b98e0b4..7c18043 100644 (file)
@@ -38,6 +38,7 @@ static const AVClass decklink_muxer_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
 AVOutputFormat ff_decklink_muxer = {
index 5293d26..950e313 100644 (file)
@@ -1081,6 +1081,7 @@ static const AVClass dshow_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_dshow_demuxer = {
index 0af5ea5..c8241e3 100644 (file)
@@ -224,6 +224,7 @@ static const AVClass dv1394_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_dv1394_demuxer = {
index 14ebab3..01bc7c6 100644 (file)
@@ -217,6 +217,7 @@ static const AVClass fbdev_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_fbdev_demuxer = {
index 8291b59..0fd1c66 100644 (file)
@@ -196,6 +196,7 @@ static const AVClass fbdev_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
 AVOutputFormat ff_fbdev_muxer = {
index a63566e..92b9dc2 100644 (file)
@@ -483,6 +483,7 @@ static const AVClass iec61883_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_iec61883_demuxer = {
index 5ba6731..67f7ac7 100644 (file)
@@ -333,6 +333,7 @@ static const AVClass jack_indev_class = {
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_jack_demuxer = {
index a177ad0..1ea7ea7 100644 (file)
@@ -425,6 +425,7 @@ static const AVClass lavfi_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_INPUT,
 };
 
 AVInputFormat ff_lavfi_demuxer = {
index 91052cc..16a4b26 100644 (file)
@@ -177,6 +177,7 @@ static const AVClass libcdio_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_libcdio_demuxer = {
index 80cb1be..e9bd4c9 100644 (file)
@@ -112,6 +112,7 @@ static const AVClass libdc1394_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 
index 93633ff..4c4ba28 100644 (file)
@@ -236,7 +236,8 @@ static const AVClass class = {
     .class_name = "openal",
     .item_name = av_default_item_name,
     .option = options,
-    .version = LIBAVUTIL_VERSION_INT
+    .version = LIBAVUTIL_VERSION_INT,
+    .category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_openal_demuxer = {
index 1b99390..6be0398 100644 (file)
@@ -1272,6 +1272,7 @@ static const AVClass opengl_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
 AVOutputFormat ff_opengl_muxer = {
index 916908c..71bf636 100644 (file)
@@ -296,6 +296,7 @@ static const AVClass oss_demuxer_class = {
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_oss_demuxer = {
@@ -311,6 +312,13 @@ AVInputFormat ff_oss_demuxer = {
 #endif
 
 #if CONFIG_OSS_OUTDEV
+static const AVClass oss_muxer_class = {
+    .class_name     = "OSS muxer",
+    .item_name      = av_default_item_name,
+    .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
+};
+
 AVOutputFormat ff_oss_muxer = {
     .name           = "oss",
     .long_name      = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) playback"),
@@ -324,5 +332,6 @@ AVOutputFormat ff_oss_muxer = {
     .write_packet   = audio_write_packet,
     .write_trailer  = audio_write_trailer,
     .flags          = AVFMT_NOFILE,
+    .priv_class     = &oss_muxer_class,
 };
 #endif
index 3b5cebb..49d6f7e 100644 (file)
@@ -166,6 +166,7 @@ static const AVClass pulse_demuxer_class = {
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_pulse_demuxer = {
index e047299..4fb64ed 100644 (file)
@@ -167,6 +167,7 @@ static const AVClass pulse_muxer_class = {
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
 };
 
 AVOutputFormat ff_pulse_muxer = {
index bef5041..b98aae5 100644 (file)
@@ -358,6 +358,7 @@ static const AVClass sdl_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
 AVOutputFormat ff_sdl_muxer = {
index 806f478..37c6983 100644 (file)
@@ -104,6 +104,7 @@ static const AVClass sndio_demuxer_class = {
     .item_name      = av_default_item_name,
     .option         = options,
     .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
 };
 
 AVInputFormat ff_sndio_demuxer = {
index 84d070e..205cf24 100644 (file)
@@ -76,6 +76,13 @@ static int audio_write_trailer(AVFormatContext *s1)
     return 0;
 }
 
+static const AVClass sndio_muxer_class = {
+    .class_name     = "sndio outdev",
+    .item_name      = av_default_item_name,
+    .version        = LIBAVUTIL_VERSION_INT,
+    .category       = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
+};
+
 AVOutputFormat ff_sndio_muxer = {
     .name           = "sndio",
     .long_name      = NULL_IF_CONFIG_SMALL("sndio audio playback"),
@@ -89,4 +96,5 @@ AVOutputFormat ff_sndio_muxer = {
     .write_packet   = audio_write_packet,
     .write_trailer  = audio_write_trailer,
     .flags          = AVFMT_NOFILE,
+    .priv_class     = &sndio_muxer_class,
 };
index bf2c9e3..d33f714 100644 (file)
@@ -348,6 +348,7 @@ static const AVClass v4l_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_v4l_demuxer = {
index 96a272c..c671e3a 100644 (file)
@@ -1023,6 +1023,7 @@ static const AVClass v4l2_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 AVInputFormat ff_v4l2_demuxer = {
index 21f0ef6..efe08b5 100644 (file)
@@ -97,6 +97,13 @@ static int write_trailer(AVFormatContext *s1)
     return 0;
 }
 
+static const AVClass v4l2_class = {
+    .class_name = "V4L2 outdev",
+    .item_name  = av_default_item_name,
+    .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
+};
+
 AVOutputFormat ff_v4l2_muxer = {
     .name           = "v4l2",
     .long_name      = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"),
@@ -107,4 +114,5 @@ AVOutputFormat ff_v4l2_muxer = {
     .write_packet   = write_packet,
     .write_trailer  = write_trailer,
     .flags          = AVFMT_NOFILE,
+    .priv_class     = &v4l2_class,
 };
index 014f18c..e5d9593 100644 (file)
@@ -469,6 +469,7 @@ static const AVClass vfw_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
 };
 
 AVInputFormat ff_vfwcap_demuxer = {
index 0e7b6ae..d38c55d 100644 (file)
@@ -633,6 +633,7 @@ static const AVClass x11_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
 };
 
 /** x11 grabber device demuxer declaration */
index 89d6575..ab08e3e 100644 (file)
@@ -255,6 +255,7 @@ static const AVClass xv_class = {
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,
+    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
 };
 
 AVOutputFormat ff_xv_muxer = {