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
904ef782
Commit
904ef782
authored
Sep 26, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the prototype of vout_display_SendEventDisplaySize.
It is needed to avoid problems with threaded event.
parent
5b8dcc36
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
include/vlc_vout_display.h
include/vlc_vout_display.h
+3
-3
src/video_output/display.c
src/video_output/display.c
+17
-10
No files found.
include/vlc_vout_display.h
View file @
904ef782
...
@@ -174,7 +174,7 @@ enum {
...
@@ -174,7 +174,7 @@ enum {
VOUT_DISPLAY_EVENT_FULLSCREEN
,
VOUT_DISPLAY_EVENT_FULLSCREEN
,
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
,
/* The display size need to change : int i_width, int i_height */
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
,
/* The display size need to change : int i_width, int i_height
, bool is_fullscreen
*/
/* */
/* */
VOUT_DISPLAY_EVENT_CLOSE
,
VOUT_DISPLAY_EVENT_CLOSE
,
...
@@ -315,9 +315,9 @@ static inline void vout_display_SendEvent(vout_display_t *vd, int query, ...)
...
@@ -315,9 +315,9 @@ static inline void vout_display_SendEvent(vout_display_t *vd, int query, ...)
va_end
(
args
);
va_end
(
args
);
}
}
static
inline
void
vout_display_SendEventDisplaySize
(
vout_display_t
*
vd
,
int
width
,
int
height
)
static
inline
void
vout_display_SendEventDisplaySize
(
vout_display_t
*
vd
,
int
width
,
int
height
,
bool
is_fullscreen
)
{
{
vout_display_SendEvent
(
vd
,
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
,
width
,
height
);
vout_display_SendEvent
(
vd
,
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
,
width
,
height
,
is_fullscreen
);
}
}
static
inline
void
vout_display_SendEventPicturesInvalid
(
vout_display_t
*
vd
)
static
inline
void
vout_display_SendEventPicturesInvalid
(
vout_display_t
*
vd
)
{
{
...
...
src/video_output/display.c
View file @
904ef782
...
@@ -314,6 +314,7 @@ struct vout_display_owner_sys_t {
...
@@ -314,6 +314,7 @@ struct vout_display_owner_sys_t {
bool
ch_display_size
;
bool
ch_display_size
;
int
display_width
;
int
display_width
;
int
display_height
;
int
display_height
;
bool
display_is_fullscreen
;
bool
ch_display_filled
;
bool
ch_display_filled
;
bool
is_display_filled
;
bool
is_display_filled
;
...
@@ -554,12 +555,15 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
...
@@ -554,12 +555,15 @@ static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
case
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
:
{
case
VOUT_DISPLAY_EVENT_DISPLAY_SIZE
:
{
const
int
width
=
(
int
)
va_arg
(
args
,
int
);
const
int
width
=
(
int
)
va_arg
(
args
,
int
);
const
int
height
=
(
int
)
va_arg
(
args
,
int
);
const
int
height
=
(
int
)
va_arg
(
args
,
int
);
msg_Dbg
(
vd
,
"VoutDisplayEvent 'resize' %dx%d"
,
width
,
height
);
const
bool
is_fullscreen
=
(
bool
)
va_arg
(
args
,
int
);
msg_Dbg
(
vd
,
"VoutDisplayEvent 'resize' %dx%d %s"
,
width
,
height
,
is_fullscreen
?
"fullscreen"
:
"window"
);
/* */
/* */
osys
->
ch_display_size
=
true
;
osys
->
ch_display_size
=
true
;
osys
->
display_width
=
width
;
osys
->
display_width
=
width
;
osys
->
display_height
=
height
;
osys
->
display_height
=
height
;
osys
->
display_is_fullscreen
=
is_fullscreen
;
break
;
break
;
}
}
...
@@ -647,7 +651,9 @@ void vout_ManageDisplay(vout_display_t *vd)
...
@@ -647,7 +651,9 @@ void vout_ManageDisplay(vout_display_t *vd)
cfg
.
display
.
width
=
osys
->
display_width
;
cfg
.
display
.
width
=
osys
->
display_width
;
cfg
.
display
.
height
=
osys
->
display_height
;
cfg
.
display
.
height
=
osys
->
display_height
;
if
(
vout_display_Control
(
vd
,
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
,
&
cfg
))
{
if
(
!
cfg
.
is_fullscreen
!=
!
osys
->
display_is_fullscreen
||
vout_display_Control
(
vd
,
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
,
&
cfg
))
{
if
(
!
cfg
.
is_fullscreen
==
!
osys
->
display_is_fullscreen
)
msg_Err
(
vd
,
"Failed to resize display"
);
msg_Err
(
vd
,
"Failed to resize display"
);
/* We ignore the resized */
/* We ignore the resized */
...
@@ -657,7 +663,7 @@ void vout_ManageDisplay(vout_display_t *vd)
...
@@ -657,7 +663,7 @@ void vout_ManageDisplay(vout_display_t *vd)
osys
->
cfg
.
display
.
width
=
osys
->
display_width
;
osys
->
cfg
.
display
.
width
=
osys
->
display_width
;
osys
->
cfg
.
display
.
height
=
osys
->
display_height
;
osys
->
cfg
.
display
.
height
=
osys
->
display_height
;
if
(
!
osys
->
is_fullscreen
)
{
if
(
!
osys
->
display_
is_fullscreen
)
{
osys
->
width_saved
=
osys
->
display_width
;
osys
->
width_saved
=
osys
->
display_width
;
osys
->
height_saved
=
osys
->
display_height
;
osys
->
height_saved
=
osys
->
display_height
;
}
}
...
@@ -698,9 +704,10 @@ void vout_ManageDisplay(vout_display_t *vd)
...
@@ -698,9 +704,10 @@ void vout_ManageDisplay(vout_display_t *vd)
osys
->
zoom
.
num
=
osys
->
cfg
.
zoom
.
num
;
osys
->
zoom
.
num
=
osys
->
cfg
.
zoom
.
num
;
osys
->
zoom
.
den
=
osys
->
cfg
.
zoom
.
den
;
osys
->
zoom
.
den
=
osys
->
cfg
.
zoom
.
den
;
}
else
if
(
cfg
.
is_display_filled
)
{
}
else
if
(
cfg
.
is_display_filled
)
{
osys
->
ch_display_size
=
true
;
const
int
display_width
=
(
int64_t
)
vd
->
source
.
i_width
*
osys
->
zoom
.
num
/
osys
->
zoom
.
den
;
osys
->
display_width
=
(
int64_t
)
vd
->
source
.
i_width
*
osys
->
zoom
.
num
/
osys
->
zoom
.
den
;
const
int
display_height
=
(
int64_t
)
vd
->
source
.
i_height
*
osys
->
zoom
.
num
/
osys
->
zoom
.
den
;
osys
->
display_height
=
(
int64_t
)
vd
->
source
.
i_height
*
osys
->
zoom
.
num
/
osys
->
zoom
.
den
;
vout_display_SendEventDisplaySize
(
vd
,
display_width
,
display_height
,
osys
->
cfg
.
is_fullscreen
);
}
}
osys
->
cfg
.
zoom
.
num
=
osys
->
zoom
.
num
;
osys
->
cfg
.
zoom
.
num
=
osys
->
zoom
.
num
;
...
...
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