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
11f3cbaa
Commit
11f3cbaa
authored
Jul 09, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remoteosd: inline connect function
No need to duplicate debug from net_Connect()...
parent
bcc5917f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
31 deletions
+7
-31
modules/video_filter/remoteosd.c
modules/video_filter/remoteosd.c
+7
-31
No files found.
modules/video_filter/remoteosd.c
View file @
11f3cbaa
...
...
@@ -164,8 +164,6 @@ static void* vnc_worker_thread ( void * );
static
void
*
update_request_thread
(
void
*
);
static
bool
open_vnc_connection
(
filter_t
*
p_filter
);
static
bool
handshaking
(
filter_t
*
p_filter
);
static
bool
process_server_message
(
filter_t
*
p_filter
,
...
...
@@ -204,7 +202,6 @@ struct filter_sys_t
uint8_t
i_alpha
;
/* alpha transparency value */
char
*
psz_host
;
/* VNC host */
int
i_port
;
char
*
psz_passwd
;
/* VNC password */
...
...
@@ -264,8 +261,6 @@ static int CreateFilter ( vlc_object_t *p_this )
goto
error
;
}
p_sys
->
i_port
=
var_CreateGetIntegerCommand
(
p_this
,
RMTOSD_CFG
"port"
);
p_sys
->
i_alpha
=
var_CreateGetIntegerCommand
(
p_this
,
RMTOSD_CFG
"alpha"
);
for
(
int
i
=
0
;
i
<
256
;
i
++
)
...
...
@@ -335,7 +330,6 @@ static void DestroyFilter( vlc_object_t *p_this )
var_DelCallback
(
p_filter
->
p_libvlc
,
"key-pressed"
,
KeyEvent
,
p_this
);
var_Destroy
(
p_this
,
RMTOSD_CFG
"host"
);
var_Destroy
(
p_this
,
RMTOSD_CFG
"port"
);
var_Destroy
(
p_this
,
RMTOSD_CFG
"password"
);
var_Destroy
(
p_this
,
RMTOSD_CFG
"mouse-events"
);
var_Destroy
(
p_this
,
RMTOSD_CFG
"key-events"
);
...
...
@@ -376,26 +370,6 @@ static bool write_exact( filter_t *p_filter,
return
i_bytes
==
net_Write
(
p_filter
,
i_socket
,
p_writebuf
,
i_bytes
);
}
static
bool
open_vnc_connection
(
filter_t
*
p_filter
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
msg_Dbg
(
p_filter
,
"Open socket to vnc server on %s:%u."
,
p_sys
->
psz_host
,
p_sys
->
i_port
);
p_sys
->
i_socket
=
net_ConnectTCP
(
p_filter
,
p_sys
->
psz_host
,
p_sys
->
i_port
);
if
(
p_sys
->
i_socket
<
0
)
{
msg_Err
(
p_filter
,
"Could not open socket"
);
return
false
;
}
msg_Dbg
(
p_filter
,
"socket is open."
);
return
true
;
}
static
bool
handshaking
(
filter_t
*
p_filter
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
...
...
@@ -637,10 +611,13 @@ static void* vnc_worker_thread( void *obj )
msg_Dbg
(
p_filter
,
"VNC worker thread started"
);
if
(
!
open_vnc_connection
(
p_filter
)
)
int
i_port
=
var_InheritInteger
(
p_filter
,
RMTOSD_CFG
"port"
);
p_sys
->
i_socket
=
net_ConnectTCP
(
p_filter
,
p_sys
->
psz_host
,
i_port
);
if
(
p_sys
->
i_socket
==
-
1
)
{
msg_Err
(
p_filter
,
"Could not connect to
vnc
host"
);
goto
exit
;
msg_Err
(
p_filter
,
"Could not connect to
VNC
host"
);
return
NULL
;
}
if
(
!
handshaking
(
p_filter
)
)
...
...
@@ -742,7 +719,6 @@ exit:
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
b_connection_active
=
false
;
if
(
p_sys
->
i_socket
>=
0
)
net_Close
(
p_sys
->
i_socket
);
if
(
p_sys
->
p_pic
)
...
...
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