Commit 07d406a6 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* extras/MacOSX/vlc.pbproj/project.pbxproj: Added a slew of file extensions

  recognized by VLC
* modules/code/quicktime.c: Added samr (AMR) to the quicktime decoder.
  Although it runs on OS X, it only plays back silence for some reason.
  Might be a problem with one of the converters?
* modules/gui/macosx/*:
  - 'fixed' several compiler warnings
  - removed some old no longer necesarry stuff
parent 2bd94a6c
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* quicktime.c: a quicktime decoder that uses the QT library/dll * quicktime.c: a quicktime decoder that uses the QT library/dll
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: quicktime.c,v 1.12 2003/09/02 20:19:25 gbazin Exp $ * $Id: quicktime.c,v 1.13 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Laurent Aimar <fenrir at via.ecp.fr> * Authors: Laurent Aimar <fenrir at via.ecp.fr>
* Derk-Jan Hartman <thedj at users.sf.net> * Derk-Jan Hartman <thedj at users.sf.net>
...@@ -288,6 +288,7 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -288,6 +288,7 @@ static int OpenDecoder( vlc_object_t *p_this )
p_dec->pf_run = RunDecoderVideo; p_dec->pf_run = RunDecoderVideo;
return VLC_SUCCESS; return VLC_SUCCESS;
case VLC_FOURCC('s','a','m','r'): /* 3GPP AMR audio */
case VLC_FOURCC('m','p','4','a'): /* MPEG-4 audio */ case VLC_FOURCC('m','p','4','a'): /* MPEG-4 audio */
case VLC_FOURCC('Q','D','M','C'): /* QDesign */ case VLC_FOURCC('Q','D','M','C'): /* QDesign */
case VLC_FOURCC('Q','D','M','2'): /* QDesign* 2 */ case VLC_FOURCC('Q','D','M','2'): /* QDesign* 2 */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin * intf.h: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.h,v 1.42 2003/06/01 23:48:17 hartman Exp $ * $Id: intf.h,v 1.43 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -35,14 +35,11 @@ ...@@ -35,14 +35,11 @@
*****************************************************************************/ *****************************************************************************/
@interface VLCApplication : NSApplication @interface VLCApplication : NSApplication
{ {
NSStringEncoding i_encoding;
intf_thread_t *p_intf; intf_thread_t *p_intf;
} }
- (void)initIntlSupport;
- (NSString *)localizedString:(char *)psz; - (NSString *)localizedString:(char *)psz;
- (char *)delocalizeString:(NSString *)psz; - (char *)delocalizeString:(NSString *)psz;
- (NSStringEncoding)getEncoding;
- (NSString *)wrapString: (NSString *)o_in_string toWidth: (int)i_width; - (NSString *)wrapString: (NSString *)o_in_string toWidth: (int)i_width;
- (void)setIntf:(intf_thread_t *)p_intf; - (void)setIntf:(intf_thread_t *)p_intf;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.93 2003/07/27 23:05:41 hartman Exp $ * $Id: intf.m,v 1.94 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -70,7 +70,6 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) ...@@ -70,7 +70,6 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
p_intf->pf_run = Run; p_intf->pf_run = Run;
[[VLCApplication sharedApplication] autorelease]; [[VLCApplication sharedApplication] autorelease];
[NSApp initIntlSupport];
[NSApp setIntf: p_intf]; [NSApp setIntf: p_intf];
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp]; [NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
...@@ -111,18 +110,6 @@ static void Run( intf_thread_t *p_intf ) ...@@ -111,18 +110,6 @@ static void Run( intf_thread_t *p_intf )
*****************************************************************************/ *****************************************************************************/
@implementation VLCApplication @implementation VLCApplication
- (id)init
{
/* default encoding: ISO-8859-1 */
i_encoding = NSUTF8StringEncoding;
return( [super init] );
}
- (void)initIntlSupport
{
}
- (NSString *)localizedString:(char *)psz - (NSString *)localizedString:(char *)psz
{ {
NSString * o_str = nil; NSString * o_str = nil;
...@@ -141,13 +128,13 @@ static void Run( intf_thread_t *p_intf ) ...@@ -141,13 +128,13 @@ static void Run( intf_thread_t *p_intf )
- (char *)delocalizeString:(NSString *)id - (char *)delocalizeString:(NSString *)id
{ {
NSData * o_data = [id dataUsingEncoding: i_encoding NSData * o_data = [id dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion: NO]; allowLossyConversion: NO];
char * psz_string; char * psz_string;
if ( o_data == nil ) if ( o_data == nil )
{ {
o_data = [id dataUsingEncoding: i_encoding o_data = [id dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion: YES]; allowLossyConversion: YES];
psz_string = malloc( [o_data length] + 1 ); psz_string = malloc( [o_data length] + 1 );
[o_data getBytes: psz_string]; [o_data getBytes: psz_string];
...@@ -165,11 +152,6 @@ static void Run( intf_thread_t *p_intf ) ...@@ -165,11 +152,6 @@ static void Run( intf_thread_t *p_intf )
return psz_string; return psz_string;
} }
- (NSStringEncoding)getEncoding
{
return i_encoding;
}
/* i_width is in pixels */ /* i_width is in pixels */
- (NSString *)wrapString: (NSString *)o_in_string toWidth: (int) i_width - (NSString *)wrapString: (NSString *)o_in_string toWidth: (int) i_width
{ {
...@@ -569,20 +551,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -569,20 +551,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
msg_Dbg( p_intf, "stream has changed, refreshing interface" ); msg_Dbg( p_intf, "stream has changed, refreshing interface" );
} }
else
{
vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
FIND_ANYWHERE );
if( p_vout != NULL )
{
vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vlc_mutex_unlock( &p_playlist->object_lock );
vout_Destroy( p_vout );
vlc_mutex_lock( &p_playlist->object_lock );
}
}
p_intf->p_sys->b_intf_update = VLC_TRUE; p_intf->p_sys->b_intf_update = VLC_TRUE;
} }
...@@ -617,7 +585,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -617,7 +585,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
FIND_ANYWHERE ); FIND_ANYWHERE );
if( p_vout != NULL ) if( p_vout != NULL )
{ {
/* We need to lock the vout here to make sure it does not disappear */
id o_vout_wnd; id o_vout_wnd;
NSEnumerator * o_enum = [[NSApp windows] objectEnumerator]; NSEnumerator * o_enum = [[NSApp windows] objectEnumerator];
...@@ -640,11 +607,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -640,11 +607,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
#define p_input p_playlist->p_input #define p_input p_playlist->p_input
if( p_input != NULL )
{
vlc_mutex_lock( &p_input->stream.stream_lock );
}
if( p_intf->p_sys->b_intf_update ) if( p_intf->p_sys->b_intf_update )
{ {
vlc_bool_t b_input = VLC_FALSE; vlc_bool_t b_input = VLC_FALSE;
...@@ -657,6 +619,8 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -657,6 +619,8 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
if( ( b_input = ( p_input != NULL ) ) ) if( ( b_input = ( p_input != NULL ) ) )
{ {
vlc_mutex_lock( &p_input->stream.stream_lock );
/* seekable streams */ /* seekable streams */
b_seekable = p_input->stream.b_seekable; b_seekable = p_input->stream.b_seekable;
...@@ -669,6 +633,8 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -669,6 +633,8 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
/* play status */ /* play status */
p_intf->p_sys->b_play_status = p_intf->p_sys->b_play_status =
p_input->stream.control.i_status != PAUSE_S; p_input->stream.control.i_status != PAUSE_S;
vlc_mutex_unlock( &p_input->stream.stream_lock );
} }
else else
{ {
...@@ -699,6 +665,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -699,6 +665,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
if( p_intf->p_sys->b_playing && p_input != NULL ) if( p_intf->p_sys->b_playing && p_input != NULL )
{ {
vlc_bool_t b_field_update = TRUE; vlc_bool_t b_field_update = TRUE;
vlc_mutex_lock( &p_input->stream.stream_lock );
if( !p_input->b_die && ( p_intf->p_sys->b_play_status != if( !p_input->b_die && ( p_intf->p_sys->b_play_status !=
( p_input->stream.control.i_status != PAUSE_S ) ) ) ( p_input->stream.control.i_status != PAUSE_S ) ) )
...@@ -750,6 +717,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable, ...@@ -750,6 +717,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
o_time = [NSString stringWithUTF8String: psz_time]; o_time = [NSString stringWithUTF8String: psz_time];
[o_timefield setStringValue: o_time]; [o_timefield setStringValue: o_time];
} }
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* disable screen saver */ /* disable screen saver */
UpdateSystemActivity( UsrActivity ); UpdateSystemActivity( UsrActivity );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc * open.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: open.m,v 1.37 2003/09/09 13:51:45 hartman Exp $ * $Id: open.m,v 1.38 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -635,7 +635,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -635,7 +635,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
NSArray *o_values = [[o_open_panel filenames] NSArray *o_values = [[o_open_panel filenames]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for( i = 0; i < [o_values count]; i++) for( i = 0; i < (int)[o_values count]; i++)
{ {
NSDictionary *o_dic; NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"]; o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* output.m: MacOS X Output Dialog * output.m: MacOS X Output Dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: output.m,v 1.13 2003/09/09 13:51:45 hartman Exp $ * $Id: output.m,v 1.14 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -188,9 +188,6 @@ ...@@ -188,9 +188,6 @@
- (IBAction)outputCloseSheet:(id)sender - (IBAction)outputCloseSheet:(id)sender
{ {
intf_thread_t * p_intf = [NSApp getIntf];
//export sout[o_mrl UTF8String]
[o_output_sheet orderOut:sender]; [o_output_sheet orderOut:sender];
[NSApp endSheet: o_output_sheet]; [NSApp endSheet: o_output_sheet];
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin * playlist.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: playlist.m,v 1.30 2003/08/14 13:02:55 sigmunau Exp $ * $Id: playlist.m,v 1.31 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net> * Derk-Jan Hartman <thedj@users.sourceforge.net>
...@@ -298,7 +298,7 @@ int MacVersion102 = -1; ...@@ -298,7 +298,7 @@ int MacVersion102 = -1;
return; return;
} }
for ( i_item = 0; i_item < [o_array count]; i_item++ ) for ( i_item = 0; i_item < (int)[o_array count]; i_item++ )
{ {
/* One item */ /* One item */
NSDictionary *o_one_item; NSDictionary *o_one_item;
...@@ -497,8 +497,6 @@ int MacVersion102 = -1; ...@@ -497,8 +497,6 @@ int MacVersion102 = -1;
else else
{ {
NSPasteboard * o_pasteboard; NSPasteboard * o_pasteboard;
intf_thread_t * p_intf = [NSApp getIntf];
o_pasteboard = [o_info draggingPasteboard]; o_pasteboard = [o_info draggingPasteboard];
if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] ) if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
...@@ -508,7 +506,7 @@ int MacVersion102 = -1; ...@@ -508,7 +506,7 @@ int MacVersion102 = -1;
NSArray *o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType] NSArray *o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for( i = 0; i < [o_values count]; i++) for( i = 0; i < (int)[o_values count]; i++)
{ {
NSDictionary *o_dic; NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"]; o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc * prefs.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: prefs.m,v 1.33 2003/08/08 16:41:04 massiot Exp $ * $Id: prefs.m,v 1.34 2003/09/19 23:03:27 hartman Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj at users.sf.net> * Derk-Jan Hartman <thedj at users.sf.net>
...@@ -848,7 +848,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -848,7 +848,7 @@ static VLCTreeItem *o_root_item = nil;
{ {
o_capability = [NSApp localizedString: p_submodule->psz_capability]; o_capability = [NSApp localizedString: p_submodule->psz_capability];
BOOL b_found = FALSE; BOOL b_found = FALSE;
for( j = 0; j < [o_children count]; j++ ) for( j = 0; j < (int)[o_children count]; j++ )
{ {
if( [[[o_children objectAtIndex:j] getName] isEqualToString: o_capability] ) if( [[[o_children objectAtIndex:j] getName] isEqualToString: o_capability] )
{ {
...@@ -866,7 +866,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -866,7 +866,7 @@ static VLCTreeItem *o_root_item = nil;
} }
BOOL b_found = FALSE; BOOL b_found = FALSE;
for( j = 0; j < [o_children count]; j++ ) for( j = 0; j < (int)[o_children count]; j++ )
{ {
if( [[[o_children objectAtIndex:j] getName] isEqualToString: o_capability] ) if( [[[o_children objectAtIndex:j] getName] isEqualToString: o_capability] )
{ {
...@@ -959,7 +959,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -959,7 +959,7 @@ static VLCTreeItem *o_root_item = nil;
- (int)numberOfChildren { - (int)numberOfChildren {
id i_tmp = [self children]; id i_tmp = [self children];
return (i_tmp == IsALeafNode) ? (-1) : [i_tmp count]; return (i_tmp == IsALeafNode) ? (-1) : (int)[i_tmp count];
} }
- (BOOL)hasPrefs:(NSString *)o_module_name - (BOOL)hasPrefs:(NSString *)o_module_name
......
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