X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=projects%2Fmacosx%2Fframework%2FSources%2FVLCLibrary.m;h=c05a365f72035d580b929f7fbeaa1eec1cd6aacd;hb=60e3f3c472620a11168e9be705b0e21c99ccd05b;hp=1770fad9431ff7746169214e2ea159a0cadd9ddc;hpb=4ad09c1bcdc5bfd3bdef1692b969d72fcec2e9ac;p=vlc diff --git a/projects/macosx/framework/Sources/VLCLibrary.m b/projects/macosx/framework/Sources/VLCLibrary.m index 1770fad943..c05a365f72 100644 --- a/projects/macosx/framework/Sources/VLCLibrary.m +++ b/projects/macosx/framework/Sources/VLCLibrary.m @@ -2,29 +2,33 @@ * VLCLibrary.m: VLCKit.framework VLCLibrary implementation ***************************************************************************** * Copyright (C) 2007 Pierre d'Herbemont - * Copyright (C) 2007 the VideoLAN team + * Copyright (C) 2007 VLC authors and VideoLAN * $Id$ * * Authors: Pierre d'Herbemont * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #import "VLCLibrary.h" #import "VLCLibVLCBridging.h" +#if TARGET_OS_IPHONE +# include "vlc-plugins.h" +#endif + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -49,21 +53,24 @@ static VLCLibrary * sharedLibrary = nil; { if (self = [super init]) { - NSArray *vlcParams = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"VLCParams"]; if (!vlcParams) { NSMutableArray *defaultParams = [NSMutableArray array]; + [defaultParams addObject:@"--play-and-pause"]; // We want every movie to pause instead of stopping at eof + [defaultParams addObject:@"--no-color"]; // Don't use color in output (Xcode doesn't show it) [defaultParams addObject:@"--no-video-title-show"]; // Don't show the title on overlay when starting to play + [defaultParams addObject:@"--verbose=4"]; // Let's not wreck the logs +#if TARGET_OS_IPHONE + [defaultParams addObject:@"--avcodec-fast"]; + [defaultParams addObject:@"--avcodec-skiploopfilter=all"]; + [defaultParams addObject:@"--vout=vout_ios"]; + [defaultParams addObject:@"--aout=audioqueue"]; +#else [defaultParams addObject:@"--no-sout-keep"]; [defaultParams addObject:@"--vout=macosx"]; // Select Mac OS X video output [defaultParams addObject:@"--text-renderer=quartztext"]; // our CoreText-based renderer - [defaultParams addObject:@"--verbose=-1"]; // Don't polute the stdio log - [defaultParams addObject:@"--syslog"]; // log to syslog - [defaultParams addObject:@"--log-verbose=4"]; // log everything - [defaultParams addObject:@"--no-color"]; // Don't use color in output (Xcode doesn't show it) - [defaultParams addObject:@"--no-media-library"]; // We don't need the media library - [defaultParams addObject:@"--play-and-pause"]; // We want every movie to pause instead of stopping at eof [defaultParams addObject:@"--extraintf=macosx_dialog_provider"]; // Some extra dialog (login, progress) may come up from here +#endif vlcParams = defaultParams; } @@ -75,7 +82,8 @@ static VLCLibrary * sharedLibrary = nil; lib_vlc_params[paramNum] = [vlcParam cStringUsingEncoding:NSASCIIStringEncoding]; paramNum++; } - instance = (void *)libvlc_new( sizeof(lib_vlc_params)/sizeof(lib_vlc_params[0]), lib_vlc_params); + unsigned argc = sizeof(lib_vlc_params)/sizeof(lib_vlc_params[0]); + instance = libvlc_new(argc, lib_vlc_params); NSAssert(instance, @"libvlc failed to initialize"); } return self;