avdevice: Constify all devices

This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-04-19 18:56:01 +02:00 committed by James Almer
parent a04ad248a0
commit d92f38c179
34 changed files with 66 additions and 66 deletions

View File

@ -24,41 +24,41 @@
#include "avdevice.h"
/* devices */
extern AVInputFormat ff_alsa_demuxer;
extern AVOutputFormat ff_alsa_muxer;
extern AVInputFormat ff_android_camera_demuxer;
extern AVOutputFormat ff_audiotoolbox_muxer;
extern AVInputFormat ff_avfoundation_demuxer;
extern AVInputFormat ff_bktr_demuxer;
extern AVOutputFormat ff_caca_muxer;
extern AVInputFormat ff_decklink_demuxer;
extern AVOutputFormat ff_decklink_muxer;
extern AVInputFormat ff_dshow_demuxer;
extern AVInputFormat ff_fbdev_demuxer;
extern AVOutputFormat ff_fbdev_muxer;
extern AVInputFormat ff_gdigrab_demuxer;
extern AVInputFormat ff_iec61883_demuxer;
extern AVInputFormat ff_jack_demuxer;
extern AVInputFormat ff_kmsgrab_demuxer;
extern AVInputFormat ff_lavfi_demuxer;
extern AVInputFormat ff_openal_demuxer;
extern AVOutputFormat ff_opengl_muxer;
extern AVInputFormat ff_oss_demuxer;
extern AVOutputFormat ff_oss_muxer;
extern AVInputFormat ff_pulse_demuxer;
extern AVOutputFormat ff_pulse_muxer;
extern AVOutputFormat ff_sdl2_muxer;
extern AVInputFormat ff_sndio_demuxer;
extern AVOutputFormat ff_sndio_muxer;
extern AVInputFormat ff_v4l2_demuxer;
extern AVOutputFormat ff_v4l2_muxer;
extern AVInputFormat ff_vfwcap_demuxer;
extern AVInputFormat ff_xcbgrab_demuxer;
extern AVOutputFormat ff_xv_muxer;
extern const AVInputFormat ff_alsa_demuxer;
extern const AVOutputFormat ff_alsa_muxer;
extern const AVInputFormat ff_android_camera_demuxer;
extern const AVOutputFormat ff_audiotoolbox_muxer;
extern const AVInputFormat ff_avfoundation_demuxer;
extern const AVInputFormat ff_bktr_demuxer;
extern const AVOutputFormat ff_caca_muxer;
extern const AVInputFormat ff_decklink_demuxer;
extern const AVOutputFormat ff_decklink_muxer;
extern const AVInputFormat ff_dshow_demuxer;
extern const AVInputFormat ff_fbdev_demuxer;
extern const AVOutputFormat ff_fbdev_muxer;
extern const AVInputFormat ff_gdigrab_demuxer;
extern const AVInputFormat ff_iec61883_demuxer;
extern const AVInputFormat ff_jack_demuxer;
extern const AVInputFormat ff_kmsgrab_demuxer;
extern const AVInputFormat ff_lavfi_demuxer;
extern const AVInputFormat ff_openal_demuxer;
extern const AVOutputFormat ff_opengl_muxer;
extern const AVInputFormat ff_oss_demuxer;
extern const AVOutputFormat ff_oss_muxer;
extern const AVInputFormat ff_pulse_demuxer;
extern const AVOutputFormat ff_pulse_muxer;
extern const AVOutputFormat ff_sdl2_muxer;
extern const AVInputFormat ff_sndio_demuxer;
extern const AVOutputFormat ff_sndio_muxer;
extern const AVInputFormat ff_v4l2_demuxer;
extern const AVOutputFormat ff_v4l2_muxer;
extern const AVInputFormat ff_vfwcap_demuxer;
extern const AVInputFormat ff_xcbgrab_demuxer;
extern const AVOutputFormat ff_xv_muxer;
/* external libraries */
extern AVInputFormat ff_libcdio_demuxer;
extern AVInputFormat ff_libdc1394_demuxer;
extern const AVInputFormat ff_libcdio_demuxer;
extern const AVInputFormat ff_libdc1394_demuxer;
#include "libavdevice/outdev_list.c"
#include "libavdevice/indev_list.c"

View File

