[vlc-devel] commit: macosx: fixed remaining 64bit issues ( Felix Paul Kühne )
git version control
git at videolan.org
Sat Jun 13 15:21:58 CEST 2009
vlc | branch: 1.0-bugfix | Felix Paul Kühne <fkuehne at videolan.org> | Sat Jun 13 15:15:34 2009 +0200| [496d55d02287cf51e6c0e76bbb33995fa7979a2b] | committer: Felix Paul Kühne
macosx: fixed remaining 64bit issues
backport of f7692e679266f569519ebbfe499c8503e1620695
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=496d55d02287cf51e6c0e76bbb33995fa7979a2b
---
NEWS | 1 +
modules/access/qtcapture.m | 6 ++--
modules/gui/macosx/prefs.m | 4 +-
modules/gui/macosx/simple_prefs.m | 60 ++++++++++++++++++++++++++-----------
modules/misc/quartztext.c | 9 +++++
5 files changed, 57 insertions(+), 23 deletions(-)
diff --git a/NEWS b/NEWS
index 88dcebf..efc5f4c 100644
--- a/NEWS
+++ b/NEWS
@@ -102,6 +102,7 @@ Windows CE Port:
EXPERIMENTAL work for the winCE port has been done.
Mac OS X Port:
+ * EXPERIMENTAL 64bit support
* Speed improvements by using llvm-gcc
* New Document icons by Dominic Spitaler
* Support for latest iSight models
diff --git a/modules/access/qtcapture.m b/modules/access/qtcapture.m
index a94f7d2..17f848a 100644
--- a/modules/access/qtcapture.m
+++ b/modules/access/qtcapture.m
@@ -234,7 +234,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;
}
@@ -304,14 +304,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;
}
diff --git a/modules/gui/macosx/prefs.m b/modules/gui/macosx/prefs.m
index d979d05..2d8ed59 100644
--- a/modules/gui/macosx/prefs.m
+++ b/modules/gui/macosx/prefs.m
@@ -71,7 +71,7 @@
- (id)initWithName:(NSString*)name;
- (int)numberOfChildren;
-- (VLCTreeItem *)childAtIndex:(int)i_index;
+- (VLCTreeItem *)childAtIndex:(NSInteger)i_index;
- (NSString *)name;
- (NSMutableArray *)children;
@@ -553,7 +553,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[super dealloc];
}
-- (VLCTreeItem *)childAtIndex:(int)i_index
+- (VLCTreeItem *)childAtIndex:(NSInteger)i_index
{
return [[self children] objectAtIndex:i_index];
}
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 7423ac7..a27372e 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -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
diff --git a/modules/misc/quartztext.c b/modules/misc/quartztext.c
index 3a8c7db..27af980 100644
--- a/modules/misc/quartztext.c
+++ b/modules/misc/quartztext.c
@@ -21,6 +21,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef __x86_64__
+
+#warning "No text renderer build! Quartztext isn't 64bit compatible!"
+#warning "RE-WRITE ME!"
+
+#else
+
//////////////////////////////////////////////////////////////////////////////
// Preamble
//////////////////////////////////////////////////////////////////////////////
@@ -887,3 +894,5 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region, UniCha
return VLC_SUCCESS;
}
+
+#endif
\ No newline at end of file
More information about the vlc-devel
mailing list