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
610ecb90
Commit
610ecb90
authored
Oct 29, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: create video window in fullscreen mode (fixes #2685)
parent
deddd862
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+9
-5
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+4
-3
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+1
-2
No files found.
modules/gui/qt4/main_interface.cpp
View file @
610ecb90
...
...
@@ -203,8 +203,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* VideoWidget connects for asynchronous calls */
b_videoFullScreen
=
false
;
connect
(
this
,
SIGNAL
(
askGetVideo
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
)),
this
,
SLOT
(
getVideoSlot
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
)),
connect
(
this
,
SIGNAL
(
askGetVideo
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
,
bool
)),
this
,
SLOT
(
getVideoSlot
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
,
bool
)),
Qt
::
BlockingQueuedConnection
);
connect
(
this
,
SIGNAL
(
askReleaseVideo
(
void
)),
this
,
SLOT
(
releaseVideoSlot
(
void
)),
...
...
@@ -705,7 +705,8 @@ void MainInterface::toggleFSC()
* That's why we have all those emit statements...
*/
WId
MainInterface
::
getVideo
(
struct
vout_window_t
*
p_wnd
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
)
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
,
bool
fullscreen
)
{
if
(
!
videoWidget
)
return
0
;
...
...
@@ -713,12 +714,13 @@ WId MainInterface::getVideo( struct vout_window_t *p_wnd,
/* This is a blocking call signal. Results are returned through pointers.
* Beware of deadlocks! */
WId
id
;
emit
askGetVideo
(
&
id
,
p_wnd
,
pi_width
,
pi_height
);
emit
askGetVideo
(
&
id
,
p_wnd
,
pi_width
,
pi_height
,
fullscreen
);
return
id
;
}
void
MainInterface
::
getVideoSlot
(
WId
*
p_id
,
struct
vout_window_t
*
p_wnd
,
unsigned
*
pi_width
,
unsigned
*
pi_height
)
unsigned
*
pi_width
,
unsigned
*
pi_height
,
bool
fullscreen
)
{
/* Hidden or minimized, activate */
if
(
isHidden
()
||
isMinimized
()
)
...
...
@@ -729,6 +731,8 @@ void MainInterface::getVideoSlot( WId *p_id, struct vout_window_t *p_wnd,
*
p_id
=
ret
;
if
(
ret
)
/* The videoWidget is available */
{
setVideoFullScreen
(
fullscreen
);
/* Consider the video active now */
showVideo
();
...
...
modules/gui/qt4/main_interface.hpp
View file @
610ecb90
...
...
@@ -70,7 +70,7 @@ public:
/* Video requests from core */
WId
getVideo
(
struct
vout_window_t
*
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
);
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
,
bool
);
void
releaseVideo
(
void
);
int
controlVideo
(
int
i_query
,
va_list
args
);
...
...
@@ -210,7 +210,7 @@ public slots:
/* Manage the Video Functions from the vout threads */
void
getVideoSlot
(
WId
*
p_id
,
struct
vout_window_t
*
,
unsigned
*
pi_width
,
unsigned
*
pi_height
);
unsigned
*
pi_width
,
unsigned
*
pi_height
,
bool
);
void
releaseVideoSlot
(
void
);
void
emitBoss
();
...
...
@@ -262,7 +262,8 @@ private slots:
void
resumePlayback
();
signals:
void
askGetVideo
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
);
void
askGetVideo
(
WId
*
,
struct
vout_window_t
*
,
unsigned
*
,
unsigned
*
,
bool
);
void
askReleaseVideo
(
);
void
askVideoToResize
(
unsigned
int
,
unsigned
int
);
void
askVideoSetFullScreen
(
bool
);
...
...
modules/gui/qt4/qt4.cpp
View file @
610ecb90
...
...
@@ -689,7 +689,7 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
unsigned
i_width
=
cfg
->
width
;
unsigned
i_height
=
cfg
->
height
;
WId
wid
=
p_mi
->
getVideo
(
p_wnd
,
&
i_width
,
&
i_height
);
WId
wid
=
p_mi
->
getVideo
(
p_wnd
,
&
i_width
,
&
i_height
,
cfg
->
is_fullscreen
);
if
(
!
wid
)
return
VLC_EGENERIC
;
...
...
@@ -713,7 +713,6 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
p_wnd
->
control
=
WindowControl
;
p_wnd
->
sys
=
(
vout_window_sys_t
*
)
p_mi
;
emit
p_mi
->
askVideoSetFullScreen
(
cfg
->
is_fullscreen
);
return
VLC_SUCCESS
;
}
...
...
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