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
d20d0224
Commit
d20d0224
authored
Aug 28, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPnP CyberLink: do not spawn a useless poll thread (untested)
parent
64052e01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
41 deletions
+23
-41
modules/services_discovery/upnp_cc.cpp
modules/services_discovery/upnp_cc.cpp
+23
-41
No files found.
modules/services_discovery/upnp_cc.cpp
View file @
d20d0224
...
...
@@ -68,35 +68,6 @@ vlc_module_begin();
vlc_module_end
();
/*****************************************************************************
* Local prototypes
*****************************************************************************/
/* Main functions */
static
void
Run
(
services_discovery_t
*
p_sd
);
/*****************************************************************************
* Open: initialize and create stuff
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
p_sd
->
pf_run
=
Run
;
services_discovery_SetLocalizedName
(
p_sd
,
_
(
"Devices"
)
);
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Close:
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
}
/*****************************************************************************
* Run: main UPnP thread
*****************************************************************************
...
...
@@ -145,24 +116,35 @@ class UPnPHandler : public MediaPlayer, public DeviceChangeListener,
addSearchResponseListener
(
this
);
//addEventListener( this );
}
};
static
void
Run
(
services_discovery_t
*
p_sd
)
/*****************************************************************************
* Open: initialize and create stuff
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
UPnPHandler
u
(
p_sd
)
;
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
u
.
start
(
);
services_discovery_SetLocalizedName
(
p_sd
,
_
(
"Devices"
)
);
msg_Dbg
(
p_sd
,
"UPnP discovery started"
);
/* read SAP packets */
while
(
vlc_object_alive
(
p_sd
)
)
{
msleep
(
500
);
}
UPnPHandler
*
u
=
new
UPnPHandler
(
p_sd
);
u
->
start
(
);
msg_Dbg
(
p_sd
,
"upnp discovery started"
);
p_sd
->
p_private
=
u
;
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Close:
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
UPnPHandler
*
u
=
(
UPnPHandler
*
)
p_this
->
p_private
;
u
->
stop
(
);
u
.
stop
();
msg_Dbg
(
p_sd
,
"UPnP discovery stopped"
);
msg_Dbg
(
p_this
,
"upnp discovery started"
);
}
...
...
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