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
c2f9cc44
Commit
c2f9cc44
authored
Nov 02, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved input_EsOutGetWakeup to es_out_Control.
parent
d551561d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
27 deletions
+46
-27
src/input/es_out.c
src/input/es_out.c
+27
-20
src/input/es_out.h
src/input/es_out.h
+17
-1
src/input/input.c
src/input/input.c
+2
-6
No files found.
src/input/es_out.c
View file @
c2f9cc44
...
@@ -327,26 +327,6 @@ es_out_id_t *input_EsOutGetFromID( es_out_t *out, int i_id )
...
@@ -327,26 +327,6 @@ es_out_id_t *input_EsOutGetFromID( es_out_t *out, int i_id )
return
NULL
;
return
NULL
;
}
}
mtime_t
input_EsOutGetWakeup
(
es_out_t
*
out
)
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
if
(
!
p_sys
->
p_pgrm
)
return
0
;
/* We do not have a wake up date if the input cannot have its speed
* controlled or sout is imposing its own or while buffering
*
* FIXME for !p_input->b_can_pace_control a wkeup time is still needed to avoid too strong buffering */
if
(
!
p_input
->
b_can_pace_control
||
p_input
->
p
->
b_out_pace_control
||
p_sys
->
b_buffering
)
return
0
;
return
input_clock_GetWakeup
(
p_sys
->
p_pgrm
->
p_clock
);
}
void
input_EsOutChangeRate
(
es_out_t
*
out
,
int
i_rate
)
void
input_EsOutChangeRate
(
es_out_t
*
out
,
int
i_rate
)
{
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
...
@@ -670,6 +650,26 @@ static void EsOutDelete( es_out_t *out )
...
@@ -670,6 +650,26 @@ static void EsOutDelete( es_out_t *out )
free
(
out
);
free
(
out
);
}
}
static
mtime_t
EsOutGetWakeup
(
es_out_t
*
out
)
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
if
(
!
p_sys
->
p_pgrm
)
return
0
;
/* We do not have a wake up date if the input cannot have its speed
* controlled or sout is imposing its own or while buffering
*
* FIXME for !p_input->b_can_pace_control a wkeup time is still needed to avoid too strong buffering */
if
(
!
p_input
->
b_can_pace_control
||
p_input
->
p
->
b_out_pace_control
||
p_sys
->
b_buffering
)
return
0
;
return
input_clock_GetWakeup
(
p_sys
->
p_pgrm
->
p_clock
);
}
static
void
EsOutDecodersStopBuffering
(
es_out_t
*
out
,
bool
b_forced
)
static
void
EsOutDecodersStopBuffering
(
es_out_t
*
out
,
bool
b_forced
)
{
{
...
@@ -2283,6 +2283,13 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
...
@@ -2283,6 +2283,13 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return
EsOutProgramDel
(
out
,
i_group
);
return
EsOutProgramDel
(
out
,
i_group
);
}
}
case
ES_OUT_GET_WAKE_UP
:
{
mtime_t
*
pi_wakeup
=
(
mtime_t
*
)
va_arg
(
args
,
mtime_t
*
);
*
pi_wakeup
=
EsOutGetWakeup
(
out
);
return
VLC_SUCCESS
;
}
default:
default:
msg_Err
(
p_sys
->
p_input
,
"unknown query in es_out_Control"
);
msg_Err
(
p_sys
->
p_input
,
"unknown query in es_out_Control"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
src/input/es_out.h
View file @
c2f9cc44
...
@@ -31,9 +31,25 @@
...
@@ -31,9 +31,25 @@
#include <vlc_common.h>
#include <vlc_common.h>
enum
es_out_query_private_e
{
/* Get date to wait before demuxing more data */
ES_OUT_GET_WAKE_UP
=
ES_OUT_PRIVATE_START
,
/* arg1=mtime_t* res=cannot fail */
};
static
inline
mtime_t
es_out_GetWakeup
(
es_out_t
*
p_out
)
{
mtime_t
i_wu
;
int
i_ret
=
es_out_Control
(
p_out
,
ES_OUT_GET_WAKE_UP
,
&
i_wu
);
assert
(
!
i_ret
);
return
i_wu
;
}
es_out_t
*
input_EsOutNew
(
input_thread_t
*
,
int
i_rate
);
es_out_t
*
input_EsOutNew
(
input_thread_t
*
,
int
i_rate
);
es_out_id_t
*
input_EsOutGetFromID
(
es_out_t
*
,
int
i_id
);
es_out_id_t
*
input_EsOutGetFromID
(
es_out_t
*
,
int
i_id
);
mtime_t
input_EsOutGetWakeup
(
es_out_t
*
);
void
input_EsOutSetDelay
(
es_out_t
*
,
int
i_cat
,
int64_t
);
void
input_EsOutSetDelay
(
es_out_t
*
,
int
i_cat
,
int64_t
);
int
input_EsOutSetRecord
(
es_out_t
*
,
bool
b_record
);
int
input_EsOutSetRecord
(
es_out_t
*
,
bool
b_record
);
void
input_EsOutChangeRate
(
es_out_t
*
,
int
);
void
input_EsOutChangeRate
(
es_out_t
*
,
int
);
...
...
src/input/input.c
View file @
c2f9cc44
...
@@ -754,9 +754,7 @@ static void MainLoop( input_thread_t *p_input )
...
@@ -754,9 +754,7 @@ static void MainLoop( input_thread_t *p_input )
{
{
MainLoopDemux
(
p_input
,
&
b_force_update
,
&
i_start_mdate
);
MainLoopDemux
(
p_input
,
&
b_force_update
,
&
i_start_mdate
);
input_EsOutLock
(
p_input
->
p
->
p_es_out
);
i_wakeup
=
es_out_GetWakeup
(
p_input
->
p
->
p_es_out
);
i_wakeup
=
input_EsOutGetWakeup
(
p_input
->
p
->
p_es_out
);
input_EsOutUnlock
(
p_input
->
p
->
p_es_out
);
}
}
/* */
/* */
...
@@ -794,11 +792,9 @@ static void MainLoop( input_thread_t *p_input )
...
@@ -794,11 +792,9 @@ static void MainLoop( input_thread_t *p_input )
/* Check if i_wakeup is still valid */
/* Check if i_wakeup is still valid */
if
(
i_wakeup
!=
0
)
if
(
i_wakeup
!=
0
)
{
{
input_EsOutLock
(
p_input
->
p
->
p_es_out
);
mtime_t
i_new_wakeup
=
es_out_GetWakeup
(
p_input
->
p
->
p_es_out
);
mtime_t
i_new_wakeup
=
input_EsOutGetWakeup
(
p_input
->
p
->
p_es_out
);
if
(
!
i_new_wakeup
)
if
(
!
i_new_wakeup
)
i_wakeup
=
0
;
i_wakeup
=
0
;
input_EsOutUnlock
(
p_input
->
p
->
p_es_out
);
}
}
}
while
(
i_current
<
i_wakeup
);
}
while
(
i_current
<
i_wakeup
);
}
}
...
...
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