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
4de1d766
Commit
4de1d766
authored
Jan 31, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup vout window handle typedef
parent
92107b3a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
51 additions
and
34 deletions
+51
-34
include/vlc_window.h
include/vlc_window.h
+5
-1
modules/gui/maemo/maemo.c
modules/gui/maemo/maemo.c
+3
-2
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+4
-4
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+2
-2
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+6
-7
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+4
-4
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+16
-4
modules/video_output/msw/events.c
modules/video_output/msw/events.c
+1
-1
modules/video_output/omapfb.c
modules/video_output/omapfb.c
+2
-2
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+6
-5
modules/video_output/xcb/window.c
modules/video_output/xcb/window.c
+1
-1
modules/video_output/xcb/xcb.c
modules/video_output/xcb/xcb.c
+1
-1
No files found.
include/vlc_window.h
View file @
4de1d766
...
...
@@ -36,7 +36,11 @@ struct vout_window_t
module_t
*
module
;
vout_thread_t
*
vout
;
void
*
handle
;
/* OS-specific Window handle */
union
{
void
*
hwnd
;
/* Win32 window handle */
uint32_t
xid
;
/* X11 window ID */
}
handle
;
void
*
p_sys
;
/* window provider private data */
unsigned
width
;
/* pixels width */
...
...
modules/gui/maemo/maemo.c
View file @
4de1d766
...
...
@@ -36,6 +36,7 @@
#include <hildon/hildon-banner.h>
#include <gtk/gtk.h>
#include <stdio.h>
#include <inttypes.h>
#include "maemo.h"
#include "maemo_callbacks.h"
...
...
@@ -288,8 +289,8 @@ static int OpenWindow (vlc_object_t *obj)
return
VLC_EGENERIC
;
/* Maemo not in use */
}
wnd
->
handle
=
request_video
(
intf
,
wnd
->
vout
);
msg_Dbg
(
intf
,
"Using handle %
p"
,
wnd
->
handle
);
wnd
->
handle
.
xid
=
request_video
(
intf
,
wnd
->
vout
);
msg_Dbg
(
intf
,
"Using handle %
"
PRIu32
,
wnd
->
handle
.
xid
);
wnd
->
control
=
ControlWindow
;
wnd
->
p_private
=
intf
;
...
...
modules/gui/qt4/components/interface_widgets.cpp
View file @
4de1d766
...
...
@@ -100,9 +100,9 @@ VideoWidget::~VideoWidget()
/**
* Request the video to avoid the conflicts
**/
void
*
VideoWidget
::
request
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
,
bool
b_keep_size
)
WId
VideoWidget
::
request
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
,
bool
b_keep_size
)
{
msg_Dbg
(
p_intf
,
"Video was requested %i, %i"
,
*
pi_x
,
*
pi_y
);
...
...
@@ -122,7 +122,7 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
#ifndef NDEBUG
msg_Dbg
(
p_intf
,
"embedded video ready (handle %p)"
,
(
void
*
)
winId
()
);
#endif
return
(
void
*
)
winId
();
return
winId
();
}
/* Set the Widget to the correct Size */
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
4de1d766
...
...
@@ -59,8 +59,8 @@ public:
VideoWidget
(
intf_thread_t
*
);
virtual
~
VideoWidget
();
void
*
request
(
vout_thread_t
*
,
int
*
,
int
*
,
unsigned
int
*
,
unsigned
int
*
,
bool
);
WId
request
(
vout_thread_t
*
,
int
*
,
int
*
,
unsigned
int
*
,
unsigned
int
*
,
bool
);
void
release
(
void
);
int
control
(
void
*
,
int
,
va_list
);
...
...
modules/gui/qt4/main_interface.cpp
View file @
4de1d766
...
...
@@ -638,13 +638,13 @@ private:
* Thou shall not call/resize/hide widgets from on another thread.
* This is wrong, and this is THE reason to emit signals on those Video Functions
**/
void
*
MainInterface
::
requestVideo
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
)
WId
MainInterface
::
requestVideo
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
)
{
/* Request the videoWidget */
void
*
ret
=
videoWidget
->
request
(
p_nvout
,
pi_x
,
pi_y
,
pi_width
,
pi_height
,
b_keep_size
);
WId
ret
=
videoWidget
->
request
(
p_nvout
,
pi_x
,
pi_y
,
pi_width
,
pi_height
,
b_keep_size
);
if
(
ret
)
/* The videoWidget is available */
{
/* Did we have a bg ? Hide it! */
...
...
@@ -689,9 +689,8 @@ void MainInterface::releaseVideoSlot( void )
}
/* Call from WindowControl function */
int
MainInterface
::
controlVideo
(
void
*
p_window
,
int
i_query
,
va_list
args
)
int
MainInterface
::
controlVideo
(
int
i_query
,
va_list
args
)
{
VLC_UNUSED
(
p_window
);
//FIXME remove this param
int
i_ret
=
VLC_SUCCESS
;
switch
(
i_query
)
{
...
...
modules/gui/qt4/main_interface.hpp
View file @
4de1d766
...
...
@@ -75,11 +75,11 @@ public:
virtual
~
MainInterface
();
/* Video requests from core */
void
*
requestVideo
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
);
WId
requestVideo
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
);
void
releaseVideo
(
void
);
int
controlVideo
(
void
*
p_window
,
int
i_query
,
va_list
args
);
int
controlVideo
(
int
i_query
,
va_list
args
);
/* Getters */
QSystemTrayIcon
*
getSysTray
()
{
return
sysTray
;
};
...
...
modules/gui/qt4/qt4.cpp
View file @
4de1d766
...
...
@@ -516,11 +516,23 @@ static int WindowOpen (vlc_object_t *obj)
MainInterface
*
p_mi
=
intf
->
p_sys
->
p_mi
;
msg_Dbg
(
obj
,
"requesting video..."
);
wnd
->
handle
=
p_mi
->
requestVideo
(
wnd
->
vout
,
&
wnd
->
pos_x
,
&
wnd
->
pos_y
,
&
wnd
->
width
,
&
wnd
->
height
);
if
(
!
wnd
->
handle
)
#if defined (Q_WS_X11)
wnd
->
handle
.
xid
=
p_mi
->
requestVideo
(
wnd
->
vout
,
&
wnd
->
pos_x
,
&
wnd
->
pos_y
,
&
wnd
->
width
,
&
wnd
->
height
);
if
(
!
wnd
->
handle
.
xid
)
return
VLC_EGENERIC
;
#elif defined (WIN32)
wnd
->
handle
.
hwnd
=
p_mi
->
requestVideo
(
wnd
->
vout
,
&
wnd
->
pos_x
,
&
wnd
->
pos_y
,
&
wnd
->
width
,
&
wnd
->
height
);
if
(
!
wnd
->
handle
.
hwnd
)
return
VLC_EGENERIC
;
#else
return
VLC_EGENERIC
;
#endif
wnd
->
control
=
WindowControl
;
wnd
->
p_private
=
p_mi
;
return
VLC_SUCCESS
;
...
...
@@ -531,7 +543,7 @@ static int WindowControl (vout_window_t *wnd, int query, va_list args)
MainInterface
*
p_mi
=
(
MainInterface
*
)
wnd
->
p_private
;
QMutexLocker
locker
(
&
iface
.
lock
);
return
p_mi
->
controlVideo
(
wnd
->
handle
,
query
,
args
);
return
p_mi
->
controlVideo
(
query
,
args
);
}
static
void
WindowClose
(
vlc_object_t
*
obj
)
...
...
modules/video_output/msw/events.c
View file @
4de1d766
...
...
@@ -422,7 +422,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
&
p_vout
->
p_sys
->
i_window_y
,
&
p_vout
->
p_sys
->
i_window_width
,
&
p_vout
->
p_sys
->
i_window_height
);
p_vout
->
p_sys
->
hparent
=
p_vout
->
p_sys
->
parent_window
->
handle
;
p_vout
->
p_sys
->
hparent
=
p_vout
->
p_sys
->
parent_window
->
handle
.
hwnd
;
/* We create the window ourself, there is no previous window proc. */
p_vout
->
p_sys
->
pf_wndproc
=
NULL
;
...
...
modules/video_output/omapfb.c
View file @
4de1d766
...
...
@@ -701,7 +701,7 @@ static void CreateWindow( vout_sys_t *p_sys )
BlackPixel
(
p_sys
->
p_display
,
DefaultScreen
(
p_sys
->
p_display
)
);
xwindow_attributes
.
event_mask
=
ExposureMask
|
StructureNotifyMask
;
p_sys
->
window
=
XCreateWindow
(
p_sys
->
p_display
,
p_sys
->
owner_window
->
handle
,
p_sys
->
owner_window
->
handle
.
xid
,
0
,
0
,
p_sys
->
main_window
.
i_width
,
p_sys
->
main_window
.
i_height
,
...
...
@@ -714,7 +714,7 @@ static void CreateWindow( vout_sys_t *p_sys )
XSelectInput
(
p_sys
->
p_display
,
p_sys
->
window
,
KeyPressMask
|
ButtonPressMask
|
StructureNotifyMask
|
VisibilityChangeMask
|
FocusChangeMask
);
XSelectInput
(
p_sys
->
p_display
,
p_sys
->
owner_window
->
handle
,
XSelectInput
(
p_sys
->
p_display
,
p_sys
->
owner_window
->
handle
.
xid
,
StructureNotifyMask
);
XSetInputFocus
(
p_sys
->
p_display
,
p_sys
->
window
,
RevertToParent
,
CurrentTime
);
}
...
...
modules/video_output/x11/xcommon.c
View file @
4de1d766
...
...
@@ -1161,7 +1161,7 @@ static int ManageVideo( vout_thread_t *p_vout )
if
(
p_vout
->
p_sys
->
p_win
->
owner_window
)
{
while
(
XCheckWindowEvent
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
p_win
->
owner_window
->
handle
,
p_vout
->
p_sys
->
p_win
->
owner_window
->
handle
.
xid
,
StructureNotifyMask
,
&
xevent
)
==
True
)
{
/* ConfigureNotify event: prepare */
...
...
@@ -1716,11 +1716,12 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
unsigned
int
dummy4
,
dummy5
;
/* Select events we are interested in. */
XSelectInput
(
p_vout
->
p_sys
->
p_display
,
p_win
->
owner_window
->
handle
,
StructureNotifyMask
);
XSelectInput
(
p_vout
->
p_sys
->
p_display
,
p_win
->
owner_window
->
handle
.
xid
,
StructureNotifyMask
);
/* Get the parent window's geometry information */
XGetGeometry
(
p_vout
->
p_sys
->
p_display
,
p_win
->
owner_window
->
handle
,
XGetGeometry
(
p_vout
->
p_sys
->
p_display
,
p_win
->
owner_window
->
handle
.
xid
,
&
dummy1
,
&
dummy2
,
&
dummy3
,
&
p_win
->
i_width
,
&
p_win
->
i_height
,
...
...
@@ -1733,7 +1734,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
* ButtonPress event, so we need to open a new window anyway. */
p_win
->
base_window
=
XCreateWindow
(
p_vout
->
p_sys
->
p_display
,
p_win
->
owner_window
->
handle
,
p_win
->
owner_window
->
handle
.
xid
,
0
,
0
,
p_win
->
i_width
,
p_win
->
i_height
,
0
,
...
...
modules/video_output/xcb/window.c
View file @
4de1d766
...
...
@@ -96,7 +96,7 @@ static int Open (vlc_object_t *obj)
xcb_map_window
(
conn
,
window
);
xcb_flush
(
conn
);
wnd
->
handle
=
(
void
*
)(
intptr_t
)
window
;
wnd
->
handle
.
xid
=
window
;
wnd
->
p_sys
=
conn
;
wnd
->
control
=
Control
;
return
VLC_SUCCESS
;
...
...
modules/video_output/xcb/xcb.c
View file @
4de1d766
...
...
@@ -377,7 +377,7 @@ static int Init (vout_thread_t *vout)
msg_Err
(
vout
,
"cannot get window"
);
return
VLC_EGENERIC
;
}
p_sys
->
parent
=
(
intptr_t
)
p_sys
->
embed
->
handle
;
p_sys
->
parent
=
p_sys
->
embed
->
handle
.
xid
;
}
/* Determine our input format */
...
...
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