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
62bd7af8
Commit
62bd7af8
authored
Aug 23, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a VLC object for meta reader
parent
5a218411
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
15 deletions
+19
-15
include/vlc_common.h
include/vlc_common.h
+0
-1
include/vlc_demux.h
include/vlc_demux.h
+4
-2
modules/meta_engine/id3tag.c
modules/meta_engine/id3tag.c
+3
-3
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+6
-6
src/input/input.c
src/input/input.c
+6
-3
No files found.
include/vlc_common.h
View file @
62bd7af8
...
...
@@ -184,7 +184,6 @@ typedef struct access_sys_t access_sys_t;
typedef
struct
stream_t
stream_t
;
typedef
struct
stream_sys_t
stream_sys_t
;
typedef
struct
demux_t
demux_t
;
typedef
struct
demux_meta_t
demux_meta_t
;
typedef
struct
demux_sys_t
demux_sys_t
;
typedef
struct
es_out_t
es_out_t
;
typedef
struct
es_out_id_t
es_out_id_t
;
...
...
include/vlc_demux.h
View file @
62bd7af8
...
...
@@ -78,13 +78,15 @@ struct demux_t
/* demux_meta_t is returned by "meta reader" module to the demuxer */
struct
demux_meta_t
typedef
struct
demux_meta_t
{
VLC_COMMON_MEMBERS
demux_t
*
p_demux
;
/** FIXME: use stream_t instead? */
vlc_meta_t
*
p_meta
;
/**< meta data */
int
i_attachments
;
/**< number of attachments */
input_attachment_t
**
attachments
;
/**< array of attachments */
};
}
demux_meta_t
;
enum
demux_query_e
{
...
...
modules/meta_engine/id3tag.c
View file @
62bd7af8
...
...
@@ -485,12 +485,12 @@ static void CheckHeader( demux_t *p_demux )
****************************************************************************/
static
int
ParseTags
(
vlc_object_t
*
p_this
)
{
demux_
t
*
p_demux
=
(
demux
_t
*
)
p_this
;
demux_
meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
demux_
meta_t
*
p_demux_meta
=
(
demux_meta
_t
*
)
p_this
;
demux_
t
*
p_demux
=
(
demux_t
*
)
p_demux_meta
->
p_demux
;
bool
b_seekable
;
int64_t
i_init
;
msg_Dbg
(
p_demux
,
"checking for ID3v1/2 and APEv1/2 tags"
);
msg_Dbg
(
p_demux
_meta
,
"checking for ID3v1/2 and APEv1/2 tags"
);
stream_Control
(
p_demux
->
s
,
STREAM_CAN_FASTSEEK
,
&
b_seekable
);
if
(
!
b_seekable
)
return
VLC_EGENERIC
;
...
...
modules/meta_engine/taglib.cpp
View file @
62bd7af8
...
...
@@ -224,7 +224,7 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
if
(
!
strncmp
(
psz_mime
,
"PNG"
,
3
)
||
!
strncmp
(
psz_name
,
"
\xC2\x89
PNG"
,
5
)
)
{
msg_Warn
(
p_demux
,
"Invalid picture embedded by broken iTunes version"
);
msg_Warn
(
p_demux
_meta
,
"Invalid picture embedded by broken iTunes version"
);
free
(
psz_description
);
continue
;
}
...
...
@@ -233,7 +233,7 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
const
char
*
p_data
=
picture
.
data
();
const
unsigned
i_data
=
picture
.
size
();
msg_Dbg
(
p_demux
,
"Found embedded art: %s (%s) is %u bytes"
,
msg_Dbg
(
p_demux
_meta
,
"Found embedded art: %s (%s) is %u bytes"
,
psz_name
,
psz_mime
,
i_data
);
p_attachment
=
vlc_input_attachment_New
(
psz_name
,
psz_mime
,
...
...
@@ -282,7 +282,7 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_t* p_demux, demux_met
// We get only the first covert art
if
(
mime_list
.
size
()
>
1
||
art_list
.
size
()
>
1
)
msg_Warn
(
p_demux
,
"Found %i embedded arts, so using only the first one"
,
msg_Warn
(
p_demux
_meta
,
"Found %i embedded arts, so using only the first one"
,
art_list
.
size
()
);
else
if
(
mime_list
.
size
()
==
0
||
art_list
.
size
()
==
0
)
return
;
...
...
@@ -296,7 +296,7 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_t* p_demux, demux_met
uint8_t
*
p_data
;
int
i_data
=
vlc_b64_decode_binary
(
&
p_data
,
art_list
[
0
].
toCString
(
true
)
);
msg_Dbg
(
p_demux
,
"Found embedded art: %s (%s) is %i bytes"
,
msg_Dbg
(
p_demux
_meta
,
"Found embedded art: %s (%s) is %i bytes"
,
psz_name
,
psz_mime
,
i_data
);
TAB_INIT
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
...
...
@@ -320,8 +320,8 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_t* p_demux, demux_met
*/
static
int
ReadMeta
(
vlc_object_t
*
p_this
)
{
demux_
t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_
meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
demux_
meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_this
;
demux_
t
*
p_demux
=
p_demux_meta
->
p_demux
;
vlc_meta_t
*
p_meta
;
FileRef
f
;
...
...
src/input/input.c
View file @
62bd7af8
...
...
@@ -2749,11 +2749,14 @@ static void InputSourceMeta( input_thread_t *p_input,
if
(
!
b_bool
)
return
;
demux_meta_t
*
p_demux_meta
=
p_demux
->
p_private
=
calloc
(
1
,
sizeof
(
*
p_demux_meta
)
);
demux_meta_t
*
p_demux_meta
=
vlc_custom_create
(
p_demux
,
sizeof
(
*
p_demux_meta
),
VLC_OBJECT_GENERIC
,
"demux meta"
);
if
(
!
p_demux_meta
)
return
;
p_demux_meta
->
p_demux
=
p_demux
;
module_t
*
p_id3
=
module_need
(
p_demux
,
"meta reader"
,
NULL
,
false
);
module_t
*
p_id3
=
module_need
(
p_demux
_meta
,
"meta reader"
,
NULL
,
false
);
if
(
p_id3
)
{
if
(
p_demux_meta
->
p_meta
)
...
...
@@ -2771,7 +2774,7 @@ static void InputSourceMeta( input_thread_t *p_input,
}
module_unneed
(
p_demux
,
p_id3
);
}
fre
e
(
p_demux_meta
);
vlc_object_releas
e
(
p_demux_meta
);
}
...
...
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