Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
79e1e221
Commit
79e1e221
authored
Aug 26, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: always use the demux for titles & seekpoints (fixes #8456)
parent
ba6ecd3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
74 deletions
+8
-74
src/input/input.c
src/input/input.c
+8
-74
No files found.
src/input/input.c
View file @
79e1e221
...
...
@@ -75,8 +75,6 @@ static void ControlRelease( int i_type, vlc_value_t val );
static
bool
ControlIsSeekRequest
(
int
i_type
);
static
bool
Control
(
input_thread_t
*
,
int
,
vlc_value_t
);
static
int
UpdateTitleSeekpointFromAccess
(
input_thread_t
*
);
static
int
UpdateTitleSeekpointFromDemux
(
input_thread_t
*
);
static
void
UpdateGenericFromDemux
(
input_thread_t
*
);
static
void
UpdateTitleListfromDemux
(
input_thread_t
*
);
...
...
@@ -575,15 +573,6 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, bool *pb_d
}
UpdateGenericFromDemux
(
p_input
);
}
else
if
(
p_input
->
p
->
input
.
p_access
&&
p_input
->
p
->
input
.
p_access
->
info
.
i_update
)
{
if
(
!
p_input
->
p
->
input
.
b_title_demux
)
{
i_ret
=
UpdateTitleSeekpointFromAccess
(
p_input
);
*
pb_changed
=
true
;
}
}
}
if
(
i_ret
==
0
)
/* EOF */
...
...
@@ -1902,9 +1891,7 @@ static bool Control( input_thread_t *p_input,
if
(
p_input
->
p
->
input
.
i_title
<=
0
)
break
;
int
i_title
=
p_input
->
p
->
input
.
b_title_demux
?
p_input
->
p
->
input
.
p_demux
->
info
.
i_title
:
p_input
->
p
->
input
.
p_access
->
info
.
i_title
;
int
i_title
=
p_input
->
p
->
input
.
p_demux
->
info
.
i_title
;
if
(
i_type
==
INPUT_CONTROL_SET_TITLE_PREV
)
i_title
--
;
else
if
(
i_type
==
INPUT_CONTROL_SET_TITLE_NEXT
)
...
...
@@ -1915,12 +1902,8 @@ static bool Control( input_thread_t *p_input,
break
;
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
if
(
p_input
->
p
->
input
.
b_title_demux
)
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_TITLE
,
i_title
);
else
stream_Control
(
p_input
->
p
->
input
.
p_stream
,
STREAM_SET_TITLE
,
i_title
);
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_TITLE
,
i_title
);
input_SendEventTitle
(
p_input
,
i_title
);
break
;
}
...
...
@@ -1936,21 +1919,10 @@ static bool Control( input_thread_t *p_input,
if
(
p_input
->
p
->
input
.
i_title
<=
0
)
break
;
int
i_title
,
i_seekpoint
;
if
(
p_input
->
p
->
input
.
b_title_demux
)
{
demux_t
*
p_demux
=
p_input
->
p
->
input
.
p_demux
;
i_title
=
p_demux
->
info
.
i_title
;
i_seekpoint
=
p_demux
->
info
.
i_seekpoint
;
}
else
{
access_t
*
p_access
=
p_input
->
p
->
input
.
p_access
;
demux_t
*
p_demux
=
p_input
->
p
->
input
.
p_demux
;
i_title
=
p_access
->
info
.
i_title
;
i_seekpoint
=
p_access
->
info
.
i_seekpoint
;
}
int
i_title
=
p_demux
->
info
.
i_title
;
int
i_seekpoint
=
p_demux
->
info
.
i_seekpoint
;
if
(
i_type
==
INPUT_CONTROL_SET_SEEKPOINT_PREV
)
{
...
...
@@ -1973,12 +1945,8 @@ static bool Control( input_thread_t *p_input,
break
;
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
if
(
p_input
->
p
->
input
.
b_title_demux
)
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_SEEKPOINT
,
i_seekpoint
);
else
stream_Control
(
p_input
->
p
->
input
.
p_stream
,
STREAM_SET_SEEKPOINT
,
i_seekpoint
);
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_SEEKPOINT
,
i_seekpoint
);
input_SendEventSeekpoint
(
p_input
,
i_title
,
i_seekpoint
);
break
;
}
...
...
@@ -2241,36 +2209,6 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
}
/*****************************************************************************
* Update*FromAccess:
*****************************************************************************/
static
int
UpdateTitleSeekpointFromAccess
(
input_thread_t
*
p_input
)
{
access_t
*
p_access
=
p_input
->
p
->
input
.
p_access
;
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_TITLE
)
{
input_SendEventTitle
(
p_input
,
p_access
->
info
.
i_title
);
stream_Control
(
p_input
->
p
->
input
.
p_stream
,
STREAM_UPDATE_SIZE
);
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_TITLE
;
}
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_SEEKPOINT
)
{
input_SendEventSeekpoint
(
p_input
,
p_access
->
info
.
i_title
,
p_access
->
info
.
i_seekpoint
);
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_SEEKPOINT
;
}
/* Hmmm only works with master input */
if
(
p_input
->
p
->
input
.
p_access
==
p_access
)
return
UpdateTitleSeekpoint
(
p_input
,
p_access
->
info
.
i_title
,
p_access
->
info
.
i_seekpoint
);
return
1
;
}
/*****************************************************************************
* InputSourceNew:
*****************************************************************************/
...
...
@@ -2498,10 +2436,6 @@ static int InputSourceInit( input_thread_t *p_input,
var_SetBool
(
p_input
,
"can-seek"
,
b
);
in
->
b_title_demux
=
false
;
if
(
stream_Control
(
in
->
p_stream
,
STREAM_GET_TITLE_INFO
,
&
in
->
title
,
&
in
->
i_title
,
&
in
->
i_title_offset
,
&
in
->
i_seekpoint_offset
)
)
TAB_INIT
(
in
->
i_title
,
in
->
title
);
}
in
->
p_demux
=
demux_New
(
p_input
,
p_input
,
psz_access
,
psz_demux
,
...
...
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