[vlc-devel] commit: Always send the SD events ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Sep 13 21:28:56 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Sep 13 22:32:17 2008 +0300| [7c9a664e765f24510f8d8004bd66a242219dc8c8] | committer: Rémi Denis-Courmont
Always send the SD events
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c9a664e765f24510f8d8004bd66a242219dc8c8
---
src/playlist/services_discovery.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index 229f984..487a7c6 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -109,6 +109,11 @@ void services_discovery_Destroy ( services_discovery_t * p_sd )
***********************************************************************/
int services_discovery_Start ( services_discovery_t * p_sd )
{
+ vlc_event_t event = {
+ .type = vlc_ServicesDiscoveryStarted
+ };
+ vlc_event_send( &p_sd->event_manager, &event );
+
if ((p_sd->pf_run != NULL)
&& vlc_thread_create( p_sd, "services_discovery", RunSD,
VLC_THREAD_PRIORITY_LOW, false))
@@ -137,9 +142,14 @@ static void ObjectKillChildrens( vlc_object_t *p_obj )
void services_discovery_Stop ( services_discovery_t * p_sd )
{
+ vlc_event_t event = {
+ .type = vlc_ServicesDiscoveryEnded
+ };
+
ObjectKillChildrens( VLC_OBJECT(p_sd) );
if( p_sd->pf_run ) vlc_thread_join( p_sd );
+ vlc_event_send( &p_sd->event_manager, &event );
module_Unneed( p_sd, p_sd->p_module );
}
@@ -205,19 +215,7 @@ services_discovery_RemoveItem ( services_discovery_t * p_sd, input_item_t * p_it
static void* RunSD( vlc_object_t *p_this )
{
services_discovery_t *p_sd = (services_discovery_t *)p_this;
- vlc_event_t event = {
- .type = vlc_ServicesDiscoveryStarted
- };
- int canc = vlc_savecancel ();
- vlc_event_send( &p_sd->event_manager, &event );
- vlc_restorecancel (canc);
-
p_sd->pf_run( p_sd );
-
- canc = vlc_savecancel ();
- event.type = vlc_ServicesDiscoveryEnded;
- vlc_event_send( &p_sd->event_manager, &event );
- vlc_restorecancel (canc);
return NULL;
}
More information about the vlc-devel
mailing list