From 045440b4833a9d6e05d9181bfbfef87aa6a85041 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 14 Mar 2007 16:30:19 +0000 Subject: sys/osxvideo/: Fix leaks when running a NSApp. Original commit message from CVS: * sys/osxvideo/cocoawindow.h: * sys/osxvideo/cocoawindow.m: * sys/osxvideo/osxvideosink.h: * sys/osxvideo/osxvideosink.m: Fix leaks when running a NSApp. Accept any kind of resolutions. Works in fullscreen. Can maximize. Only thing left before being able to move this to -good is documentation and embedded window support. --- sys/osxvideo/osxvideosink.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/osxvideo/osxvideosink.h') diff --git a/sys/osxvideo/osxvideosink.h b/sys/osxvideo/osxvideosink.h index 2c144f5e..d7fba966 100644 --- a/sys/osxvideo/osxvideosink.h +++ b/sys/osxvideo/osxvideosink.h @@ -65,12 +65,12 @@ struct _GstOSXWindow { gboolean internal; GstOSXVideoSinkWindow* win; GstGLView* gstview; + NSAutoreleasePool *pool; }; struct _GstOSXVideoSink { /* Our element stuff */ GstVideoSink videosink; - GstOSXWindow *osxwindow; gint fps_n; @@ -92,6 +92,16 @@ struct _GstOSXVideoSinkClass { GType gst_osx_video_sink_get_type(void); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 +@interface NSApplication(AppleMenu) +- (void)setAppleMenu:(NSMenu *)menu; +@end +#endif + +@interface GstAppDelegate : NSObject +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; +@end + G_END_DECLS #endif /* __GST_OSX_VIDEO_SINK_H__ */ -- cgit v1.2.1