Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
ce3bb7a1
Commit
ce3bb7a1
authored
Jun 02, 2015
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
faad: update file, function and struct names
parent
4aa9e1ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
34 deletions
+33
-34
configure.ac
configure.ac
+1
-2
modules/codec/faad.c
modules/codec/faad.c
+32
-32
No files found.
configure.ac
View file @
ce3bb7a1
...
...
@@ -2512,8 +2512,7 @@ AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default auto)])
have_faad="no"
AS_IF([test "${enable_faad}" != "no"], [
AC_CHECK_HEADERS([faad.h], [
AC_CHECK_LIB(faad, faacDecOpen, [have_faad="yes"],, [$LIBM])
AC_CHECK_HEADERS([neaacdec.h], [
AC_CHECK_LIB(faad, NeAACDecOpen, [have_faad="yes"],, [$LIBM])
AS_IF([test "${have_faad}" = "yes"], [
...
...
modules/codec/faad.c
View file @
ce3bb7a1
...
...
@@ -40,7 +40,7 @@
#include <vlc_codec.h>
#include <vlc_cpu.h>
#include <
faad
.h>
#include <
neaacdec
.h>
/*****************************************************************************
* Module descriptor
...
...
@@ -67,7 +67,7 @@ static void DoReordering( uint32_t *, uint32_t *, int, int, uint32_t * );
struct
decoder_sys_t
{
/* faad handler */
faac
DecHandle
*
hfaad
;
NeAAC
DecHandle
*
hfaad
;
/* samples */
date_t
date
;
...
...
@@ -123,7 +123,7 @@ static int Open( vlc_object_t *p_this )
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_sys_t
*
p_sys
;
faac
DecConfiguration
*
cfg
;
NeAAC
DecConfiguration
*
cfg
;
if
(
p_dec
->
fmt_in
.
i_codec
!=
VLC_CODEC_MP4A
)
{
...
...
@@ -135,7 +135,7 @@ static int Open( vlc_object_t *p_this )
return
VLC_ENOMEM
;
/* Open a faad context */
if
(
(
p_sys
->
hfaad
=
faac
DecOpen
()
)
==
NULL
)
if
(
(
p_sys
->
hfaad
=
NeAAC
DecOpen
()
)
==
NULL
)
{
msg_Err
(
p_dec
,
"cannot initialize faad"
);
free
(
p_sys
);
...
...
@@ -157,12 +157,12 @@ static int Open( vlc_object_t *p_this )
unsigned
long
i_rate
;
unsigned
char
i_channels
;
if
(
faac
DecInit2
(
p_sys
->
hfaad
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
&
i_rate
,
&
i_channels
)
<
0
)
if
(
NeAAC
DecInit2
(
p_sys
->
hfaad
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
&
i_rate
,
&
i_channels
)
<
0
)
{
msg_Err
(
p_dec
,
"Failed to initialize faad using extra data"
);
faac
DecClose
(
p_sys
->
hfaad
);
NeAAC
DecClose
(
p_sys
->
hfaad
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -182,11 +182,11 @@ static int Open( vlc_object_t *p_this )
}
/* Set the faad config */
cfg
=
faac
DecGetCurrentConfiguration
(
p_sys
->
hfaad
);
cfg
=
NeAAC
DecGetCurrentConfiguration
(
p_sys
->
hfaad
);
if
(
p_dec
->
fmt_in
.
audio
.
i_rate
)
cfg
->
defSampleRate
=
p_dec
->
fmt_in
.
audio
.
i_rate
;
cfg
->
outputFormat
=
HAVE_FPU
?
FAAD_FMT_FLOAT
:
FAAD_FMT_16BIT
;
faac
DecSetConfiguration
(
p_sys
->
hfaad
,
cfg
);
NeAAC
DecSetConfiguration
(
p_sys
->
hfaad
,
cfg
);
/* buffer */
p_sys
->
i_buffer
=
p_sys
->
i_buffer_size
=
0
;
...
...
@@ -266,9 +266,9 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
unsigned
long
i_rate
;
unsigned
char
i_channels
;
if
(
faac
DecInit2
(
p_sys
->
hfaad
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
&
i_rate
,
&
i_channels
)
>=
0
)
if
(
NeAAC
DecInit2
(
p_sys
->
hfaad
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
&
i_rate
,
&
i_channels
)
>=
0
)
{
p_dec
->
fmt_out
.
audio
.
i_rate
=
i_rate
;
p_dec
->
fmt_out
.
audio
.
i_channels
=
i_channels
;
...
...
@@ -286,9 +286,9 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
unsigned
char
i_channels
;
/* Init faad with the first frame */
if
(
faac
DecInit
(
p_sys
->
hfaad
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
,
&
i_rate
,
&
i_channels
)
<
0
)
if
(
NeAAC
DecInit
(
p_sys
->
hfaad
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
,
&
i_rate
,
&
i_channels
)
<
0
)
{
block_Release
(
p_block
);
return
NULL
;
...
...
@@ -318,15 +318,15 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if
(
p_sys
->
i_buffer
>
1
)
{
void
*
samples
;
faac
DecFrameInfo
frame
;
NeAAC
DecFrameInfo
frame
;
block_t
*
p_out
;
samples
=
faac
DecDecode
(
p_sys
->
hfaad
,
&
frame
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
);
samples
=
NeAAC
DecDecode
(
p_sys
->
hfaad
,
&
frame
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
);
if
(
frame
.
error
>
0
)
{
msg_Warn
(
p_dec
,
"%s"
,
faac
DecGetErrorMessage
(
frame
.
error
)
);
msg_Warn
(
p_dec
,
"%s"
,
NeAAC
DecGetErrorMessage
(
frame
.
error
)
);
if
(
frame
.
error
==
21
||
frame
.
error
==
12
)
{
...
...
@@ -338,28 +338,28 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
*/
unsigned
long
i_rate
;
unsigned
char
i_channels
;
faac
DecHandle
*
hfaad
;
faac
DecConfiguration
*
cfg
,
*
oldcfg
;
NeAAC
DecHandle
*
hfaad
;
NeAAC
DecConfiguration
*
cfg
,
*
oldcfg
;
oldcfg
=
faac
DecGetCurrentConfiguration
(
p_sys
->
hfaad
);
hfaad
=
faac
DecOpen
();
cfg
=
faac
DecGetCurrentConfiguration
(
hfaad
);
oldcfg
=
NeAAC
DecGetCurrentConfiguration
(
p_sys
->
hfaad
);
hfaad
=
NeAAC
DecOpen
();
cfg
=
NeAAC
DecGetCurrentConfiguration
(
hfaad
);
if
(
oldcfg
->
defSampleRate
)
cfg
->
defSampleRate
=
oldcfg
->
defSampleRate
;
cfg
->
defObjectType
=
oldcfg
->
defObjectType
;
cfg
->
outputFormat
=
oldcfg
->
outputFormat
;
faac
DecSetConfiguration
(
hfaad
,
cfg
);
NeAAC
DecSetConfiguration
(
hfaad
,
cfg
);
if
(
faac
DecInit
(
hfaad
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
,
&
i_rate
,
&
i_channels
)
<
0
)
if
(
NeAAC
DecInit
(
hfaad
,
p_sys
->
p_buffer
,
p_sys
->
i_buffer
,
&
i_rate
,
&
i_channels
)
<
0
)
{
/* reinitialization failed */
faac
DecClose
(
hfaad
);
faac
DecSetConfiguration
(
p_sys
->
hfaad
,
oldcfg
);
NeAAC
DecClose
(
hfaad
);
NeAAC
DecSetConfiguration
(
p_sys
->
hfaad
,
oldcfg
);
}
else
{
faac
DecClose
(
p_sys
->
hfaad
);
NeAAC
DecClose
(
p_sys
->
hfaad
);
p_sys
->
hfaad
=
hfaad
;
p_dec
->
fmt_out
.
audio
.
i_rate
=
i_rate
;
p_dec
->
fmt_out
.
audio
.
i_channels
=
i_channels
;
...
...
@@ -522,7 +522,7 @@ static void Close( vlc_object_t *p_this )
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
faac
DecClose
(
p_sys
->
hfaad
);
NeAAC
DecClose
(
p_sys
->
hfaad
);
free
(
p_sys
->
p_buffer
);
free
(
p_sys
);
}
...
...
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