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
73b3ef6a
Commit
73b3ef6a
authored
Nov 18, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Faster close when timeshift is active.
It is useless to read the stream data when flushing.
parent
b8525bc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+10
-9
No files found.
src/input/es_out_timeshift.c
View file @
73b3ef6a
...
...
@@ -234,7 +234,7 @@ static void TsAutoStop( es_out_t * );
static
void
TsStop
(
ts_thread_t
*
);
static
void
TsPushCmd
(
ts_thread_t
*
,
ts_cmd_t
*
);
static
int
TsPopCmdLocked
(
ts_thread_t
*
,
ts_cmd_t
*
);
static
int
TsPopCmdLocked
(
ts_thread_t
*
,
ts_cmd_t
*
,
bool
b_flush
);
static
bool
TsHasCmd
(
ts_thread_t
*
);
static
bool
TsIsUnused
(
ts_thread_t
*
);
static
int
TsChangePause
(
ts_thread_t
*
,
bool
b_source_paused
,
bool
b_paused
,
mtime_t
i_date
);
...
...
@@ -248,7 +248,7 @@ static void TsStoragePack( ts_storage_t *p_storage );
static
bool
TsStorageIsFull
(
ts_storage_t
*
,
const
ts_cmd_t
*
p_cmd
);
static
bool
TsStorageIsEmpty
(
ts_storage_t
*
);
static
void
TsStoragePushCmd
(
ts_storage_t
*
,
const
ts_cmd_t
*
p_cmd
,
bool
b_flush
);
static
void
TsStoragePopCmd
(
ts_storage_t
*
p_storage
,
ts_cmd_t
*
p_cmd
);
static
void
TsStoragePopCmd
(
ts_storage_t
*
p_storage
,
ts_cmd_t
*
p_cmd
,
bool
b_flush
);
static
void
CmdClean
(
ts_cmd_t
*
);
static
void
cmd_cleanup_routine
(
void
*
p
)
{
CmdClean
(
p
);
}
...
...
@@ -762,7 +762,7 @@ static void TsStop( ts_thread_t *p_ts )
{
ts_cmd_t
cmd
;
if
(
TsPopCmdLocked
(
p_ts
,
&
cmd
)
)
if
(
TsPopCmdLocked
(
p_ts
,
&
cmd
,
true
)
)
break
;
CmdClean
(
&
cmd
);
...
...
@@ -809,14 +809,14 @@ static void TsPushCmd( ts_thread_t *p_ts, ts_cmd_t *p_cmd )
vlc_mutex_unlock
(
&
p_ts
->
lock
);
}
static
int
TsPopCmdLocked
(
ts_thread_t
*
p_ts
,
ts_cmd_t
*
p_cmd
)
static
int
TsPopCmdLocked
(
ts_thread_t
*
p_ts
,
ts_cmd_t
*
p_cmd
,
bool
b_flush
)
{
vlc_assert_locked
(
&
p_ts
->
lock
);
if
(
TsStorageIsEmpty
(
p_ts
->
p_storage_r
)
)
return
VLC_EGENERIC
;
TsStoragePopCmd
(
p_ts
->
p_storage_r
,
p_cmd
);
TsStoragePopCmd
(
p_ts
->
p_storage_r
,
p_cmd
,
b_flush
);
while
(
p_ts
->
p_storage_r
&&
TsStorageIsEmpty
(
p_ts
->
p_storage_r
)
)
{
...
...
@@ -922,7 +922,7 @@ static void *TsRun( vlc_object_t *p_thread )
const
int
canc
=
vlc_savecancel
();
b_buffering
=
es_out_GetBuffering
(
p_ts
->
p_out
);
if
(
(
!
p_ts
->
b_paused
||
b_buffering
)
&&
!
TsPopCmdLocked
(
p_ts
,
&
cmd
)
)
if
(
(
!
p_ts
->
b_paused
||
b_buffering
)
&&
!
TsPopCmdLocked
(
p_ts
,
&
cmd
,
false
)
)
{
vlc_restorecancel
(
canc
);
break
;
...
...
@@ -1059,7 +1059,7 @@ static void TsStorageDelete( ts_storage_t *p_storage )
{
ts_cmd_t
cmd
;
TsStoragePopCmd
(
p_storage
,
&
cmd
);
TsStoragePopCmd
(
p_storage
,
&
cmd
,
true
);
CmdClean
(
&
cmd
);
}
...
...
@@ -1140,7 +1140,7 @@ static void TsStoragePushCmd( ts_storage_t *p_storage, const ts_cmd_t *p_cmd, bo
}
p_storage
->
p_cmd
[
p_storage
->
i_cmd_w
++
]
=
cmd
;
}
static
void
TsStoragePopCmd
(
ts_storage_t
*
p_storage
,
ts_cmd_t
*
p_cmd
)
static
void
TsStoragePopCmd
(
ts_storage_t
*
p_storage
,
ts_cmd_t
*
p_cmd
,
bool
b_flush
)
{
assert
(
!
TsStorageIsEmpty
(
p_storage
)
);
...
...
@@ -1149,7 +1149,8 @@ static void TsStoragePopCmd( ts_storage_t *p_storage, ts_cmd_t *p_cmd )
{
block_t
block
;
if
(
!
fseek
(
p_storage
->
p_filer
,
p_cmd
->
send
.
i_offset
,
SEEK_SET
)
&&
if
(
!
b_flush
&&
!
fseek
(
p_storage
->
p_filer
,
p_cmd
->
send
.
i_offset
,
SEEK_SET
)
&&
fread
(
&
block
,
sizeof
(
block
),
1
,
p_storage
->
p_filer
)
==
1
)
{
block_t
*
p_block
=
block_Alloc
(
block
.
i_buffer
);
...
...
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