Commit 55187d6f authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: move resize code from vout to macosx module

Also, this commit reenables resize to native video size, if video starts.
(cherry picked from commit 12b4d49591f5843bdaaac3d0c2f45193c65bdc62)

Conflicts:

	modules/video_output/macosx.m
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 8c87de17
...@@ -433,31 +433,10 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -433,31 +433,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
{ {
glViewport (place.x, place.y, place.width, place.height); glViewport (place.x, place.y, place.width, place.height);
} }
else
{ // this should not be needed, but currently it improves crop somehow, when we are in fullscreen
// VOUT_DISPLAY_CHANGE_ZOOM, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, VOUT_DISPLAY_CHANGE_DISPLAY_SIZE if (query == VOUT_DISPLAY_CHANGE_SOURCE_CROP)
const vout_display_cfg_t *cfg; [sys->glView performSelectorOnMainThread:@selector(reshapeView:) withObject:nil waitUntilDone:NO];
const video_format_t *source;
bool is_forced = false;
source = &vd->source;
cfg = (const vout_display_cfg_t*)va_arg (ap, const vout_display_cfg_t *);
is_forced = (bool)va_arg (ap, int);
if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&& is_forced
&& (cfg->display.width != vd->cfg->display.width
||cfg->display.height != vd->cfg->display.height)
&& vout_window_SetSize (sys->embed,
cfg->display.width,
cfg->display.height))
return VLC_EGENERIC;
vout_display_place_t place;
vout_display_PlacePicture (&place, source, cfg, false);
i_width = place.width;
i_height = place.height;
}
[o_pool release]; [o_pool release];
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment