Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0ca738e8
Commit
0ca738e8
authored
Nov 27, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Old RC: do not use pf_run
parent
2a579315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
modules/control/rc.c
modules/control/rc.c
+13
-5
No files found.
modules/control/rc.c
View file @
0ca738e8
...
...
@@ -80,7 +80,7 @@ static const char *ppsz_input_state[] = {
*****************************************************************************/
static
int
Activate
(
vlc_object_t
*
);
static
void
Deactivate
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
void
*
Run
(
void
*
);
static
void
Help
(
intf_thread_t
*
,
bool
);
static
void
RegisterCallbacks
(
intf_thread_t
*
);
...
...
@@ -123,6 +123,7 @@ struct intf_sys_t
int
*
pi_socket_listen
;
int
i_socket
;
char
*
psz_unix_path
;
vlc_thread_t
thread
;
/* status changes */
vlc_mutex_t
status_lock
;
...
...
@@ -210,6 +211,7 @@ vlc_module_end ()
*****************************************************************************/
static
int
Activate
(
vlc_object_t
*
p_this
)
{
/* FIXME: This function is full of memory leaks and bugs in error paths. */
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
char
*
psz_host
,
*
psz_unix_path
=
NULL
;
int
*
pi_socket
=
NULL
;
...
...
@@ -328,7 +330,7 @@ static int Activate( vlc_object_t *p_this )
/* Non-buffered stdout */
setvbuf
(
stdout
,
(
char
*
)
NULL
,
_IOLBF
,
0
);
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
NULL
;
#ifdef WIN32
p_intf
->
p_sys
->
b_quiet
=
var_InheritBool
(
p_intf
,
"rc-quiet"
);
...
...
@@ -338,6 +340,10 @@ static int Activate( vlc_object_t *p_this )
CONSOLE_INTRO_MSG
;
}
if
(
vlc_clone
(
&
p_intf
->
p_sys
->
thread
,
Run
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
abort
();
msg_rc
(
"%s"
,
_
(
"Remote control interface initialized. Type `help' for help."
)
);
return
VLC_SUCCESS
;
}
...
...
@@ -349,6 +355,8 @@ static void Deactivate( vlc_object_t *p_this )
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
vlc_join
(
p_intf
->
p_sys
->
thread
,
NULL
);
net_ListenClose
(
p_intf
->
p_sys
->
pi_socket_listen
);
if
(
p_intf
->
p_sys
->
i_socket
!=
-
1
)
net_Close
(
p_intf
->
p_sys
->
i_socket
);
...
...
@@ -439,8 +447,9 @@ static void RegisterCallbacks( intf_thread_t *p_intf )
* This part of the interface is in a separate thread so that we can call
* exec() from within it without annoying the rest of the program.
*****************************************************************************/
static
void
Run
(
intf_thread_t
*
p_intf
)
static
void
*
Run
(
void
*
data
)
{
intf_thread_t
*
p_intf
=
data
;
input_thread_t
*
p_input
=
NULL
;
playlist_t
*
p_playlist
=
pl_Get
(
p_intf
);
...
...
@@ -451,7 +460,6 @@ static void Run( intf_thread_t *p_intf )
int
i_size
=
0
;
int
i_oldpos
=
0
;
int
i_newpos
;
int
canc
=
vlc_savecancel
();
p_buffer
[
0
]
=
0
;
...
...
@@ -790,7 +798,7 @@ static void Run( intf_thread_t *p_intf )
}
var_DelCallback
(
p_playlist
,
"volume"
,
VolumeChanged
,
p_intf
);
vlc_restorecancel
(
canc
)
;
return
NULL
;
}
static
void
Help
(
intf_thread_t
*
p_intf
,
bool
b_longhelp
)
...
...
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