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
fe689840
Commit
fe689840
authored
Oct 03, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Demuxers: do not load "meta reader" module if the input item has already been preparsed.
parent
eff0d355
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
173 additions
and
108 deletions
+173
-108
modules/codec/ffmpeg/demux.c
modules/codec/ffmpeg/demux.c
+21
-18
modules/demux/flac.c
modules/demux/flac.c
+35
-24
modules/demux/mpc.c
modules/demux/mpc.c
+24
-12
modules/demux/mpeg/m4a.c
modules/demux/mpeg/m4a.c
+25
-13
modules/demux/mpeg/mpga.c
modules/demux/mpeg/mpga.c
+23
-11
modules/demux/ogg.c
modules/demux/ogg.c
+19
-16
modules/demux/tta.c
modules/demux/tta.c
+26
-14
No files found.
modules/codec/ffmpeg/demux.c
View file @
fe689840
...
@@ -259,27 +259,30 @@ int E_(OpenDemux)( vlc_object_t *p_this )
...
@@ -259,27 +259,30 @@ int E_(OpenDemux)( vlc_object_t *p_this )
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
if
(
p_input
)
{
{
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
if
(
!
(
input_GetItem
(
p_input
)
->
p_meta
->
i_status
&
ITEM_PREPARSED
)
)
if
(
!
p_demux
->
p_private
)
{
{
vlc_object_release
(
p_input
);
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
return
VLC_ENOMEM
;
if
(
!
p_demux
->
p_private
)
}
{
module_t
*
p_meta
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
);
vlc_object_release
(
p_input
);
if
(
p_meta
)
return
VLC_ENOMEM
;
{
}
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
module_t
*
p_meta
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
);
vlc_meta_Merge
(
input_GetItem
(
p_input
)
->
p_meta
,
if
(
p_meta
)
p_demux_meta
->
p_meta
);
{
vlc_meta_Delete
(
p_demux_meta
->
p_meta
);
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
module_Unneed
(
p_demux
,
p_meta
);
vlc_meta_Merge
(
input_GetItem
(
p_input
)
->
p_meta
,
int
i
;
p_demux_meta
->
p_meta
);
for
(
i
=
0
;
i
<
p_demux_meta
->
i_attachments
;
i
++
)
vlc_meta_Delete
(
p_demux_meta
->
p_meta
);
free
(
p_demux_meta
->
attachments
[
i
]
);
module_Unneed
(
p_demux
,
p_meta
);
TAB_CLEAN
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
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
);
}
}
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
free
(
p_demux
->
p_private
);
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
modules/demux/flac.c
View file @
fe689840
...
@@ -155,34 +155,45 @@ static int Open( vlc_object_t * p_this )
...
@@ -155,34 +155,45 @@ static int Open( vlc_object_t * p_this )
}
}
/* Parse possible id3 header */
/* Parse possible id3 header */
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
!
p_demux
->
p_private
)
if
(
p_input
)
return
VLC_ENOMEM
;
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
if
(
!
(
input_GetItem
(
p_input
)
->
p_meta
->
i_status
&
ITEM_PREPARSED
)
)
vlc_meta_t
*
p_meta
=
p_demux_meta
->
p_meta
;
if
(
!
p_sys
->
p_meta
)
{
{
p_sys
->
p_meta
=
p_meta
;
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
}
if
(
!
p_demux
->
p_private
)
else
if
(
p_meta
)
{
{
vlc_object_release
(
p_input
);
vlc_meta_Merge
(
p_sys
->
p_meta
,
p_meta
);
return
VLC_ENOMEM
;
vlc_meta_Delete
(
p_meta
);
}
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
vlc_meta_t
*
p_meta
=
p_demux_meta
->
p_meta
;
if
(
!
p_sys
->
p_meta
)
{
p_sys
->
p_meta
=
p_meta
;
}
else
if
(
p_meta
)
{
vlc_meta_Merge
(
p_sys
->
p_meta
,
p_meta
);
vlc_meta_Delete
(
p_meta
);
}
p_demux
->
p_private
=
NULL
;
module_Unneed
(
p_demux
,
p_id3
);
int
i
;
for
(
i
=
0
;
i
<
p_demux_meta
->
i_attachments
;
i
++
)
TAB_APPEND_CAST
(
(
input_attachment_t
**
),
p_sys
->
i_attachments
,
p_sys
->
attachments
,
p_demux_meta
->
attachments
[
p_demux_meta
->
i_attachments
]
);
TAB_CLEAN
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
}
free
(
p_demux
->
p_private
);
}
}
p_demux
->
p_private
=
NULL
;
vlc_object_release
(
p_input
);
module_Unneed
(
p_demux
,
p_id3
);
int
i
;
for
(
i
=
0
;
i
<
p_demux_meta
->
i_attachments
;
i
++
)
TAB_APPEND_CAST
(
(
input_attachment_t
**
),
p_sys
->
i_attachments
,
p_sys
->
attachments
,
p_demux_meta
->
attachments
[
p_demux_meta
->
i_attachments
]
);
TAB_CLEAN
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
}
}
free
(
p_demux
->
p_private
);
if
(
p_sys
->
i_cover_idx
<
p_sys
->
i_attachments
)
if
(
p_sys
->
i_cover_idx
<
p_sys
->
i_attachments
)
{
{
...
...
modules/demux/mpc.c
View file @
fe689840
...
@@ -189,20 +189,32 @@ static int Open( vlc_object_t * p_this )
...
@@ -189,20 +189,32 @@ static int Open( vlc_object_t * p_this )
}
}
/* Parse possible id3 header */
/* Parse possible id3 header */
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
!
p_demux
->
p_private
)
if
(
p_input
)
return
VLC_ENOMEM
;
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
if
(
!
(
input_GetItem
(
p_input
)
->
p_meta
->
i_status
&
ITEM_PREPARSED
)
)
p_sys
->
p_meta
=
p_demux_meta
->
p_meta
;
{
module_Unneed
(
p_demux
,
p_id3
);
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
int
i
;
if
(
!
p_demux
->
p_private
)
for
(
i
=
0
;
i
<
p_demux_meta
->
i_attachments
;
i
++
)
{
free
(
p_demux_meta
->
attachments
[
i
]
);
vlc_object_release
(
p_input
);
TAB_CLEAN
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
return
VLC_ENOMEM
;
}
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
p_sys
->
p_meta
=
p_demux_meta
->
p_meta
;
module_Unneed
(
p_demux
,
p_id3
);
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
);
}
vlc_object_release
(
p_input
);
}
}
free
(
p_demux
->
p_private
);
if
(
!
p_sys
->
p_meta
)
if
(
!
p_sys
->
p_meta
)
p_sys
->
p_meta
=
vlc_meta_New
();
p_sys
->
p_meta
=
vlc_meta_New
();
...
...
modules/demux/mpeg/m4a.c
View file @
fe689840
...
@@ -110,21 +110,33 @@ static int Open( vlc_object_t * p_this )
...
@@ -110,21 +110,33 @@ static int Open( vlc_object_t * p_this )
LOAD_PACKETIZER_OR_FAIL
(
p_sys
->
p_packetizer
,
"mp4 audio"
);
LOAD_PACKETIZER_OR_FAIL
(
p_sys
->
p_packetizer
,
"mp4 audio"
);
/* Parse possible id3 header */
/* Parse possible id3 header */
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
!
p_demux
->
p_private
)
if
(
p_input
)
return
VLC_ENOMEM
;
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
if
(
!
(
input_GetItem
(
p_input
)
->
p_meta
->
i_status
&
ITEM_PREPARSED
)
)
p_sys
->
meta
=
p_demux_meta
->
p_meta
;
{
p_demux
->
p_private
=
NULL
;
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
module_Unneed
(
p_demux
,
p_id3
);
if
(
!
p_demux
->
p_private
)
int
i
;
{
for
(
i
=
0
;
i
<
p_demux_meta
->
i_attachments
;
i
++
)
vlc_object_release
(
p_input
);
free
(
p_demux_meta
->
attachments
[
i
]
);
return
VLC_ENOMEM
;
TAB_CLEAN
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
}
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
p_sys
->
meta
=
p_demux_meta
->
p_meta
;
p_demux
->
p_private
=
NULL
;
module_Unneed
(
p_demux
,
p_id3
);
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
);
}
vlc_object_release
(
p_input
);
}
}
free
(
p_demux
->
p_private
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/demux/mpeg/mpga.c
View file @
fe689840
...
@@ -255,19 +255,31 @@ static int Open( vlc_object_t * p_this )
...
@@ -255,19 +255,31 @@ static int Open( vlc_object_t * p_this )
p_sys
->
p_block_out
=
p_block_out
;
p_sys
->
p_block_out
=
p_block_out
;
/* Parse possible id3 header */
/* Parse possible id3 header */
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
input_thread_t
*
p_input
=
(
input_thread_t
*
)
if
(
!
p_demux
->
p_private
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
return
VLC_ENOMEM
;
if
(
p_input
)
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
if
(
!
(
input_GetItem
(
p_input
)
->
p_meta
->
i_status
&
ITEM_PREPARSED
)
)
p_sys
->
meta
=
p_demux_meta
->
p_meta
;
{
p_demux
->
p_private
=
NULL
;
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
module_Unneed
(
p_demux
,
p_id3
);
if
(
!
p_demux
->
p_private
)
p_sys
->
i_attachments
=
p_demux_meta
->
i_attachments
;
{
p_sys
->
attachments
=
p_demux_meta
->
attachments
;
vlc_object_release
(
p_input
);
return
VLC_ENOMEM
;
}
if
(
(
p_id3
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
)
)
)
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
p_sys
->
meta
=
p_demux_meta
->
p_meta
;
p_demux
->
p_private
=
NULL
;
module_Unneed
(
p_demux
,
p_id3
);
p_sys
->
i_attachments
=
p_demux_meta
->
i_attachments
;
p_sys
->
attachments
=
p_demux_meta
->
attachments
;
}
free
(
p_demux
->
p_private
);
}
vlc_object_release
(
p_input
);
}
}
free
(
p_demux
->
p_private
);
/* */
/* */
p_sys
->
p_packetizer
->
fmt_out
.
b_packetized
=
VLC_TRUE
;
p_sys
->
p_packetizer
->
fmt_out
.
b_packetized
=
VLC_TRUE
;
...
...
modules/demux/ogg.c
View file @
fe689840
...
@@ -211,25 +211,28 @@ static int Open( vlc_object_t * p_this )
...
@@ -211,25 +211,28 @@ static int Open( vlc_object_t * p_this )
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
if
(
p_input
)
{
{
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
if
(
!
(
input_GetItem
(
p_input
)
->
p_meta
->
i_status
&
ITEM_PREPARSED
)
)
if
(
!
p_demux
->
p_private
)
{
{
vlc_object_release
(
p_input
);
p_demux
->
p_private
=
malloc
(
sizeof
(
demux_meta_t
)
);
return
VLC_ENOMEM
;
if
(
!
p_demux
->
p_private
)
}
{
module_t
*
p_meta
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
);
vlc_object_release
(
p_input
);
if
(
p_meta
)
return
VLC_ENOMEM
;
{
}
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
module_t
*
p_meta
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
);
vlc_meta_Merge
(
input_GetItem
(
p_input
)
->
p_meta
,
if
(
p_meta
)
p_demux_meta
->
p_meta
);
{
vlc_meta_Delete
(
p_demux_meta
->
p_meta
);
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
module_Unneed
(
p_demux
,
p_meta
);
vlc_meta_Merge
(
input_GetItem
(
p_input
)
->
p_meta
,
p_sys
->
i_attachments
=
p_demux_meta
->
i_attachments
;
p_demux_meta
->
p_meta
);
p_sys
->
attachments
=
p_demux_meta
->
attachments
;
vlc_meta_Delete
(
p_demux_meta
->
p_meta
);
module_Unneed
(
p_demux
,
p_meta
);
p_sys
->
i_attachments
=
p_demux_meta
->
i_attachments
;
p_sys
->
attachments
=
p_demux_meta
->
attachments
;
}
free
(
p_demux
->
p_private
);
}
}
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
free
(
p_demux
->
p_private
);
}
}
/* Initialize the Ogg physical bitstream parser */
/* Initialize the Ogg physical bitstream parser */
...
...
modules/demux/tta.c
View file @
fe689840
...
@@ -141,22 +141,34 @@ static int Open( vlc_object_t * p_this )
...
@@ -141,22 +141,34 @@ static int Open( vlc_object_t * p_this )
#if 0
#if 0
/* Parse possible id3 header */
/* Parse possible id3 header */
p_demux->p_private = malloc( sizeof( demux_meta_t ) );
input_thread_t *p_input = (input_thread_t *)
if( !p_demux->p_private )
vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
return VLC_ENOMEM;
if( p_input )
if( ( p_id3 = module_Need( p_demux, "meta reader", NULL, 0 ) ) )
{
{
demux_meta_t *p_demux_meta = (demux_meta_t *)p_demux->p_private;
if( !( input_GetItem( p_input )->p_meta->i_status & ITEM_PREPARSED ) )
p_sys->p_meta = p_demux_meta->p_meta;
{
p_demux->p_private = NULL;
p_demux->p_private = malloc( sizeof( demux_meta_t ) );
module_Unneed( p_demux, p_id3 );
if( !p_demux->p_private )
int i;
{
for( i = 0; i < p_demux_meta->i_attachments; i++ )
vlc_object_release( p_input );
free( p_demux_meta->attachments[i] );
return VLC_ENOMEM;
TAB_CLEAN( p_demux_meta->i_attachments, p_demux_meta->attachments );
}
if( ( p_id3 = module_Need( p_demux, "meta reader", NULL, 0 ) ) )
{
demux_meta_t *p_demux_meta = (demux_meta_t *)p_demux->p_private;
p_sys->p_meta = p_demux_meta->p_meta;
p_demux->p_private = NULL;
module_Unneed( p_demux, p_id3 );
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 );
}
vlc_object_release( p_input );
}
}
free( p_demux->p_private );
if( !p_sys->p_meta )
if( !p_sys->p_meta )
p_sys->p_meta = vlc_meta_New();
p_sys->p_meta = vlc_meta_New();
#endif
#endif
...
...
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