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
76901ea3
Commit
76901ea3
authored
Dec 01, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved access/demux update state reading.
parent
f86fdcb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
25 deletions
+55
-25
src/input/input.c
src/input/input.c
+55
-25
No files found.
src/input/input.c
View file @
76901ea3
...
...
@@ -74,8 +74,11 @@ static inline int ControlPopNoLock( input_thread_t *, int *, vlc_value_t *, mtim
static
void
ControlReduce
(
input_thread_t
*
);
static
bool
Control
(
input_thread_t
*
,
int
,
vlc_value_t
);
static
int
UpdateFromAccess
(
input_thread_t
*
);
static
int
UpdateFromDemux
(
input_thread_t
*
);
static
int
UpdateTitleSeekpointFromAccess
(
input_thread_t
*
);
static
void
UpdateGenericFromAccess
(
input_thread_t
*
);
static
int
UpdateTitleSeekpointFromDemux
(
input_thread_t
*
);
static
void
UpdateGenericFromDemux
(
input_thread_t
*
);
static
void
MRLSections
(
input_thread_t
*
,
char
*
,
int
*
,
int
*
,
int
*
,
int
*
);
...
...
@@ -555,19 +558,24 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
if
(
i_ret
>
0
)
{
/* TODO */
if
(
p_input
->
p
->
input
.
b_title_demux
&&
p_input
->
p
->
input
.
p_demux
->
info
.
i_update
)
if
(
p_input
->
p
->
input
.
p_demux
->
info
.
i_update
)
{
i_ret
=
UpdateFromDemux
(
p_input
);
*
pb_changed
=
true
;
if
(
p_input
->
p
->
input
.
b_title_demux
)
{
i_ret
=
UpdateTitleSeekpointFromDemux
(
p_input
);
*
pb_changed
=
true
;
}
UpdateGenericFromDemux
(
p_input
);
}
else
if
(
!
p_input
->
p
->
input
.
b_title_demux
&&
p_input
->
p
->
input
.
p_access
&&
p_input
->
p
->
input
.
p_access
->
info
.
i_update
)
else
if
(
p_input
->
p
->
input
.
p_access
&&
p_input
->
p
->
input
.
p_access
->
info
.
i_update
)
{
i_ret
=
UpdateFromAccess
(
p_input
);
*
pb_changed
=
true
;
if
(
!
p_input
->
p
->
input
.
b_title_demux
)
{
i_ret
=
UpdateTitleSeekpointFromAccess
(
p_input
);
*
pb_changed
=
true
;
}
UpdateGenericFromAccess
(
p_input
);
}
}
...
...
@@ -2090,7 +2098,7 @@ static bool Control( input_thread_t *p_input, int i_type,
}
/*****************************************************************************
* Update
FromDemux:
* Update
TitleSeekpoint
*****************************************************************************/
static
int
UpdateTitleSeekpoint
(
input_thread_t
*
p_input
,
int
i_title
,
int
i_seekpoint
)
...
...
@@ -2118,7 +2126,10 @@ static int UpdateTitleSeekpoint( input_thread_t *p_input,
}
return
1
;
}
static
int
UpdateFromDemux
(
input_thread_t
*
p_input
)
/*****************************************************************************
* Update*FromDemux:
*****************************************************************************/
static
int
UpdateTitleSeekpointFromDemux
(
input_thread_t
*
p_input
)
{
demux_t
*
p_demux
=
p_input
->
p
->
input
.
p_demux
;
...
...
@@ -2136,7 +2147,6 @@ static int UpdateFromDemux( input_thread_t *p_input )
p_demux
->
info
.
i_update
&=
~
INPUT_UPDATE_SEEKPOINT
;
}
p_demux
->
info
.
i_update
&=
~
INPUT_UPDATE_SIZE
;
/* Hmmm only works with master input */
if
(
p_input
->
p
->
input
.
p_demux
==
p_demux
)
...
...
@@ -2146,10 +2156,26 @@ static int UpdateFromDemux( input_thread_t *p_input )
return
1
;
}
static
void
UpdateGenericFromDemux
(
input_thread_t
*
p_input
)
{
demux_t
*
p_demux
=
p_input
->
p
->
input
.
p_demux
;
if
(
p_demux
->
info
.
i_update
&
INPUT_UPDATE_META
)
{
vlc_meta_t
*
p_meta
=
vlc_meta_New
();
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_GET_META
,
p_meta
);
InputUpdateMeta
(
p_input
,
p_meta
);
p_demux
->
info
.
i_update
&=
~
INPUT_UPDATE_META
;
}
p_demux
->
info
.
i_update
&=
~
INPUT_UPDATE_SIZE
;
}
/*****************************************************************************
* UpdateFromAccess:
* Update
*
FromAccess:
*****************************************************************************/
static
int
UpdateFromAccess
(
input_thread_t
*
p_input
)
static
int
Update
TitleSeekpoint
FromAccess
(
input_thread_t
*
p_input
)
{
access_t
*
p_access
=
p_input
->
p
->
input
.
p_access
;
...
...
@@ -2168,11 +2194,22 @@ static int UpdateFromAccess( input_thread_t *p_input )
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
;
}
static
void
UpdateGenericFromAccess
(
input_thread_t
*
p_input
)
{
access_t
*
p_access
=
p_input
->
p
->
input
.
p_access
;
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_META
)
{
/* TODO maybe multi - access ? */
vlc_meta_t
*
p_meta
=
vlc_meta_New
();
access_Control
(
p_input
->
p
->
input
.
p_access
,
ACCESS_GET_META
,
p_meta
);
access_Control
(
p_input
->
p
->
input
.
p_access
,
ACCESS_GET_META
,
p_meta
);
InputUpdateMeta
(
p_input
,
p_meta
);
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_META
;
}
...
...
@@ -2190,13 +2227,6 @@ static int UpdateFromAccess( input_thread_t *p_input )
}
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_SIZE
;
/* 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
;
}
/*****************************************************************************
...
...
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