Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0b614fba
Commit
0b614fba
authored
Nov 01, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: make all decoder_plugin structs const
All decoder_plugin structs are initialized at compile time, and must never change.
parent
1a4a3e1f
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
23 deletions
+23
-23
aac_plugin.c
src/decoder/aac_plugin.c
+1
-1
audiofile_plugin.c
src/decoder/audiofile_plugin.c
+1
-1
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+1
-1
flac_plugin.c
src/decoder/flac_plugin.c
+2
-2
mod_plugin.c
src/decoder/mod_plugin.c
+1
-1
mp3_plugin.c
src/decoder/mp3_plugin.c
+1
-1
mp4_plugin.c
src/decoder/mp4_plugin.c
+1
-1
mpc_plugin.c
src/decoder/mpc_plugin.c
+1
-1
oggflac_plugin.c
src/decoder/oggflac_plugin.c
+1
-1
oggvorbis_plugin.c
src/decoder/oggvorbis_plugin.c
+1
-1
wavpack_plugin.c
src/decoder/wavpack_plugin.c
+1
-1
decoder_list.c
src/decoder_list.c
+11
-11
No files found.
src/decoder/aac_plugin.c
View file @
0b614fba
...
...
@@ -589,7 +589,7 @@ static struct tag *aacTagDup(const char *file)
static
const
char
*
aac_suffixes
[]
=
{
"aac"
,
NULL
};
static
const
char
*
aac_mimeTypes
[]
=
{
"audio/aac"
,
"audio/aacp"
,
NULL
};
struct
decoder_plugin
aacPlugin
=
{
const
struct
decoder_plugin
aacPlugin
=
{
.
name
=
"aac"
,
.
stream_decode
=
aac_stream_decode
,
.
file_decode
=
aac_decode
,
...
...
src/decoder/audiofile_plugin.c
View file @
0b614fba
...
...
@@ -135,7 +135,7 @@ static struct tag *audiofileTagDup(const char *file)
static
const
char
*
audiofileSuffixes
[]
=
{
"wav"
,
"au"
,
"aiff"
,
"aif"
,
NULL
};
struct
decoder_plugin
audiofilePlugin
=
{
const
struct
decoder_plugin
audiofilePlugin
=
{
.
name
=
"audiofile"
,
.
file_decode
=
audiofile_decode
,
.
tag_dup
=
audiofileTagDup
,
...
...
src/decoder/ffmpeg_plugin.c
View file @
0b614fba
...
...
@@ -380,7 +380,7 @@ static const char *ffmpeg_Mimetypes[] = {
NULL
};
struct
decoder_plugin
ffmpegPlugin
=
{
const
struct
decoder_plugin
ffmpegPlugin
=
{
.
name
=
"ffmpeg"
,
.
init
=
ffmpeg_init
,
.
try_decode
=
ffmpeg_try_decode
,
...
...
src/decoder/flac_plugin.c
View file @
0b614fba
...
...
@@ -435,7 +435,7 @@ static const char *oggflac_mime_types[] = { "audio/x-flac+ogg",
"application/x-ogg"
,
NULL
};
struct
decoder_plugin
oggflacPlugin
=
{
const
struct
decoder_plugin
oggflacPlugin
=
{
.
name
=
"oggflac"
,
.
try_decode
=
oggflac_try_decode
,
.
stream_decode
=
oggflac_decode
,
...
...
@@ -452,7 +452,7 @@ static const char *flac_mime_types[] = { "audio/x-flac",
"application/x-flac"
,
NULL
};
struct
decoder_plugin
flacPlugin
=
{
const
struct
decoder_plugin
flacPlugin
=
{
.
name
=
"flac"
,
.
stream_decode
=
flac_decode
,
.
tag_dup
=
flacTagDup
,
...
...
src/decoder/mod_plugin.c
View file @
0b614fba
...
...
@@ -281,7 +281,7 @@ static const char *modSuffixes[] = { "amf",
NULL
};
struct
decoder_plugin
modPlugin
=
{
const
struct
decoder_plugin
modPlugin
=
{
.
name
=
"mod"
,
.
finish
=
mod_finishMikMod
,
.
file_decode
=
mod_decode
,
...
...
src/decoder/mp3_plugin.c
View file @
0b614fba
...
...
@@ -1146,7 +1146,7 @@ static struct tag *mp3_tag_dup(const char *file)
static
const
char
*
mp3_suffixes
[]
=
{
"mp3"
,
"mp2"
,
NULL
};
static
const
char
*
mp3_mime_types
[]
=
{
"audio/mpeg"
,
NULL
};
struct
decoder_plugin
mp3Plugin
=
{
const
struct
decoder_plugin
mp3Plugin
=
{
.
name
=
"mp3"
,
.
init
=
mp3_plugin_init
,
.
stream_decode
=
mp3_decode
,
...
...
src/decoder/mp4_plugin.c
View file @
0b614fba
...
...
@@ -413,7 +413,7 @@ static struct tag *mp4TagDup(const char *file)
static
const
char
*
mp4_suffixes
[]
=
{
"m4a"
,
"mp4"
,
NULL
};
static
const
char
*
mp4_mimeTypes
[]
=
{
"audio/mp4"
,
"audio/m4a"
,
NULL
};
struct
decoder_plugin
mp4Plugin
=
{
const
struct
decoder_plugin
mp4Plugin
=
{
.
name
=
"mp4"
,
.
stream_decode
=
mp4_decode
,
.
tag_dup
=
mp4TagDup
,
...
...
src/decoder/mpc_plugin.c
View file @
0b614fba
...
...
@@ -297,7 +297,7 @@ static struct tag *mpcTagDup(const char *file)
static
const
char
*
mpcSuffixes
[]
=
{
"mpc"
,
NULL
};
struct
decoder_plugin
mpcPlugin
=
{
const
struct
decoder_plugin
mpcPlugin
=
{
.
name
=
"mpc"
,
.
stream_decode
=
mpc_decode
,
.
tag_dup
=
mpcTagDup
,
...
...
src/decoder/oggflac_plugin.c
View file @
0b614fba
...
...
@@ -343,7 +343,7 @@ static const char *oggflac_mime_types[] = { "audio/x-flac+ogg",
"application/x-ogg"
,
NULL
};
struct
decoder_plugin
oggflacPlugin
=
{
const
struct
decoder_plugin
oggflacPlugin
=
{
.
name
=
"oggflac"
,
.
try_decode
=
oggflac_try_decode
,
.
stream_decode
=
oggflac_decode
,
...
...
src/decoder/oggvorbis_plugin.c
View file @
0b614fba
...
...
@@ -374,7 +374,7 @@ static const char *oggvorbis_MimeTypes[] = { "application/ogg",
"application/x-ogg"
,
NULL
};
struct
decoder_plugin
oggvorbisPlugin
=
{
const
struct
decoder_plugin
oggvorbisPlugin
=
{
.
name
=
"oggvorbis"
,
.
try_decode
=
oggvorbis_try_decode
,
.
stream_decode
=
oggvorbis_decode
,
...
...
src/decoder/wavpack_plugin.c
View file @
0b614fba
...
...
@@ -562,7 +562,7 @@ wavpack_filedecode(struct decoder *decoder, const char *fname)
static
char
const
*
wavpackSuffixes
[]
=
{
"wv"
,
NULL
};
static
char
const
*
wavpackMimeTypes
[]
=
{
"audio/x-wavpack"
,
NULL
};
struct
decoder_plugin
wavpackPlugin
=
{
const
struct
decoder_plugin
wavpackPlugin
=
{
.
name
=
"wavpack"
,
.
try_decode
=
wavpack_trydecode
,
.
stream_decode
=
wavpack_streamdecode
,
...
...
src/decoder_list.c
View file @
0b614fba
...
...
@@ -21,17 +21,17 @@
#include <glib.h>
extern
struct
decoder_plugin
mp3Plugin
;
extern
struct
decoder_plugin
oggvorbisPlugin
;
extern
struct
decoder_plugin
flacPlugin
;
extern
struct
decoder_plugin
oggflacPlugin
;
extern
struct
decoder_plugin
audiofilePlugin
;
extern
struct
decoder_plugin
mp4Plugin
;
extern
struct
decoder_plugin
aacPlugin
;
extern
struct
decoder_plugin
mpcPlugin
;
extern
struct
decoder_plugin
wavpackPlugin
;
extern
struct
decoder_plugin
modPlugin
;
extern
struct
decoder_plugin
ffmpegPlugin
;
extern
const
struct
decoder_plugin
mp3Plugin
;
extern
const
struct
decoder_plugin
oggvorbisPlugin
;
extern
const
struct
decoder_plugin
flacPlugin
;
extern
const
struct
decoder_plugin
oggflacPlugin
;
extern
const
struct
decoder_plugin
audiofilePlugin
;
extern
const
struct
decoder_plugin
mp4Plugin
;
extern
const
struct
decoder_plugin
aacPlugin
;
extern
const
struct
decoder_plugin
mpcPlugin
;
extern
const
struct
decoder_plugin
wavpackPlugin
;
extern
const
struct
decoder_plugin
modPlugin
;
extern
const
struct
decoder_plugin
ffmpegPlugin
;
static
const
struct
decoder_plugin
*
const
decoder_plugins
[]
=
{
#ifdef HAVE_MAD
...
...
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