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
187a6ea2
Commit
187a6ea2
authored
Sep 17, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Interfaces are now allowed not to have a Run function.
This will help reduce useless process wakeups
parent
c17e7670
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
modules/misc/notify/notify.c
modules/misc/notify/notify.c
+0
-11
src/interface/interface.c
src/interface/interface.c
+11
-1
No files found.
modules/misc/notify/notify.c
View file @
187a6ea2
...
...
@@ -38,7 +38,6 @@
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
int
ItemChange
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -49,7 +48,6 @@ static int Notify( vlc_object_t *, const char * );
* Module descriptor
****************************************************************************/
#define APPLICATION_NAME "VLC media player"
#define TIMEOUT_TEXT N_("Timeout (ms)")
...
...
@@ -86,7 +84,6 @@ static int Open( vlc_object_t *p_this )
var_AddCallback
(
p_playlist
,
"playlist-current"
,
ItemChange
,
p_intf
);
pl_Release
(
p_intf
);
p_intf
->
pf_run
=
Run
;
return
VLC_SUCCESS
;
}
...
...
@@ -102,14 +99,6 @@ static void Close( vlc_object_t *p_this )
notify_uninit
();
}
/*****************************************************************************
* Run
*****************************************************************************/
static
void
Run
(
intf_thread_t
*
p_this
)
{
msleep
(
10
*
INTF_IDLE_SLEEP
);
}
/*****************************************************************************
* ItemChange: Playlist item change callback
*****************************************************************************/
...
...
src/interface/interface.c
View file @
187a6ea2
...
...
@@ -186,6 +186,11 @@ int intf_RunThread( intf_thread_t *p_intf )
}
else
{
/* This interface doesn't need to be run */
if
(
!
p_intf
->
pf_run
)
{
return
VLC_SUCCESS
;
}
/* Run the interface in a separate thread */
if
(
!
strcmp
(
p_intf
->
p_module
->
psz_object_name
,
"macosx"
)
)
{
...
...
@@ -226,6 +231,10 @@ int intf_RunThread( intf_thread_t *p_intf )
}
else
{
/* This interface doesn't need to be run */
if
(
!
p_intf
->
pf_run
)
return
VLC_SUCCESS
;
/* Run the interface in a separate thread */
if
(
vlc_thread_create
(
p_intf
,
"interface"
,
RunInterface
,
VLC_THREAD_PRIORITY_LOW
,
VLC_FALSE
)
)
...
...
@@ -255,7 +264,8 @@ void intf_StopThread( intf_thread_t *p_intf )
}
/* Wait for the thread to exit */
vlc_thread_join
(
p_intf
);
if
(
p_intf
->
pf_run
)
vlc_thread_join
(
p_intf
);
}
/**
...
...
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