Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
1153717c
Commit
1153717c
authored
Aug 18, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/services_discovery.c: Use a stop method to end the service.
parent
716d5bf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
include/vlc_playlist.h
include/vlc_playlist.h
+1
-0
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+15
-6
No files found.
include/vlc_playlist.h
View file @
1153717c
...
...
@@ -428,6 +428,7 @@ VLC_EXPORT( playlist_item_t *, playlist_GetLastLeaf, ( playlist_t *p_playlist, p
VLC_EXPORT
(
services_discovery_t
*
,
services_discovery_Create
,
(
vlc_object_t
*
p_super
,
const
char
*
psz_service_name
)
);
VLC_EXPORT
(
void
,
services_discovery_Destroy
,
(
services_discovery_t
*
p_this
)
);
VLC_EXPORT
(
int
,
services_discovery_Start
,
(
services_discovery_t
*
p_this
)
);
VLC_EXPORT
(
void
,
services_discovery_Stop
,
(
services_discovery_t
*
p_this
)
);
/* Read info from discovery object */
VLC_EXPORT
(
char
*
,
services_discovery_GetLocalizedName
,
(
services_discovery_t
*
p_this
)
);
...
...
src/playlist/services_discovery.c
View file @
1153717c
...
...
@@ -72,13 +72,9 @@ services_discovery_Create ( vlc_object_t * p_super, const char * psz_module_name
***********************************************************************/
void
services_discovery_Destroy
(
services_discovery_t
*
p_sd
)
{
vlc_object_kill
(
p_sd
);
if
(
p_sd
->
pf_run
)
vlc_thread_join
(
p_sd
);
vlc_event_manager_fini
(
&
p_sd
->
event_manager
);
free
(
p_sd
->
psz_module
);
module_Unneed
(
p_sd
,
p_sd
->
p_module
);
vlc_event_manager_fini
(
&
p_sd
->
event_manager
);
free
(
p_sd
->
psz_localized_name
);
vlc_object_destroy
(
p_sd
);
...
...
@@ -100,6 +96,17 @@ int services_discovery_Start ( services_discovery_t * p_sd )
return
VLC_SUCCESS
;
}
/***********************************************************************
* Stop
***********************************************************************/
void
services_discovery_Stop
(
services_discovery_t
*
p_sd
)
{
vlc_object_kill
(
p_sd
);
if
(
p_sd
->
pf_run
)
vlc_thread_join
(
p_sd
);
module_Unneed
(
p_sd
,
p_sd
->
p_module
);
}
/***********************************************************************
* GetLocalizedName
***********************************************************************/
...
...
@@ -316,7 +323,7 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
if
(
p_asd
&&
p_asd
->
p_sd
)
{
services_discovery_
Destroy
(
p_asd
->
p_sd
);
services_discovery_
Stop
(
p_asd
->
p_sd
);
vlc_event_detach
(
services_discovery_EventManager
(
p_asd
->
p_sd
),
vlc_ServicesDiscoveryItemAdded
,
...
...
@@ -348,6 +355,8 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
}
PL_UNLOCK
;
services_discovery_Destroy
(
p_asd
->
p_sd
);
free
(
p_asd
);
}
else
...
...
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