]> git.sesse.net Git - vlc/commitdiff
macosx: fixed remaining 64bit issues
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 13 Jun 2009 12:13:58 +0000 (14:13 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 13 Jun 2009 12:18:11 +0000 (14:18 +0200)
The Quartztext module needs a rewrite. All other parts of VLC are working nicely in 64bit mode.

extras/contrib/src/Makefile
modules/access/qtcapture.m
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/prefs.m
modules/gui/macosx/sidebarview.m
modules/gui/macosx/simple_prefs.m
modules/misc/quartztext.c

index a1d820e33502e32060e3d9d8250cd1a6e0216fad..c851459e881335b4983c95de3613bc5fc98ace94 100644 (file)
@@ -156,11 +156,15 @@ endif
 ifdef HAVE_DARWIN_OS_ON_INTEL
 FFMPEG_CFLAGS += -DHAVE_LRINTF
 endif
+ifndef HAVE_DARWIN_10
 NONLLVMCC+= CC="/Developer/usr/bin/gcc-4.2"
 NONLLVMCC+= CXX="/Developer/usr/bin/g++-4.2"
 else
 NONLLVMCC+= $(HOSTCC)
 endif
+else
+NONLLVMCC+= $(HOSTCC)
+endif
 
 ifdef HAVE_AMR
 FFMPEGCONF+= --enable-libamr-nb --enable-libamr-wb --enable-nonfree
index 01bb691bbe65ec8e144e280b76ad53adba71bbba..19b470bf70bf2dbf28d4453fd8e0d82794ebc318 100644 (file)
@@ -233,7 +233,7 @@ static int Open( vlc_object_t *p_this )
 
     if( ![p_sys->device open: &o_returnedError] )
     {
-        msg_Err( p_demux, "Unable to open the capture device (%i)", [o_returnedError code] );
+        msg_Err( p_demux, "Unable to open the capture device (%ld)", [o_returnedError code] );
         goto error;
     }
 
@@ -303,14 +303,14 @@ static int Open( vlc_object_t *p_this )
     bool ret = [p_sys->session addInput:input error: &o_returnedError];
     if( !ret )
     {
-        msg_Err( p_demux, "default video capture device could not be added to capture session (%i)", [o_returnedError code] );
+        msg_Err( p_demux, "default video capture device could not be added to capture session (%ld)", [o_returnedError code] );
         goto error;
     }
 
     ret = [p_sys->session addOutput:p_sys->output error: &o_returnedError];
     if( !ret )
     {
-        msg_Err( p_demux, "output could not be added to capture session (%i)", [o_returnedError code] );
+        msg_Err( p_demux, "output could not be added to capture session (%ld)", [o_returnedError code] );
         goto error;
     }
 
index c530669939151b1429d8cd81ad391a3756b9bda6..527a7cc4cc61a1590b4331c78c60fc2869841d77 100644 (file)
     [super resignMainWindow];
 }
 
-- (float)splitView:(NSSplitView *) splitView constrainSplitPosition:(float) proposedPosition ofSubviewAt:(int) index
+- (CGFloat)splitView:(NSSplitView *) splitView constrainSplitPosition:(CGFloat) proposedPosition ofSubviewAt:(NSInteger) index
 {
        if([splitView isVertical])
                return proposedPosition;
 
 }
 
-- (float)splitView:(NSSplitView *) splitView constrainMinCoordinate:(float) proposedMin ofSubviewAt:(int) offset
+- (CGFloat)splitView:(NSSplitView *) splitView constrainMinCoordinate:(CGFloat) proposedMin ofSubviewAt:(NSInteger) offset
 {
        if([splitView isVertical])
                return 125.;
                return 0.;
 }
 
-- (float)splitView:(NSSplitView *) splitView constrainMaxCoordinate:(float) proposedMax ofSubviewAt:(int) offset
+- (CGFloat)splitView:(NSSplitView *) splitView constrainMaxCoordinate:(CGFloat) proposedMax ofSubviewAt:(NSInteger) offset
 {
     if([splitView isVertical])
                return MIN([self frame].size.width - 551, 300);
index e69dfda0f7b89a722ee12e433da9ea7ccb566f3f..7561b6fcf840b1532b36b2617be3de0f9c275971 100644 (file)
@@ -71,7 +71,7 @@
 - (id)initWithName:(NSString*)name;
 
 - (int)numberOfChildren;
-- (VLCTreeItem *)childAtIndex:(int)i_index;
+- (VLCTreeItem *)childAtIndex:(NSInteger)i_index;
 
 - (NSString *)name;
 - (NSMutableArray *)children;
@@ -556,7 +556,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
     [super dealloc];
 }
 
-- (VLCTreeItem *)childAtIndex:(int)i_index
+- (VLCTreeItem *)childAtIndex:(NSInteger)i_index
 {
     return [[self children] objectAtIndex:i_index];
 }
index 7398cc528ececd1e157a7ba634718368ee69654d..728af9ac2eb9d7945d1e324513bc880e4d63ff35 100644 (file)
@@ -39,7 +39,7 @@
        return self;
 }
 
