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
b6203ed6
Commit
b6203ed6
authored
Mar 25, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_demux: replace deprecated vlc_object_alive()
parent
e865945b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/input/stream_demux.c
src/input/stream_demux.c
+7
-4
No files found.
src/input/stream_demux.c
View file @
b6203ed6
...
...
@@ -29,6 +29,7 @@
#include "demux.h"
#include <libvlc.h>
#include <vlc_codec.h>
#include <vlc_atomic.h>
/****************************************************************************
* stream_Demux*: create a demuxer for an outpout stream (allow demuxer chain)
...
...
@@ -45,6 +46,7 @@ struct stream_sys_t
char
*
psz_name
;
es_out_t
*
out
;
atomic_bool
active
;
vlc_thread_t
thread
;
vlc_mutex_t
lock
;
struct
...
...
@@ -103,6 +105,7 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
return
NULL
;
}
atomic_init
(
&
p_sys
->
active
,
true
);
vlc_mutex_init
(
&
p_sys
->
lock
);
if
(
vlc_clone
(
&
p_sys
->
thread
,
DStreamThread
,
s
,
VLC_THREAD_PRIORITY_INPUT
)
)
...
...
@@ -156,7 +159,7 @@ static void DStreamDelete( stream_t *s )
stream_sys_t
*
p_sys
=
s
->
p_sys
;
block_t
*
p_empty
;
vlc_object_kill
(
s
);
atomic_store
(
&
p_sys
->
active
,
false
);
p_empty
=
block_Alloc
(
0
);
block_FifoPut
(
p_sys
->
p_fifo
,
p_empty
);
vlc_join
(
p_sys
->
thread
,
NULL
);
...
...
@@ -180,7 +183,7 @@ static int DStreamRead( stream_t *s, void *p_read, unsigned int i_read )
//msg_Dbg( s, "DStreamRead: wanted %d bytes", i_read );
while
(
vlc_object_alive
(
s
)
&&
!
s
->
b_error
&&
i_read
)
while
(
atomic_load
(
&
p_sys
->
active
)
&&
!
s
->
b_error
&&
i_read
)
{
block_t
*
p_block
=
p_sys
->
p_block
;
int
i_copy
;
...
...
@@ -223,7 +226,7 @@ static int DStreamPeek( stream_t *s, const uint8_t **pp_peek, unsigned int i_pee
//msg_Dbg( s, "DStreamPeek: wanted %d bytes", i_peek );
while
(
vlc_object_alive
(
s
)
&&
!
s
->
b_error
&&
i_peek
)
while
(
atomic_load
(
&
p_sys
->
active
)
&&
!
s
->
b_error
&&
i_peek
)
{
int
i_copy
;
...
...
@@ -326,7 +329,7 @@ static void* DStreamThread( void *obj )
/* Main loop */
mtime_t
next_update
=
0
;
while
(
vlc_object_alive
(
s
)
)
while
(
atomic_load
(
&
p_sys
->
active
)
)
{
if
(
p_demux
->
info
.
i_update
||
mdate
()
>=
next_update
)
{
...
...
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