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
643f98a1
Commit
643f98a1
authored
Oct 09, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msw: shrink events data structure
parent
7876f294
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
31 deletions
+41
-31
modules/video_output/msw/common.c
modules/video_output/msw/common.c
+4
-5
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+4
-5
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+29
-19
modules/video_output/msw/events.h
modules/video_output/msw/events.h
+4
-2
No files found.
modules/video_output/msw/common.c
View file @
643f98a1
...
...
@@ -78,11 +78,10 @@ int CommonInit(vout_display_t *vd)
#ifdef MODULE_NAME_IS_directdraw
cfg
.
use_overlay
=
sys
->
use_overlay
;
#endif
cfg
.
win
.
type
=
VOUT_WINDOW_TYPE_HWND
;
cfg
.
win
.
x
=
var_InheritInteger
(
vd
,
"video-x"
);
cfg
.
win
.
y
=
var_InheritInteger
(
vd
,
"video-y"
);
cfg
.
win
.
width
=
vd
->
cfg
->
display
.
width
;
cfg
.
win
.
height
=
vd
->
cfg
->
display
.
height
;
cfg
.
x
=
var_InheritInteger
(
vd
,
"video-x"
);
cfg
.
y
=
var_InheritInteger
(
vd
,
"video-y"
);
cfg
.
width
=
vd
->
cfg
->
display
.
width
;
cfg
.
height
=
vd
->
cfg
->
display
.
height
;
event_hwnd_t
hwnd
;
if
(
EventThreadStart
(
sys
->
event
,
&
hwnd
,
&
cfg
))
...
...
modules/video_output/msw/direct3d.c
View file @
643f98a1
...
...
@@ -399,11 +399,10 @@ static int ControlReopenDevice(vout_display_t *vd)
memset
(
&
cfg
,
0
,
sizeof
(
cfg
));
cfg
.
use_desktop
=
sys
->
use_desktop
;
if
(
!
sys
->
use_desktop
)
{
cfg
.
win
.
type
=
VOUT_WINDOW_TYPE_HWND
;
cfg
.
win
.
x
=
sys
->
desktop_save
.
win
.
left
;
cfg
.
win
.
y
=
sys
->
desktop_save
.
win
.
top
;
cfg
.
win
.
width
=
sys
->
desktop_save
.
win
.
right
-
sys
->
desktop_save
.
win
.
left
;
cfg
.
win
.
height
=
sys
->
desktop_save
.
win
.
bottom
-
sys
->
desktop_save
.
win
.
top
;
cfg
.
x
=
sys
->
desktop_save
.
win
.
left
;
cfg
.
y
=
sys
->
desktop_save
.
win
.
top
;
cfg
.
width
=
sys
->
desktop_save
.
win
.
right
-
sys
->
desktop_save
.
win
.
left
;
cfg
.
height
=
sys
->
desktop_save
.
win
.
bottom
-
sys
->
desktop_save
.
win
.
top
;
}
event_hwnd_t
hwnd
;
...
...
modules/video_output/msw/events.c
View file @
643f98a1
...
...
@@ -76,7 +76,8 @@ struct event_thread_t
char
*
psz_title
;
int
i_window_style
;
vout_window_cfg_t
wnd_cfg
;
int
x
,
y
;
unsigned
width
,
height
;
/* */
vout_window_t
*
parent_window
;
...
...
@@ -414,15 +415,13 @@ void EventThreadUpdateWindowPosition( event_thread_t *p_event,
int
x
,
int
y
,
unsigned
w
,
unsigned
h
)
{
vlc_mutex_lock
(
&
p_event
->
lock
);
*
pb_moved
=
x
!=
p_event
->
wnd_cfg
.
x
||
y
!=
p_event
->
wnd_cfg
.
y
;
*
pb_resized
=
w
!=
p_event
->
wnd_cfg
.
width
||
h
!=
p_event
->
wnd_cfg
.
height
;
p_event
->
wnd_cfg
.
x
=
x
;
p_event
->
wnd_cfg
.
y
=
y
;
p_event
->
wnd_cfg
.
width
=
w
;
p_event
->
wnd_cfg
.
height
=
h
;
*
pb_moved
=
x
!=
p_event
->
x
||
y
!=
p_event
->
y
;
*
pb_resized
=
w
!=
p_event
->
width
||
h
!=
p_event
->
height
;
p_event
->
x
=
x
;
p_event
->
y
=
y
;
p_event
->
width
=
w
;
p_event
->
height
=
h
;
vlc_mutex_unlock
(
&
p_event
->
lock
);
}
...
...
@@ -495,7 +494,10 @@ int EventThreadStart( event_thread_t *p_event, event_hwnd_t *p_hwnd, const event
{
p_event
->
use_desktop
=
p_cfg
->
use_desktop
;
p_event
->
use_overlay
=
p_cfg
->
use_overlay
;
p_event
->
wnd_cfg
=
p_cfg
->
win
;
p_event
->
x
=
p_cfg
->
x
;
p_event
->
y
=
p_cfg
->
y
;
p_event
->
width
=
p_cfg
->
width
;
p_event
->
height
=
p_cfg
->
height
;
p_event
->
has_moved
=
false
;
...
...
@@ -683,8 +685,16 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
if
(
!
p_event
->
use_desktop
)
{
#endif
vout_window_cfg_t
wnd_cfg
=
{
.
type
=
VOUT_WINDOW_TYPE_HWND
,
.
x
=
p_event
->
x
,
.
y
=
p_event
->
y
,
.
width
=
p_event
->
width
,
.
height
=
p_event
->
height
,
};
/* If an external window was specified, we'll draw in it. */
p_event
->
parent_window
=
vout_display_NewWindow
(
vd
,
&
p_event
->
wnd_cfg
);
p_event
->
parent_window
=
vout_display_NewWindow
(
vd
,
&
wnd_cfg
);
if
(
p_event
->
parent_window
)
p_event
->
hparent
=
p_event
->
parent_window
->
handle
.
hwnd
;
else
...
...
@@ -746,8 +756,8 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
* the window corresponding to the useable surface we want */
rect_window
.
left
=
10
;
rect_window
.
top
=
10
;
rect_window
.
right
=
rect_window
.
left
+
p_event
->
w
nd_cfg
.
w
idth
;
rect_window
.
bottom
=
rect_window
.
top
+
p_event
->
wnd_cfg
.
height
;
rect_window
.
right
=
rect_window
.
left
+
p_event
->
width
;
rect_window
.
bottom
=
rect_window
.
top
+
p_event
->
height
;
if
(
var_GetBool
(
vd
,
"video-deco"
)
)
{
...
...
@@ -785,10 +795,10 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
p_event
->
class_main
,
/* name of window class */
_T
(
VOUT_TITLE
)
_T
(
" (VLC Video Output)"
),
/* window title */
i_style
,
/* window style */
(
!
p_event
->
wnd_cfg
.
x
)
?
(
UINT
)
CW_USEDEFAULT
:
(
UINT
)
p_event
->
wnd_cfg
.
x
,
/* default X coordinate */
(
!
p_event
->
wnd_cfg
.
y
)
?
(
UINT
)
CW_USEDEFAULT
:
(
UINT
)
p_event
->
wnd_cfg
.
y
,
/* default Y coordinate */
(
!
p_event
->
x
)
?
(
UINT
)
CW_USEDEFAULT
:
(
UINT
)
p_event
->
x
,
/* default X coordinate */
(
!
p_event
->
y
)
?
(
UINT
)
CW_USEDEFAULT
:
(
UINT
)
p_event
->
y
,
/* default Y coordinate */
rect_window
.
right
-
rect_window
.
left
,
/* window width */
rect_window
.
bottom
-
rect_window
.
top
,
/* window height */
p_event
->
hparent
,
/* parent window */
...
...
modules/video_output/msw/events.h
View file @
643f98a1
...
...
@@ -32,8 +32,10 @@ typedef struct event_thread_t event_thread_t;
typedef
struct
{
bool
use_desktop
;
/* direct3d */
bool
use_overlay
;
/* directx */
vout_window_cfg_t
win
;
int
x
;
int
y
;
unsigned
width
;
unsigned
height
;
}
event_cfg_t
;
typedef
struct
{
...
...
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