-- (float) dividerThickness
+- (CGFloat) dividerThickness
 {
        return 1.0;
 }
 @implementation VLCSidebar (NSOutlineViewDataSource)
 
 /* return the number of children for Obj-C pointer item */ /* DONE */
-- (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item
+- (NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item
 {
     return [o_playlist outlineView:outlineView numberOfChildrenOfItem:item];
 }
 
 /* return the child at index for the Obj-C pointer item */ /* DONE */
-- (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item
+- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item
 {
     return [o_playlist outlineView:outlineView child:index ofItem:item];
 }
index da430b31fe6c240f2bfd67be9a0683a6d14834b8..2d61c269a8ab6d12d797a125fec32310f72190a7 100644 (file)
@@ -566,10 +566,24 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
     
     [self setupButton: o_osd_encoding_pop forStringList: "subsdec-encoding"];
     [self setupField: o_osd_lang_fld forOption: "sub-language" ];
-    [self setupField: o_osd_font_fld forOption: "quartztext-font"];
+       
+       if( module_exists( "quartztext" ) )
+       {
+               [self setupField: o_osd_font_fld forOption: "quartztext-font"];
+
+               [self setupButton: o_osd_font_color_pop forIntList: "quartztext-color"];
+               [self setupButton: o_osd_font_size_pop forIntList: "quartztext-rel-fontsize"];
+       }
+       else 
+       {
+               [o_osd_font_fld setEnabled: NO];
+               [o_osd_font_color_pop setEnabled: NO];
+               [o_osd_font_size_pop setEnabled: NO];
+               [o_osd_font_color_pop removeAllItems];
+               [o_osd_font_size_pop removeAllItems];
+               [o_osd_font_btn setEnabled: NO];
+       }
 
-    [self setupButton: o_osd_font_color_pop forIntList: "quartztext-color"];
-    [self setupButton: o_osd_font_size_pop forIntList: "quartztext-rel-fontsize"];
 
     /********************
      * hotkeys settings *
@@ -921,10 +935,13 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
             config_PutPsz( p_intf, "subsdec-encoding", [[[o_osd_encoding_pop selectedItem] title] UTF8String] );
 
         config_PutPsz( p_intf, "sub-language", [[o_osd_lang_fld stringValue] UTF8String] );
-        config_PutPsz( p_intf, "quartztext-font", [[o_osd_font_fld stringValue] UTF8String] );
-
-        SaveIntList( o_osd_font_color_pop, "quartztext-color" );
-        SaveIntList( o_osd_font_size_pop, "quartztext-rel-fontsize" );
+        
+               if( module_exists( "quartztext" ) )
+               {
+                       config_PutPsz( p_intf, "quartztext-font", [[o_osd_font_fld stringValue] UTF8String] );
+                       SaveIntList( o_osd_font_color_pop, "quartztext-color" );
+                       SaveIntList( o_osd_font_size_pop, "quartztext-rel-fontsize" );
+               }
 
         i = config_SaveConfigFile( p_intf, NULL );
 
@@ -1098,17 +1115,24 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
 
 - (IBAction)showFontPicker:(id)sender
 {
-    char * font = config_GetPsz( p_intf, "quartztext-font" );
-    NSString * fontFamilyName = font ? [NSString stringWithUTF8String: font] : nil;
-    free(font);
-    if( fontFamilyName )
-    {
-        NSFontDescriptor * fd = [NSFontDescriptor fontDescriptorWithFontAttributes:nil];
-        NSFont * font = [NSFont fontWithDescriptor:[fd fontDescriptorWithFamily:fontFamilyName] textTransform:nil];
-        [[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
-    }
-    [[NSFontManager sharedFontManager] setTarget: self];
-    [[NSFontPanel sharedFontPanel] orderFront:self];
+       if( module_exists( "quartztext" ) )
+       {
+               char * font = config_GetPsz( p_intf, "quartztext-font" );
+               NSString * fontFamilyName = font ? [NSString stringWithUTF8String: font] : nil;
+               free(font);
+               if( fontFamilyName )
+               {
+                       NSFontDescriptor * fd = [NSFontDescriptor fontDescriptorWithFontAttributes:nil];
+                       NSFont * font = [NSFont fontWithDescriptor:[fd fontDescriptorWithFamily:fontFamilyName] textTransform:nil];
+                       [[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
+               }
+               [[NSFontManager sharedFontManager] setTarget: self];
+               [[NSFontPanel sharedFontPanel] orderFront:self];
+       }
+       else 
+       {
+               [sender setEnabled: NO];
+       }
 }
 
 - (void)changeFont:(id)sender
index 3ac67b57a11ff141f20f2605299bfe7af5a22d49..a3fc2c189fa7e007ea0b9b73de6dc52dbfd2987a 100644 (file)
 // Preamble
 //////////////////////////////////////////////////////////////////////////////
 
+#ifdef __x86_64__
+
+#warning "No text renderer build! Quartztext isn't 64bit compatible!"
+#warning "RE-WRITE ME!"
+
+#else
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -887,3 +894,5 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region, UniCha
 
     return VLC_SUCCESS;
 }
+
+#endif