Skip to content

Commit

Permalink
avdevice: Constify all devices
Browse files Browse the repository at this point in the history
This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <[email protected]>
Signed-off-by: James Almer <[email protected]>
  • Loading branch information
mkver authored and jamrial committed Apr 27, 2021
1 parent a04ad24 commit d92f38c
Show file tree
Hide file tree
Showing 34 changed files with 66 additions and 66 deletions.
66 changes: 33 additions & 33 deletions libavdevice/alldevices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/alsa_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/alsa_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/android_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/audiotoolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static av_cold int at_write_trailer(AVFormatContext *avctx)
.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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/avfoundation.m
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ static int avf_close(AVFormatContext *s)
.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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/bktr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/caca.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/decklink_dec_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/decklink_enc_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/dshow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/fbdev_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/fbdev_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/gdigrab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/iec61883.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/kmsgrab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/lavfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/libcdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/libdc1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/openal-dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/opengl_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/oss_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/oss_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/pulse_audio_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/pulse_audio_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/sndio_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/sndio_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/v4l2enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/vfwcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/xcbgrab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/xv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit d92f38c

Please sign in to comment.