Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
eaa5f37e
Commit
eaa5f37e
authored
Oct 08, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let the input handle meta data and attachments for musepack audio.
parent
f21326c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
39 deletions
+4
-39
modules/demux/mpc.c
modules/demux/mpc.c
+4
-39
No files found.
modules/demux/mpc.c
View file @
eaa5f37e
...
...
@@ -27,7 +27,6 @@
#include <vlc/vlc.h>
#include <vlc_demux.h>
#include <vlc_input.h>
#include <vlc_meta.h>
#include <vlc_codec.h>
#include <math.h>
...
...
@@ -45,11 +44,6 @@
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define REPLAYGAIN_TYPE_TEXT N_("Replay Gain type" )
#define REPLAYGAIN_TYPE_LONGTEXT N_( "Musepack can have a title-specific " \
"replay gain (volume control) or an album-specific one. " \
"Choose which type you want to use" )
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
...
@@ -80,7 +74,6 @@ struct demux_sys_t
mpc_streaminfo
info
;
/* */
vlc_meta_t
*
p_meta
;
int64_t
i_position
;
};
...
...
@@ -99,7 +92,6 @@ static int Open( vlc_object_t * p_this )
demux_sys_t
*
p_sys
;
es_format_t
fmt
;
const
uint8_t
*
p_peek
;
module_t
*
p_id3
;
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
4
)
<
4
)
return
VLC_EGENERIC
;
...
...
@@ -189,30 +181,6 @@ static int Open( vlc_object_t * p_this )
fmt
.
audio_replay_gain
.
pf_gain
[
AUDIO_REPLAY_GAIN_ALBUM
]
=
(
float
)
p_sys
->
info
.
gain_album
/
100
.
0
;
}
/* Parse possible id3 header */
if
(
!
var_CreateGetBool
(
p_demux
,
"meta-preparsed"
)
)
{
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
if
(
!
p_demux
->
p_private
)
return
VLC_ENOMEM
;
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
module_Unneed
(
p_demux
,
p_id3
);
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
p_sys
->
p_meta
=
p_demux_meta
->
p_meta
;
int
i
;
for
(
i
=
0
;
i
<
p_demux_meta
->
i_attachments
;
i
++
)
free
(
p_demux_meta
->
attachments
[
i
]
);
TAB_CLEAN
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
}
free
(
p_demux
->
p_private
);
}
if
(
!
p_sys
->
p_meta
)
p_sys
->
p_meta
=
vlc_meta_New
();
vlc_audio_replay_gain_MergeFromMeta
(
&
fmt
.
audio_replay_gain
,
p_sys
->
p_meta
);
p_sys
->
p_es
=
es_out_Add
(
p_demux
->
out
,
&
fmt
);
return
VLC_SUCCESS
;
...
...
@@ -275,16 +243,13 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
double
f
,
*
pf
;
int64_t
i64
,
*
pi64
;
vlc_
meta_t
*
p_meta
;
vlc_
bool_t
*
pb_bool
;
switch
(
i_query
)
{
case
DEMUX_GET_META
:
p_meta
=
(
vlc_meta_t
*
)
va_arg
(
args
,
vlc_meta_t
*
);
if
(
p_sys
->
p_meta
)
vlc_meta_Merge
(
p_meta
,
p_sys
->
p_meta
);
else
p_meta
=
NULL
;
case
DEMUX_HAS_UNSUPPORTED_META
:
pb_bool
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb_bool
=
VLC_TRUE
;
return
VLC_SUCCESS
;
case
DEMUX_GET_LENGTH
:
...
...
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