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
acb7470b
Commit
acb7470b
authored
Feb 05, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: remove useless parameter to input_Stop()
parent
bdcdf970
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
35 deletions
+18
-35
include/vlc_input.h
include/vlc_input.h
+1
-1
lib/media_player.c
lib/media_player.c
+6
-11
modules/misc/fingerprinter.c
modules/misc/fingerprinter.c
+2
-2
modules/services_discovery/podcast.c
modules/services_discovery/podcast.c
+2
-2
src/input/input.c
src/input/input.c
+1
-12
src/input/input_internal.h
src/input/input_internal.h
+0
-1
src/input/vlm.c
src/input/vlm.c
+3
-3
src/playlist/item.c
src/playlist/item.c
+1
-1
src/playlist/thread.c
src/playlist/thread.c
+2
-2
No files found.
include/vlc_input.h
View file @
acb7470b
...
...
@@ -494,7 +494,7 @@ VLC_API input_thread_t * input_CreateAndStart( vlc_object_t *p_parent, input_ite
VLC_API
int
input_Start
(
input_thread_t
*
);
VLC_API
void
input_Stop
(
input_thread_t
*
,
bool
b_abort
);
VLC_API
void
input_Stop
(
input_thread_t
*
);
VLC_API
int
input_Read
(
vlc_object_t
*
,
input_item_t
*
);
#define input_Read(a,b) input_Read(VLC_OBJECT(a),b)
...
...
lib/media_player.c
View file @
acb7470b
...
...
@@ -124,7 +124,7 @@ static inline void unlock_input(libvlc_media_player_t *mp)
* Object lock is NOT held.
* Input lock is held or instance is being destroyed.
*/
static
void
release_input_thread
(
libvlc_media_player_t
*
p_mi
,
bool
b_input_abort
)
static
void
release_input_thread
(
libvlc_media_player_t
*
p_mi
)
{
assert
(
p_mi
);
...
...
@@ -144,7 +144,7 @@ static void release_input_thread( libvlc_media_player_t *p_mi, bool b_input_abor
del_es_callbacks
(
p_input_thread
,
p_mi
);
/* We owned this one */
input_Stop
(
p_input_thread
,
b_input_abort
);
input_Stop
(
p_input_thread
);
input_Close
(
p_input_thread
);
}
...
...
@@ -685,7 +685,7 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
/* No need for lock_input() because no other threads knows us anymore */
if
(
p_mi
->
input
.
p_thread
)
release_input_thread
(
p_mi
,
true
);
release_input_thread
(
p_mi
);
input_resource_Terminate
(
p_mi
->
input
.
p_resource
);
input_resource_Release
(
p_mi
->
input
.
p_resource
);
vlc_mutex_destroy
(
&
p_mi
->
input
.
lock
);
...
...
@@ -742,12 +742,7 @@ void libvlc_media_player_set_media(
{
lock_input
(
p_mi
);
/* FIXME I am not sure if it is a user request or on die(eof/error)
* request here */
release_input_thread
(
p_mi
,
p_mi
->
input
.
p_thread
&&
!
p_mi
->
input
.
p_thread
->
b_eof
&&
!
p_mi
->
input
.
p_thread
->
b_error
);
release_input_thread
(
p_mi
);
lock
(
p_mi
);
set_state
(
p_mi
,
libvlc_NothingSpecial
,
true
);
...
...
@@ -899,7 +894,7 @@ void libvlc_media_player_set_pause( libvlc_media_player_t *p_mi, int paused )
if
(
libvlc_media_player_can_pause
(
p_mi
)
)
input_Control
(
p_input_thread
,
INPUT_SET_STATE
,
PAUSE_S
);
else
input_Stop
(
p_input_thread
,
true
);
input_Stop
(
p_input_thread
);
}
}
else
...
...
@@ -941,7 +936,7 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi )
libvlc_state_t
state
=
libvlc_media_player_get_state
(
p_mi
);
lock_input
(
p_mi
);
release_input_thread
(
p_mi
,
true
);
/* This will stop the input thread */
release_input_thread
(
p_mi
);
/* This will stop the input thread */
/* Force to go to stopped state, in case we were in Ended, or Error
* state. */
...
...
modules/misc/fingerprinter.c
View file @
acb7470b
...
...
@@ -143,7 +143,7 @@ static void cancelDoFingerprint( void *p_arg )
fingerprinter_sys_t
*
p_sys
=
(
fingerprinter_sys_t
*
)
p_arg
;
if
(
p_sys
->
p_input
)
{
input_Stop
(
p_sys
->
p_input
,
true
);
input_Stop
(
p_sys
->
p_input
);
input_Close
(
p_sys
->
p_input
);
}
/* cleanup temporary result */
...
...
@@ -217,7 +217,7 @@ static void DoFingerprint( vlc_object_t *p_this, fingerprinter_sys_t *p_sys, aco
}
var_DelCallback
(
p_sys
->
p_input
,
"intf-event"
,
inputStateCallback
,
p_sys
);
}
input_Stop
(
p_sys
->
p_input
,
true
);
input_Stop
(
p_sys
->
p_input
);
input_Close
(
p_sys
->
p_input
);
p_sys
->
p_input
=
NULL
;
...
...
modules/services_discovery/podcast.c
View file @
acb7470b
...
...
@@ -186,7 +186,7 @@ static void Close( vlc_object_t *p_this )
if
(
!
p_input
)
continue
;
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
);
input_Close
(
p_input
);
p_sd
->
p_sys
->
pp_input
[
i
]
=
NULL
;
...
...
@@ -237,7 +237,7 @@ static void *Run( void *data )
if
(
p_input
->
b_eof
||
p_input
->
b_error
)
{
input_Stop
(
p_input
,
false
);
input_Stop
(
p_input
);
input_Close
(
p_input
);
p_sd
->
p_sys
->
pp_input
[
i
]
=
NULL
;
...
...
src/input/input.c
View file @
acb7470b
...
...
@@ -235,24 +235,14 @@ int input_Start( input_thread_t *p_input )
/**
* Request a running input thread to stop and die
*
* b_abort must be true when a user stop is requested and not because you have
* detected an error or an eof. It will be used to properly send the
* INPUT_EVENT_ABORT event.
*
* \param p_input the input thread to stop
* \param b_abort true if the input has been aborted by a user request
*/
void
input_Stop
(
input_thread_t
*
p_input
,
bool
b_abort
)
void
input_Stop
(
input_thread_t
*
p_input
)
{
/* Set die for input and ALL of this childrens (even (grand-)grand-childrens)
* It is needed here even if it is done in INPUT_CONTROL_SET_DIE handler to
* unlock the control loop */
ObjectKillChildrens
(
VLC_OBJECT
(
p_input
)
);
vlc_mutex_lock
(
&
p_input
->
p
->
lock_control
);
p_input
->
p
->
b_abort
|=
b_abort
;
vlc_mutex_unlock
(
&
p_input
->
p
->
lock_control
);
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_DIE
,
NULL
);
}
...
...
@@ -397,7 +387,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
vlc_mutex_init
(
&
p_input
->
p
->
lock_control
);
vlc_cond_init
(
&
p_input
->
p
->
wait_control
);
p_input
->
p
->
i_control
=
0
;
p_input
->
p
->
b_abort
=
false
;
p_input
->
p
->
is_running
=
false
;
/* Create Object Variables for private use only */
...
...
src/input/input_internal.h
View file @
acb7470b
...
...
@@ -161,7 +161,6 @@ struct input_thread_private_t
int
i_control
;
input_control_t
control
[
INPUT_CONTROL_FIFO_SIZE
];
bool
b_abort
;
bool
is_running
;
vlc_thread_t
thread
;
};
...
...
src/input/vlm.c
View file @
acb7470b
...
...
@@ -662,7 +662,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
var_DelCallback
(
p_input
,
"intf-event"
,
InputEventPreparse
,
&
preparse
);
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
);
input_Close
(
p_input
);
vlc_sem_destroy
(
&
sem_preparse
);
}
...
...
@@ -904,7 +904,7 @@ static void vlm_MediaInstanceDelete( vlm_t *p_vlm, int64_t id, vlm_media_instanc
input_thread_t
*
p_input
=
p_instance
->
p_input
;
if
(
p_input
)
{
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
);
input_Join
(
p_input
);
var_DelCallback
(
p_instance
->
p_input
,
"intf-event"
,
InputEvent
,
p_media
);
input_Release
(
p_input
);
...
...
@@ -996,7 +996,7 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char *
}
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
);
input_Join
(
p_input
);
var_DelCallback
(
p_instance
->
p_input
,
"intf-event"
,
InputEvent
,
p_media
);
input_Release
(
p_input
);
...
...
src/playlist/item.c
View file @
acb7470b
...
...
@@ -755,7 +755,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
sys
->
request
.
i_skip
=
0
;
sys
->
request
.
p_item
=
p_item
;
if
(
sys
->
p_input
!=
NULL
)
input_Stop
(
sys
->
p_input
,
true
);
input_Stop
(
sys
->
p_input
);
vlc_cond_signal
(
&
sys
->
signal
);
}
/* Preparse if no artist/album info, and hasn't been preparsed allready
...
...
src/playlist/thread.c
View file @
acb7470b
...
...
@@ -438,7 +438,7 @@ static void LoopInput( playlist_t *p_playlist )
if
(
p_sys
->
request
.
b_request
||
p_sys
->
killed
)
{
PL_DEBUG
(
"incoming request - stopping current input"
);
input_Stop
(
p_input
,
true
);
input_Stop
(
p_input
);
}
#warning Unsynchronized access to *p_input flags...
...
...
@@ -466,7 +466,7 @@ static void LoopInput( playlist_t *p_playlist )
else
if
(
p_input
->
b_error
||
p_input
->
b_eof
)
{
PL_DEBUG
(
"finished input"
);
input_Stop
(
p_input
,
false
);
input_Stop
(
p_input
);
}
vlc_cond_wait
(
&
p_sys
->
signal
,
&
p_sys
->
lock
);
...
...
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