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
49b528cd
Commit
49b528cd
authored
Aug 26, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg: implement title/seekpoint controls (refs #8455)
This is intended for VDR directories and Video CDs.
parent
15e2e50e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
1 deletion
+55
-1
include/vlc_demux.h
include/vlc_demux.h
+20
-0
include/vlc_input.h
include/vlc_input.h
+1
-1
modules/demux/ps.c
modules/demux/ps.c
+17
-0
modules/demux/ts.c
modules/demux/ts.c
+17
-0
No files found.
include/vlc_demux.h
View file @
49b528cd
...
@@ -172,6 +172,26 @@ enum demux_query_e
...
@@ -172,6 +172,26 @@ enum demux_query_e
VLC_API
int
demux_vaControlHelper
(
stream_t
*
,
int64_t
i_start
,
int64_t
i_end
,
int64_t
i_bitrate
,
int
i_align
,
int
i_query
,
va_list
args
);
VLC_API
int
demux_vaControlHelper
(
stream_t
*
,
int64_t
i_start
,
int64_t
i_end
,
int64_t
i_bitrate
,
int
i_align
,
int
i_query
,
va_list
args
);
static
inline
void
demux_UpdateTitleFromStream
(
demux_t
*
demux
)
{
stream_t
*
s
=
demux
->
s
;
unsigned
title
,
seekpoint
;
if
(
stream_Control
(
s
,
STREAM_GET_TITLE
,
&
title
)
==
VLC_SUCCESS
&&
title
!=
(
unsigned
)
demux
->
info
.
i_title
)
{
demux
->
info
.
i_title
=
title
;
demux
->
info
.
i_update
=
INPUT_UPDATE_TITLE
;
}
if
(
stream_Control
(
s
,
STREAM_GET_SEEKPOINT
,
&
seekpoint
)
==
VLC_SUCCESS
&&
seekpoint
!=
(
unsigned
)
demux
->
info
.
i_seekpoint
)
{
demux
->
info
.
i_seekpoint
=
seekpoint
;
demux
->
info
.
i_update
=
INPUT_UPDATE_SEEKPOINT
;
}
}
/*************************************************************************
/*************************************************************************
* Miscellaneous helpers for demuxers
* Miscellaneous helpers for demuxers
*************************************************************************/
*************************************************************************/
...
...
include/vlc_input.h
View file @
49b528cd
...
@@ -77,7 +77,7 @@ static inline seekpoint_t *vlc_seekpoint_Duplicate( const seekpoint_t *src )
...
@@ -77,7 +77,7 @@ static inline seekpoint_t *vlc_seekpoint_Duplicate( const seekpoint_t *src )
/*****************************************************************************
/*****************************************************************************
* Title:
* Title:
*****************************************************************************/
*****************************************************************************/
typedef
struct
typedef
struct
input_title_t
{
{
char
*
psz_name
;
char
*
psz_name
;
...
...
modules/demux/ps.c
View file @
49b528cd
...
@@ -444,6 +444,7 @@ static int Demux( demux_t *p_demux )
...
@@ -444,6 +444,7 @@ static int Demux( demux_t *p_demux )
break
;
break
;
}
}
demux_UpdateTitleFromStream
(
p_demux
);
return
1
;
return
1
;
}
}
...
@@ -530,6 +531,22 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -530,6 +531,22 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
}
}
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
case
DEMUX_GET_TITLE_INFO
:
{
struct
input_title_t
***
v
=
va_arg
(
args
,
struct
input_title_t
***
);
int
*
c
=
va_arg
(
args
,
int
*
);
*
va_arg
(
args
,
int
*
)
=
0
;
/* Title offset */
*
va_arg
(
args
,
int
*
)
=
0
;
/* Chapter offset */
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_TITLE_INFO
,
v
,
c
);
}
case
DEMUX_SET_TITLE
:
return
stream_Control
(
p_demux
->
s
,
STREAM_SET_TITLE
,
args
);
case
DEMUX_SET_SEEKPOINT
:
return
stream_Control
(
p_demux
->
s
,
STREAM_SET_SEEKPOINT
,
args
);
case
DEMUX_GET_META
:
case
DEMUX_GET_META
:
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_META
,
args
);
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_META
,
args
);
...
...
modules/demux/ts.c
View file @
49b528cd
...
@@ -1019,6 +1019,7 @@ static int Demux( demux_t *p_demux )
...
@@ -1019,6 +1019,7 @@ static int Demux( demux_t *p_demux )
p_sys
->
i_ts_read
*
p_sys
->
i_packet_size
);
p_sys
->
i_ts_read
*
p_sys
->
i_packet_size
);
}
}
demux_UpdateTitleFromStream
(
p_demux
);
return
1
;
return
1
;
}
}
...
@@ -1189,6 +1190,22 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -1189,6 +1190,22 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
case
DEMUX_GET_TITLE_INFO
:
{
struct
input_title_t
***
v
=
va_arg
(
args
,
struct
input_title_t
***
);
int
*
c
=
va_arg
(
args
,
int
*
);
*
va_arg
(
args
,
int
*
)
=
0
;
/* Title offset */
*
va_arg
(
args
,
int
*
)
=
0
;
/* Chapter offset */
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_TITLE_INFO
,
v
,
c
);
}
case
DEMUX_SET_TITLE
:
return
stream_Control
(
p_demux
->
s
,
STREAM_SET_TITLE
,
args
);
case
DEMUX_SET_SEEKPOINT
:
return
stream_Control
(
p_demux
->
s
,
STREAM_SET_SEEKPOINT
,
args
);
case
DEMUX_GET_META
:
case
DEMUX_GET_META
:
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_META
,
args
);
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_META
,
args
);
...
...
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