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
e44b8916
Commit
e44b8916
authored
Sep 11, 2009
by
Sébastien Escudier
Committed by
Rémi Denis-Courmont
Sep 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vod input preparsing : use input events instead of msleep
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
6fc6b16d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
src/input/vlm.c
src/input/vlm.c
+21
-2
No files found.
src/input/vlm.c
View file @
e44b8916
...
...
@@ -69,6 +69,18 @@ static void vlm_Destructor( vlm_t *p_vlm );
static
void
*
Manage
(
void
*
);
static
int
vlm_MediaVodControl
(
void
*
,
vod_media_t
*
,
const
char
*
,
int
,
va_list
);
static
int
InputEventPreparse
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
oldval
);
vlc_sem_t
*
p_sem_preparse
=
p_data
;
if
(
newval
.
i_int
==
INPUT_EVENT_DEAD
)
vlc_sem_post
(
p_sem_preparse
);
return
VLC_SUCCESS
;
}
static
int
InputEvent
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
...
...
@@ -558,8 +570,15 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
if
(
(
p_input
=
input_CreateAndStart
(
p_vlm
->
p_libvlc
,
p_media
->
vod
.
p_item
,
psz_header
)
)
)
{
while
(
!
p_input
->
b_eof
&&
!
p_input
->
b_error
)
msleep
(
100000
);
vlc_sem_t
sem_preparse
;
vlc_sem_init
(
&
sem_preparse
,
0
);
var_AddCallback
(
p_input
,
"intf-event"
,
InputEventPreparse
,
&
sem_preparse
);
if
(
!
p_input
->
b_dead
)
vlc_sem_wait
(
&
sem_preparse
);
var_DelCallback
(
p_input
,
"intf-event"
,
InputEventPreparse
,
&
sem_preparse
);
vlc_sem_destroy
(
&
sem_preparse
);
input_Stop
(
p_input
,
false
);
vlc_thread_join
(
p_input
);
...
...
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