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
85a7d1a1
Commit
85a7d1a1
authored
Nov 04, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: removed stream_types
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
parent
59c20e5a
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
0 additions
and
28 deletions
+0
-28
aac_plugin.c
src/decoder/aac_plugin.c
+0
-1
audiofile_plugin.c
src/decoder/audiofile_plugin.c
+0
-1
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+0
-1
flac_plugin.c
src/decoder/flac_plugin.c
+0
-2
mod_plugin.c
src/decoder/mod_plugin.c
+0
-1
mp3_plugin.c
src/decoder/mp3_plugin.c
+0
-1
mp4_plugin.c
src/decoder/mp4_plugin.c
+0
-1
mpc_plugin.c
src/decoder/mpc_plugin.c
+0
-1
oggflac_plugin.c
src/decoder/oggflac_plugin.c
+0
-1
oggvorbis_plugin.c
src/decoder/oggvorbis_plugin.c
+0
-1
wavpack_plugin.c
src/decoder/wavpack_plugin.c
+0
-1
decoder_api.h
src/decoder_api.h
+0
-8
decoder_thread.c
src/decoder_thread.c
+0
-8
No files found.
src/decoder/aac_plugin.c
View file @
85a7d1a1
...
...
@@ -579,7 +579,6 @@ const struct decoder_plugin aacPlugin = {
.
stream_decode
=
aac_stream_decode
,
.
file_decode
=
aac_decode
,
.
tag_dup
=
aacTagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_FILE
|
INPUT_PLUGIN_STREAM_URL
,
.
suffixes
=
aac_suffixes
,
.
mime_types
=
aac_mimeTypes
};
src/decoder/audiofile_plugin.c
View file @
85a7d1a1
...
...
@@ -141,6 +141,5 @@ const struct decoder_plugin audiofilePlugin = {
.
name
=
"audiofile"
,
.
file_decode
=
audiofile_decode
,
.
tag_dup
=
audiofileTagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
audiofileSuffixes
,
};
src/decoder/ffmpeg_plugin.c
View file @
85a7d1a1
...
...
@@ -373,7 +373,6 @@ const struct decoder_plugin ffmpeg_plugin = {
.
try_decode
=
ffmpeg_try_decode
,
.
stream_decode
=
ffmpeg_decode
,
.
tag_dup
=
ffmpeg_tag
,
.
stream_types
=
INPUT_PLUGIN_STREAM_URL
|
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
ffmpeg_suffixes
,
.
mime_types
=
ffmpeg_mime_types
};
src/decoder/flac_plugin.c
View file @
85a7d1a1
...
...
@@ -443,7 +443,6 @@ const struct decoder_plugin oggflacPlugin = {
.
try_decode
=
oggflac_try_decode
,
.
stream_decode
=
oggflac_decode
,
.
tag_dup
=
oggflac_tag_dup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_URL
|
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
oggflac_suffixes
,
.
mime_types
=
oggflac_mime_types
};
...
...
@@ -459,7 +458,6 @@ const struct decoder_plugin flacPlugin = {
.
name
=
"flac"
,
.
stream_decode
=
flac_decode
,
.
tag_dup
=
flacTagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_URL
|
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
flacSuffixes
,
.
mime_types
=
flac_mime_types
};
src/decoder/mod_plugin.c
View file @
85a7d1a1
...
...
@@ -260,6 +260,5 @@ const struct decoder_plugin modPlugin = {
.
finish
=
mod_finishMikMod
,
.
file_decode
=
mod_decode
,
.
tag_dup
=
modTagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
modSuffixes
,
};
src/decoder/mp3_plugin.c
View file @
85a7d1a1
...
...
@@ -1115,7 +1115,6 @@ const struct decoder_plugin mp3Plugin = {
.
init
=
mp3_plugin_init
,
.
stream_decode
=
mp3_decode
,
.
tag_dup
=
mp3_tag_dup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_FILE
|
INPUT_PLUGIN_STREAM_URL
,
.
suffixes
=
mp3_suffixes
,
.
mime_types
=
mp3_mime_types
};
src/decoder/mp4_plugin.c
View file @
85a7d1a1
...
...
@@ -417,7 +417,6 @@ const struct decoder_plugin mp4_plugin = {
.
name
=
"mp4"
,
.
stream_decode
=
mp4_decode
,
.
tag_dup
=
mp4_tag_dup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_FILE
|
INPUT_PLUGIN_STREAM_URL
,
.
suffixes
=
mp4_suffixes
,
.
mime_types
=
mp4_mime_types
,
};
src/decoder/mpc_plugin.c
View file @
85a7d1a1
...
...
@@ -301,6 +301,5 @@ const struct decoder_plugin mpcPlugin = {
.
name
=
"mpc"
,
.
stream_decode
=
mpc_decode
,
.
tag_dup
=
mpcTagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_URL
|
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
mpcSuffixes
,
};
src/decoder/oggflac_plugin.c
View file @
85a7d1a1
...
...
@@ -346,7 +346,6 @@ const struct decoder_plugin oggflacPlugin = {
.
try_decode
=
oggflac_try_decode
,
.
stream_decode
=
oggflac_decode
,
.
tag_dup
=
oggflac_TagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_URL
|
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
oggflac_Suffixes
,
.
mime_types
=
oggflac_mime_types
};
src/decoder/oggvorbis_plugin.c
View file @
85a7d1a1
...
...
@@ -370,7 +370,6 @@ const struct decoder_plugin oggvorbisPlugin = {
.
try_decode
=
oggvorbis_try_decode
,
.
stream_decode
=
oggvorbis_decode
,
.
tag_dup
=
oggvorbis_TagDup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_URL
|
INPUT_PLUGIN_STREAM_FILE
,
.
suffixes
=
oggvorbis_Suffixes
,
.
mime_types
=
oggvorbis_MimeTypes
};
src/decoder/wavpack_plugin.c
View file @
85a7d1a1
...
...
@@ -539,7 +539,6 @@ const struct decoder_plugin wavpack_plugin = {
.
stream_decode
=
wavpack_streamdecode
,
.
file_decode
=
wavpack_filedecode
,
.
tag_dup
=
wavpack_tagdup
,
.
stream_types
=
INPUT_PLUGIN_STREAM_FILE
|
INPUT_PLUGIN_STREAM_URL
,
.
suffixes
=
wavpack_suffixes
,
.
mime_types
=
wavpack_mime_types
};
src/decoder_api.h
View file @
85a7d1a1
...
...
@@ -35,11 +35,6 @@
#include <stdbool.h>
/* valid values for streamTypes in the InputPlugin struct: */
#define INPUT_PLUGIN_STREAM_FILE 0x01
#define INPUT_PLUGIN_STREAM_URL 0x02
enum
decoder_command
{
DECODE_COMMAND_NONE
=
0
,
DECODE_COMMAND_START
,
...
...
@@ -94,9 +89,6 @@ struct decoder_plugin {
*/
struct
tag
*
(
*
tag_dup
)(
const
char
*
file
);
/* one or more of the INPUT_PLUGIN_STREAM_* values OR'd together */
unsigned
char
stream_types
;
/* last element in these arrays must always be a NULL: */
const
char
*
const
*
suffixes
;
const
char
*
const
*
mime_types
;
...
...
src/decoder_thread.c
View file @
85a7d1a1
...
...
@@ -108,8 +108,6 @@ static void decoder_run(void)
while
((
plugin
=
decoder_plugin_from_mime_type
(
input_stream
.
mime
,
next
++
)))
{
if
(
plugin
->
stream_decode
==
NULL
)
continue
;
if
(
!
(
plugin
->
stream_types
&
INPUT_PLUGIN_STREAM_URL
))
continue
;
if
(
!
decoder_try_decode
(
plugin
,
&
input_stream
))
continue
;
ret
=
plugin
->
stream_decode
(
&
decoder
,
&
input_stream
);
...
...
@@ -123,9 +121,6 @@ static void decoder_run(void)
while
((
plugin
=
decoder_plugin_from_suffix
(
s
,
next
++
)))
{
if
(
plugin
->
stream_decode
==
NULL
)
continue
;
if
(
!
(
plugin
->
stream_types
&
INPUT_PLUGIN_STREAM_URL
))
continue
;
if
(
!
decoder_try_decode
(
plugin
,
&
input_stream
))
continue
;
decoder
.
plugin
=
plugin
;
...
...
@@ -150,9 +145,6 @@ static void decoder_run(void)
unsigned
int
next
=
0
;
const
char
*
s
=
getSuffix
(
uri
);
while
((
plugin
=
decoder_plugin_from_suffix
(
s
,
next
++
)))
{
if
(
!
plugin
->
stream_types
&
INPUT_PLUGIN_STREAM_FILE
)
continue
;
if
(
!
decoder_try_decode
(
plugin
,
&
input_stream
))
continue
;
...
...
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