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
b6c753c6
Commit
b6c753c6
authored
Mar 18, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_msw: use var_TriggerCallback and some cleaning.
parent
68ab6616
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
52 deletions
+26
-52
modules/video_output/msw/direct3d.c
modules/video_output/msw/direct3d.c
+6
-13
modules/video_output/msw/directx.c
modules/video_output/msw/directx.c
+9
-18
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+3
-6
modules/video_output/msw/glwin32.c
modules/video_output/msw/glwin32.c
+3
-6
modules/video_output/msw/vout.h
modules/video_output/msw/vout.h
+1
-1
modules/video_output/msw/wingdi.c
modules/video_output/msw/wingdi.c
+4
-8
No files found.
modules/video_output/msw/direct3d.c
View file @
b6c753c6
/*****************************************************************************
* direct3d.c: Windows Direct3D video output module
*****************************************************************************
* Copyright (C) 2006 the VideoLAN team
* Copyright (C) 2006
-2009
the VideoLAN team
*$Id$
*
* Authors: Damien Fouilleul <damienf@videolan.org>
...
...
@@ -158,15 +158,12 @@ typedef struct
static
int
OpenVideo
(
vlc_object_t
*
p_this
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vlc_value_t
val
;
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
calloc
(
1
,
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
return
VLC_ENOMEM
;
memset
(
p_vout
->
p_sys
,
0
,
sizeof
(
vout_sys_t
)
);
if
(
VLC_SUCCESS
!=
Direct3DVoutCreate
(
p_vout
)
)
{
msg_Err
(
p_vout
,
"Direct3D could not be initialized !"
);
...
...
@@ -238,15 +235,13 @@ static int OpenVideo( vlc_object_t *p_this )
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
var_Get
(
p_vout
,
"video-on-top"
,
&
val
);
var_Set
(
p_vout
,
"video-on-top"
,
val
);
var_TriggerCallback
(
p_vout
,
"video-on-top"
);
/* disable screensaver by temporarily changing system settings */
p_vout
->
p_sys
->
i_spi_lowpowertimeout
=
0
;
p_vout
->
p_sys
->
i_spi_powerofftimeout
=
0
;
p_vout
->
p_sys
->
i_spi_screensavetimeout
=
0
;
var_Get
(
p_vout
,
"disable-screensaver"
,
&
val
);
if
(
val
.
b_bool
)
{
if
(
var_GetBool
(
p_vout
,
"disable-screensaver"
)
)
{
msg_Dbg
(
p_vout
,
"disabling screen saver"
);
SystemParametersInfo
(
SPI_GETLOWPOWERTIMEOUT
,
0
,
&
(
p_vout
->
p_sys
->
i_spi_lowpowertimeout
),
0
);
...
...
@@ -266,7 +261,7 @@ static int OpenVideo( vlc_object_t *p_this )
}
return
VLC_SUCCESS
;
error:
error:
CloseVideo
(
VLC_OBJECT
(
p_vout
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -334,10 +329,8 @@ static void CloseVideo( vlc_object_t *p_this )
static
int
Init
(
vout_thread_t
*
p_vout
)
{
int
i_ret
;
vlc_value_t
val
;
var_Get
(
p_vout
,
"directx-hw-yuv"
,
&
val
);
p_vout
->
p_sys
->
b_hw_yuv
=
val
.
b_bool
;
p_vout
->
p_sys
->
b_hw_yuv
=
var_GetBool
(
p_vout
,
"directx-hw-yuv"
);
/* Initialise Direct3D */
if
(
VLC_SUCCESS
!=
Direct3DVoutOpen
(
p_vout
)
)
...
...
modules/video_output/msw/directx.c
View file @
b6c753c6
/*****************************************************************************
* vout.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001-200
4
the VideoLAN team
* Copyright (C) 2001-200
9
the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
...
...
@@ -208,10 +208,9 @@ static int OpenVideo( vlc_object_t *p_this )
HMODULE
huser32
;
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
calloc
(
1
,
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
return
VLC_ENOMEM
;
memset
(
p_vout
->
p_sys
,
0
,
sizeof
(
vout_sys_t
)
);
/* Initialisations */
p_vout
->
pf_init
=
Init
;
...
...
@@ -316,8 +315,7 @@ static int OpenVideo( vlc_object_t *p_this )
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
var_Get
(
p_vout
,
"video-on-top"
,
&
val
);
var_Set
(
p_vout
,
"video-on-top"
,
val
);
var_TriggerCallback
(
p_vout
,
"video-on-top"
);
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
...
...
@@ -325,15 +323,13 @@ static int OpenVideo( vlc_object_t *p_this )
val
.
psz_string
=
_
(
"Wallpaper"
);
var_Change
(
p_vout
,
"directx-wallpaper"
,
VLC_VAR_SETTEXT
,
&
val
,
NULL
);
var_AddCallback
(
p_vout
,
"directx-wallpaper"
,
WallpaperCallback
,
NULL
);
var_Get
(
p_vout
,
"directx-wallpaper"
,
&
val
);
var_Set
(
p_vout
,
"directx-wallpaper"
,
val
);
var_TriggerCallback
(
p_vout
,
"directx-wallpaper"
);
/* disable screensaver by temporarily changing system settings */
p_vout
->
p_sys
->
i_spi_lowpowertimeout
=
0
;
p_vout
->
p_sys
->
i_spi_powerofftimeout
=
0
;
p_vout
->
p_sys
->
i_spi_screensavetimeout
=
0
;
var_Get
(
p_vout
,
"disable-screensaver"
,
&
val
);
if
(
val
.
b_bool
)
{
if
(
var_GetBool
(
p_vout
,
"disable-screensaver"
)
)
{
msg_Dbg
(
p_vout
,
"disabling screen saver"
);
SystemParametersInfo
(
SPI_GETLOWPOWERTIMEOUT
,
0
,
&
(
p_vout
->
p_sys
->
i_spi_lowpowertimeout
),
0
);
...
...
@@ -368,17 +364,12 @@ static int OpenVideo( vlc_object_t *p_this )
static
int
Init
(
vout_thread_t
*
p_vout
)
{
int
i_chroma_backup
;
vlc_value_t
val
;
/* Get a few default parameters */
var_Get
(
p_vout
,
"overlay"
,
&
val
);
p_vout
->
p_sys
->
b_using_overlay
=
val
.
b_bool
;
var_Get
(
p_vout
,
"directx-use-sysmem"
,
&
val
);
p_vout
->
p_sys
->
b_use_sysmem
=
val
.
b_bool
;
var_Get
(
p_vout
,
"directx-hw-yuv"
,
&
val
);
p_vout
->
p_sys
->
b_hw_yuv
=
val
.
b_bool
;
var_Get
(
p_vout
,
"directx-3buffering"
,
&
val
);
p_vout
->
p_sys
->
b_3buf_overlay
=
val
.
b_bool
;
p_vout
->
p_sys
->
b_using_overlay
=
var_GetBool
(
p_vout
,
"overlay"
);
p_vout
->
p_sys
->
b_use_sysmem
=
var_GetBool
(
p_vout
,
"directx-use-sysmem"
);
p_vout
->
p_sys
->
b_hw_yuv
=
var_GetBool
(
p_vout
,
"directx-hw-yuv"
);
p_vout
->
p_sys
->
b_3buf_overlay
=
var_GetBool
(
p_vout
,
"directx-3buffering"
);
/* Initialise DirectDraw if not already done.
* We do this here because on multi-monitor systems we may have to
...
...
modules/video_output/msw/events.c
View file @
b6c753c6
/*****************************************************************************
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001-200
4
the VideoLAN team
* Copyright (C) 2001-200
9
the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
...
...
@@ -176,8 +176,7 @@ void* EventThread( vlc_object_t *p_this )
p_event
->
p_vout
->
fmt_in
.
i_y_offset
;
var_Set
(
p_event
->
p_vout
,
"mouse-y"
,
val
);
val
.
b_bool
=
true
;
var_Set
(
p_event
->
p_vout
,
"mouse-moved"
,
val
);
var_SetBool
(
p_event
->
p_vout
,
"mouse-moved"
,
true
);
}
case
WM_NCMOUSEMOVE
:
...
...
@@ -1208,8 +1207,6 @@ void Win32ToggleFullscreen( vout_thread_t *p_vout )
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
);
var_SetBool
(
p_vout
,
"fullscreen"
,
p_vout
->
b_fullscreen
);
}
modules/video_output/msw/glwin32.c
View file @
b6c753c6
/*****************************************************************************
* glwin32.c: Windows OpenGL provider
*****************************************************************************
* Copyright (C) 2001-200
4
the VideoLAN team
* Copyright (C) 2001-200
9
the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
...
...
@@ -91,13 +91,11 @@ vlc_module_end ()
static
int
OpenVideo
(
vlc_object_t
*
p_this
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vlc_value_t
val
;
/* Allocate structure */
p_vout
->
p_sys
=
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
calloc
(
1
,
sizeof
(
vout_sys_t
)
);
if
(
p_vout
->
p_sys
==
NULL
)
return
VLC_ENOMEM
;
memset
(
p_vout
->
p_sys
,
0
,
sizeof
(
vout_sys_t
)
);
/* Initialisations */
p_vout
->
pf_init
=
Init
;
...
...
@@ -159,8 +157,7 @@ static int OpenVideo( vlc_object_t *p_this )
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
var_Get
(
p_vout
,
"video-on-top"
,
&
val
);
var_Set
(
p_vout
,
"video-on-top"
,
val
);
var_TriggerCallback
(
p_vout
,
"video-on-top"
);
return
VLC_SUCCESS
;
...
...
modules/video_output/msw/vout.h
View file @
b6c753c6
/*****************************************************************************
* vout.h: Windows video output header file
*****************************************************************************
* Copyright (C) 2001-200
4
the VideoLAN team
* Copyright (C) 2001-200
9
the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
...
...
modules/video_output/msw/wingdi.c
View file @
b6c753c6
/*****************************************************************************
* wingdi.c : Win32 / WinCE GDI video output plugin for vlc
*****************************************************************************
* Copyright (C) 2002 the VideoLAN team
* Copyright (C) 2002
-2009
the VideoLAN team
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
...
...
@@ -145,11 +145,9 @@ vlc_module_end ()
static
int
OpenVideo
(
vlc_object_t
*
p_this
)
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vlc_value_t
val
;
p_vout
->
p_sys
=
(
vout_sys_t
*
)
malloc
(
sizeof
(
vout_sys_t
)
);
p_vout
->
p_sys
=
(
vout_sys_t
*
)
calloc
(
1
,
sizeof
(
vout_sys_t
)
);
if
(
!
p_vout
->
p_sys
)
return
VLC_ENOMEM
;
memset
(
p_vout
->
p_sys
,
0
,
sizeof
(
vout_sys_t
)
);
#ifdef MODULE_NAME_IS_wingapi
/* Load GAPI */
...
...
@@ -268,15 +266,13 @@ static int OpenVideo ( vlc_object_t *p_this )
#ifndef UNDER_CE
/* Variable to indicate if the window should be on top of others */
/* Trigger a callback right now */
var_Get
(
p_vout
,
"video-on-top"
,
&
val
);
var_Set
(
p_vout
,
"video-on-top"
,
val
);
var_TriggerCallback
(
p_vout
,
"video-on-top"
);
/* disable screensaver by temporarily changing system settings */
p_vout
->
p_sys
->
i_spi_lowpowertimeout
=
0
;
p_vout
->
p_sys
->
i_spi_powerofftimeout
=
0
;
p_vout
->
p_sys
->
i_spi_screensavetimeout
=
0
;
var_Get
(
p_vout
,
"disable-screensaver"
,
&
val
);
if
(
val
.
b_bool
)
{
if
(
var_GetBool
(
p_vout
,
"disable-screensaver"
)
)
{
msg_Dbg
(
p_vout
,
"disabling screen saver"
);
SystemParametersInfo
(
SPI_GETLOWPOWERTIMEOUT
,
0
,
&
(
p_vout
->
p_sys
->
i_spi_lowpowertimeout
),
0
);
...
...
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