Commit f7692e67 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed remaining 64bit issues

The Quartztext module needs a rewrite. All other parts of VLC are working nicely in 64bit mode.
parent bc93cce1
...@@ -156,11 +156,15 @@ endif ...@@ -156,11 +156,15 @@ endif
ifdef HAVE_DARWIN_OS_ON_INTEL ifdef HAVE_DARWIN_OS_ON_INTEL
FFMPEG_CFLAGS += -DHAVE_LRINTF FFMPEG_CFLAGS += -DHAVE_LRINTF
endif endif
ifndef HAVE_DARWIN_10
NONLLVMCC+= CC="/Developer/usr/bin/gcc-4.2" NONLLVMCC+= CC="/Developer/usr/bin/gcc-4.2"
NONLLVMCC+= CXX="/Developer/usr/bin/g++-4.2" NONLLVMCC+= CXX="/Developer/usr/bin/g++-4.2"
else else
NONLLVMCC+= $(HOSTCC) NONLLVMCC+= $(HOSTCC)
endif endif
else
NONLLVMCC+= $(HOSTCC)
endif
ifdef HAVE_AMR ifdef HAVE_AMR
FFMPEGCONF+= --enable-libamr-nb --enable-libamr-wb --enable-nonfree FFMPEGCONF+= --enable-libamr-nb --enable-libamr-wb --enable-nonfree
......
...@@ -233,7 +233,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -233,7 +233,7 @@ static int Open( vlc_object_t *p_this )
if( ![p_sys->device open: &o_returnedError] ) 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; goto error;
} }
...@@ -303,14 +303,14 @@ static int Open( vlc_object_t *p_this ) ...@@ -303,14 +303,14 @@ static int Open( vlc_object_t *p_this )
bool ret = [p_sys->session addInput:input error: &o_returnedError]; bool ret = [p_sys->session addInput:input error: &o_returnedError];
if( !ret ) 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; goto error;
} }
ret = [p_sys->session addOutput:p_sys->output error: &o_returnedError]; ret = [p_sys->session addOutput:p_sys->output error: &o_returnedError];
if( !ret ) 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; goto error;
} }
......
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
[super resignMainWindow]; [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]) if([splitView isVertical])
return proposedPosition; return proposedPosition;
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
} }
- (float)splitView:(NSSplitView *) splitView constrainMinCoordinate:(float) proposedMin ofSubviewAt:(int) offset - (CGFloat)splitView:(NSSplitView *) splitView constrainMinCoordinate:(CGFloat) proposedMin ofSubviewAt:(NSInteger) offset
{ {
if([splitView isVertical]) if([splitView isVertical])
return 125.; return 125.;
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
return 0.; 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]) if([splitView isVertical])
return MIN([self frame].size.width - 551, 300); return MIN([self frame].size.width - 551, 300);
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
- (id)initWithName:(NSString*)name; - (id)initWithName:(NSString*)name;
- (int)numberOfChildren; - (int)numberOfChildren;
- (VLCTreeItem *)childAtIndex:(int)i_index; - (VLCTreeItem *)childAtIndex:(NSInteger)i_index;
- (NSString *)name; - (NSString *)name;
- (NSMutableArray *)children; - (NSMutableArray *)children;
...@@ -556,7 +556,7 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -556,7 +556,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[super dealloc]; [super dealloc];
} }
- (VLCTreeItem *)childAtIndex:(int)i_index - (VLCTreeItem *)childAtIndex:(NSInteger)i_index
{ {
return [[self children] objectAtIndex:i_index]; return [[self children] objectAtIndex:i_index];
} }
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
return self; return self;
} }
- (float) dividerThickness - (CGFloat) dividerThickness
{ {
return 1.0; return 1.0;
} }
...@@ -172,13 +172,13 @@ ...@@ -172,13 +172,13 @@
@implementation VLCSidebar (NSOutlineViewDataSource) @implementation VLCSidebar (NSOutlineViewDataSource)
/* return the number of children for Obj-C pointer item */ /* DONE */ /* 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 [o_playlist outlineView:outlineView numberOfChildrenOfItem:item];
} }
/* return the child at index for the Obj-C pointer item */ /* DONE */ /* 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]; return [o_playlist outlineView:outlineView child:index ofItem:item];
} }
......
...@@ -566,10 +566,24 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des ...@@ -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 setupButton: o_osd_encoding_pop forStringList: "subsdec-encoding"];
[self setupField: o_osd_lang_fld forOption: "sub-language" ]; [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 * * hotkeys settings *
...@@ -921,10 +935,13 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch ...@@ -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, "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, "sub-language", [[o_osd_lang_fld stringValue] UTF8String] );
config_PutPsz( p_intf, "quartztext-font", [[o_osd_font_fld stringValue] UTF8String] );
if( module_exists( "quartztext" ) )
SaveIntList( o_osd_font_color_pop, "quartztext-color" ); {
SaveIntList( o_osd_font_size_pop, "quartztext-rel-fontsize" ); 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 ); 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 ...@@ -1098,17 +1115,24 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
- (IBAction)showFontPicker:(id)sender - (IBAction)showFontPicker:(id)sender
{ {
char * font = config_GetPsz( p_intf, "quartztext-font" ); if( module_exists( "quartztext" ) )
NSString * fontFamilyName = font ? [NSString stringWithUTF8String: font] : nil; {
free(font); char * font = config_GetPsz( p_intf, "quartztext-font" );
if( fontFamilyName ) NSString * fontFamilyName = font ? [NSString stringWithUTF8String: font] : nil;
{ free(font);
NSFontDescriptor * fd = [NSFontDescriptor fontDescriptorWithFontAttributes:nil]; if( fontFamilyName )
NSFont * font = [NSFont fontWithDescriptor:[fd fontDescriptorWithFamily:fontFamilyName] textTransform:nil]; {
[[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO]; NSFontDescriptor * fd = [NSFontDescriptor fontDescriptorWithFontAttributes:nil];
} NSFont * font = [NSFont fontWithDescriptor:[fd fontDescriptorWithFamily:fontFamilyName] textTransform:nil];
[[NSFontManager sharedFontManager] setTarget: self]; [[NSFontManager sharedFontManager] setSelectedFont:font isMultiple:NO];
[[NSFontPanel sharedFontPanel] orderFront:self]; }
[[NSFontManager sharedFontManager] setTarget: self];
[[NSFontPanel sharedFontPanel] orderFront:self];
}
else
{
[sender setEnabled: NO];
}
} }
- (void)changeFont:(id)sender - (void)changeFont:(id)sender
......
...@@ -25,6 +25,13 @@ ...@@ -25,6 +25,13 @@
// Preamble // Preamble
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#ifdef __x86_64__
#warning "No text renderer build! Quartztext isn't 64bit compatible!"
#warning "RE-WRITE ME!"
#else
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
...@@ -887,3 +894,5 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region, UniCha ...@@ -887,3 +894,5 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region, UniCha
return VLC_SUCCESS; return VLC_SUCCESS;
} }
#endif
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