[vlc-devel] vlc-devel Digest, Vol 36, Issue 23

John M. Moyo jmoyo at mme.gov.na
Tue May 11 09:57:34 CEST 2010


I CANT GET IT RIGHT WITH YOUR vlc-develDigest

-----Original Message-----
From: vlc-devel-bounces at videolan.org [mailto:vlc-devel-bounces at videolan.org]
On Behalf Of vlc-devel-request at videolan.org
Sent: Tuesday, May 11, 2010 1:18 AM
To: vlc-devel at videolan.org
Subject: vlc-devel Digest, Vol 36, Issue 23

Send vlc-devel mailing list submissions to
	vlc-devel at videolan.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://mailman.videolan.org/listinfo/vlc-devel
or, via email, send a message with subject or body 'help' to
	vlc-devel-request at videolan.org

You can reach the person managing the list at
	vlc-devel-owner at videolan.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of vlc-devel digest..."


Today's Topics:

   1. [PATCH 4/5] Add coreanim.m for Core Animation code that	must
      use Objective C. (David Menestrina)
   2. [PATCH 5/5] Use Core Animation drawing model,	Cocoa event
      model in 64 bit plugin. (David Menestrina)
   3. Re: [PATCH] macosx: connect the right slider outlet.	close
      #3598 (Pierre d'Herbemont)
   4. Re: [PATCH] 64-bit support for mozilla plugin on Mac OS	X
      (Pierre d'Herbemont)
   5. Re: [PATCH] 64-bit support for mozilla plugin on Mac OS	X
      (Pierre d'Herbemont)


----------------------------------------------------------------------

Message: 1
Date: Mon, 10 May 2010 15:32:04 -0700
From: David Menestrina <dmenest-vlc at ofb.net>
Subject: [vlc-devel] [PATCH 4/5] Add coreanim.m for Core Animation
	code that	must use Objective C.
To: vlc-devel at videolan.org
Message-ID: <1273530725-68551-5-git-send-email-dmenest-vlc at ofb.net>

---
 projects/mozilla/Makefile.am |   15 +++++++---
 projects/mozilla/coreanim.h  |   40 ++++++++++++++++++++++++++++
 projects/mozilla/coreanim.m  |   60
++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 111 insertions(+), 4 deletions(-)
 create mode 100644 projects/mozilla/coreanim.h
 create mode 100644 projects/mozilla/coreanim.m

diff --git a/projects/mozilla/Makefile.am b/projects/mozilla/Makefile.am
index 230b720..b7b2874 100644
--- a/projects/mozilla/Makefile.am
+++ b/projects/mozilla/Makefile.am
@@ -2,6 +2,11 @@
 # Building the Mozilla plugin
 
############################################################################
###
 
+# Automake forgets to add a proper tag to libtool with Objective-C files.
+# Moreover Libtool should default tag to CC when none is specified but
+# obviously does not. Here is a fix for that.
+LIBTOOL=@LIBTOOL@ --tag=CC
+
 MOSTLYCLEANFILES = 
 CLEANFILES = $(BUILT_SOURCES)
 EXTRA_DIST = $(DIST_sources) npvlc_rc.rc.in COPYING npvlc.dll.manifest
@@ -19,7 +24,7 @@ SOURCES_mozilla_common = \
 	support/classinfo.h
 
 DIST_sources = $(SOURCES_mozilla_common) \
-	support/npwin.cpp support/npmac.cpp support/npunix.c
+	support/npwin.cpp support/npmac.cpp support/npunix.c coreanim.m
coreanim.h
 
 if BUILD_MOZILLA
 
@@ -62,18 +67,20 @@ if HAVE_DARWIN
 
 lib_LTLIBRARIES = npvlc.la
 
-SOURCES_support = support/npmac.cpp
+SOURCES_support = support/npmac.cpp coreanim.m
 CPPFLAGS_mozilla_EXTRA = -I. -I$(top_builddir) -I$(srcdir)/../include -c \
 	-F/System/Library/Frameworks/CoreFoundation.framework $(moz_CFLAGS)
\
 	-I/Developer/Headers/FlatCarbon -fno-common -fpascal-strings \
 	-Wmost -Wno-four-char-constants -Wno-unknown-pragmas -DXP_MACOSX=1 \
-	-DNO_X11=1 -DUSE_SYSTEM_CONSOLE=1 -pipe -fmessage-length=0 
+	-DNO_X11=1 -DUSE_SYSTEM_CONSOLE=1 -pipe -fmessage-length=0
+OBJCFLAGS_mozilla_EXTRA = $(CPPFLAGS_mozilla_EXTRA)
 LDFLAGS_mozilla_EXTRA = -no-undefined -bundle -Wl,-read_only_relocs
-Wl,suppress \
-	-Wl,-headerpad_max_install_names -shrext $(LIBEXT)
-Wl,-framework,Carbon -Wl,-framework,System
+	-Wl,-headerpad_max_install_names -shrext $(LIBEXT)
-Wl,-framework,Carbon -Wl,-framework,System -Wl,-framework,Cocoa
-Wl,-framework,QuartzCore
 
 npvlc_la_SOURCES = $(SOURCES_mozilla_common) $(SOURCES_support)
 npvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags mozilla`
$(CPPFLAGS_mozilla_EXTRA)
 npvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags mozilla`
$(CPPFLAGS_mozilla_EXTRA) 
+npvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags mozilla`
$(OBJCFLAGS_mozilla_extra)
 npvlc_la_DEPENDENCIES = $(LIBRARIES_libvlc)
 npvlc_la_LDFLAGS = `$(VLC_CONFIG) --ldflags mozilla` -module -avoid-version
\
 				   $(LDFLAGS_mozilla_EXTRA)
diff --git a/projects/mozilla/coreanim.h b/projects/mozilla/coreanim.h
new file mode 100644
index 0000000..00737b9
--- /dev/null
+++ b/projects/mozilla/coreanim.h
@@ -0,0 +1,40 @@
+/**************************************************************************
***
+ * coreanim.h:
+
****************************************************************************
*
+ * Copyright (C) 2010 Veetle, Inc.
+ * $Id$
+ *
+ * Authors: David Menestrina <dmenest-vlc at ofb.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301,
USA.
+
****************************************************************************
*/
+
+#ifndef __VLCPLUGIN_COREANIM_H__
+#define __VLCPLUGIN_COREANIM_H__
+
+typedef struct coreanim_instance_t coreanim_instance_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+coreanim_instance_t *coreanim_init();
+void *coreanim_get_calayer(coreanim_instance_t *inst);
+void coreanim_destroy(coreanim_instance_t *inst);
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __VLCPLUGIN_COREANIM_H__
diff --git a/projects/mozilla/coreanim.m b/projects/mozilla/coreanim.m
new file mode 100644
index 0000000..acbe849
--- /dev/null
+++ b/projects/mozilla/coreanim.m
@@ -0,0 +1,60 @@
+/**************************************************************************
***
+ * coreanim.m:
+
****************************************************************************
*
+ * Copyright (C) 2010 Veetle, Inc.
+ * $Id$
+ *
+ * Authors: David Menestrina <dmenest-vlc at ofb.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301,
USA.
+
****************************************************************************
*/
+
+#import <Cocoa/Cocoa.h>
+#import <QuartzCore/QuartzCore.h>
+#include "coreanim.h"
+
+struct coreanim_instance_t {
+    CALayer *browserLayer;
+};
+
+coreanim_instance_t *coreanim_init()
+{
+    coreanim_instance_t *inst = calloc(1, sizeof(coreanim_instance_t));
+
+    [CATransaction begin];
+
+    inst->browserLayer = [[CALayer layer] retain];
+    inst->browserLayer.layoutManager=[CAConstraintLayoutManager
layoutManager];
+    inst->browserLayer.backgroundColor =
CGColorGetConstantColor(kCGColorBlack);
+
+    [CATransaction commit];
+
+    return inst;
+}
+
+void coreanim_destroy(coreanim_instance_t *inst)
+{
+    if( inst )
+    {
+        [inst->browserLayer release];
+
+        free(inst);
+    }
+}
+
+void *coreanim_get_calayer(coreanim_instance_t *inst)
+{
+    return inst->browserLayer;
+}
-- 
1.7.0.3



------------------------------

Message: 2
Date: Mon, 10 May 2010 15:32:05 -0700
From: David Menestrina <dmenest-vlc at ofb.net>
Subject: [vlc-devel] [PATCH 5/5] Use Core Animation drawing model,
	Cocoa event model in 64 bit plugin.
To: vlc-devel at videolan.org
Message-ID: <1273530725-68551-6-git-send-email-dmenest-vlc at ofb.net>

---
 projects/mozilla/vlcplugin.cpp |   21 ++++++++
 projects/mozilla/vlcplugin.h   |   15 +++++-
 projects/mozilla/vlcshell.cpp  |  112
+++++++++++++++++++++++++++++++++------
 projects/mozilla/vlcshell.h    |    2 +-
 4 files changed, 129 insertions(+), 21 deletions(-)

diff --git a/projects/mozilla/vlcplugin.cpp b/projects/mozilla/vlcplugin.cpp
index 2a15a2a..f012788 100644
--- a/projects/mozilla/vlcplugin.cpp
+++ b/projects/mozilla/vlcplugin.cpp
@@ -31,6 +31,9 @@
 #include "vlcplugin.h"
 #include "control/npolibvlc.h"
 
+#if defined(XP_MACOSX) && defined(__x86_64__)
+#   include "coreanim.h"
+#endif
 #include <ctype.h>
 
 #if defined(XP_UNIX)
@@ -318,6 +321,7 @@ void EventObj::unask_for_event(event_t e)
 }
 
 
+
 NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
 {
     /* prepare VLC command line */
@@ -331,7 +335,11 @@ NPError VlcPlugin::init(int argc, char* const argn[],
char* const argv[])
     /* locate VLC module path */
 #ifdef XP_MACOSX
     ppsz_argv[ppsz_argc++] = "--plugin-path=/Library/Internet\\
Plug-Ins/VLC\\ Plugin.plugin/Contents/MacOS/plugins";
+#ifdef __x86_64__
+    ppsz_argv[ppsz_argc++] = "--vout=calayer";
+#else // not 64 bit
     ppsz_argv[ppsz_argc++] = "--vout=minimal_macosx";
+#endif
 #elif defined(XP_WIN)
     HKEY h_key;
     DWORD i_type, i_data = MAX_PATH + 1;
@@ -487,6 +495,10 @@ NPError VlcPlugin::init(int argc, char* const argn[],
char* const argv[])
     if( !events.init() )
         return NPERR_GENERIC_ERROR;
 
+#if defined(XP_MACOSX) && defined(__x86_64__)
+    this->p_coreanim = coreanim_init();
+#endif
+
     return NPERR_NO_ERROR;
 }
 
@@ -507,6 +519,11 @@ VlcPlugin::~VlcPlugin()
         libvlc_media_list_release( libvlc_media_list );
     if( libvlc_instance )
         libvlc_release(libvlc_instance);
+
+#if defined(XP_MACOSX) && defined(__x86_64__)
+    if( this->p_coreanim )
+        coreanim_destroy(this->p_coreanim);
+#endif
 }
 
 
/***************************************************************************
**
@@ -519,8 +536,12 @@ void VlcPlugin::set_player_window()
                                     (uint32_t)getVideoWindow());
 #endif
 #ifdef XP_MACOSX
+#ifdef __x86_64__
+    libvlc_media_player_set_nsobject(libvlc_media_player,
coreanim_get_calayer(p_coreanim));
+#else
     // XXX FIXME insert appropriate call here
 #endif
+#endif
 #ifdef XP_WIN
     libvlc_media_player_set_hwnd(libvlc_media_player,
                                  getWindow().window);
diff --git a/projects/mozilla/vlcplugin.h b/projects/mozilla/vlcplugin.h
index ff2e4cf..46263cf 100644
--- a/projects/mozilla/vlcplugin.h
+++ b/projects/mozilla/vlcplugin.h
@@ -53,7 +53,7 @@
 #   include <winbase.h>
 #endif
 
-#ifdef XP_MACOSX
+#if defined(XP_MACOSX) && !defined(__x86_64__)
     /* Mac OS X stuff */
 #   include <Quickdraw.h>
 #endif
@@ -71,6 +71,10 @@
 #   endif
 #endif
 
+#if defined(XP_MACOSX) && defined(__x86_64__)
+#include "coreanim.h"
+#endif
+
 #ifndef __MAX
 #   define __MAX(a, b)   ( ((a) > (b)) ? (a) : (b) )
 #endif
@@ -107,7 +111,6 @@ typedef enum vlc_toolbar_clicked_e {
     clicked_Unmute
 } vlc_toolbar_clicked_t;
 
-
 // Note that the accessor functions are unsafe, but this is handled in
 // the next layer up. 64bit uints can be substituted to taste (shift=6).
 template<size_t M> class bitmap
@@ -222,6 +225,11 @@ public:
                             { pf_wndproc = wndproc; };
 #endif
 
+#if defined(XP_MACOSX) && defined(__x86_64__)
+    void*               getCALayer()
+                            { return coreanim_get_calayer(p_coreanim); };
+#endif
+
 #if defined(XP_UNIX)
     int                 setSize(unsigned width, unsigned height);
     Window              getVideoWindow()
@@ -350,6 +358,9 @@ private:
 
     int i_last_position;
 #endif
+#if defined(XP_MACOSX) && defined(__x86_64__)
+    coreanim_instance_t *p_coreanim;
+#endif
 
     static void eventAsync(void *);
     static void event_callback(const libvlc_event_t *, void *);
diff --git a/projects/mozilla/vlcshell.cpp b/projects/mozilla/vlcshell.cpp
index 883205b..601084b 100644
--- a/projects/mozilla/vlcshell.cpp
+++ b/projects/mozilla/vlcshell.cpp
@@ -129,6 +129,12 @@ NPError NPP_GetValue( NPP instance, NPPVariable
variable, void *value )
             break;
         }
 
+#if defined(XP_MACOSX) && defined(__x86_64__)
+        case NPPVpluginCoreAnimationLayer:
+            *((void **)value) = p_plugin->getCALayer();
+            return NPERR_NO_ERROR;
+#endif
+
         default:
             ;
     }
@@ -149,23 +155,10 @@ NPError NPP_SetValue( NPP instance, NPNVariable
variable, void *value )
  * Mac-only API calls
 
****************************************************************************
*/
 #ifdef XP_MACOSX
-int16_t NPP_HandleEvent( NPP instance, void * event )
+#ifndef __x86_64__
+static int16_t HandleCarbonEvent( VlcPlugin * p_plugin, EventRecord
*myEvent )
 {
     static UInt32 lastMouseUp = 0;
-    if( instance == NULL )
-    {
-        return false;
-    }
-
-    VlcPlugin* p_plugin = reinterpret_cast<VlcPlugin*>(instance->pdata);
-    if( p_plugin == NULL )
-    {
-        return false;
-    }
-
-#ifndef __x86_64__  
-    EventRecord *myEvent = (EventRecord*)event;
-
     switch( myEvent->what )
     {
         case nullEvent:
@@ -256,9 +249,68 @@ int16_t NPP_HandleEvent( NPP instance, void * event )
         default:
             ;
     }
-#endif // __x86_64__
     return false;
 }
+#endif
+#ifdef __x86_64__
+static int16_t HandleCocoaEvent( VlcPlugin * p_plugin, NPCocoaEvent * event
)
+{
+    switch( event->type )
+    {
+        case NPCocoaEventDrawRect:
+	    break;
+        case NPCocoaEventMouseDown:
+            if( event->data.mouse.clickCount > 1 )
+                 p_plugin->toggle_fullscreen();
+	    return true;
+        case NPCocoaEventMouseUp:
+	    break;
+        case NPCocoaEventMouseMoved:
+	    break;
+        case NPCocoaEventMouseEntered:
+	    break;
+        case NPCocoaEventMouseExited:
+	    break;
+        case NPCocoaEventMouseDragged:
+	    break;
+        case NPCocoaEventKeyDown:
+	    break;
+        case NPCocoaEventKeyUp:
+	    break;
+        case NPCocoaEventFlagsChanged:
+	    break;
+        case NPCocoaEventFocusChanged:
+	    break;
+        case NPCocoaEventWindowFocusChanged:
+	    break;
+        case NPCocoaEventScrollWheel:
+	    break;
+        case NPCocoaEventTextInput:
+	    break;
+    }
+    return false;
+}
+#endif
+
+int16_t NPP_HandleEvent( NPP instance, void * event )
+{
+    if( instance == NULL )
+    {
+        return false;
+    }
+
+    VlcPlugin* p_plugin = reinterpret_cast<VlcPlugin*>(instance->pdata);
+    if( p_plugin == NULL )
+    {
+        return false;
+    }
+#ifdef __x86_64__
+    return HandleCocoaEvent(p_plugin, (NPCocoaEvent*) event);
+#else
+    return HandleCarbonEvent(p_plugin, (EventRecord*) event);
+#endif
+
+}
 #endif /* XP_MACOSX */
 
 
/***************************************************************************
***
@@ -289,7 +341,7 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance,
 #endif
                  char* argn[], char* argv[], NPSavedData* saved )
 {
-    NPError status;
+    NPError status = NPERR_NO_ERROR;
 
     if( instance == NULL )
     {
@@ -302,7 +354,31 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance,
         return NPERR_OUT_OF_MEMORY_ERROR;
     }
 
-    status = p_plugin->init(argc, argn, argv);
+#if defined(XP_MACOSX) && defined(__x86_64__)
+    if( NPERR_NO_ERROR == status )
+    {
+        // Check if the browser supports the CoreAnimation drawing model
+        NPBool supportsCoreAnimation = FALSE;
+        NPError err = NPN_GetValue(instance,
+
(NPNVariable)NPNVsupportsCoreAnimationBool,
+                                   &supportsCoreAnimation);
+        if( err != NPERR_NO_ERROR || !supportsCoreAnimation )
+            status = NPERR_INCOMPATIBLE_VERSION_ERROR;
+        else
+        {
+            // Set the drawing model
+            err = NPN_SetValue(instance,
+                               (NPPVariable)NPNVpluginDrawingModel,
+                               (void*)NPDrawingModelCoreAnimation);
+            if( err != NPERR_NO_ERROR )
+                status = NPERR_INCOMPATIBLE_VERSION_ERROR;
+        }
+    }
+#endif // defined(XP_MACOSX) && defined(__x86_64__)
+
+    if( NPERR_NO_ERROR == status )
+        status = p_plugin->init(argc, argn, argv);
+
     if( NPERR_NO_ERROR == status )
     {
         instance->pdata = reinterpret_cast<void*>(p_plugin);
diff --git a/projects/mozilla/vlcshell.h b/projects/mozilla/vlcshell.h
index a91a06e..452b7c8 100644
--- a/projects/mozilla/vlcshell.h
+++ b/projects/mozilla/vlcshell.h
@@ -28,7 +28,7 @@ char * NPP_GetMIMEDescription( void );
 
 NPError NPP_Initialize( void );
 
-#ifdef OJI 
+#ifdef OJI
 jref NPP_GetJavaClass( void );
 #endif
 void NPP_Shutdown( void );
-- 
1.7.0.3



------------------------------

Message: 3
Date: Tue, 11 May 2010 00:40:19 +0200
From: Pierre d'Herbemont <pdherbemont at gmail.com>
Subject: Re: [vlc-devel] [PATCH] macosx: connect the right slider
	outlet.	close #3598
To: Mailing list for VLC media player developers
	<vlc-devel at videolan.org>
Message-ID: <6F40BEDE-29FF-497C-8ADB-B2FF4034C14E at gmail.com>
Content-Type: text/plain; charset=us-ascii

Applied, thanks!

On May 10, 2010, at 9:11 PM, Dilaroga Dev wrote:

> <0001-macosx-connect-the-right-slider-outlet.patch>



------------------------------

Message: 4
Date: Tue, 11 May 2010 01:02:52 +0200
From: Pierre d'Herbemont <pdherbemont at gmail.com>
Subject: Re: [vlc-devel] [PATCH] 64-bit support for mozilla plugin on
	Mac OS	X
To: Mailing list for VLC media player developers
	<vlc-devel at videolan.org>
Message-ID: <710AC1F0-3069-4F34-8A01-BEEC861A1DE4 at gmail.com>
Content-Type: text/plain; charset=us-ascii


On May 11, 2010, at 12:32 AM, David Menestrina wrote:

> This patchset (against the 1.1 fork) fixes the VLC mozilla plugin to work
> in 64 bit browsers on Mac OS X (currently the only such browser is
Safari).
> 64-bit browser plugins can no longer use the old Carbon based QuickDraw
APIs.
> Instead, they must implement either the Core Graphics or Core Animation
drawing
> models.  Further, they must implement the Cocoa event model.  Here, we
create a
> new vout display module that writes to a Core Animation layer, and then we
use this
> vout display to implement the Core Animation drawing model.
> 
> I am quite new to both VLC and Mac OS X development, so there are bound to
be bugs,
> and there are even a few known issues that I just don't have the expertise
to figure
> out at this time.  I would greatly appreciate the assistance of some real
Mac OS
> developers to look over the code.  Known issues:
>  1) Cocoa documentation says that NSView is not threadsafe, yet this
>     code uses NSView in the vout thread for entering fullscreen mode.

It's easy to dispatch a selector on main thread using
-performSelectorOnMainThread:withObject:, why don't you use it?

>  2) Perhaps due to some release/retain issues, or perhaps some race
>     conditions, the plugin crashes when closing the page using it.  The
>     stack trace for the crash is unfortunately in Safari code, which
>     makes it difficult to debug.

Generally using AppKit from non main thread is a bad idea. The CoreAnimation
code being used is heavily relying on AppKit's own CA backend. So I wouldn't
assume bet too much on CoreAnimation also.

>  3) I have read that Cocoa requires an NSAutoreleasePool to exist for
>     any thread that makes Cocoa calls.  The vout thread does not have one,
>     and therefore the plugin will leak memory.
It's easy to create one when one is needed. Just wrap your Code like this:

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// Code
[pool drain];

Thanks!

Pierre.

------------------------------

Message: 5
Date: Tue, 11 May 2010 01:17:32 +0200
From: Pierre d'Herbemont <pdherbemont at gmail.com>
Subject: Re: [vlc-devel] [PATCH] 64-bit support for mozilla plugin on
	Mac OS	X
To: Pierre d'Herbemont <pdherbemont at gmail.com>
Cc: Mailing list for VLC media player developers
	<vlc-devel at videolan.org>
Message-ID: <D917528F-5614-4D81-872F-8A0646542FD5 at gmail.com>
Content-Type: text/plain; charset=us-ascii


On May 11, 2010, at 1:02 AM, Pierre d'Herbemont wrote:

>> 2) Perhaps due to some release/retain issues, or perhaps some race
>>    conditions, the plugin crashes when closing the page using it.  The
>>    stack trace for the crash is unfortunately in Safari code, which
>>    makes it difficult to debug.
> 
> Generally using AppKit from non main thread is a bad idea. The
CoreAnimation code being used is heavily relying on AppKit's own CA backend.
So I wouldn't assume bet too much on CoreAnimation also.

>From the code I have just reviewed this should be fine.

Note, you don't have to use Safari to debug your plugin. You can use your
own App, hosting a WebView.

NSZombieEnabled is something that may help you if that's really the case.

Pierre.

------------------------------

_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


End of vlc-devel Digest, Vol 36, Issue 23
*****************************************




More information about the vlc-devel mailing list