Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
30b4ee79
Commit
30b4ee79
authored
Sep 23, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations.
parent
9ff6d079
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
133 additions
and
159 deletions
+133
-159
alsa-audio-dec.c
libavdevice/alsa-audio-dec.c
+8
-9
alsa-audio-enc.c
libavdevice/alsa-audio-enc.c
+9
-11
bktr.c
libavdevice/bktr.c
+8
-9
jack_audio.c
libavdevice/jack_audio.c
+8
-9
oss_audio.c
libavdevice/oss_audio.c
+17
-20
v4l.c
libavdevice/v4l.c
+8
-9
v4l2.c
libavdevice/v4l2.c
+8
-9
vfwcap.c
libavdevice/vfwcap.c
+8
-9
x11grab.c
libavdevice/x11grab.c
+9
-11
daud.c
libavformat/daud.c
+9
-12
idroqenc.c
libavformat/idroqenc.c
+8
-11
pcmdec.c
libavformat/pcmdec.c
+18
-20
pcmenc.c
libavformat/pcmenc.c
+9
-12
txd.c
libavformat/txd.c
+6
-8
No files found.
libavdevice/alsa-audio-dec.c
View file @
30b4ee79
...
...
@@ -164,13 +164,12 @@ static const AVClass alsa_demuxer_class = {
};
AVInputFormat
ff_alsa_demuxer
=
{
"alsa"
,
NULL_IF_CONFIG_SMALL
(
"ALSA audio input"
),
sizeof
(
AlsaData
),
NULL
,
audio_read_header
,
audio_read_packet
,
ff_alsa_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
alsa_demuxer_class
,
.
name
=
"alsa"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"ALSA audio input"
),
.
priv_data_size
=
sizeof
(
AlsaData
),
.
read_header
=
audio_read_header
,
.
read_packet
=
audio_read_packet
,
.
read_close
=
ff_alsa_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
alsa_demuxer_class
,
};
libavdevice/alsa-audio-enc.c
View file @
30b4ee79
...
...
@@ -102,15 +102,13 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
}
AVOutputFormat
ff_alsa_muxer
=
{
"alsa"
,
NULL_IF_CONFIG_SMALL
(
"ALSA audio output"
),
""
,
""
,
sizeof
(
AlsaData
),
DEFAULT_CODEC_ID
,
CODEC_ID_NONE
,
audio_write_header
,
audio_write_packet
,
ff_alsa_close
,
.
flags
=
AVFMT_NOFILE
,
.
name
=
"alsa"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"ALSA audio output"
),
.
priv_data_size
=
sizeof
(
AlsaData
),
.
audio_codec
=
DEFAULT_CODEC_ID
,
.
video_codec
=
CODEC_ID_NONE
,
.
write_header
=
audio_write_header
,
.
write_packet
=
audio_write_packet
,
.
write_trailer
=
ff_alsa_close
,
.
flags
=
AVFMT_NOFILE
,
};
libavdevice/bktr.c
View file @
30b4ee79
...
...
@@ -345,13 +345,12 @@ static const AVClass bktr_class = {
};
AVInputFormat
ff_bktr_demuxer
=
{
"bktr"
,
NULL_IF_CONFIG_SMALL
(
"video grab"
),
sizeof
(
VideoData
),
NULL
,
grab_read_header
,
grab_read_packet
,
grab_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
bktr_class
,
.
name
=
"bktr"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"video grab"
),
.
priv_data_size
=
sizeof
(
VideoData
),
.
read_header
=
grab_read_header
,
.
read_packet
=
grab_read_packet
,
.
read_close
=
grab_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
bktr_class
,
};
libavdevice/jack_audio.c
View file @
30b4ee79
...
...
@@ -326,13 +326,12 @@ static const AVClass jack_indev_class = {
};
AVInputFormat
ff_jack_demuxer
=
{
"jack"
,
NULL_IF_CONFIG_SMALL
(
"JACK Audio Connection Kit"
),
sizeof
(
JackData
),
NULL
,
audio_read_header
,
audio_read_packet
,
audio_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
jack_indev_class
,
.
name
=
"jack"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"JACK Audio Connection Kit"
),
.
priv_data_size
=
sizeof
(
JackData
),
.
read_header
=
audio_read_header
,
.
read_packet
=
audio_read_packet
,
.
read_close
=
audio_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
jack_indev_class
,
};
libavdevice/oss_audio.c
View file @
30b4ee79
...
...
@@ -295,33 +295,30 @@ static const AVClass oss_demuxer_class = {
};
AVInputFormat
ff_oss_demuxer
=
{
"oss"
,
NULL_IF_CONFIG_SMALL
(
"Open Sound System capture"
),
sizeof
(
AudioData
),
NULL
,
audio_read_header
,
audio_read_packet
,
audio_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
oss_demuxer_class
,
.
name
=
"oss"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Open Sound System capture"
),
.
priv_data_size
=
sizeof
(
AudioData
),
.
read_header
=
audio_read_header
,
.
read_packet
=
audio_read_packet
,
.
read_close
=
audio_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
oss_demuxer_class
,
};
#endif
#if CONFIG_OSS_OUTDEV
AVOutputFormat
ff_oss_muxer
=
{
"oss"
,
NULL_IF_CONFIG_SMALL
(
"Open Sound System playback"
),
""
,
""
,
sizeof
(
AudioData
),
.
name
=
"oss"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Open Sound System playback"
),
.
priv_data_size
=
sizeof
(
AudioData
),
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
AV_NE
(
CODEC_ID_PCM_S16BE
,
CODEC_ID_PCM_S16LE
),
CODEC_ID_NONE
,
audio_write_header
,
audio_write_packet
,
audio_write_trailer
,
.
flags
=
AVFMT_NOFILE
,
.
audio_codec
=
AV_NE
(
CODEC_ID_PCM_S16BE
,
CODEC_ID_PCM_S16LE
),
.
video_codec
=
CODEC_ID_NONE
,
.
write_header
=
audio_write_header
,
.
write_packet
=
audio_write_packet
,
.
write_trailer
=
audio_write_trailer
,
.
flags
=
AVFMT_NOFILE
,
};
#endif
libavdevice/v4l.c
View file @
30b4ee79
...
...
@@ -354,14 +354,13 @@ static const AVClass v4l_class = {
};
AVInputFormat
ff_v4l_demuxer
=
{
"video4linux"
,
NULL_IF_CONFIG_SMALL
(
"Video4Linux device grab"
),
sizeof
(
VideoData
),
NULL
,
grab_read_header
,
grab_read_packet
,
grab_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
v4l_class
,
.
name
=
"video4linux"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Video4Linux device grab"
),
.
priv_data_size
=
sizeof
(
VideoData
),
.
read_header
=
grab_read_header
,
.
read_packet
=
grab_read_packet
,
.
read_close
=
grab_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
v4l_class
,
};
#endif
/* FF_API_V4L */
libavdevice/v4l2.c
View file @
30b4ee79
...
...
@@ -725,13 +725,12 @@ static const AVClass v4l2_class = {
};
AVInputFormat
ff_v4l2_demuxer
=
{
"video4linux2"
,
NULL_IF_CONFIG_SMALL
(
"Video4Linux2 device grab"
),
sizeof
(
struct
video_data
),
NULL
,
v4l2_read_header
,
v4l2_read_packet
,
v4l2_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
v4l2_class
,
.
name
=
"video4linux2"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Video4Linux2 device grab"
),
.
priv_data_size
=
sizeof
(
struct
video_data
),
.
read_header
=
v4l2_read_header
,
.
read_packet
=
v4l2_read_packet
,
.
read_close
=
v4l2_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
v4l2_class
,
};
libavdevice/vfwcap.c
View file @
30b4ee79
...
...
@@ -470,13 +470,12 @@ static const AVClass vfw_class = {
};
AVInputFormat
ff_vfwcap_demuxer
=
{
"vfwcap"
,
NULL_IF_CONFIG_SMALL
(
"VFW video capture"
),
sizeof
(
struct
vfw_ctx
),
NULL
,
vfw_read_header
,
vfw_read_packet
,
vfw_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
vfw_class
,
.
name
=
"vfwcap"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"VfW video capture"
),
.
priv_data_size
=
sizeof
(
struct
vfw_ctx
),
.
read_header
=
vfw_read_header
,
.
read_packet
=
vfw_read_packet
,
.
read_close
=
vfw_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
vfw_class
,
};
libavdevice/x11grab.c
View file @
30b4ee79
...
...
@@ -598,15 +598,13 @@ static const AVClass x11_class = {
};
/** x11 grabber device demuxer declaration */
AVInputFormat
ff_x11_grab_device_demuxer
=
{
"x11grab"
,
NULL_IF_CONFIG_SMALL
(
"X11grab"
),
sizeof
(
struct
x11_grab
),
NULL
,
x11grab_read_header
,
x11grab_read_packet
,
x11grab_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
x11_class
,
AVInputFormat
ff_x11_grab_device_demuxer
=
{
.
name
=
"x11grab"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"X11grab"
),
.
priv_data_size
=
sizeof
(
struct
x11_grab
),
.
read_header
=
x11grab_read_header
,
.
read_packet
=
x11grab_read_packet
,
.
read_close
=
x11grab_read_close
,
.
flags
=
AVFMT_NOFILE
,
.
priv_class
=
&
x11_class
,
};
libavformat/daud.c
View file @
30b4ee79
...
...
@@ -80,17 +80,14 @@ AVInputFormat ff_daud_demuxer = {
#endif
#if CONFIG_DAUD_MUXER
AVOutputFormat
ff_daud_muxer
=
{
"daud"
,
NULL_IF_CONFIG_SMALL
(
"D-Cinema audio format"
),
NULL
,
"302"
,
0
,
CODEC_ID_PCM_S24DAUD
,
CODEC_ID_NONE
,
daud_write_header
,
daud_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
AVOutputFormat
ff_daud_muxer
=
{
.
name
=
"daud"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"D-Cinema audio format"
),
.
extensions
=
"302"
,
.
audio_codec
=
CODEC_ID_PCM_S24DAUD
,
.
video_codec
=
CODEC_ID_NONE
,
.
write_header
=
daud_write_header
,
.
write_packet
=
daud_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
#endif
libavformat/idroqenc.c
View file @
30b4ee79
...
...
@@ -35,15 +35,12 @@ static int roq_write_header(struct AVFormatContext *s)
return
0
;
}
AVOutputFormat
ff_roq_muxer
=
{
"RoQ"
,
NULL_IF_CONFIG_SMALL
(
"raw id RoQ format"
),
NULL
,
"roq"
,
0
,
CODEC_ID_ROQ_DPCM
,
CODEC_ID_ROQ
,
roq_write_header
,
ff_raw_write_packet
,
AVOutputFormat
ff_roq_muxer
=
{
.
name
=
"RoQ"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"raw id RoQ format"
),
.
extensions
=
"roq"
,
.
audio_codec
=
CODEC_ID_ROQ_DPCM
,
.
video_codec
=
CODEC_ID_ROQ
,
.
write_header
=
roq_write_header
,
.
write_packet
=
ff_raw_write_packet
,
};
libavformat/pcmdec.c
View file @
30b4ee79
...
...
@@ -54,26 +54,24 @@ static const AVOption pcm_options[] = {
{
NULL
},
};
#define PCMDEF(name, long_name, ext, codec) \
static const AVClass name ## _demuxer_class = {\
.class_name = #name " demuxer",\
.item_name = av_default_item_name,\
.option = pcm_options,\
.version = LIBAVUTIL_VERSION_INT,\
};\
AVInputFormat ff_pcm_ ## name ## _demuxer = {\
#name,\
NULL_IF_CONFIG_SMALL(long_name),\
sizeof(RawAudioDemuxerContext),\
NULL,\
ff_raw_read_header,\
raw_read_packet,\
NULL,\
pcm_read_seek,\
.flags= AVFMT_GENERIC_INDEX,\
.extensions = ext,\
.value = codec,\
.priv_class = &name ## _demuxer_class,\
#define PCMDEF(name_, long_name_, ext, codec) \
static const AVClass name_ ## _demuxer_class = { \
.class_name = #name_ " demuxer", \
.item_name = av_default_item_name, \
.option = pcm_options, \
.version = LIBAVUTIL_VERSION_INT, \
}; \
AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.priv_data_size = sizeof(RawAudioDemuxerContext), \
.read_header = ff_raw_read_header, \
.read_packet = raw_read_packet, \
.read_seek = pcm_read_seek, \
.flags = AVFMT_GENERIC_INDEX, \
.extensions = ext, \
.value = codec, \
.priv_class = &name_ ## _demuxer_class, \
};
PCMDEF
(
f64be
,
"PCM 64 bit floating-point big-endian format"
,
...
...
libavformat/pcmenc.c
View file @
30b4ee79
...
...
@@ -22,18 +22,15 @@
#include "avformat.h"
#include "rawenc.h"
#define PCMDEF(name, long_name, ext, codec) \
AVOutputFormat ff_pcm_ ## name ## _muxer = {\
#name,\
NULL_IF_CONFIG_SMALL(long_name),\
NULL,\
ext,\
0,\
codec,\
CODEC_ID_NONE,\
NULL,\
ff_raw_write_packet,\
.flags= AVFMT_NOTIMESTAMPS,\
#define PCMDEF(name_, long_name_, ext, codec) \
AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.extensions = ext, \
.audio_codec = codec, \
.video_codec = CODEC_ID_NONE, \
.write_packet = ff_raw_write_packet, \
.flags = AVFMT_NOTIMESTAMPS, \
};
PCMDEF
(
f64be
,
"PCM 64 bit floating-point big-endian format"
,
...
...
libavformat/txd.c
View file @
30b4ee79
...
...
@@ -90,12 +90,10 @@ next_chunk:
return
0
;
}
AVInputFormat
ff_txd_demuxer
=
{
"txd"
,
NULL_IF_CONFIG_SMALL
(
"Renderware TeXture Dictionary"
),
0
,
txd_probe
,
txd_read_header
,
txd_read_packet
,
AVInputFormat
ff_txd_demuxer
=
{
.
name
=
"txd"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Renderware TeXture Dictionary"
),
.
read_probe
=
txd_probe
,
.
read_header
=
txd_read_header
,
.
read_packet
=
txd_read_packet
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment