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
......@@ -137,214 +137,217 @@
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>asf</string>
<string>sub</string>
<string>srt</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>asf.icns</string>
<string>sub.icns</string>
<key>CFBundleTypeName</key>
<string>ASF File</string>
<string>Subtitle File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>sub</string>
<string>srt</string>
<string>pls</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>sub.icns</string>
<string>pls.icns</string>
<key>CFBundleTypeName</key>
<string>Subtitle File</string>
<string>Shoutcast playlist</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>dv</string>
<string>m3u</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>dv.icns</string>
<string>m3u.icns</string>
<key>CFBundleTypeName</key>
<string>DV file</string>
<string>Playlist file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mov</string>
<string>vob</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>generic.icns</string>
<string>vob.icns</string>
<key>CFBundleTypeName</key>
<string>Mov File</string>
<string>VOB File (DVD Video)</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pls</string>
<string>dat</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>pls.icns</string>
<string>dat.icns</string>
<key>CFBundleTypeName</key>
<string>Shoutcast playlist</string>
<string>DAT file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>m3u</string>
<string>cue</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>m3u.icns</string>
<string>cue.icns</string>
<key>CFBundleTypeName</key>
<string>Playlist file</string>
<string>CUE file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>vob</string>
<string>iso</string>
<string>bin</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>vob.icns</string>
<key>CFBundleTypeName</key>
<string>VOB File (DVD Video)</string>
<string>Iso file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>dat</string>
<string>a52</string>
<string>ac3</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>dat.icns</string>
<string>a52.icns</string>
<key>CFBundleTypeName</key>
<string>DAT file</string>
<string>Digital Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>cue</string>
<string>aac</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>cue.icns</string>
<key>CFBundleTypeName</key>
<string>CUE file</string>
<string>Advanced Audio Coding</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>iso</string>
<string>bin</string>
<string>ogm</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>ogm.icns</string>
<key>CFBundleTypeName</key>
<string>Iso file</string>
<string>Ogg Vorbis Media container</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp3</string>
<string>ogg</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>mp3.icns</string>
<string>ogg.icns</string>
<key>CFBundleTypeName</key>
<string>MP3</string>
<string>OGG Vorbis file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>a52</string>
<string>avi</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>a52.icns</string>
<string>avi.icns</string>
<key>CFBundleTypeName</key>
<string>Raw a52</string>
<string>Avi container</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>aac</string>
<string>mov</string>
<string>moov</string>
<string>qt</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>generic.icns</string>
<key>CFBundleTypeName</key>
<string>Raw aac</string>
<string>Apple QuickTime container</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>wma</string>
<string>divx</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>wma.icns</string>
<string>divx.icns</string>
<key>CFBundleTypeName</key>
<string>WMA File</string>
<string>DivX file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>ogg</string>
<string>dv</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>ogg.icns</string>
<string>dv.icns</string>
<key>CFBundleTypeName</key>
<string>OGG file</string>
<string>DV file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>avi</string>
<string>asf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>avi.icns</string>
<string>asf.icns</string>
<key>CFBundleTypeName</key>
<string>Avi file</string>
<string>Advanced Streaming Format</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>ogm</string>
<string>wma</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>ogm.icns</string>
<string>wma.icns</string>
<key>CFBundleTypeName</key>
<string>OGM FIle</string>
<string>WIndows Media Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>divx</string>
<string>wmv</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>divx.icns</string>
<string>wmv.icns</string>
<key>CFBundleTypeName</key>
<string>DivX file</string>
<string>Windows Media Video</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
......@@ -353,13 +356,11 @@
<array>
<string>mpg</string>
<string>mpeg</string>
<string>ts</string>
<string>ps</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>mpeg.icns</string>
<key>CFBundleTypeName</key>
<string>MPEG File</string>
<string>mulitplexed MPEG-1/2</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
......@@ -375,10 +376,63 @@
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>m2a</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG-1/2 Audio File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp1</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG Audio Layer 1</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp2</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG Audio Layer 2</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp3</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>mp3.icns</string>
<key>CFBundleTypeName</key>
<string>MPEG Audio Layer 3</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>m2p</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG-2 Program Stream</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>m2v</string>
<string>mpv</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>mpeg2.icns</string>
......@@ -387,6 +441,16 @@
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mpa</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG-2 Audio File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
......@@ -402,12 +466,40 @@
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>wmv</string>
<string>3gp</string>
</array>
<key>CFBundleTypeName</key>
<string>3GPP File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mka</string>
</array>
<key>CFBundleTypeName</key>
<string>Matroska Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mkv</string>
</array>
<key>CFBundleTypeName</key>
<string>Matroska Video</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mks</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>wmv.icns</string>
<key>CFBundleTypeName</key>
<string>WMV File</string>
<string>Matroska Elementry Stream</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
......
......@@ -2,7 +2,7 @@
* quicktime.c: a quicktime decoder that uses the QT library/dll
*****************************************************************************
* 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>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -288,6 +288,7 @@ static int OpenDecoder( vlc_object_t *p_this )
p_dec->pf_run = RunDecoderVideo;
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('Q','D','M','C'): /* QDesign */
case VLC_FOURCC('Q','D','M','2'): /* QDesign* 2 */
......
......@@ -2,7 +2,7 @@
* intf.h: MacOS X interface plugin
*****************************************************************************
* 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>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -35,14 +35,11 @@
*****************************************************************************/
@interface VLCApplication : NSApplication
{
NSStringEncoding i_encoding;
intf_thread_t *p_intf;
}
- (void)initIntlSupport;
- (NSString *)localizedString:(char *)psz;
- (char *)delocalizeString:(NSString *)psz;
- (NSStringEncoding)getEncoding;
- (NSString *)wrapString: (NSString *)o_in_string toWidth: (int)i_width;
- (void)setIntf:(intf_thread_t *)p_intf;
......
......@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* 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>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -70,7 +70,6 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
p_intf->pf_run = Run;
[[VLCApplication sharedApplication] autorelease];
[NSApp initIntlSupport];
[NSApp setIntf: p_intf];
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
......@@ -111,18 +110,6 @@ static void Run( intf_thread_t *p_intf )
*****************************************************************************/
@implementation VLCApplication
- (id)init
{
/* default encoding: ISO-8859-1 */
i_encoding = NSUTF8StringEncoding;
return( [super init] );
}
- (void)initIntlSupport
{
}
- (NSString *)localizedString:(char *)psz
{
NSString * o_str = nil;
......@@ -141,13 +128,13 @@ static void Run( intf_thread_t *p_intf )
- (char *)delocalizeString:(NSString *)id
{
NSData * o_data = [id dataUsingEncoding: i_encoding
NSData * o_data = [id dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion: NO];
char * psz_string;
if ( o_data == nil )
{
o_data = [id dataUsingEncoding: i_encoding
o_data = [id dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion: YES];
psz_string = malloc( [o_data length] + 1 );
[o_data getBytes: psz_string];
......@@ -165,11 +152,6 @@ static void Run( intf_thread_t *p_intf )
return psz_string;
}
- (NSStringEncoding)getEncoding
{
return i_encoding;
}
/* i_width is in pixels */
- (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,
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;
}
......@@ -617,7 +585,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
FIND_ANYWHERE );
if( p_vout != NULL )
{
/* We need to lock the vout here to make sure it does not disappear */
id o_vout_wnd;
NSEnumerator * o_enum = [[NSApp windows] objectEnumerator];
......@@ -640,11 +607,6 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
#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 )
{
vlc_bool_t b_input = VLC_FALSE;
......@@ -657,6 +619,8 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
if( ( b_input = ( p_input != NULL ) ) )
{
vlc_mutex_lock( &p_input->stream.stream_lock );
/* seekable streams */
b_seekable = p_input->stream.b_seekable;
......@@ -669,6 +633,8 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
/* play status */
p_intf->p_sys->b_play_status =
p_input->stream.control.i_status != PAUSE_S;
vlc_mutex_unlock( &p_input->stream.stream_lock );
}
else
{
......@@ -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 )
{
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 !=
( p_input->stream.control.i_status != PAUSE_S ) ) )
......@@ -750,6 +717,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
o_time = [NSString stringWithUTF8String: psz_time];
[o_timefield setStringValue: o_time];
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* disable screen saver */
UpdateSystemActivity( UsrActivity );
......
......@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc
*****************************************************************************
* 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>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -635,7 +635,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
NSArray *o_values = [[o_open_panel filenames]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for( i = 0; i < [o_values count]; i++)
for( i = 0; i < (int)[o_values count]; i++)
{
NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
......
......@@ -2,7 +2,7 @@
* output.m: MacOS X Output Dialog
*****************************************************************************
* 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>
* Christophe Massiot <massiot@via.ecp.fr>
......@@ -188,9 +188,6 @@
- (IBAction)outputCloseSheet:(id)sender
{
intf_thread_t * p_intf = [NSApp getIntf];
//export sout[o_mrl UTF8String]
[o_output_sheet orderOut:sender];
[NSApp endSheet: o_output_sheet];
}
......
......@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin
*****************************************************************************
* 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>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
......@@ -298,7 +298,7 @@ int MacVersion102 = -1;
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 */
NSDictionary *o_one_item;
......@@ -497,8 +497,6 @@ int MacVersion102 = -1;
else
{
NSPasteboard * o_pasteboard;
intf_thread_t * p_intf = [NSApp getIntf];
o_pasteboard = [o_info draggingPasteboard];
if( [[o_pasteboard types] containsObject: NSFilenamesPboardType] )
......@@ -508,7 +506,7 @@ int MacVersion102 = -1;
NSArray *o_values = [[o_pasteboard propertyListForType: NSFilenamesPboardType]
sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for( i = 0; i < [o_values count]; i++)
for( i = 0; i < (int)[o_values count]; i++)
{
NSDictionary *o_dic;
o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
......
......@@ -2,7 +2,7 @@
* prefs.m: MacOS X plugin for vlc
*****************************************************************************
* 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>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -848,7 +848,7 @@ static VLCTreeItem *o_root_item = nil;
{
o_capability = [NSApp localizedString: p_submodule->psz_capability];
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] )
{
......@@ -866,7 +866,7 @@ static VLCTreeItem *o_root_item = nil;
}
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] )
{
......@@ -959,7 +959,7 @@ static VLCTreeItem *o_root_item = nil;
- (int)numberOfChildren {
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
......
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