@ -157,7 +157,7 @@ static const AVClass alsa_demuxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_alsa_demuxer = {
const AVInputFormat ff_alsa_demuxer = {
.name = "alsa",
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio input"),
.priv_data_size = sizeof(AlsaData),

View File

@ -157,7 +157,7 @@ static const AVClass alsa_muxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
};
AVOutputFormat ff_alsa_muxer = {
const AVOutputFormat ff_alsa_muxer = {
.name = "alsa",
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
.priv_data_size = sizeof(AlsaData),

View File

@ -859,7 +859,7 @@ static const AVClass android_camera_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_android_camera_demuxer = {
const AVInputFormat ff_android_camera_demuxer = {
.name = "android_camera",
.long_name = NULL_IF_CONFIG_SMALL("Android camera input device"),
.priv_data_size = sizeof(AndroidCameraCtx),

View File

@ -294,7 +294,7 @@ static const AVClass at_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
};
AVOutputFormat ff_audiotoolbox_muxer = {
const AVOutputFormat ff_audiotoolbox_muxer = {
.name = "audiotoolbox",
.long_name = NULL_IF_CONFIG_SMALL("AudioToolbox output device"),
.priv_data_size = sizeof(ATContext),

View File

@ -1214,7 +1214,7 @@ static const AVClass avf_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_avfoundation_demuxer = {
const AVInputFormat ff_avfoundation_demuxer = {
.name = "avfoundation",
.long_name = NULL_IF_CONFIG_SMALL("AVFoundation input device"),
.priv_data_size = sizeof(AVFContext),

View File

@ -348,7 +348,7 @@ static const AVClass bktr_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_bktr_demuxer = {
const AVInputFormat ff_bktr_demuxer = {
.name = "bktr",
.long_name = NULL_IF_CONFIG_SMALL("video grab"),
.priv_data_size = sizeof(VideoData),

View File

@ -227,7 +227,7 @@ static const AVClass caca_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_caca_muxer = {
const AVOutputFormat ff_caca_muxer = {
.name = "caca",
.long_name = NULL_IF_CONFIG_SMALL("caca (color ASCII art) output device"),
.priv_data_size = sizeof(CACAContext),

View File

@ -101,7 +101,7 @@ static const AVClass decklink_demuxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_decklink_demuxer = {
const AVInputFormat ff_decklink_demuxer = {
.name = "decklink",
.long_name = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink input"),
.flags = AVFMT_NOFILE,

View File

@ -48,7 +48,7 @@ static const AVClass decklink_muxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_decklink_muxer = {
const AVOutputFormat ff_decklink_muxer = {
.name = "decklink",
.long_name = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink output"),
.audio_codec = AV_CODEC_ID_PCM_S16LE,

View File

@ -1328,7 +1328,7 @@ static const AVClass dshow_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_dshow_demuxer = {
const AVInputFormat ff_dshow_demuxer = {
.name = "dshow",
.long_name = NULL_IF_CONFIG_SMALL("DirectShow capture"),
.priv_data_size = sizeof(struct dshow_ctx),

View File

@ -232,7 +232,7 @@ static const AVClass fbdev_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_fbdev_demuxer = {
const AVInputFormat ff_fbdev_demuxer = {
.name = "fbdev",
.long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
.priv_data_size = sizeof(FBDevContext),

View File

@ -205,7 +205,7 @@ static const AVClass fbdev_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_fbdev_muxer = {
const AVOutputFormat ff_fbdev_muxer = {
.name = "fbdev",
.long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
.priv_data_size = sizeof(FBDevContext),

View File

@ -664,7 +664,7 @@ static const AVClass gdigrab_class = {
};
/** gdi grabber device demuxer declaration */
AVInputFormat ff_gdigrab_demuxer = {
const AVInputFormat ff_gdigrab_demuxer = {
.name = "gdigrab",
.long_name = NULL_IF_CONFIG_SMALL("GDI API Windows frame grabber"),
.priv_data_size = sizeof(struct gdigrab),

View File

@ -499,7 +499,7 @@ static const AVClass iec61883_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_iec61883_demuxer = {
const AVInputFormat ff_iec61883_demuxer = {
.name = "iec61883",
.long_name = NULL_IF_CONFIG_SMALL("libiec61883 (new DV1394) A/V input device"),
.priv_data_size = sizeof(struct iec61883_data),

View File

@ -342,7 +342,7 @@ static const AVClass jack_indev_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_jack_demuxer = {
const AVInputFormat ff_jack_demuxer = {
.name = "jack",
.long_name = NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"),
.priv_data_size = sizeof(JackData),

View File

@ -708,7 +708,7 @@ static const AVClass kmsgrab_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_kmsgrab_demuxer = {
const AVInputFormat ff_kmsgrab_demuxer = {
.name = "kmsgrab",
.long_name = NULL_IF_CONFIG_SMALL("KMS screen capture"),
.priv_data_size = sizeof(KMSGrabContext),

View File

@ -494,7 +494,7 @@ static const AVClass lavfi_class = {
.category = AV_CLASS_CATEGORY_DEVICE_INPUT,
};
AVInputFormat ff_lavfi_demuxer = {
const AVInputFormat ff_lavfi_demuxer = {
.name = "lavfi",
.long_name = NULL_IF_CONFIG_SMALL("Libavfilter virtual input device"),
.priv_data_size = sizeof(LavfiContext),

View File

@ -182,7 +182,7 @@ static const AVClass libcdio_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_libcdio_demuxer = {
const AVInputFormat ff_libcdio_demuxer = {
.name = "libcdio",
.read_header = read_header,
.read_packet = read_packet,

View File

@ -288,7 +288,7 @@ static int dc1394_close(AVFormatContext * context)
return 0;
}
AVInputFormat ff_libdc1394_demuxer = {
const AVInputFormat ff_libdc1394_demuxer = {
.name = "libdc1394",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),

View File

@ -248,7 +248,7 @@ static const AVClass class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_openal_demuxer = {
const AVInputFormat ff_openal_demuxer = {
.name = "openal",
.long_name = NULL_IF_CONFIG_SMALL("OpenAL audio capture device"),
.priv_data_size = sizeof(al_data),

View File

@ -1292,7 +1292,7 @@ static const AVClass opengl_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_opengl_muxer = {
const AVOutputFormat ff_opengl_muxer = {
.name = "opengl",
.long_name = NULL_IF_CONFIG_SMALL("OpenGL output"),
.priv_data_size = sizeof(OpenGLContext),

View File

@ -132,7 +132,7 @@ static const AVClass oss_demuxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_oss_demuxer = {
const AVInputFormat ff_oss_demuxer = {
.name = "oss",
.long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) capture"),
.priv_data_size = sizeof(OSSAudioData),

View File

@ -96,7 +96,7 @@ static const AVClass oss_muxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
};
AVOutputFormat ff_oss_muxer = {
const AVOutputFormat ff_oss_muxer = {
.name = "oss",
.long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) playback"),
.priv_data_size = sizeof(OSSAudioData),

View File

@ -386,7 +386,7 @@ static const AVClass pulse_demuxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_pulse_demuxer = {
const AVInputFormat ff_pulse_demuxer = {
.name = "pulse",
.long_name = NULL_IF_CONFIG_SMALL("Pulse audio input"),
.priv_data_size = sizeof(PulseData),

View File

@ -778,7 +778,7 @@ static const AVClass pulse_muxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
};
AVOutputFormat ff_pulse_muxer = {
const AVOutputFormat ff_pulse_muxer = {
.name = "pulse",
.long_name = NULL_IF_CONFIG_SMALL("Pulse audio output"),
.priv_data_size = sizeof(PulseData),

View File

@ -355,7 +355,7 @@ static const AVClass sdl2_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_sdl2_muxer = {
const AVOutputFormat ff_sdl2_muxer = {
.name = "sdl,sdl2",
.long_name = NULL_IF_CONFIG_SMALL("SDL2 output device"),
.priv_data_size = sizeof(SDLContext),

View File

@ -109,7 +109,7 @@ static const AVClass sndio_demuxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
};
AVInputFormat ff_sndio_demuxer = {
const AVInputFormat ff_sndio_demuxer = {
.name = "sndio",
.long_name = NULL_IF_CONFIG_SMALL("sndio audio capture"),
.priv_data_size = sizeof(SndioData),

View File

@ -86,7 +86,7 @@ static const AVClass sndio_muxer_class = {
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
};
AVOutputFormat ff_sndio_muxer = {
const AVOutputFormat ff_sndio_muxer = {
.name = "sndio",
.long_name = NULL_IF_CONFIG_SMALL("sndio audio playback"),
.priv_data_size = sizeof(SndioData),

View File

@ -1117,7 +1117,7 @@ static const AVClass v4l2_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
};
AVInputFormat ff_v4l2_demuxer = {
const AVInputFormat ff_v4l2_demuxer = {
.name = "video4linux2,v4l2",
.long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"),
.priv_data_size = sizeof(struct video_data),

View File

@ -109,7 +109,7 @@ static const AVClass v4l2_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_v4l2_muxer = {
const AVOutputFormat ff_v4l2_muxer = {
.name = "video4linux2,v4l2",
.long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"),
.priv_data_size = sizeof(V4L2Context),

View File

@ -482,7 +482,7 @@ static const AVClass vfw_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT
};
AVInputFormat ff_vfwcap_demuxer = {
const AVInputFormat ff_vfwcap_demuxer = {
.name = "vfwcap",
.long_name = NULL_IF_CONFIG_SMALL("VfW video capture"),
.priv_data_size = sizeof(struct vfw_ctx),

View File

@ -900,7 +900,7 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
return 0;
}
AVInputFormat ff_xcbgrab_demuxer = {
const AVInputFormat ff_xcbgrab_demuxer = {
.name = "x11grab",
.long_name = NULL_IF_CONFIG_SMALL("X11 screen capture, using XCB"),
.priv_data_size = sizeof(XCBGrabContext),

View File

@ -376,7 +376,7 @@ static const AVClass xv_class = {
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_xv_muxer = {
const AVOutputFormat ff_xv_muxer = {
.name = "xv",
.long_name = NULL_IF_CONFIG_SMALL("XV (XVideo) output device"),
.priv_data_size = sizeof(XVContext),