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
d75ce5c4
Commit
d75ce5c4
authored
Feb 17, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
faad: renamed internal functions
"aac" -> "faad"
parent
943b17c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
faad_plugin.c
src/decoder/faad_plugin.c
+12
-12
No files found.
src/decoder/faad_plugin.c
View file @
d75ce5c4
...
...
@@ -39,7 +39,7 @@ struct faad_buffer {
};
static
void
aac
_buffer_shift
(
struct
faad_buffer
*
b
,
size_t
length
)
faad
_buffer_shift
(
struct
faad_buffer
*
b
,
size_t
length
)
{
assert
(
length
>=
b
->
consumed
);
assert
(
length
<=
b
->
consumed
+
b
->
length
);
...
...
@@ -58,7 +58,7 @@ faad_buffer_fill(struct faad_buffer *b)
size_t
rest
,
bread
;
if
(
b
->
consumed
>
0
)
aac
_buffer_shift
(
b
,
b
->
consumed
);
faad
_buffer_shift
(
b
,
b
->
consumed
);
rest
=
sizeof
(
b
->
data
)
-
b
->
length
;
if
(
rest
==
0
)
...
...
@@ -120,7 +120,7 @@ adts_find_frame(struct faad_buffer *b)
while
((
p
=
memchr
(
b
->
data
,
0xff
,
b
->
length
))
!=
NULL
)
{
/* discard data before 0xff */
if
(
p
>
b
->
data
)
aac
_buffer_shift
(
b
,
p
-
b
->
data
);
faad
_buffer_shift
(
b
,
p
-
b
->
data
);
if
(
b
->
length
<=
7
)
/* not enough data yet */
...
...
@@ -134,16 +134,16 @@ adts_find_frame(struct faad_buffer *b)
/* it's just some random 0xff byte; discard and and
continue searching */
aac
_buffer_shift
(
b
,
1
);
faad
_buffer_shift
(
b
,
1
);
}
/* nothing at all; discard the whole buffer */
aac
_buffer_shift
(
b
,
b
->
length
);
faad
_buffer_shift
(
b
,
b
->
length
);
return
0
;
}
static
void
adts
Parse
(
struct
faad_buffer
*
b
,
float
*
length
)
adts
_song_duration
(
struct
faad_buffer
*
b
,
float
*
length
)
{
unsigned
int
frames
,
frame_length
;
unsigned
sample_rate
=
0
;
...
...
@@ -183,7 +183,7 @@ faad_buffer_init(struct faad_buffer *buffer, struct decoder *decoder,
}
static
void
aac_parse_header
(
struct
faad_buffer
*
b
,
float
*
length
)
faad_song_duration
(
struct
faad_buffer
*
b
,
float
*
length
)
{
size_t
fileread
;
size_t
tagsize
;
...
...
@@ -210,7 +210,7 @@ aac_parse_header(struct faad_buffer *b, float *length)
if
(
b
->
is
->
seekable
&&
b
->
length
>=
2
&&
(
b
->
data
[
0
]
==
0xFF
)
&&
((
b
->
data
[
1
]
&
0xF6
)
==
0xF0
))
{
adts
Parse
(
b
,
length
);
adts
_song_duration
(
b
,
length
);
input_stream_seek
(
b
->
is
,
tagsize
,
SEEK_SET
);
b
->
length
=
0
;
...
...
@@ -263,7 +263,7 @@ faad_get_file_time_float(const char *file)
return
-
1
;
faad_buffer_init
(
&
buffer
,
NULL
,
&
is
);
aac_parse_header
(
&
buffer
,
&
length
);
faad_song_duration
(
&
buffer
,
&
length
);
if
(
length
<
0
)
{
decoder
=
faacDecOpen
();
...
...
@@ -304,7 +304,7 @@ faad_get_file_time(const char *file)
}
static
void
aac
_stream_decode
(
struct
decoder
*
mpd_decoder
,
struct
input_stream
*
is
)
faad
_stream_decode
(
struct
decoder
*
mpd_decoder
,
struct
input_stream
*
is
)
{
float
file_time
;
float
total_time
=
0
;
...
...
@@ -331,7 +331,7 @@ aac_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
enum
decoder_command
cmd
;
faad_buffer_init
(
&
buffer
,
mpd_decoder
,
is
);
aac_parse_header
(
&
buffer
,
&
total_time
);
faad_song_duration
(
&
buffer
,
&
total_time
);
decoder
=
faacDecOpen
();
...
...
@@ -458,7 +458,7 @@ static const char *const faad_mime_types[] = {
const
struct
decoder_plugin
faad_decoder_plugin
=
{
.
name
=
"faad"
,
.
stream_decode
=
aac
_stream_decode
,
.
stream_decode
=
faad
_stream_decode
,
.
tag_dup
=
faad_tag_dup
,
.
suffixes
=
faad_suffixes
,
.
mime_types
=
faad_mime_types
,
...
...
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