Commit 331103ec authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Delete patches merged upstream and patches for the old vout

parent f814a52e
From e5b2b9413079dc71f6df3c06c36d702f69776ac0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 26 Sep 2012 19:23:24 +0200
Subject: [PATCH 07/10] vout_ios: respond to HUD visiblity changes by adapting
the layout accordingly
---
modules/video_output/ios.m | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 2dc0929..5ca8cea 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -348,12 +348,15 @@ static void OpenglSwap(vlc_gl_t *gl)
_framebufferDirty = NO;
[self setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(toggleHUDmode:) name:@"VLCHUDModeChanged" object:nil];
}
return self;
}
- (void) dealloc
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
[_context release];
[super dealloc];
}
@@ -369,6 +372,14 @@ static void OpenglSwap(vlc_gl_t *gl)
}
}
+/**
+ * gets called when the status bar resizes
+ */
+- (void)toggleHUDmode:(NSNotification *)aNotification
+{
+ [self layoutSubviews];
+}
+
/**
* Method called by UIKit when we have been resized
--
1.7.12.4 (Apple Git-37)
From 759c080826b69637c06d51b38b3c53dd6e97608e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 28 Mar 2013 12:34:46 +0100
Subject: [PATCH 09/10] ios_vout2: fix crash when trying to draw OpenGL
changes while the app is in the background
---
modules/video_output/ios2.m | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index a18f8f2..0774550 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -89,9 +89,11 @@ vlc_module_end ()
GLuint _frameBuffer;
BOOL _bufferNeedReset;
+ BOOL _appActive;
}
@property (readwrite) vout_display_t* voutDisplay;
@property (readonly) EAGLContext* eaglContext;
+@property (readonly) BOOL isAppActive;
- (void)createBuffers;
- (void)destroyBuffers;
@@ -189,6 +191,8 @@ static int Open(vlc_object_t *this)
vd->control = Control;
/* */
+ [[NSNotificationCenter defaultCenter] addObserver:sys->glESView selector:@selector(applicationStateChanged:) name:UIApplicationWillResignActiveNotification object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:sys->glESView selector:@selector(applicationStateChanged:) name:UIApplicationDidBecomeActiveNotification object:nil];
[sys->glESView performSelectorOnMainThread:@selector(reshape) withObject:nil waitUntilDone:YES];
[autoreleasePool release];
@@ -311,7 +315,8 @@ static void PictureDisplay(vout_display_t *vd, picture_t *pic, subpicture_t *sub
{
vout_display_sys_t *sys = vd->sys;
sys->has_first_frame = true;
- vout_display_opengl_Display(sys->vgl, &vd->source);
+ if ([sys->glESView isAppActive])
+ vout_display_opengl_Display(sys->vgl, &vd->source);
picture_Release(pic);
@@ -324,7 +329,8 @@ static void PictureRender(vout_display_t *vd, picture_t *pic, subpicture_t *subp
vout_display_sys_t *sys = vd->sys;
- vout_display_opengl_Prepare(sys->vgl, pic, subpicture);
+ if ([sys->glESView isAppActive])
+ vout_display_opengl_Prepare(sys->vgl, pic, subpicture);
}
static picture_pool_t *PicturePool(vout_display_t *vd, unsigned requested_count)
@@ -350,14 +356,15 @@ static int OpenglESClean(vlc_gl_t *gl)
static void OpenglESSwap(vlc_gl_t *gl)
{
vout_display_sys_t *sys = (vout_display_sys_t *)gl->sys;
- [[sys->glESView eaglContext] presentRenderbuffer:GL_RENDERBUFFER];
+ if ([sys->glESView isAppActive])
+ [[sys->glESView eaglContext] presentRenderbuffer:GL_RENDERBUFFER];
}
/*****************************************************************************
* Our UIView object
*****************************************************************************/
@implementation VLCOpenGLES2VideoView
-@synthesize voutDisplay = _voutDisplay, eaglContext = _eaglContext;
+@synthesize voutDisplay = _voutDisplay, eaglContext = _eaglContext, isAppActive = _appActive;
+ (Class)layerClass
{
@@ -384,6 +391,8 @@ static void OpenglESSwap(vlc_gl_t *gl)
[self performSelectorOnMainThread:@selector(reshape) withObject:nil waitUntilDone:NO];
[self setAutoresizingMask: UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight];
+ _appActive = ([UIApplication sharedApplication].applicationState == UIApplicationStateActive);
+
return self;
}
@@ -484,6 +493,14 @@ static void OpenglESSwap(vlc_gl_t *gl)
glViewport(place.x, place.y, place.width, place.height);
}
+- (void)applicationStateChanged:(NSNotification *)notification
+{
+ if ([[notification name] isEqualToString: UIApplicationWillResignActiveNotification])
+ _appActive = NO;
+ else
+ _appActive = YES;
+}
+
- (void)updateConstraints
{
[self reshape];
--
1.7.12.4 (Apple Git-37)
From 32011da1639d30338878d02ecbea9bf67bfeb1ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 2 May 2013 20:30:35 +0100
Subject: [PATCH 10/10] ios: enable freetype
---
extras/package/ios/build.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index 6d1b9c3..fa813c5 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@@ -193,7 +193,6 @@ fi
--disable-SDL_image \
--disable-fontconfig \
--disable-ass \
- --disable-freetype2 \
--disable-iconv \
--disable-fribidi \
--disable-zvbi \
@@ -215,6 +214,7 @@ fi
--disable-libmpeg2 \
--disable-chromaprint \
--disable-mad \
+ --enable-freetype2 \
--disable-taglib > ${out}
echo "EXTRA_CFLAGS += ${EXTRA_CFLAGS}" >> config.mak
@@ -317,7 +317,7 @@ ${VLCROOT}/configure \
--enable-theora \
--enable-flac \
--disable-screen \
- --disable-freetype \
+ --enable-freetype \
--disable-taglib \
--disable-mmx \
--disable-mad > ${out} # MMX and SSE support requires llvm which is broken on Simulator
--
1.7.12.4 (Apple Git-37)
From 76c1c80fd8ea4f2d2fae0cdf61a3d4348f872001 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 2 May 2013 22:23:14 +0100
Subject: [PATCH 11/11] freetype: fixed compilation for non-Mac darwin
platforms
---
modules/text_renderer/freetype.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index a9787cb..1325d3e 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -103,7 +103,10 @@
/* apple stuff */
#ifdef __APPLE__
+#include <TargetConditionals.h>
+#if !TARGET_OS_IPHONE
#include <Carbon/Carbon.h>
+#endif
#include <sys/param.h> /* for MAXPATHLEN */
#undef HAVE_FONTCONFIG
#define HAVE_STYLES
@@ -736,6 +739,7 @@ fail:
#endif /* HAVE_WIN32 */
#ifdef __APPLE__
+#if !TARGET_OS_IPHONE
static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
bool b_bold, bool b_italic, int i_size, int *i_idx )
{
@@ -815,6 +819,7 @@ static char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
return psz_path;
}
#endif
+#endif
#endif /* HAVE_STYLES */
@@ -1997,7 +2002,9 @@ static FT_Face LoadFace( filter_t *p_filter,
-1,
&i_idx );
#elif defined( __APPLE__ )
+#if !TARGET_OS_IPHONE
psz_fontfile = MacLegacy_Select( p_filter, p_style->psz_fontname, false, false, -1, &i_idx );
+#endif
#elif defined( WIN32 )
psz_fontfile = Win32_Select( p_filter,
p_style->psz_fontname,
@@ -2911,7 +2918,9 @@ static int Create( vlc_object_t *p_this )
false, p_sys->i_default_font_size,
&monofontindex );
#elif defined(__APPLE__)
+#if !TARGET_OS_IPHONE
psz_fontfile = MacLegacy_Select( p_filter, psz_fontfamily, false, false, 0, &fontindex );
+#endif
#elif defined(WIN32)
psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
--
1.7.12.4 (Apple Git-37)
From 782eccd0d1ae98cc9455d44b2aeb20c3b99879c4 Mon Sep 17 00:00:00 2001
From: Gleb Pinigin <gpinigin@gmail.com>
Date: Fri, 17 May 2013 23:13:06 +0700
Subject: [PATCH 15/15] Fix potential crash when sending notification to
deallocated object
---
modules/video_output/ios2.m | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/video_output/ios2.m b/modules/video_output/ios2.m
index 0774550..9ecc58c 100644
--- a/modules/video_output/ios2.m
+++ b/modules/video_output/ios2.m
@@ -398,6 +398,7 @@ static void OpenglESSwap(vlc_gl_t *gl)
- (void)dealloc
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
[_eaglContext release];
[super dealloc];
}
--
1.7.12.4 (Apple Git-37)
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