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
2657f3bc
Commit
2657f3bc
authored
Jul 05, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout/ios: set the display size correctly
parent
a965f436
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
modules/video_output/ios.m
modules/video_output/ios.m
+20
-5
No files found.
modules/video_output/ios.m
View file @
2657f3bc
/*****************************************************************************
* ios.m: iOS X OpenGLES provider
*****************************************************************************
* Copyright (C) 2001-20
09 the VideoLAN team
* Copyright (C) 2001-20
12 VLC Authors and VideoLAN
* $Id$
*
* Authors: Romain Goyet <romain.goyet at likid dot org>
...
...
@@ -40,8 +40,6 @@
#include <vlc_vout_display.h>
#include <vlc_opengl.h>
#define USE_OPENGL_ES 1
#include "opengl.h"
/**
...
...
@@ -181,8 +179,11 @@ static int Open(vlc_object_t *this)
vd
->
control
=
Control
;
/* */
CGRect
bounds
=
sys
->
glView
.
layer
.
bounds
;
CGFloat
scaleFactor
=
sys
->
glView
.
contentScaleFactor
;
/* we need to multiply the bounds dimensions by the scaleFactor to be save for Retina Displays */
vout_display_SendEventFullscreen
(
vd
,
false
);
vout_display_SendEventDisplaySize
(
vd
,
vd
->
source
.
i_visible_width
,
vd
->
source
.
i_visible_height
,
false
);
vout_display_SendEventDisplaySize
(
vd
,
bounds
.
size
.
width
*
scaleFactor
,
bounds
.
size
.
height
*
scaleFactor
,
false
);
return
VLC_SUCCESS
;
...
...
@@ -257,7 +258,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT
:
case
VOUT_DISPLAY_CHANGE_SOURCE_CROP
:
{
return
VLC_
EGENERIC
;
return
VLC_
SUCCESS
;
}
case
VOUT_DISPLAY_HIDE_MOUSE
:
return
VLC_SUCCESS
;
...
...
@@ -377,6 +378,11 @@ static void OpenglSwap(vlc_gl_t *gl)
}
}
/* we don't get the correct scale factor if we don't overwrite this method */
-
(
void
)
drawRect
:
(
CGRect
)
rect
{
}
@end
@implementation
VLCOpenGLESVideoView
(
Private
)
...
...
@@ -429,6 +435,15 @@ static void OpenglSwap(vlc_gl_t *gl)
x
=
width
;
y
=
(
width
*
videoHeight
*
sarDen
)
/
(
videoWidth
*
sarNum
);
}
@synchronized
(
self
)
{
vout_display_cfg_t
cfg_tmp
=
*
(
_vd
->
cfg
);
cfg_tmp
.
display
.
width
=
width
;
cfg_tmp
.
display
.
height
=
height
;
vout_display_SendEventDisplaySize
(
_vd
,
width
,
height
,
false
);
}
}
[
EAGLContext
setCurrentContext
:
_context
];
...
...
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