Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
e1e8b00b
Commit
e1e8b00b
authored
Jan 31, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* input: call DEMUX_GET_META and fill playlist and input infos.
parent
034ed2f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
2 deletions
+76
-2
src/input/demux.c
src/input/demux.c
+4
-1
src/input/input.c
src/input/input.c
+72
-1
No files found.
src/input/demux.c
View file @
e1e8b00b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* demux.c
* demux.c
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* Copyright (C) 1999-2004 VideoLAN
* $Id: demux.c,v 1.1
0 2004/01/25 17:16:05 zorglub
Exp $
* $Id: demux.c,v 1.1
1 2004/01/31 05:25:36 fenrir
Exp $
*
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* Author: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -140,6 +140,9 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query,
...
@@ -140,6 +140,9 @@ int demux_vaControlDefault( input_thread_t *p_input, int i_query,
case
DEMUX_GET_FPS
:
case
DEMUX_GET_FPS
:
i_ret
=
VLC_EGENERIC
;
i_ret
=
VLC_EGENERIC
;
break
;
break
;
case
DEMUX_GET_META
:
i_ret
=
VLC_EGENERIC
;
break
;
default:
default:
msg_Err
(
p_input
,
"unknown query in demux_vaControlDefault"
);
msg_Err
(
p_input
,
"unknown query in demux_vaControlDefault"
);
...
...
src/input/input.c
View file @
e1e8b00b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* decoders.
* decoders.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2004 VideoLAN
* Copyright (C) 1998-2004 VideoLAN
* $Id: input.c,v 1.28
4 2004/01/29 17:51:08 zorglub
Exp $
* $Id: input.c,v 1.28
5 2004/01/31 05:25:36 fenrir
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
#include "vlc_interface.h"
#include "vlc_interface.h"
#include "codecs.h"
#include "codecs.h"
#include "vlc_meta.h"
#include "../../modules/demux/util/sub.h"
#include "../../modules/demux/util/sub.h"
/*****************************************************************************
/*****************************************************************************
...
@@ -524,6 +525,7 @@ static int RunThread( input_thread_t *p_input )
...
@@ -524,6 +525,7 @@ static int RunThread( input_thread_t *p_input )
*****************************************************************************/
*****************************************************************************/
static
int
InitThread
(
input_thread_t
*
p_input
)
static
int
InitThread
(
input_thread_t
*
p_input
)
{
{
vlc_meta_t
*
meta
;
float
f_fps
;
float
f_fps
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
;
mtime_t
i_length
;
mtime_t
i_length
;
...
@@ -778,6 +780,75 @@ static int InitThread( input_thread_t * p_input )
...
@@ -778,6 +780,75 @@ static int InitThread( input_thread_t * p_input )
p_input
->
p_sys
->
i_sub
=
0
;
p_input
->
p_sys
->
i_sub
=
0
;
p_input
->
p_sys
->
sub
=
NULL
;
p_input
->
p_sys
->
sub
=
NULL
;
/* get meta informations */
if
(
!
demux_Control
(
p_input
,
DEMUX_GET_META
,
&
meta
)
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_input
,
VLC_OBJECT_PLAYLIST
,
FIND_PARENT
);
playlist_item_t
*
p_item
=
NULL
;
input_info_category_t
*
p_cat
;
int
i
;
if
(
p_playlist
)
{
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
p_item
=
playlist_ItemGetByPos
(
p_playlist
,
-
1
);
if
(
p_item
)
{
vlc_mutex_lock
(
&
p_item
->
lock
);
}
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
}
msg_Dbg
(
p_input
,
"meta informations:"
);
if
(
meta
->
i_meta
>
0
)
{
p_cat
=
input_InfoCategory
(
p_input
,
_
(
"File"
)
);
for
(
i
=
0
;
i
<
meta
->
i_meta
;
i
++
)
{
msg_Dbg
(
p_input
,
" - '%s' = '%s'"
,
_
(
meta
->
name
[
i
]),
meta
->
value
[
i
]
);
input_AddInfo
(
p_cat
,
_
(
meta
->
name
[
i
]),
"%s"
,
meta
->
value
[
i
]
);
if
(
p_item
)
{
playlist_ItemAddInfo
(
p_item
,
_
(
"File"
),
_
(
meta
->
name
[
i
]),
"%s"
,
meta
->
value
[
i
]
);
}
}
}
for
(
i
=
0
;
i
<
meta
->
i_track
;
i
++
)
{
vlc_meta_t
*
tk
=
meta
->
track
[
i
];
int
j
;
msg_Dbg
(
p_input
,
" - track[%d]:"
,
i
);
if
(
tk
->
i_meta
>
0
)
{
char
*
psz_cat
=
malloc
(
strlen
(
_
(
"Stream"
))
+
10
);
sprintf
(
psz_cat
,
"%s %d"
,
_
(
"Stream"
),
i
);
p_cat
=
input_InfoCategory
(
p_input
,
psz_cat
);
for
(
j
=
0
;
j
<
tk
->
i_meta
;
j
++
)
{
msg_Dbg
(
p_input
,
" - '%s' = '%s'"
,
_
(
tk
->
name
[
j
]),
tk
->
value
[
j
]
);
input_AddInfo
(
p_cat
,
_
(
tk
->
name
[
j
]),
"%s"
,
tk
->
value
[
j
]
);
if
(
p_item
)
{
playlist_ItemAddInfo
(
p_item
,
psz_cat
,
_
(
tk
->
name
[
j
]),
"%s"
,
tk
->
value
[
j
]
);
}
}
}
}
if
(
p_item
)
{
vlc_mutex_unlock
(
&
p_item
->
lock
);
}
if
(
p_playlist
)
vlc_object_release
(
p_playlist
);
vlc_meta_Delete
(
meta
);
}
/* get length */
/* get length */
if
(
!
demux_Control
(
p_input
,
DEMUX_GET_LENGTH
,
&
i_length
)
&&
i_length
>
0
)
if
(
!
demux_Control
(
p_input
,
DEMUX_GET_LENGTH
,
&
i_length
)
&&
i_length
>
0
)
{
{
...
...
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