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
f4833f08
Commit
f4833f08
authored
May 08, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- directx: commit patch by Sergey Volk
parent
9c609bd9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
241 deletions
+115
-241
modules/video_output/directx/direct3d.c
modules/video_output/directx/direct3d.c
+1
-80
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+1
-80
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+111
-1
modules/video_output/directx/glwin32.c
modules/video_output/directx/glwin32.c
+1
-80
modules/video_output/directx/vout.h
modules/video_output/directx/vout.h
+1
-0
No files found.
modules/video_output/directx/direct3d.c
View file @
f4833f08
...
...
@@ -381,8 +381,6 @@ static void End( vout_thread_t *p_vout )
*****************************************************************************/
static
int
Manage
(
vout_thread_t
*
p_vout
)
{
WINDOWPLACEMENT
window_placement
;
/* If we do not control our window, we check for geometry changes
* ourselves because the parent might not send us its events. */
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
lock
);
...
...
@@ -467,84 +465,7 @@ static int Manage( vout_thread_t *p_vout )
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
{
vlc_value_t
val
;
HWND
hwnd
=
(
p_vout
->
p_sys
->
hparent
&&
p_vout
->
p_sys
->
hfswnd
)
?
p_vout
->
p_sys
->
hfswnd
:
p_vout
->
p_sys
->
hwnd
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
/* We need to switch between Maximized and Normal sized window */
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
if
(
p_vout
->
b_fullscreen
)
{
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
;
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
if
(
p_vout
->
p_sys
->
hparent
)
{
/* Retrieve current window position so fullscreen will happen
* on the right screen */
POINT
point
=
{
0
,
0
};
RECT
rect
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
GetClientRect
(
p_vout
->
p_sys
->
hwnd
,
&
rect
);
SetWindowPos
(
hwnd
,
0
,
point
.
x
,
point
.
y
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
}
/* Maximize window */
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
hwnd
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
hwnd
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
SetForegroundWindow
(
hwnd
);
}
else
{
/* Change window style, no borders and no title bar */
SetWindowLong
(
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
);
/* Normal window */
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
p_vout
->
p_sys
->
hparent
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
ShowWindow
(
hwnd
,
SW_HIDE
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
}
/* Make sure the mouse cursor is displayed */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
}
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
var_Set
(
p_vout
,
"fullscreen"
,
val
);
Win32ToggleFullscreen
(
p_vout
);
p_vout
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
p_vout
->
p_sys
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
...
...
modules/video_output/directx/directx.c
View file @
f4833f08
...
...
@@ -540,8 +540,6 @@ static void CloseVideo( vlc_object_t *p_this )
*****************************************************************************/
static
int
Manage
(
vout_thread_t
*
p_vout
)
{
WINDOWPLACEMENT
window_placement
;
/* If we do not control our window, we check for geometry changes
* ourselves because the parent might not send us its events. */
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
lock
);
...
...
@@ -631,84 +629,7 @@ static int Manage( vout_thread_t *p_vout )
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
{
vlc_value_t
val
;
HWND
hwnd
=
(
p_vout
->
p_sys
->
hparent
&&
p_vout
->
p_sys
->
hfswnd
)
?
p_vout
->
p_sys
->
hfswnd
:
p_vout
->
p_sys
->
hwnd
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
/* We need to switch between Maximized and Normal sized window */
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
if
(
p_vout
->
b_fullscreen
)
{
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
;
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
if
(
p_vout
->
p_sys
->
hparent
)
{
/* Retrieve current window position so fullscreen will happen
* on the right screen */
POINT
point
=
{
0
,
0
};
RECT
rect
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
GetClientRect
(
p_vout
->
p_sys
->
hwnd
,
&
rect
);
SetWindowPos
(
hwnd
,
0
,
point
.
x
,
point
.
y
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
}
/* Maximize window */
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
hwnd
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
hwnd
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
SetForegroundWindow
(
hwnd
);
}
else
{
/* Change window style, no borders and no title bar */
SetWindowLong
(
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
);
/* Normal window */
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
p_vout
->
p_sys
->
hparent
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
ShowWindow
(
hwnd
,
SW_HIDE
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
}
/* Make sure the mouse cursor is displayed */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
}
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
var_Set
(
p_vout
,
"fullscreen"
,
val
);
Win32ToggleFullscreen
(
p_vout
);
p_vout
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
p_vout
->
p_sys
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
...
...
modules/video_output/directx/events.c
View file @
f4833f08
...
...
@@ -1056,7 +1056,7 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
return
vout_vaControlDefault
(
p_vout
,
i_query
,
args
);
case
VOUT_SET_STAY_ON_TOP
:
if
(
p_vout
->
p_sys
->
hparent
)
if
(
p_vout
->
p_sys
->
hparent
&&
!
var_GetBool
(
p_vout
,
"fullscreen"
)
)
return
vout_ControlWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
hparent
,
i_query
,
args
);
...
...
@@ -1067,3 +1067,113 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
return
vout_vaControlDefault
(
p_vout
,
i_query
,
args
);
}
}
/* Internal wrapper over GetWindowPlacement / SetWindowPlacement */
static
void
SetWindowState
(
HWND
hwnd
,
int
nShowCmd
)
{
WINDOWPLACEMENT
window_placement
;
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
window_placement
.
showCmd
=
nShowCmd
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
/* Internal wrapper to call vout_ControlWindow for hparent */
static
void
ControlParentWindow
(
vout_thread_t
*
p_vout
,
int
i_query
,
...
)
{
va_list
args
;
va_start
(
args
,
i_query
);
vout_ControlWindow
(
p_vout
,
(
void
*
)
p_vout
->
p_sys
->
hparent
,
i_query
,
args
);
va_end
(
args
);
}
void
Win32ToggleFullscreen
(
vout_thread_t
*
p_vout
)
{
HWND
hwnd
=
(
p_vout
->
p_sys
->
hparent
&&
p_vout
->
p_sys
->
hfswnd
)
?
p_vout
->
p_sys
->
hfswnd
:
p_vout
->
p_sys
->
hwnd
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
if
(
p_vout
->
b_fullscreen
)
{
msg_Dbg
(
p_vout
,
"entering fullscreen mode"
);
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
;
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
if
(
p_vout
->
p_sys
->
hparent
)
{
/* Retrieve current window position so fullscreen will happen
* on the right screen */
POINT
point
=
{
0
,
0
};
RECT
rect
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
GetClientRect
(
p_vout
->
p_sys
->
hwnd
,
&
rect
);
SetWindowPos
(
hwnd
,
0
,
point
.
x
,
point
.
y
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
/* Maximize window */
SetWindowState
(
hwnd
,
SW_SHOWMAXIMIZED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
hwnd
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
hwnd
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
HWND
topLevelParent
=
GetAncestor
(
p_vout
->
p_sys
->
hparent
,
GA_ROOT
);
ShowWindow
(
topLevelParent
,
SW_HIDE
);
}
SetForegroundWindow
(
hwnd
);
}
else
{
msg_Dbg
(
p_vout
,
"leaving fullscreen mode"
);
/* Change window style, no borders and no title bar */
SetWindowLong
(
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
);
/* Normal window */
SetWindowState
(
hwnd
,
SW_SHOWNORMAL
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
p_vout
->
p_sys
->
hparent
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
HWND
topLevelParent
=
GetAncestor
(
p_vout
->
p_sys
->
hparent
,
GA_ROOT
);
ShowWindow
(
topLevelParent
,
SW_SHOW
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
ShowWindow
(
hwnd
,
SW_HIDE
);
/* Update "video-on-top" status for main interface window, it
needs to be updated as we were hiding VOUT_SET_STAY_ON_TOP
queries from it while we were in fullscreen mode */
int
b_ontop
=
var_GetBool
(
p_vout
,
"video-on-top"
);
ControlParentWindow
(
p_vout
,
VOUT_SET_STAY_ON_TOP
,
b_ontop
);
}
/* Make sure the mouse cursor is displayed */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
}
{
vlc_value_t
val
;
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
var_Set
(
p_vout
,
"fullscreen"
,
val
);
}
}
modules/video_output/directx/glwin32.c
View file @
f4833f08
...
...
@@ -256,8 +256,6 @@ static void CloseVideo( vlc_object_t *p_this )
*****************************************************************************/
static
int
Manage
(
vout_thread_t
*
p_vout
)
{
WINDOWPLACEMENT
window_placement
;
int
i_width
=
p_vout
->
p_sys
->
rect_dest
.
right
-
p_vout
->
p_sys
->
rect_dest
.
left
;
int
i_height
=
p_vout
->
p_sys
->
rect_dest
.
bottom
-
...
...
@@ -328,84 +326,7 @@ static int Manage( vout_thread_t *p_vout )
if
(
p_vout
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
||
p_vout
->
p_sys
->
i_changes
&
VOUT_FULLSCREEN_CHANGE
)
{
vlc_value_t
val
;
HWND
hwnd
=
(
p_vout
->
p_sys
->
hparent
&&
p_vout
->
p_sys
->
hfswnd
)
?
p_vout
->
p_sys
->
hfswnd
:
p_vout
->
p_sys
->
hwnd
;
p_vout
->
b_fullscreen
=
!
p_vout
->
b_fullscreen
;
/* We need to switch between Maximized and Normal sized window */
window_placement
.
length
=
sizeof
(
WINDOWPLACEMENT
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
if
(
p_vout
->
b_fullscreen
)
{
/* Change window style, no borders and no title bar */
int
i_style
=
WS_CLIPCHILDREN
|
WS_VISIBLE
;
SetWindowLong
(
hwnd
,
GWL_STYLE
,
i_style
);
if
(
p_vout
->
p_sys
->
hparent
)
{
/* Retrieve current window position so fullscreen will happen
* on the right screen */
POINT
point
=
{
0
,
0
};
RECT
rect
;
ClientToScreen
(
p_vout
->
p_sys
->
hwnd
,
&
point
);
GetClientRect
(
p_vout
->
p_sys
->
hwnd
,
&
rect
);
SetWindowPos
(
hwnd
,
0
,
point
.
x
,
point
.
y
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
GetWindowPlacement
(
hwnd
,
&
window_placement
);
}
/* Maximize window */
window_placement
.
showCmd
=
SW_SHOWMAXIMIZED
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
hwnd
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
hwnd
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
}
SetForegroundWindow
(
hwnd
);
}
else
{
/* Change window style, no borders and no title bar */
SetWindowLong
(
hwnd
,
GWL_STYLE
,
p_vout
->
p_sys
->
i_window_style
);
/* Normal window */
window_placement
.
showCmd
=
SW_SHOWNORMAL
;
SetWindowPlacement
(
hwnd
,
&
window_placement
);
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
if
(
p_vout
->
p_sys
->
hparent
)
{
RECT
rect
;
GetClientRect
(
p_vout
->
p_sys
->
hparent
,
&
rect
);
SetParent
(
p_vout
->
p_sys
->
hwnd
,
p_vout
->
p_sys
->
hparent
);
SetWindowPos
(
p_vout
->
p_sys
->
hwnd
,
0
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
SWP_NOZORDER
|
SWP_FRAMECHANGED
);
ShowWindow
(
hwnd
,
SW_HIDE
);
SetForegroundWindow
(
p_vout
->
p_sys
->
hparent
);
}
/* Make sure the mouse cursor is displayed */
PostMessage
(
p_vout
->
p_sys
->
hwnd
,
WM_VLC_SHOW_MOUSE
,
0
,
0
);
}
/* Update the object variable and trigger callback */
val
.
b_bool
=
p_vout
->
b_fullscreen
;
var_Set
(
p_vout
,
"fullscreen"
,
val
);
Win32ToggleFullscreen
(
p_vout
);
p_vout
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
p_vout
->
p_sys
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
...
...
modules/video_output/directx/vout.h
View file @
f4833f08
...
...
@@ -147,6 +147,7 @@ int E_(DirectXUpdateOverlay)( vout_thread_t *p_vout );
*****************************************************************************/
void
E_
(
DirectXEventThread
)
(
event_thread_t
*
p_event
);
void
E_
(
DirectXUpdateRects
)
(
vout_thread_t
*
p_vout
,
vlc_bool_t
b_force
);
void
Win32ToggleFullscreen
(
vout_thread_t
*
p_vout
);
/*****************************************************************************
* Constants
...
...
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