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
323539bd
Commit
323539bd
authored
Jul 09, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remoteosd: factor code
parent
23930b32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
modules/video_filter/remoteosd.c
modules/video_filter/remoteosd.c
+22
-24
No files found.
modules/video_filter/remoteosd.c
View file @
323539bd
...
...
@@ -625,6 +625,25 @@ static bool handshaking ( filter_t *p_filter )
}
static
int
write_update_request
(
filter_t
*
p_filter
,
bool
incremental
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
rfbFramebufferUpdateRequestMsg
udr
;
udr
.
type
=
rfbFramebufferUpdateRequest
;
udr
.
incremental
=
incremental
;
udr
.
x
=
0
;
udr
.
y
=
0
;
udr
.
w
=
htons
(
p_sys
->
i_vnc_width
);
udr
.
h
=
htons
(
p_sys
->
i_vnc_height
);
int
w
=
write_exact
(
p_filter
,
p_sys
->
i_socket
,
(
char
*
)
&
udr
,
sz_rfbFramebufferUpdateRequestMsg
);
if
(
!
w
)
msg_Err
(
p_filter
,
"Could not write rfbFramebufferUpdateRequestMsg."
);
return
w
;
}
static
void
*
vnc_worker_thread
(
void
*
obj
)
{
filter_t
*
p_filter
=
(
filter_t
*
)
obj
;
...
...
@@ -758,37 +777,16 @@ static void* update_request_thread( void *obj )
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
msg_Dbg
(
p_filter
,
"VNC update request thread started"
);
rfbFramebufferUpdateRequestMsg
udr
;
udr
.
type
=
rfbFramebufferUpdateRequest
;
udr
.
incremental
=
0
;
udr
.
x
=
0
;
udr
.
y
=
0
;
udr
.
w
=
htons
(
p_sys
->
i_vnc_width
);
udr
.
h
=
htons
(
p_sys
->
i_vnc_height
);
int
w
=
write_exact
(
p_filter
,
p_sys
->
i_socket
,
(
char
*
)
&
udr
,
sz_rfbFramebufferUpdateRequestMsg
);
if
(
!
w
)
{
msg_Err
(
p_filter
,
"Could not write rfbFramebufferUpdateRequestMsg."
);
if
(
!
write_update_request
(
p_filter
,
false
)
)
return
NULL
;
}
udr
.
incremental
=
1
;
if
(
p_sys
->
b_vnc_poll
)
{
for
(
;;
)
{
msleep
(
p_sys
->
i_vnc_poll_interval
*
1000
);
if
(
!
write_exact
(
p_filter
,
p_sys
->
i_socket
,
(
char
*
)
&
udr
,
sz_rfbFramebufferUpdateRequestMsg
))
{
msg_Err
(
p_filter
,
"Could not write rfbFramebufferUpdateRequestMsg."
);
break
;
}
if
(
!
write_update_request
(
p_filter
,
true
)
)
return
NULL
;
}
}
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