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
6d3ce593
Commit
6d3ce593
authored
May 25, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added meta parsing (close #624)
parent
d6cacb46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
modules/demux/mpeg/m4a.c
modules/demux/mpeg/m4a.c
+17
-0
No files found.
modules/demux/mpeg/m4a.c
View file @
6d3ce593
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc_demux.h>
#include <vlc_demux.h>
#include <vlc_meta.h>
#include "vlc_codec.h"
#include "vlc_codec.h"
/*****************************************************************************
/*****************************************************************************
...
@@ -54,6 +55,7 @@ struct demux_sys_t
...
@@ -54,6 +55,7 @@ struct demux_sys_t
{
{
vlc_bool_t
b_start
;
vlc_bool_t
b_start
;
es_out_id_t
*
p_es
;
es_out_id_t
*
p_es
;
vlc_meta_t
*
meta
;
decoder_t
*
p_packetizer
;
decoder_t
*
p_packetizer
;
...
@@ -76,6 +78,7 @@ static int Open( vlc_object_t * p_this )
...
@@ -76,6 +78,7 @@ static int Open( vlc_object_t * p_this )
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
demux_sys_t
*
p_sys
;
module_t
*
p_id3
;
uint8_t
*
p_peek
;
uint8_t
*
p_peek
;
int
b_forced
=
VLC_FALSE
;
int
b_forced
=
VLC_FALSE
;
...
@@ -121,6 +124,13 @@ static int Open( vlc_object_t * p_this )
...
@@ -121,6 +124,13 @@ static int Open( vlc_object_t * p_this )
es_format_Init
(
&
p_sys
->
p_packetizer
->
fmt_out
,
UNKNOWN_ES
,
0
);
es_format_Init
(
&
p_sys
->
p_packetizer
->
fmt_out
,
UNKNOWN_ES
,
0
);
LOAD_PACKETIZER_OR_FAIL
(
p_sys
->
p_packetizer
,
"mp4 audio"
);
LOAD_PACKETIZER_OR_FAIL
(
p_sys
->
p_packetizer
,
"mp4 audio"
);
/* Parse possible id3 header */
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
p_sys
->
meta
=
(
vlc_meta_t
*
)
p_demux
->
p_private
;
p_demux
->
p_private
=
NULL
;
module_Unneed
(
p_demux
,
p_id3
);
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -193,11 +203,18 @@ static int Demux( demux_t *p_demux)
...
@@ -193,11 +203,18 @@ static int Demux( demux_t *p_demux)
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
)
static
int
Control
(
demux_t
*
p_demux
,
int
i_query
,
va_list
args
)
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
vlc_meta_t
*
p_meta
;
int64_t
*
pi64
;
int64_t
*
pi64
;
int
i_ret
;
int
i_ret
;
switch
(
i_query
)
switch
(
i_query
)
{
{
case
DEMUX_GET_META
:
p_meta
=
(
vlc_meta_t
*
)
va_arg
(
args
,
vlc_meta_t
*
);
vlc_meta_Merge
(
p_meta
,
p_sys
->
meta
);
return
VLC_SUCCESS
;
case
DEMUX_GET_TIME
:
case
DEMUX_GET_TIME
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
*
pi64
=
p_sys
->
i_pts
+
p_sys
->
i_time_offset
;
*
pi64
=
p_sys
->
i_pts
+
p_sys
->
i_time_offset
;
...
...
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