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
ebf481e1
Commit
ebf481e1
authored
Sep 04, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ogg_common: rename to ogg_codec.c
parent
5a52e913
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
Makefile.am
Makefile.am
+1
-1
flac_decoder_plugin.c
src/decoder/flac_decoder_plugin.c
+3
-3
ogg_codec.c
src/decoder/ogg_codec.c
+6
-6
ogg_codec.h
src/decoder/ogg_codec.h
+7
-7
vorbis_decoder_plugin.c
src/decoder/vorbis_decoder_plugin.c
+3
-3
No files found.
Makefile.am
View file @
ebf481e1
...
...
@@ -588,7 +588,7 @@ endif
if
HAVE_OGG_COMMON
libdecoder_plugins_a_SOURCES
+=
\
src/decoder/ogg_co
mmon.c src/decoder/ogg_common
.h
src/decoder/ogg_co
dec.c src/decoder/ogg_codec
.h
endif
if
HAVE_FLAC_COMMON
...
...
src/decoder/flac_decoder_plugin.c
View file @
ebf481e1
...
...
@@ -23,7 +23,7 @@
#include "flac_metadata.h"
#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7
#include "ogg_co
mmon
.h"
#include "ogg_co
dec
.h"
#endif
#include <glib.h>
...
...
@@ -433,10 +433,10 @@ oggflac_scan_file(const char *file,
static
void
oggflac_decode
(
struct
decoder
*
decoder
,
struct
input_stream
*
input_stream
)
{
if
(
ogg_
stream_type_detect
(
decoder
,
input_stream
)
!=
FLAC
)
if
(
ogg_
codec_detect
(
decoder
,
input_stream
)
!=
OGG_CODEC_
FLAC
)
return
;
/* rewind the stream, because ogg_
stream_type
_detect() has
/* rewind the stream, because ogg_
codec
_detect() has
moved it */
input_stream_lock_seek
(
input_stream
,
0
,
SEEK_SET
,
NULL
);
...
...
src/decoder/ogg_co
mmon
.c
→
src/decoder/ogg_co
dec
.c
View file @
ebf481e1
...
...
@@ -22,10 +22,10 @@
*/
#include "config.h"
#include "ogg_co
mmon
.h"
#include "ogg_co
dec
.h"
enum
ogg_
stream_type
ogg_
stream_type
_detect
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
)
enum
ogg_
codec
ogg_
codec
_detect
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
)
{
/* oggflac detection based on code in ogg123 and this post
* http://lists.xiph.org/pipermail/flac/2004-December/000393.html
...
...
@@ -33,13 +33,13 @@ ogg_stream_type_detect(struct decoder *decoder, struct input_stream *is)
unsigned
char
buf
[
41
];
size_t
r
=
decoder_read
(
decoder
,
is
,
buf
,
sizeof
(
buf
));
if
(
r
<
sizeof
(
buf
)
||
memcmp
(
buf
,
"OggS"
,
4
)
!=
0
)
return
VORBIS
;
return
OGG_CODEC_
VORBIS
;
if
((
memcmp
(
buf
+
29
,
"FLAC"
,
4
)
==
0
&&
memcmp
(
buf
+
37
,
"fLaC"
,
4
)
==
0
)
||
memcmp
(
buf
+
28
,
"FLAC"
,
4
)
==
0
||
memcmp
(
buf
+
28
,
"fLaC"
,
4
)
==
0
)
return
FLAC
;
return
OGG_CODEC_
FLAC
;
return
VORBIS
;
return
OGG_CODEC_
VORBIS
;
}
src/decoder/ogg_co
mmon
.h
→
src/decoder/ogg_co
dec
.h
View file @
ebf481e1
...
...
@@ -21,17 +21,17 @@
* Common functions used for Ogg data streams (Ogg-Vorbis and OggFLAC)
*/
#ifndef MPD_OGG_CO
MMON
_H
#define MPD_OGG_CO
MMON
_H
#ifndef MPD_OGG_CO
DEC
_H
#define MPD_OGG_CO
DEC
_H
#include "decoder_api.h"
enum
ogg_
stream_type
{
VORBIS
,
FLAC
,
enum
ogg_
codec
{
OGG_CODEC_
VORBIS
,
OGG_CODEC_
FLAC
,
};
enum
ogg_
stream_type
ogg_
stream_type
_detect
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
);
enum
ogg_
codec
ogg_
codec
_detect
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
);
#endif
/* _OGG_COMMON_H */
src/decoder/vorbis_decoder_plugin.c
View file @
ebf481e1
...
...
@@ -19,7 +19,7 @@
#include "config.h"
#include "vorbis_comments.h"
#include "ogg_co
mmon
.h"
#include "ogg_co
dec
.h"
#include "audio_check.h"
#include "uri.h"
#include "tag_handler.h"
...
...
@@ -184,10 +184,10 @@ vorbis_stream_decode(struct decoder *decoder,
const
vorbis_info
*
vi
;
enum
decoder_command
cmd
=
DECODE_COMMAND_NONE
;
if
(
ogg_
stream_type_detect
(
decoder
,
input_stream
)
!=
VORBIS
)
if
(
ogg_
codec_detect
(
decoder
,
input_stream
)
!=
OGG_CODEC_
VORBIS
)
return
;
/* rewind the stream, because ogg_
stream_type
_detect() has
/* rewind the stream, because ogg_
codec
_detect() has
moved it */
input_stream_lock_seek
(
input_stream
,
0
,
SEEK_SET
,
NULL
);
...
...
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