mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:21:11 +01:00
avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit
20f9727018 did for AVCodec:
It adds a new type FFOutputFormat, moves all the internals
of AVOutputFormat to it and adds a now reduced AVOutputFormat
as first member.
This does not affect/improve extensibility of both public
or private fields for muxers (it is still a mess due to lavd).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
f23ae839fc
commit
59c9dc82f4
115 changed files with 1731 additions and 1644 deletions
|
|
@ -19,40 +19,41 @@
|
|||
*/
|
||||
|
||||
#include "libavformat/internal.h"
|
||||
#include "libavformat/mux.h"
|
||||
#include "avdevice.h"
|
||||
|
||||
/* devices */
|
||||
extern const AVInputFormat ff_alsa_demuxer;
|
||||
extern const AVOutputFormat ff_alsa_muxer;
|
||||
extern const FFOutputFormat ff_alsa_muxer;
|
||||
extern const AVInputFormat ff_android_camera_demuxer;
|
||||
extern const AVOutputFormat ff_audiotoolbox_muxer;
|
||||
extern const FFOutputFormat ff_audiotoolbox_muxer;
|
||||
extern const AVInputFormat ff_avfoundation_demuxer;
|
||||
extern const AVInputFormat ff_bktr_demuxer;
|
||||
extern const AVOutputFormat ff_caca_muxer;
|
||||
extern const FFOutputFormat ff_caca_muxer;
|
||||
extern const AVInputFormat ff_decklink_demuxer;
|
||||
extern const AVOutputFormat ff_decklink_muxer;
|
||||
extern const FFOutputFormat ff_decklink_muxer;
|
||||
extern const AVInputFormat ff_dshow_demuxer;
|
||||
extern const AVInputFormat ff_fbdev_demuxer;
|
||||
extern const AVOutputFormat ff_fbdev_muxer;
|
||||
extern const FFOutputFormat 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 FFOutputFormat ff_opengl_muxer;
|
||||
extern const AVInputFormat ff_oss_demuxer;
|
||||
extern const AVOutputFormat ff_oss_muxer;
|
||||
extern const FFOutputFormat ff_oss_muxer;
|
||||
extern const AVInputFormat ff_pulse_demuxer;
|
||||
extern const AVOutputFormat ff_pulse_muxer;
|
||||
extern const AVOutputFormat ff_sdl2_muxer;
|
||||
extern const FFOutputFormat ff_pulse_muxer;
|
||||
extern const FFOutputFormat ff_sdl2_muxer;
|
||||
extern const AVInputFormat ff_sndio_demuxer;
|
||||
extern const AVOutputFormat ff_sndio_muxer;
|
||||
extern const FFOutputFormat ff_sndio_muxer;
|
||||
extern const AVInputFormat ff_v4l2_demuxer;
|
||||
extern const AVOutputFormat ff_v4l2_muxer;
|
||||
extern const FFOutputFormat ff_v4l2_muxer;
|
||||
extern const AVInputFormat ff_vfwcap_demuxer;
|
||||
extern const AVInputFormat ff_xcbgrab_demuxer;
|
||||
extern const AVOutputFormat ff_xv_muxer;
|
||||
extern const FFOutputFormat ff_xv_muxer;
|
||||
|
||||
/* external libraries */
|
||||
extern const AVInputFormat ff_libcdio_demuxer;
|
||||
|
|
@ -97,12 +98,12 @@ static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
|
|||
const AVClass *pc;
|
||||
const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_OUTPUT;
|
||||
AVClassCategory category = AV_CLASS_CATEGORY_NA;
|
||||
const AVOutputFormat *fmt = NULL;
|
||||
const FFOutputFormat *fmt = NULL;
|
||||
int i = 0;
|
||||
|
||||
while (prev && (fmt = outdev_list[i])) {
|
||||
i++;
|
||||
if (prev == fmt)
|
||||
if (prev == &fmt->p)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +111,7 @@ static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
|
|||
fmt = outdev_list[i++];
|
||||
if (!fmt)
|
||||
break;
|
||||
pc = fmt->priv_class;
|
||||
pc = fmt->p.priv_class;
|
||||
if (!pc)
|
||||
continue;
|
||||
category = pc->category;
|
||||
|
|
|
|||
|
|
@ -165,18 +165,18 @@ static const AVClass alsa_muxer_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_alsa_muxer = {
|
||||
.name = "alsa",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
|
||||
const FFOutputFormat ff_alsa_muxer = {
|
||||
.p.name = "alsa",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
|
||||
.priv_data_size = sizeof(AlsaData),
|
||||
.audio_codec = DEFAULT_CODEC_ID,
|
||||
.video_codec = AV_CODEC_ID_NONE,
|
||||
.p.audio_codec = DEFAULT_CODEC_ID,
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.write_header = audio_write_header,
|
||||
.write_packet = audio_write_packet,
|
||||
.write_trailer = ff_alsa_close,
|
||||
.write_uncoded_frame = audio_write_frame,
|
||||
.get_device_list = audio_get_device_list,
|
||||
.get_output_timestamp = audio_get_output_timestamp,
|
||||
.flags = AVFMT_NOFILE,
|
||||
.priv_class = &alsa_muxer_class,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &alsa_muxer_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavformat/internal.h"
|
||||
#include "libavformat/mux.h"
|
||||
#include "libavutil/internal.h"
|
||||
#include "avdevice.h"
|
||||
|
||||
|
|
@ -294,15 +295,15 @@ static const AVClass at_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_audiotoolbox_muxer = {
|
||||
.name = "audiotoolbox",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("AudioToolbox output device"),
|
||||
const FFOutputFormat ff_audiotoolbox_muxer = {
|
||||
.p.name = "audiotoolbox",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("AudioToolbox output device"),
|
||||
.priv_data_size = sizeof(ATContext),
|
||||
.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.video_codec = AV_CODEC_ID_NONE,
|
||||
.p.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.write_header = at_write_header,
|
||||
.write_packet = at_write_packet,
|
||||
.write_trailer = at_write_trailer,
|
||||
.flags = AVFMT_NOFILE,
|
||||
.priv_class = &at_class,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &at_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "libavutil/avassert.h"
|
||||
#include "avdevice.h"
|
||||
#include "internal.h"
|
||||
#include "libavformat/mux.h"
|
||||
|
||||
#if FF_API_DEVICE_CAPABILITIES
|
||||
const AVOption av_device_capabilities[] = {
|
||||
|
|
@ -29,9 +30,9 @@ const AVOption av_device_capabilities[] = {
|
|||
int avdevice_app_to_dev_control_message(struct AVFormatContext *s, enum AVAppToDevMessageType type,
|
||||
void *data, size_t data_size)
|
||||
{
|
||||
if (!s->oformat || !s->oformat->control_message)
|
||||
if (!s->oformat || !ffofmt(s->oformat)->control_message)
|
||||
return AVERROR(ENOSYS);
|
||||
return s->oformat->control_message(s, type, data, data_size);
|
||||
return ffofmt(s->oformat)->control_message(s, type, data, data_size);
|
||||
}
|
||||
|
||||
int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type,
|
||||
|
|
@ -61,7 +62,7 @@ int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
|
|||
av_assert0(s);
|
||||
av_assert0(device_list);
|
||||
av_assert0(s->oformat || s->iformat);
|
||||
if ((s->oformat && !s->oformat->get_device_list) ||
|
||||
if ((s->oformat && !ffofmt(s->oformat)->get_device_list) ||
|
||||
(s->iformat && !s->iformat->get_device_list)) {
|
||||
*device_list = NULL;
|
||||
return AVERROR(ENOSYS);
|
||||
|
|
@ -72,7 +73,7 @@ int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
|
|||
/* no default device by default */
|
||||
(*device_list)->default_device = -1;
|
||||
if (s->oformat)
|
||||
ret = s->oformat->get_device_list(s, *device_list);
|
||||
ret = ffofmt(s->oformat)->get_device_list(s, *device_list);
|
||||
else
|
||||
ret = s->iformat->get_device_list(s, *device_list);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <caca.h>
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "libavformat/mux.h"
|
||||
#include "avdevice.h"
|
||||
|
||||
typedef struct CACAContext {
|
||||
|
|
@ -220,15 +221,15 @@ static const AVClass caca_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_caca_muxer = {
|
||||
.name = "caca",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("caca (color ASCII art) output device"),
|
||||
const FFOutputFormat ff_caca_muxer = {
|
||||
.p.name = "caca",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("caca (color ASCII art) output device"),
|
||||
.priv_data_size = sizeof(CACAContext),
|
||||
.audio_codec = AV_CODEC_ID_NONE,
|
||||
.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.p.audio_codec = AV_CODEC_ID_NONE,
|
||||
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.write_header = caca_write_header,
|
||||
.write_packet = caca_write_packet,
|
||||
.deinit = caca_deinit,
|
||||
.flags = AVFMT_NOFILE,
|
||||
.priv_class = &caca_class,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &caca_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavformat/mux.h"
|
||||
#include "libavutil/opt.h"
|
||||
|
||||
#include "decklink_common_c.h"
|
||||
|
|
@ -71,15 +72,15 @@ static const AVClass decklink_muxer_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_decklink_muxer = {
|
||||
.name = "decklink",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink output"),
|
||||
.audio_codec = AV_CODEC_ID_PCM_S16LE,
|
||||
.video_codec = AV_CODEC_ID_WRAPPED_AVFRAME,
|
||||
.subtitle_codec = AV_CODEC_ID_NONE,
|
||||
.flags = AVFMT_NOFILE,
|
||||
const FFOutputFormat ff_decklink_muxer = {
|
||||
.p.name = "decklink",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Blackmagic DeckLink output"),
|
||||
.p.audio_codec = AV_CODEC_ID_PCM_S16LE,
|
||||
.p.video_codec = AV_CODEC_ID_WRAPPED_AVFRAME,
|
||||
.p.subtitle_codec = AV_CODEC_ID_NONE,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &decklink_muxer_class,
|
||||
.get_device_list = ff_decklink_list_output_devices,
|
||||
.priv_class = &decklink_muxer_class,
|
||||
.priv_data_size = sizeof(struct decklink_cctx),
|
||||
.write_header = ff_decklink_write_header,
|
||||
.write_packet = ff_decklink_write_packet,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "libavutil/log.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavformat/mux.h"
|
||||
#include "fbdev_common.h"
|
||||
#include "avdevice.h"
|
||||
|
||||
|
|
@ -206,16 +207,16 @@ static const AVClass fbdev_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_fbdev_muxer = {
|
||||
.name = "fbdev",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
|
||||
const FFOutputFormat ff_fbdev_muxer = {
|
||||
.p.name = "fbdev",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Linux framebuffer"),
|
||||
.priv_data_size = sizeof(FBDevContext),
|
||||
.audio_codec = AV_CODEC_ID_NONE,
|
||||
.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.p.audio_codec = AV_CODEC_ID_NONE,
|
||||
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.write_header = fbdev_write_header,
|
||||
.write_packet = fbdev_write_packet,
|
||||
.write_trailer = fbdev_write_trailer,
|
||||
.get_device_list = fbdev_get_device_list,
|
||||
.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.priv_class = &fbdev_class,
|
||||
.p.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.p.priv_class = &fbdev_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1292,17 +1292,17 @@ static const AVClass opengl_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_opengl_muxer = {
|
||||
.name = "opengl",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("OpenGL output"),
|
||||
const FFOutputFormat ff_opengl_muxer = {
|
||||
.p.name = "opengl",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("OpenGL output"),
|
||||
.p.audio_codec = AV_CODEC_ID_NONE,
|
||||
.p.video_codec = AV_CODEC_ID_WRAPPED_AVFRAME,
|
||||
.p.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.p.priv_class = &opengl_class,
|
||||
.priv_data_size = sizeof(OpenGLContext),
|
||||
.audio_codec = AV_CODEC_ID_NONE,
|
||||
.video_codec = AV_CODEC_ID_WRAPPED_AVFRAME,
|
||||
.write_header = opengl_write_header,
|
||||
.write_packet = opengl_write_packet,
|
||||
.write_uncoded_frame = opengl_write_frame,
|
||||
.write_trailer = opengl_write_trailer,
|
||||
.control_message = opengl_control_message,
|
||||
.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.priv_class = &opengl_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "avdevice.h"
|
||||
#include "libavformat/internal.h"
|
||||
#include "libavformat/mux.h"
|
||||
|
||||
#include "oss.h"
|
||||
|
||||
|
|
@ -94,18 +95,18 @@ static const AVClass oss_muxer_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_oss_muxer = {
|
||||
.name = "oss",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) playback"),
|
||||
const FFOutputFormat ff_oss_muxer = {
|
||||
.p.name = "oss",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) playback"),
|
||||
.priv_data_size = sizeof(OSSAudioData),
|
||||
/* XXX: we make the assumption that the soundcard accepts this format */
|
||||
/* XXX: find better solution with "preinit" method, needed also in
|
||||
other formats */
|
||||
.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.video_codec = AV_CODEC_ID_NONE,
|
||||
.p.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.write_header = audio_write_header,
|
||||
.write_packet = audio_write_packet,
|
||||
.write_trailer = audio_write_trailer,
|
||||
.flags = AVFMT_NOFILE,
|
||||
.priv_class = &oss_muxer_class,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &oss_muxer_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -788,12 +788,12 @@ static const AVClass pulse_muxer_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_pulse_muxer = {
|
||||
.name = "pulse",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Pulse audio output"),
|
||||
const FFOutputFormat ff_pulse_muxer = {
|
||||
.p.name = "pulse",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Pulse audio output"),
|
||||
.priv_data_size = sizeof(PulseData),
|
||||
.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.video_codec = AV_CODEC_ID_NONE,
|
||||
.p.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.write_header = pulse_write_header,
|
||||
.write_packet = pulse_write_packet,
|
||||
.write_uncoded_frame = pulse_write_frame,
|
||||
|
|
@ -801,6 +801,6 @@ const AVOutputFormat ff_pulse_muxer = {
|
|||
.get_output_timestamp = pulse_get_output_timestamp,
|
||||
.get_device_list = pulse_get_device_list,
|
||||
.control_message = pulse_control_message,
|
||||
.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
|
||||
.priv_class = &pulse_muxer_class,
|
||||
.p.flags = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
|
||||
.p.priv_class = &pulse_muxer_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "libavutil/pixdesc.h"
|
||||
#include "libavutil/time.h"
|
||||
#include "avdevice.h"
|
||||
#include "libavformat/mux.h"
|
||||
|
||||
typedef struct {
|
||||
AVClass *class;
|
||||
|
|
@ -355,15 +356,15 @@ static const AVClass sdl2_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_sdl2_muxer = {
|
||||
.name = "sdl,sdl2",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("SDL2 output device"),
|
||||
const FFOutputFormat ff_sdl2_muxer = {
|
||||
.p.name = "sdl,sdl2",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("SDL2 output device"),
|
||||
.priv_data_size = sizeof(SDLContext),
|
||||
.audio_codec = AV_CODEC_ID_NONE,
|
||||
.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.p.audio_codec = AV_CODEC_ID_NONE,
|
||||
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.write_header = sdl2_write_header,
|
||||
.write_packet = sdl2_write_packet,
|
||||
.write_trailer = sdl2_write_trailer,
|
||||
.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.priv_class = &sdl2_class,
|
||||
.p.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.p.priv_class = &sdl2_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "libavutil/internal.h"
|
||||
|
||||
#include "libavformat/mux.h"
|
||||
|
||||
#include "libavdevice/avdevice.h"
|
||||
#include "libavdevice/sndio.h"
|
||||
|
|
@ -86,18 +87,18 @@ static const AVClass sndio_muxer_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_sndio_muxer = {
|
||||
.name = "sndio",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("sndio audio playback"),
|
||||
const FFOutputFormat ff_sndio_muxer = {
|
||||
.p.name = "sndio",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("sndio audio playback"),
|
||||
.priv_data_size = sizeof(SndioData),
|
||||
/* XXX: we make the assumption that the soundcard accepts this format */
|
||||
/* XXX: find better solution with "preinit" method, needed also in
|
||||
other formats */
|
||||
.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.video_codec = AV_CODEC_ID_NONE,
|
||||
.p.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
|
||||
.p.video_codec = AV_CODEC_ID_NONE,
|
||||
.write_header = audio_write_header,
|
||||
.write_packet = audio_write_packet,
|
||||
.write_trailer = audio_write_trailer,
|
||||
.flags = AVFMT_NOFILE,
|
||||
.priv_class = &sndio_muxer_class,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &sndio_muxer_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "libavutil/imgutils.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavformat/mux.h"
|
||||
#include "v4l2-common.h"
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -111,15 +112,15 @@ static const AVClass v4l2_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_v4l2_muxer = {
|
||||
.name = "video4linux2,v4l2",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"),
|
||||
const FFOutputFormat ff_v4l2_muxer = {
|
||||
.p.name = "video4linux2,v4l2",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("Video4Linux2 output device"),
|
||||
.priv_data_size = sizeof(V4L2Context),
|
||||
.audio_codec = AV_CODEC_ID_NONE,
|
||||
.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.p.audio_codec = AV_CODEC_ID_NONE,
|
||||
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
|
||||
.write_header = write_header,
|
||||
.write_packet = write_packet,
|
||||
.write_trailer = write_trailer,
|
||||
.flags = AVFMT_NOFILE,
|
||||
.priv_class = &v4l2_class,
|
||||
.p.flags = AVFMT_NOFILE,
|
||||
.p.priv_class = &v4l2_class,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -376,17 +376,17 @@ static const AVClass xv_class = {
|
|||
.category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
|
||||
};
|
||||
|
||||
const AVOutputFormat ff_xv_muxer = {
|
||||
.name = "xv",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("XV (XVideo) output device"),
|
||||
const FFOutputFormat ff_xv_muxer = {
|
||||
.p.name = "xv",
|
||||
.p.long_name = NULL_IF_CONFIG_SMALL("XV (XVideo) output device"),
|
||||
.p.audio_codec = AV_CODEC_ID_NONE,
|
||||
.p.video_codec = AV_CODEC_ID_WRAPPED_AVFRAME,
|
||||
.p.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.p.priv_class = &xv_class,
|
||||
.priv_data_size = sizeof(XVContext),
|
||||
.audio_codec = AV_CODEC_ID_NONE,
|
||||
.video_codec = AV_CODEC_ID_WRAPPED_AVFRAME,
|
||||
.write_header = xv_write_header,
|
||||
.write_packet = xv_write_packet,
|
||||
.write_uncoded_frame = xv_write_frame,
|
||||
.write_trailer = xv_write_trailer,
|
||||
.control_message = xv_control_message,
|
||||
.flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
|
||||
.priv_class = &xv_class,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue