Commit a51501d7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Remove VLCKit

parent 60e3f3c4
!Makefile
*.mode*
*.pbxuser
*.xcworkspace
xcuserdata
#
# Configure script
#
# used by VLCKit.xcodeproj
if test "x$SYMROOT" = "x"; then
echo " This script is bound to be launched by VLCKit.xcodeproj, not you"
exit 1
fi
if test "$ACTION" = "clean"; then
rm -Rf $VLC_BUILD_DIR
exit 0
fi
# Construct the vlc_build_dir
mkdir -p $VLC_BUILD_DIR
cd $VLC_BUILD_DIR
# Construct the argument list
echo "Building for $ARCHS with sdk=\"$SDKROOT\" in $VLC_BUILD_DIR"
args="--disable-nls $args"
# Mac OS X related options
args="--disable-macosx $args" # Disable old gui/macosx
args="--disable-macosx-vlc-app $args" # Don't build old vlc.app
args="--with-macosx-version-min=10.6 $args"
# optional modules
args="--enable-merge-ffmpeg $args"
args="--enable-faad $args"
args="--enable-flac $args"
args="--enable-theora $args"
args="--enable-shout $args"
args="--enable-twolame $args"
args="--enable-realrtsp $args"
args="--enable-libass $args"
args="--enable-macosx-audio $args"
args="--enable-macosx-dialog-provider $args"
args="--enable-macosx-eyetv $args"
args="--enable-macosx-qtkit $args"
args="--enable-macosx-vout $args"
# disabled stuff
args="--disable-growl $args"
args="--disable-caca $args"
args="--disable-ncurses $args"
args="--disable-httpd $args"
args="--disable-vlm $args"
args="--disable-skins2 $args"
args="--disable-glx $args"
args="--disable-xvideo $args"
args="--disable-xcb $args"
args="--disable-sdl $args"
args="--disable-sdl-image $args"
args="--disable-visual $args"
args="--disable-samplerate $args"
if test "x$SDKROOT" != "x"
then
args="--with-macosx-sdk=$SDKROOT $args"
fi
# Debug Flags
if test "$CONFIGURATION" = "Debug"; then
args="--enable-debug $args"
fi
# 64 bits switches
for arch in $ARCHS; do
this_args="$args"
# where to install
this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args"
input="$VLC_SRC_DIR/configure"
output="$arch/Makefile"
if test -e ${output} && test ${output} -nt ${input}; then
echo "No need to re-run configure for $arch"
continue;
fi
# Construct the vlc_build_dir/$arch
mkdir -p $arch
cd $arch
echo "Running [$arch] configure $this_args"
if test $arch = "x86_64"; then
export CFLAGS="-m64 -arch x86_64"
export CXXFLAGS="-m64 -arch x86_64"
export OBJCFLAGS="-m64 -arch x86_64"
export CPPFLAGS="-m64 -arch x86_64"
this_args="--build=x86_64-apple-darwin10 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin10 $this_args"
export PATH=$VLC_SRC_DIR/extras/tools/build/bin:$VLC_SRC_DIR/contrib/x86_64-apple-darwin10/bin:$PATH
export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin10/lib/pkgconfig
fi
if test $arch = "i386"; then
export CFLAGS="-m32 -arch i386"
export CXXFLAGS="-m32 -arch i386"
export OBJCFLAGS="-m32 -arch i386"
export CPPFLAGS="-m32 -arch i386"
this_args="--build=i686-apple-darwin9 --with-contrib=$VLC_SRC_DIR/contrib/i686-apple-darwin9 $this_args"
fi
if test $arch = "ppc"; then
export CFLAGS="-m32 -arch ppc"
export CXXFLAGS="-m32 -arch ppc"
export OBJCFLAGS="-m32 -arch ppc"
export CPPFLAGS="-m32 -arch ppc"
this_args="--build=powerpc-apple-darwin9 --with-contrib=$VLC_SRC_DIR/contrib/powerpc-apple-darwin9 $this_args"
fi
$VLC_SRC_DIR/configure $this_args
err=$?
if test $err != 0; then
exit $err
fi
cd ..
done
/* Controller */
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCKit.h>
@interface Controller : NSObject
{
IBOutlet NSView * remoteURLView;
IBOutlet NSView * workingView;
IBOutlet NSWindow * window;
IBOutlet NSButton * openConvertedFileButton;
NSNumber * selectedStreamOutput;
NSString * remoteURLAsString;
VLCMedia * media;
VLCStreamSession * streamSession;
NSString * outputFilePath;
NSString * outputFolderPath;
}
- (void)awakeFromNib;
@property (retain) VLCMedia * media;
@property (retain) VLCStreamSession * streamSession;
@property (assign) NSNumber * selectedStreamOutput;
@property (retain,readonly) NSString * outputFilePath;
@property (retain,readonly) NSString * outputFolderPath;
@property (retain) NSString * remoteURLAsString;
- (IBAction)convert:(id)sender;
- (IBAction)openConvertedFile:(id)sender;
- (IBAction)openConvertedEnclosingFolder:(id)sender;
- (IBAction)pickOutputFolderPath:(id)sender;
@end
#import "Controller.h"
/**********************************************************
* First off, some value transformer to easily play with
* bindings
*/
@interface VLCFloat10000FoldTransformer : NSObject
@end
@implementation VLCFloat10000FoldTransformer
+ (Class)transformedValueClass
{
return [NSNumber class];
}
+ (BOOL)allowsReverseTransformation
{
return YES;
}
- (id)transformedValue:(id)value
{
if( !value ) return nil;
if(![value respondsToSelector: @selector(floatValue)])
{
[NSException raise: NSInternalInconsistencyException
format: @"Value (%@) does not respond to -floatValue.",
[value class]];
return nil;
}
return [NSNumber numberWithFloat: [value floatValue]*10000.];
}
- (id)reverseTransformedValue:(id)value
{
if( !value ) return nil;
if(![value respondsToSelector: @selector(floatValue)])
{
[NSException raise: NSInternalInconsistencyException
format: @"Value (%@) does not respond to -floatValue.",
[value class]];
return nil;
}
return [NSNumber numberWithFloat: [value floatValue]/10000.];
}
@end
/**********************************************************
* @implementation Controller
*/
@interface Controller ()
@property (retain,readwrite) NSString * outputFolderPath;
@end
@implementation Controller
- (id)init
{
if(self = [super init])
{
[self bind:@"outputFolderPath" toObject:[NSUserDefaultsController sharedUserDefaultsController]
withKeyPath:@"values.outputFolderPath" options:nil];
[[[NSUserDefaultsController sharedUserDefaultsController] values] bind:@"outputFolderPath" toObject:self
withKeyPath:@"outputFolderPath" options:nil];
VLCFloat10000FoldTransformer *float100fold;
float100fold = [[[VLCFloat10000FoldTransformer alloc] init] autorelease];
[NSValueTransformer setValueTransformer:(id)float100fold forName:@"Float10000FoldTransformer"];
self.media = nil;
self.streamSession = nil;
selectedStreamOutput = [[NSNumber alloc] initWithInt:0];
self.remoteURLAsString = [NSString stringWithString:@"http://youtube.com/watch?v=IXpx2OEWBdA&feature=bz303"];
outputFilePath = nil;
if( !self.outputFolderPath || [self.outputFolderPath isKindOfClass:[NSNull class]])
self.outputFolderPath = [@"~/Movies/Flash Video Converted" stringByExpandingTildeInPath];
}
return self;
}
- (void)dealloc
{
[outputFilePath release];
[remoteURLAsString release];
[streamSession release];
[media release];
[super dealloc];
}
@synthesize streamSession;
@synthesize selectedStreamOutput;
@synthesize media;
@synthesize outputFolderPath;
- (void)awakeFromNib
{
[window setShowsResizeIndicator:NO];
[NSApp setDelegate: self];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[VLCLibrary sharedLibrary];
}
- (NSString *)remoteURLAsString
{
return remoteURLAsString;
}
- (void)setRemoteURLAsString:(NSString *)newURLAsString
{
[remoteURLAsString release];
remoteURLAsString = [[newURLAsString copy] retain];
media = [[newURLAsString copy] retain];
[self setMedia:[VLCMedia mediaWithPath:newURLAsString]];
}
+ (NSSet *)keyPathsForValuesAffectingOutputFilePath
{
return [NSSet setWithObjects:@"media.metaDictionary.title", nil];
}
- (void)freezeOutputFilePath
{
[outputFilePath release];
outputFilePath = nil;
outputFilePath = [self outputFilePath];
[outputFilePath retain];
}
- (NSString *)outputFilePath
{
if(outputFilePath)
return [outputFilePath copy];
VLCMedia * aMedia = self.streamSession ? self.streamSession.media ? self.streamSession.media : self.media : self.media;
NSString * name = [[[aMedia metaDictionary] objectForKey:@"title"] lastPathComponent];
NSString * extension = [selectedStreamOutput intValue] == 2 ? @"mpeg" : @"mp4";
NSString * path = [NSString stringWithFormat:@"%@/%@.%@", self.outputFolderPath, name, extension ];
int i;
for( i = 0; [[NSFileManager defaultManager] fileExistsAtPath:path]; i ++)
{
path = [NSString stringWithFormat:@"%@/%@ %d.%@", self.outputFolderPath, name, i, extension ];
if( i > 256 )
{
/* Don't got too far */
/* FIXME: Be nicer with the user and give him a choice for the new name */
NSRunAlertPanelRelativeToWindow(@"File already exists",
[NSString stringWithFormat:
@"File '%@', already exists. The old one will be deleted when the OK button will be pressed", path],
@"OK", nil, nil, window);
break;
}
}
return path;
}
- (IBAction)convert:(id)sender
{
VLCStreamOutput * streamOutput;
[self.streamSession removeObserver:self forKeyPath:@"isComplete"];
self.streamSession = [VLCStreamSession streamSession];
[self freezeOutputFilePath];
if([selectedStreamOutput intValue] == 2)
{
streamOutput = [VLCStreamOutput mpeg2StreamOutputWithFilePath:[self outputFilePath]];
}
else if([selectedStreamOutput intValue] == 1)
{
streamOutput = [VLCStreamOutput mpeg4StreamOutputWithFilePath:[self outputFilePath]];
}
else
streamOutput = [VLCStreamOutput ipodStreamOutputWithFilePath:[self outputFilePath]];
/* Make sure we are exporting to a well known directory */
[[NSFileManager defaultManager] createDirectoryAtPath:self.outputFolderPath attributes:nil];
[self.streamSession setStreamOutput:streamOutput];
[self.streamSession setMedia:self.media];
[self.streamSession startStreaming];
[self.streamSession addObserver:self forKeyPath:@"isComplete" options:NSKeyValueObservingOptionNew context:nil];
/* Show the new view */
[[window contentView] addSubview:workingView];
NSRect frame = [workingView frame];
frame.origin.y -= NSHeight([window contentRectForFrameRect:[window frame]]) + 20.f;
[workingView setFrame:frame];
[[window animator] setFrame:NSMakeRect([window frame].origin.x, [window frame].origin.y-NSHeight([workingView frame]), NSWidth([window frame]), NSHeight([window frame])+NSHeight([workingView frame])) display:YES];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if([keyPath isEqualToString:@"isComplete"])
{
if([self.streamSession isComplete])
{
/* Notify the user */
[[NSSound soundNamed:@"Glass"] play];
/* Set the icon */
[openConvertedFileButton setImage:[[NSWorkspace sharedWorkspace] iconForFile:[self outputFilePath]]];
/* Rename the link with a nicer name */
NSString * oldPath = [self outputFilePath];
[self freezeOutputFilePath];
[[NSFileManager defaultManager] moveItemAtPath:oldPath toPath:[self outputFilePath] error:NULL];
}
return;
}
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
- (IBAction)openConvertedFile:(id)sender
{
[[NSWorkspace sharedWorkspace] openFile:[self outputFilePath]];
}
- (IBAction)pickOutputFolderPath:(id)sender;
{
NSOpenPanel * panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:NO];
[panel setCanChooseDirectories:YES];
[panel setAllowsMultipleSelection:NO];
[panel beginSheetForDirectory:self.outputFolderPath file:nil types:nil modalForWindow:[sender window] modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:nil];
}
- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
if(returnCode != NSOKButton || ![[panel filenames] count])
return;
self.outputFolderPath = [[panel filenames] objectAtIndex:0];
}
- (IBAction)openConvertedEnclosingFolder:(id)sender
{
[[NSWorkspace sharedWorkspace] selectFile:[self outputFilePath] inFileViewerRootedAtPath:[[self outputFilePath] stringByDeletingLastPathComponent]];
}
- (IBAction)cancel:(id)sender
{
[self.streamSession stop];
}
@end
Binary files a/projects/macosx/framework/Examples/FlashVideoDownloader/English.lproj/InfoPlist.strings and /dev/null differ
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>GradientBackgroundView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSImageView</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>convert</key>
<string>id</string>
<key>openConvertedEnclosingFolder</key>
<string>id</string>
<key>openConvertedFile</key>
<string>id</string>
<key>pickOutputFolderPath</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>Controller</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>openConvertedFileButton</key>
<string>NSButton</string>
<key>remoteURLView</key>
<string>NSView</string>
<key>titleView</key>
<string>NSView</string>
<key>window</key>
<string>NSWindow</string>
<key>workingView</key>
<string>NSView</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
<string>629</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../FlashVideoDownloader.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>169</integer>
<integer>940</integer>
<integer>704</integer>
</array>
<key>IBSystem Version</key>
<string>9B18</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
//
// Prefix header for all source files of the 'test' target in the 'test' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
//
// GradientBackgroundView.h
// iPodConverter
//
// Created by Pierre d'Herbemont on 1/12/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface GradientBackgroundView : NSImageView {
}
@end
//
// GradientBackgroundView.m
// iPodConverter
//
// Created by Pierre d'Herbemont on 1/12/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "GradientBackgroundView.h"
/**********************************************************
* Why not drawing something nice?
*/
@implementation GradientBackgroundView
- (void)awakeFromNib
{
/* Buggy nib files... Force us to be on the back of the view hierarchy */
NSView * superView;
[self retain];
superView = [self superview];
[self removeFromSuperview];
[superView addSubview:self positioned: NSWindowBelow relativeTo:nil];
}
- (void)drawRect:(NSRect)rect
{
NSColor * topGradient = [NSColor colorWithCalibratedWhite:.12f alpha:1.0];
NSColor * bottomGradient = [NSColor colorWithCalibratedWhite:0.55f alpha:0.9];
NSGradient * gradient = [[NSGradient alloc] initWithColorsAndLocations:bottomGradient, 0.f, bottomGradient, 0.1f, topGradient, 1.f, nil];
[gradient drawInRect:self.bounds angle:90.0];
[super drawRect:rect];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Flash Video Downloader</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.videolan.flashvideodownloader</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Flash Video Downloader</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
//
// main.m
// test
//
// Created by Pierre d'Herbemont on 13/04/07.
// Copyright __MyCompanyName__ 2007. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCKit.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}
/* Controller */
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCKit.h>
#import <VLCKit/VLCMediaPlayer.h>
@interface Controller : NSObject
{
IBOutlet NSView * conversionView;
IBOutlet NSWindow * window;
IBOutlet NSButton * openConvertedFileButton;
NSNumber * selectedStreamOutput;
VLCMedia * media;
VLCStreamSession * streamSession;
}
- (void)awakeFromNib;
@property (retain) VLCMedia * media;
@property (retain) VLCStreamSession * streamSession;
@property (assign) NSNumber * selectedStreamOutput;
@property (retain,readonly) NSString * outputFilePath;
- (IBAction)convert:(id)sender;
- (IBAction)openConvertedFile:(id)sender;
- (IBAction)openConvertedEnclosingFolder:(id)sender;
@end
#import "Controller.h"
/**********************************************************
* First off, some value transformer to easily play with
* bindings
*/
@interface VLCFloat10000FoldTransformer : NSObject
@end
@implementation VLCFloat10000FoldTransformer
+ (Class)transformedValueClass
{
return [NSNumber class];
}
+ (BOOL)allowsReverseTransformation
{
return YES;
}
- (id)transformedValue:(id)value
{
if( !value ) return nil;
if(![value respondsToSelector: @selector(floatValue)])
{
[NSException raise: NSInternalInconsistencyException
format: @"Value (%@) does not respond to -floatValue.",
[value class]];
return nil;
}
return [NSNumber numberWithFloat: [value floatValue]*10000.];
}
- (id)reverseTransformedValue:(id)value
{
if( !value ) return nil;
if(![value respondsToSelector: @selector(floatValue)])
{
[NSException raise: NSInternalInconsistencyException
format: @"Value (%@) does not respond to -floatValue.",
[value class]];
return nil;
}
return [NSNumber numberWithFloat: [value floatValue]/10000.];
}
@end
/**********************************************************
* @implementation Controller
*/
@implementation Controller
- (id)init
{
if(self = [super init])
{
VLCFloat10000FoldTransformer *float100fold;
float100fold = [[[VLCFloat10000FoldTransformer alloc] init] autorelease];
[NSValueTransformer setValueTransformer:(id)float100fold forName:@"Float10000FoldTransformer"];
self.media = nil;
self.streamSession = nil;
selectedStreamOutput = [[NSNumber alloc] initWithInt:0];
}
return self;
}
@synthesize streamSession;
@synthesize selectedStreamOutput;
- (void)awakeFromNib
{
[window setShowsResizeIndicator:NO];
[NSApp setDelegate: self];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[VLCLibrary sharedLibrary];
}
- (VLCMedia *)media
{
return media;
}
- (void)setMedia:(VLCMedia *)newMedia
{
[media release];
media = [newMedia retain];
NSRect newFrame = [window frameRectForContentRect:[conversionView frame]];
[[window animator] setFrame:NSMakeRect([window frame].origin.x, [window frame].origin.y+NSHeight([window frame])-NSHeight(newFrame), NSWidth(newFrame), NSHeight(newFrame)) display:YES];
[[window animator] setContentView:conversionView];
[window setMinSize:newFrame.size];
[window setMaxSize:NSMakeSize(10000., NSHeight(newFrame))];
[window setShowsResizeIndicator:YES];
}
+ (NSSet *)keyPathsForValuesAffectingOutputFilePath
{
return [NSSet setWithObjects:@"media.metaDictionary.title", nil];
}
- (NSString *)outputFilePath
{
return [NSString stringWithFormat:[@"~/Movies/iPod Converted/%@.mp4" stringByExpandingTildeInPath],
[[self.media metaDictionary] objectForKey:@"title"]];
}
- (IBAction)convert:(id)sender
{
self.streamSession = [VLCStreamSession streamSession];
if([selectedStreamOutput intValue] == 0)
{
[self.streamSession setStreamOutput:
[VLCStreamOutput ipodStreamOutputWithFilePath:
[self outputFilePath]
]];
}
else
{
/* This doesn't really is useful for the iPod/iPhone...
* But one day we'll figure that out */
NSRunAlertPanelRelativeToWindow(@"Warning", @"We can't really stream to the iPod/iPhone for now...\n\nSo we're just streaming using the RTP protocol, and annoucing it via SAP.\n\n(Launch the SAP VLC service discovery module to see it).", @"OK", nil, nil, window);
[self.streamSession setStreamOutput:
[VLCStreamOutput rtpBroadcastStreamOutput]];
}
NSLog(@"Using %@", self.streamSession.streamOutput );
[self.streamSession setMedia:self.media];
[self.streamSession startStreaming];
[openConvertedFileButton setImage:[[NSWorkspace sharedWorkspace] iconForFile:[self outputFilePath]]];
}
- (IBAction)openConvertedFile:(id)sender
{
[[NSWorkspace sharedWorkspace] openFile:[self outputFilePath]];
}
- (IBAction)openConvertedEnclosingFolder:(id)sender
{
[[NSWorkspace sharedWorkspace] openFile:[[self outputFilePath] stringByDeletingLastPathComponent]];
}
@end
Binary files a/projects/macosx/framework/Examples/iPodConverter/English.lproj/InfoPlist.strings and /dev/null differ
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>GradientBackgroundView</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSImageView</string>
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>convert</key>
<string>id</string>
<key>openConvertedEnclosingFolder</key>
<string>id</string>
<key>openConvertedFile</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>Controller</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>conversionView</key>
<string>NSView</string>
<key>openConvertedFileButton</key>
<string>NSButton</string>
<key>window</key>
<string>NSWindow</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>CLASS</key>
<string>MovieReceiver</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>controller</key>
<string>Controller</string>
</dict>
<key>SUPERCLASS</key>
<string>NSView</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
<string>629</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../iPodConverter.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>317</integer>
</array>
<key>IBSystem Version</key>
<string>9B18</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
//
// GradientBackgroundView.h
// iPodConverter
//
// Created by Pierre d'Herbemont on 1/12/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface GradientBackgroundView : NSImageView {
}
@end
//
// GradientBackgroundView.m
// iPodConverter
//
// Created by Pierre d'Herbemont on 1/12/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "GradientBackgroundView.h"
/**********************************************************
* Why not drawing something nice?
*/
@implementation GradientBackgroundView
- (void)awakeFromNib
{
/* Buggy nib files... Force us to be on the back of the view hierarchy */
NSView * superView;
[self retain];
superView = [self superview];
[self removeFromSuperview];
[superView addSubview:self positioned: NSWindowBelow relativeTo:nil];
}
- (void)drawRect:(NSRect)rect
{
NSColor * topGradient = [NSColor colorWithCalibratedWhite:.12f alpha:1.0];
NSColor * bottomGradient = [NSColor colorWithCalibratedWhite:0.55f alpha:0.9];
NSGradient * gradient = [[NSGradient alloc] initWithColorsAndLocations:bottomGradient, 0.f, bottomGradient, 0.1f, topGradient, 1.f, nil];
[gradient drawInRect:self.bounds angle:90.0];
[super drawRect:rect];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>iPodConverter</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.videolan.ipodconverter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
//
// MovieReceiver.h
// iPodConverter
//
// Created by Pierre d'Herbemont on 1/12/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "Controller.h"
@interface MovieReceiver : NSView {
IBOutlet Controller * controller;
}
@end
//
// MovieReceiver.m
// iPodConverter
//
// Created by Pierre d'Herbemont on 1/12/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "MovieReceiver.h"
/**********************************************************
* This handles drag-and-drop in the main window
*/
@implementation MovieReceiver
- (void)awakeFromNib
{
[self registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, NSURLPboardType, nil]];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
return NSDragOperationGeneric;
}
- (NSDragOperation)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPasteboard *pboard = [sender draggingPasteboard];
if ( [[pboard types] containsObject:NSFilenamesPboardType] )
{
NSArray *files = [pboard propertyListForType:NSFilenamesPboardType];
for( NSString * filename in files )
{
[controller setMedia:[VLCMedia mediaWithPath:filename]];
}
}
return YES;
return NSDragOperationGeneric;
}
@end
//
// Prefix header for all source files of the 'test' target in the 'test' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
//
// main.m
// test
//
// Created by Pierre d'Herbemont on 13/04/07.
// Copyright __MyCompanyName__ 2007. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCKit.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}
/* Controller */
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCKit.h>
@interface Controller : NSObject
{
IBOutlet id window;
IBOutlet id playlistOutline;
IBOutlet id videoHolderView;
VLCVideoView * videoView;
VLCMediaList *playlist;
VLCMediaPlayer *player;
int mediaIndex;
}
- (void)awakeFromNib;
- (void)setMediaIndex:(int)value;
- (void)play:(id)sender;
- (void)pause:(id)sender;
@end
#import "Controller.h"
static void *sleepForMe(void)
{
while (1) sleep(60);
}
@implementation Controller
- (void)awakeFromNib
{
// atexit((void*)sleepForMe); // Only used for memory leak debugging
[NSApp setDelegate:self];
// Allocate a VLCVideoView instance and tell it what area to occupy.
NSRect rect = NSMakeRect(0, 0, 0, 0);
rect.size = [videoHolderView frame].size;
videoView = [[VLCVideoView alloc] initWithFrame:rect];
[videoHolderView addSubview:videoView];
[videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];
videoView.fillScreen = YES;
playlist = [[VLCMediaList alloc] init];
[playlist addObserver:self forKeyPath:@"media" options:NSKeyValueObservingOptionNew context:nil];
player = [[VLCMediaPlayer alloc] initWithVideoView:videoView];
mediaIndex = -1;
[playlistOutline registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, NSURLPboardType, nil]];
[playlistOutline setDoubleAction:@selector(changeAndPlay:)];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
}
- (void)applicationWillTerminate:(NSNotification *)aNotification
{
[playlist removeObserver:self forKeyPath:@"media"];
[player pause];
[player setMedia:nil];
[player release];
[playlist release];
[videoView release];
}
- (void)changeAndPlay:(id)sender
{
if ([playlistOutline selectedRow] != mediaIndex)
{
[self setMediaIndex:[playlistOutline selectedRow]];
if (![player isPlaying])
[player play];
}
}
- (void)setMediaIndex:(int)value
{
if ([playlist count] <= 0)
return;
if (value < 0)
value = 0;
if (value > [playlist count] - 1)
value = [playlist count] - 1;
mediaIndex = value;
[player setMedia:[playlist mediaAtIndex:mediaIndex]];
}
- (void)play:(id)sender
{
[self setMediaIndex:mediaIndex+1];
if (![player isPlaying])
{
NSLog(@"%@ length = %@", [playlist mediaAtIndex:mediaIndex], [[playlist mediaAtIndex:mediaIndex] lengthWaitUntilDate:[NSDate dateWithTimeIntervalSinceNow:60]]);
[player play];
}
}
- (void)pause:(id)sender
{
NSLog(@"Sending pause message to media player...");
[player pause];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath isEqualToString:@"media"] && object == playlist) {
[playlistOutline reloadData];
}
}
// NSTableView Implementation
- (int)numberOfRowsInTableView:(NSTableView *)tableView
{
return [playlist count];
}
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn
row:(int)row
{
return [(VLCMedia *)[playlist mediaAtIndex:row].metaDictionary valueForKey:VLCMetaInformationTitle];
}
- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info
proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op
{
return NSDragOperationEvery; /* This is for now */
}
- (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id <NSDraggingInfo>)info
row:(int)row dropOperation:(NSTableViewDropOperation)operation
{
int i;
NSArray *droppedItems = [[info draggingPasteboard] propertyListForType:NSFilenamesPboardType];
for (i = 0; i < [droppedItems count]; i++)
{
NSString * filename = [droppedItems objectAtIndex:i];
VLCMedia * media = [VLCMedia mediaWithURL:[NSURL fileURLWithPath:filename]];
[playlist addMedia:media];
}
return YES;
}
@end
Binary files a/projects/macosx/framework/Examples/test/English.lproj/InfoPlist.strings and /dev/null differ
{
IBClasses = (
{
ACTIONS = {pause = id; play = id; };
CLASS = Controller;
LANGUAGE = ObjC;
OUTLETS = {playlistOutline = id; videoHolderView = id; window = id; };
SUPERCLASS = NSObject;
},
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = NSSegmentedControl; LANGUAGE = ObjC; SUPERCLASS = NSControl; }
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>111 87 356 240 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>108 299 338 44 0 0 1440 878 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8R2218</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.test</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
//
// main.m
// test
//
// Created by Pierre d'Herbemont on 13/04/07.
// Copyright __MyCompanyName__ 2007. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}
//
// Prefix header for all source files of the 'test' target in the 'test' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
/*****************************************************************************
* VLCEventManager.h: VLCKit.framework VLCEventManager header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <pthread.h>
/**
* The VLCEventManager class provides a safe way for inter-thread communications.
*/
@interface VLCEventManager : NSObject
{
NSMutableArray *messageQueue; //< Holds a queue of messages.
NSMutableArray *pendingMessagesOnMainThread; //< Holds the message that are being posted on main thread.
NSLock *pendingMessagesLock;
pthread_t dispatcherThread; //< Thread responsible for dispatching messages.
pthread_mutex_t queueLock; //< Queue lock.
pthread_cond_t signalData; //< Data lock.
}
/* Factories */
/**
* Returns the shared VLCEventManager. There should only be one instance of this class.
* \return Shared event manager.
*/
+ (id)sharedManager;
/* Operations */
/**
* Sends a message to the target's delegate on the main thread.
* \discussion The main thread is the one in which the main run loop is run, which usually
* means the one in which the NSApplication object receives events. The method is performed
* when the main thread runs the run loop in one of the common run loop modes (as specified
* in the CFRunLoop documentation).
*
* The receiver is retained until the call is finished.
* \param aTarget The target object who's delegate should receive the specified message.
* \param aSelector A selector that identifies the method to invoke. The method should not
* have a significant return value and should take a single argument of type NSNotification,
* or no arguments.
*
* See “Selectors” for a description of the SEL type.
* \param aNotificiationName The name of the notification that should be sent to the
* distributed notification center.
*/
- (void)callOnMainThreadDelegateOfObject:(id)aTarget
withDelegateMethod:(SEL)aSelector
withNotificationName:(NSString *)aNotificationName;
/**
* Sends a message to the target on the main thread.
* \discussion The main thread is the one in which the main run loop is run, which usually
* means the one in which the NSApplication object receives events. The method is performed
* when the main thread runs the run loop in one of the common run loop modes (as specified
* in the CFRunLoop documentation).
*
* The receiver and arg are retained until the call is finished.
* \param aTarget The target object who should receive the specified message.
* \param aSelector A selector that identifies the method to invoke. The method should not
* have a significant return value and should take a single argument of type id,
* or no arguments.
*
* See “Selectors” for a description of the SEL type.
* \param arg The argument to pass in the message. Pass nil if the method does not take an
* argument.
* distributed notification center.
*/
- (void)callOnMainThreadObject:(id)aTarget
withMethod:(SEL)aSelector
withArgumentAsObject:(id)arg;
- (void)cancelCallToObject:(id)target;
@end
/*****************************************************************************
* VLCLibVLCbridging.h: VLCKit.framework VLCLibVLCBridging (Private) header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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"
#if !TARGET_OS_IPHONE
#import "VLCStreamOutput.h"
#endif
#import "VLCMediaPlayer.h"
/**
* Bridges functionality between libvlc and VLCMediaList implementation.
*/
@interface VLCMediaList (LibVLCBridging)
/* Factories */
/**
* Manufactures new object wrapped around specified media list.
* \param p_new_mlist LibVLC media list pointer.
* \return Newly create media list instance using specified media list
* pointer.
*/
+ (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist;
/* Initializers */
/**
* Initializes new object wrapped around specified media list.
* \param p_new_mlist LibVLC media list pointer.
* \return Newly create media list instance using specified media list
* pointer.
*/
- (id)initWithLibVLCMediaList:(void *)p_new_mlist;
/* Properties */
@property (readonly) void * libVLCMediaList; //< LibVLC media list pointer.
@end
/**
* Bridges functionality between libvlc and VLCMedia implementation.
*/
@interface VLCMedia (LibVLCBridging)
/* Factories */
/**
* Manufactures new object wrapped around specified media descriptor.
* \param md LibVLC media descriptor pointer.
* \return Newly created media instance using specified descriptor.
*/
+ (id)mediaWithLibVLCMediaDescriptor:(void *)md;
/* Initializers */
/**
* Initializes new object wrapped around specified media descriptor.
* \param md LibVLC media descriptor pointer.
* \return Newly created media instance using specified descriptor.
*/
- (id)initWithLibVLCMediaDescriptor:(void *)md;
+ (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options;
/**
* Returns the receiver's internal media descriptor pointer.
* \return The receiver's internal media descriptor pointer.
*/
@property (readonly) void * libVLCMediaDescriptor;
@end
/**
* Bridges functionality between VLCMedia and VLCMediaPlayer
*/
@interface VLCMediaPlayer (LibVLCBridging)
/* Properties */
@property (readonly) void * libVLCMediaPlayer; //< LibVLC media list pointer.
@end
/**
* Bridges functionality between VLCMediaPlayer and LibVLC core
*/
@interface VLCMedia (VLCMediaPlayerBridging)
/**
* Set's the length of the media object. This value becomes available once the
* media object is being played.
* \param value
*/
- (void)setLength:(VLCTime *)value;
@end
/**
* Bridges functionality between VLCLibrary and LibVLC core.
*/
@interface VLCLibrary (VLCLibVLCBridging)
/**
* Shared singleton instance of libvlc library instance.
* \return libvlc pointer of library instance.
*/
+ (void *)sharedInstance;
/**
* Instance of libvlc library instance.
* \return libvlc pointer of library instance.
*/
@property (readonly) void * instance;
@end
/**
* Bridges functionality between VLCLibrary and VLCAudio.
*/
@interface VLCLibrary (VLCAudioBridging)
/**
* Called by VLCAudio, each library has a singleton VLCaudio instance. VLCAudio
* calls this function to let the VLCLibrary instance know how to get in touch
* with the VLCAudio instance. TODO: Each media player instance should have it's
* own audio instance...not each library instance.
*/
- (void)setAudio:(VLCAudio *)value;
@end
/**
* Bridges functionality between VLCAudio and VLCLibrary.
*/
@interface VLCAudio (VLCAudioBridging)
/* Initializers */
/**
* Initializes a new object using the specified mediaPlayer instance.
* \return Newly created audio object using specified VLCMediaPlayer instance.
*/
- (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer;
@end
/**
* TODO: Documentation
*/
#if !TARGET_OS_IPHONE
@interface VLCStreamOutput (LibVLCBridge)
- (NSString *)representedLibVLCOptions;
@end
#endif
/*****************************************************************************
* VLCVideoCommon.h: VLCKit.framework VLCVideoCommon header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <QuartzCore/QuartzCore.h>
/**
* TODO: Documentation
*/
@interface VLCVideoLayoutManager : NSObject
{
CGSize originalVideoSize;
BOOL fillScreenEntirely;
}
/* Factories */
+ (id)layoutManager;
/* Properties */
@property BOOL fillScreenEntirely;
@property CGSize originalVideoSize;
@end
/*
* MobileVLCKit.h
* VLCKit
*
* Created by Pierre d'Herbemont on 6/28/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
#import <MobileVLCKit/VLCLibrary.h>
#import <MobileVLCKit/VLCMedia.h>
#import <MobileVLCKit/VLCMediaList.h>
#import <MobileVLCKit/VLCMediaPlayer.h>
#import <MobileVLCKit/VLCMediaDiscoverer.h>
#import <MobileVLCKit/VLCTime.h>
#import <MobileVLCKit/VLCAudio.h>
@class VLCMedia;
@class VLCMediaLibrary;
@class VLCMediaList;
@class VLCTime;
@class VLCVideoView;
@class VLCAudio;
/*****************************************************************************
* VLCAudio.h: VLCKit.framework VLCAudio header
*****************************************************************************
* Copyright (C) 2007 Faustino E. Osuna
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Faustino E. Osuna <enrique.osuna # gmail.com>
*
* 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 Lesser General Public License for more details.
*
* 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 <Foundation/Foundation.h>
/* Notification Messages */
/**
* Standard notification messages that are emitted by VLCAudio object.
*/
extern NSString * VLCMediaPlayerVolumeChanged;
@class VLCMediaPlayer;
/**
* TODO: Documentation VLCAudio
*/
@interface VLCAudio : NSObject
{
void *instance;
}
/* Properties */
- (void)setMute:(BOOL)value;
@property (setter=setMute:) BOOL isMuted;
@property (assign) NSUInteger volume;
- (void)volumeDown;
- (void)volumeUp;
@end
//
// VLCExtension.h
// VLCKit
//
// Created by Pierre d'Herbemont on 1/26/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface VLCExtension : NSObject {
struct extension_t *_instance;
}
- (id)initWithInstance:(struct extension_t *)instance; // FIXME: Should be internal
- (struct extension_t *)instance; // FIXME: Should be internal
- (NSString *)name;
- (NSString *)title;
@end
//
// VLCExtensionsManager.h
// VLCKit
//
// Created by Pierre d'Herbemont on 1/26/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class VLCExtension;
@class VLCMediaPlayer;
@interface VLCExtensionsManager : NSObject {
void *instance;
NSMutableArray *_extensions;
VLCMediaPlayer *_player;
void *_previousInput;
}
+ (VLCExtensionsManager *)sharedManager;
- (NSArray *)extensions;
- (void)runExtension:(VLCExtension *)extension;
@property (readwrite, retain) VLCMediaPlayer *mediaPlayer;
@end
/*****************************************************************************
* VLCKit.h: VLCKit.framework main header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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.
*****************************************************************************/
/**
* TODO: Framework Documentation
*/
#import <VLCKit/VLCLibrary.h>
#import <VLCKit/VLCMedia.h>
#import <VLCKit/VLCMediaLibrary.h>
#import <VLCKit/VLCMediaList.h>
#import <VLCKit/VLCMediaListPlayer.h>
#import <VLCKit/VLCMediaDiscoverer.h>
#import <VLCKit/VLCMediaPlayer.h>
#import <VLCKit/VLCTime.h>
#import <VLCKit/VLCVideoView.h>
#import <VLCKit/VLCVideoLayer.h>
#import <VLCKit/VLCStreamSession.h>
#import <VLCKit/VLCStreamOutput.h>
@class VLCMedia;
@class VLCMediaLibrary;
@class VLCMediaList;
@class VLCTime;
@class VLCVideoView;
/*****************************************************************************
* VLCLibrary.h: VLCKit.framework VLCLibrary header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <Foundation/Foundation.h>
#import "VLCAudio.h"
#import "VLCMediaList.h"
#import "VLCMedia.h"
@class VLCAudio;
/**
* The VLCLibrary is the base library of the VLCKit.framework. This object provides a shared instance that exposes the
* internal functionalities of libvlc and libvlc-control. The VLCLibrary object is instantiated automatically when
* VLCKit.framework is loaded into memory. Also, it is automatically destroyed when the VLCKit.framework is unloaded
* from memory.
*
* Currently, the framework does not support multiple instances of VLCLibrary. Furthermore, you cannot destroy any
* instiantiation of VLCLibrary, as previously noted, this is done automatically by the dynamic link loader.
*/
@interface VLCLibrary : NSObject
{
void * instance;
}
/* Factories */
/**
* Returns the library's shared instance.
* \return The library's shared instance.
*/
+ (VLCLibrary *)sharedLibrary;
/**
* Returns the library's version
* \return The library version example "0.9.0-git Grishenko".
*/
@property (readonly) NSString * version;
/**
* Returns the library's changeset
* \return The library version example "adfee99".
*/
@property (readonly) NSString * changeset;
@end
This diff is collapsed.
/*****************************************************************************
* VLCMediaDiscoverer.h: VLCKit.framework VLCMediaDiscoverer header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <Foundation/Foundation.h>
#import "VLCMediaList.h"
@class VLCMediaList;
/**
* TODO: Documentation VLCMediaDiscoverer
*/
@interface VLCMediaDiscoverer : NSObject
{
NSString * localizedName; //< TODO: Documentation VLCMediaDiscoverer.localizedName
VLCMediaList * discoveredMedia; //< TODO: Documentation VLCMediaDiscoverer.discoveredMedia
void * mdis; //< TODO: Documentation VLCMediaDiscoverer.mdis
BOOL running; //< TODO: Documentation VLCMediaDiscoverer.running
}
/**
* Maintains a list of available media discoverers. This list is populated as new media
* discoverers are created.
* \return A list of available media discoverers.
*/
+ (NSArray *)availableMediaDiscoverer;
/* Initializers */
/**
* Initializes new object with specified name.
* \param aSerchName Name of the service for this VLCMediaDiscoverer object.
* \returns Newly created media discoverer.
*/
- (id)initWithName:(NSString *)aServiceName;
/**
* TODO: Documentation VLCMediaDiscoverer.discoveredMedia
*/
@property (readonly) VLCMediaList * discoveredMedia;
/**
* TODO: Documentation VLCMediaDiscoverer.localizedName
*/
@property (readonly) NSString * localizedName;
/**
* TODO: Documentation VLCMediaDiscoverer.isRunning
*/
@property (readonly) BOOL isRunning;
@end
/*****************************************************************************
* VLCMediaLibrary.h: VLCKit.framework VLCMediaDiscoverer header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 "VLCMediaList.h"
@class VLCMediaList;
/**
* TODO: Documentation
*/
@interface VLCMediaLibrary : NSObject
{
void * mlib;
VLCMediaList * allMedia;
}
/* Factories */
+ (id)sharedMediaLibrary;
/* Properties */
@property (readonly) VLCMediaList * allMedia;
@end
/*****************************************************************************
* VLCMediaList.h: VLCKit.framework VLCMediaList header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <Foundation/Foundation.h>
#import "VLCMedia.h"
/* Notification Messages */
extern NSString * VLCMediaListItemAdded;
extern NSString * VLCMediaListItemDeleted;
@class VLCMedia;
@class VLCMediaList;
/**
* TODO: Documentation VLCMediaListDelegate
*/
@protocol VLCMediaListDelegate
/**
* TODO: Documentation - [VLCMediaListDelegate mediaList:mediaAdded:atIndex:]
*/
- (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index;
/**
* TODO: Documentation - [VLCMediaListDelegate mediaList:mediaRemovedAtIndex:]
*/
- (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index;
@end
/**
* TODO: Documentation VLCMediaList
*/
@interface VLCMediaList : NSObject
{
void * p_mlist; //< Internal instance of media list
id <VLCMediaListDelegate,NSObject> delegate; //< Delegate object
/* We need that private copy because of Cocoa Bindings, that need to be working on first thread */
NSMutableArray * cachedMedia; //< Private copy of media objects.
}
/* Operations */
/**
* TODO: Documentation - [VLCMediaList lock]
*/
- (void)lock;
/**
* TODO: Documentation - [VLCMediaList unlock]
*/
- (void)unlock;
/**
* TODO: Documentation - [VLCMediaList addMedia:]
*/
- (NSInteger)addMedia:(VLCMedia *)media;
/**
* TODO: Documentation - [VLCMediaList insertMedia:atIndex:]
*/
- (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index;
/**
* TODO: Documentation - [VLCMediaList removeMediaAtIndex:]
*/
- (void)removeMediaAtIndex:(NSInteger)index;
/**
* TODO: Documentation - [VLCMediaList mediaAtIndex:]
*/
- (VLCMedia *)mediaAtIndex:(NSInteger)index;
/**
* TODO: Documentation - [VLCMediaList indexOfMedia:]
*/
- (NSInteger)indexOfMedia:(VLCMedia *)media;
/* Properties */
/**
* TODO: Documentation VLCMediaList.count
*/
@property (readonly) NSInteger count;
/**
* TODO: Documentation VLCMediaList.delegate
*/
@property (assign) id delegate;
/**
* TODO: Documentation VLCMediaList.isReadOnly
*/
@property (readonly) BOOL isReadOnly;
@end
/*****************************************************************************
* VLCMediaListPlayer.h: VLCKit.framework VLCMediaListPlayer implementation
*****************************************************************************
* Copyright (C) 2009 Pierre d'Herbemont
* Partial Copyright (C) 2009 Felix Paul Kühne
* Copyright (C) 2009 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
* Felix Paul Kühne <fkuehne # videolan.org
*
* 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 Lesser General Public License for more details.
*
* 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.
*****************************************************************************/
@class VLCMedia, VLCMediaPlayer, VLCMediaList;
/**
* VLCRepeatMode
* (don't repeat anything, repeat one, repeat all)
*/
enum VLCRepeatMode {
VLCDoNotRepeat,
VLCRepeatCurrentItem,
VLCRepeatAllItems
};
typedef NSInteger VLCRepeatMode;
@interface VLCMediaListPlayer : NSObject {
void *instance;
VLCMedia *_rootMedia;
VLCMediaPlayer *_mediaPlayer;
VLCMediaList *_mediaList;
VLCRepeatMode _repeatMode;
}
@property (readwrite, retain) VLCMediaList *mediaList;
/**
* rootMedia - Use this method to play a media and its subitems.
* This will erase mediaList.
* Setting mediaList will erase rootMedia.
*/
@property (readwrite, retain) VLCMedia *rootMedia;
@property (readonly, retain) VLCMediaPlayer *mediaPlayer;
/**
* Basic play and stop are here. For other method, use the mediaPlayer.
* This may change.
*/
- (void)play;
- (void)stop;
/**
* Playmode selection (don't repeat anything, repeat one, repeat all)
* See VLCRepeatMode.
*/
@property (readwrite) VLCRepeatMode repeatMode;
/**
* media must be in the current media list.
*/
- (void)playMedia:(VLCMedia *)media;
@end
//
// VLCMediaThumbnailer.h
// VLCKit
//
// Created by Pierre d'Herbemont on 7/10/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#if TARGET_OS_IPHONE
# import <CoreGraphics/CoreGraphics.h>
#endif
@class VLCMedia;
@protocol VLCMediaThumbnailerDelegate;
@interface VLCMediaThumbnailer : NSObject {
id<VLCMediaThumbnailerDelegate> _delegate;
VLCMedia *_media;
void *_mp;
CGImageRef _thumbnail;
void *_data;
NSTimer *_parsingTimeoutTimer;
NSTimer *_thumbnailingTimeoutTimer;
CGFloat _thumbnailHeight,_thumbnailWidth;
CGFloat _effectiveThumbnailHeight,_effectiveThumbnailWidth;
int _numberOfReceivedFrames;
BOOL _shouldRejectFrames;
}
+ (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media andDelegate:(id<VLCMediaThumbnailerDelegate>)delegate;
- (void)fetchThumbnail;
@property (readwrite, assign) id<VLCMediaThumbnailerDelegate> delegate;
@property (readwrite, retain) VLCMedia *media;
@property (readwrite, assign) CGImageRef thumbnail;
/**
* Thumbnail Height
* You shouldn't change this after -fetchThumbnail
* has been called.
* @return thumbnail height. Default value 240.
*/
@property (readwrite, assign) CGFloat thumbnailHeight;
/**
* Thumbnail Width
* You shouldn't change this after -fetchThumbnail
* has been called.
* @return thumbnail height. Default value 320
*/
@property (readwrite, assign) CGFloat thumbnailWidth;
@end
@protocol VLCMediaThumbnailerDelegate
@required
- (void)mediaThumbnailerDidTimeOut:(VLCMediaThumbnailer *)mediaThumbnailer;
- (void)mediaThumbnailer:(VLCMediaThumbnailer *)mediaThumbnailer didFinishThumbnail:(CGImageRef)thumbnail;
@end
/*****************************************************************************
* VLCPlaylistDataSource.h: VLC.framework VLCPlaylistDataSource header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <VLC/VLCPlaylist.h>
#import <VLC/VLCVideoView.h>
/* This class can be used as a data source for an NSOutlineView
* it will display the playlist content. If provided the videoView
* will automatically be associated to the given playlist, and actions
* in the outlineView will trigger the videoView, visual feedback of the
* current item in the videoview will be displayed in the outlineview
*/
@interface VLCPlaylistDataSource : NSObject
{
VLCPlaylist * playlist;
VLCVideoView * videoView;
NSOutlineView *outlineView;
}
- (id)initWithPlaylist:(VLCPlaylist *)aPlaylist;
- (id)initWithPlaylist:(VLCPlaylist *)aPlaylist videoView:(VLCVideoView *)aVideoView;
- (VLCPlaylist *)playlist;
- (VLCVideoView *)videoView;
@end
/* It could be really useful to use that, this probably need to be reviewed to see
* if it really belongs here */
@interface VLCPlaylistDataSource (OutlineViewDataSource)
- (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item;
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item;
- (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item;
- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
@end
@interface VLCPlaylistDataSource (OutlineViewDataSourceDropping)
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(id)item childIndex:(int)index;
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(int)index;
@end
/*****************************************************************************
* VLCServicesDiscoverer.h: VLC.framework VLCMediaDiscoverer header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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.
*****************************************************************************/
@interface VLCServicesDiscoverer : NSObject
{
NSArray * services;
}
+ (id)sharedDiscoverer;
- (id)init;
- (NSArray *)services;
@end
/*****************************************************************************
* VLCStreamOutput.h: VLCKit.framework VLCStreamOutput header
*****************************************************************************
* Copyright (C) 2008 Pierre d'Herbemont
* Copyright (C) 2008 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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.
*****************************************************************************/
extern NSString * VLCDefaultStreamOutputRTSP;
extern NSString * VLCDefaultStreamOutputRTP;
extern NSString * VLCDefaultStreamOutputRTP;
@interface VLCStreamOutput : NSObject {
NSMutableDictionary * options;
}
- (id)initWithOptionDictionary:(NSDictionary *)dictionary;
+ (id)streamOutputWithOptionDictionary:(NSDictionary *)dictionary;
+ (id)rtpBroadcastStreamOutputWithSAPAnnounce:(NSString *)announceName;
+ (id)rtpBroadcastStreamOutput;
+ (id)ipodStreamOutputWithFilePath:(NSString *)filePath;
+ (id)streamOutputWithFilePath:(NSString *)filePath;
+ (id)mpeg2StreamOutputWithFilePath:(NSString *)filePath;
+ (id)mpeg4StreamOutputWithFilePath:(NSString *)filePath;
@end
/*****************************************************************************
* VLCStreamSession.h: VLCKit.framework VLCStreamSession header
*****************************************************************************
* Copyright (C) 2008 Pierre d'Herbemont
* Copyright (C) 2008 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <VLCKit/VLCStreamOutput.h>
#import <VLCKit/VLCMediaPlayer.h>
#import <VLCKit/VLCMedia.h>
@interface VLCStreamSession : VLCMediaPlayer {
VLCStreamOutput * streamOutput;
VLCMedia * originalMedia;
NSUInteger reattemptedConnections;
BOOL isComplete;
}
+ (id)streamSession;
@property (retain) VLCMedia * media;
@property (retain) VLCStreamOutput * streamOutput;
@property (readonly) BOOL isComplete;
- (void)startStreaming;
- (void)stopStreaming;
@end
/*****************************************************************************
* VLCTime.h: VLCKit.framework VLCTime header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <Foundation/Foundation.h>
/**
* Provides an object to define VLCMedia's time.
*/
@interface VLCTime : NSObject <NSCopying>
{
NSNumber * value; //< Holds, in milliseconds, the VLCTime value
}
/* Factories */
+ (VLCTime *)nullTime;
+ (VLCTime *)timeWithNumber:(NSNumber *)aNumber;
+ (VLCTime *)timeWithInt:(NSInteger)aInt;
/* Initializers */
- (id)initWithNumber:(NSNumber *)aNumber;
- (id)initWithInt:(int)aInt;
/* Properties */
@property (readonly) NSNumber * numberValue;
@property (readonly) NSString * stringValue;
@property (readonly) NSString * verboseStringValue;
@property (readonly) int intValue;
/* Comparitors */
- (NSComparisonResult)compare:(VLCTime *)aTime;
@end
/*****************************************************************************
* VLCVideoLayer.h: VLCKit.framework VLCVideoLayer header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <QuartzCore/QuartzCore.h>
@interface VLCVideoLayer : CALayer
{
BOOL hasVideo;
}
/* Properties */
@property (readonly) BOOL hasVideo;
@property BOOL fillScreen;
@end
/*****************************************************************************
* VLCVideoView.h: VLCKit.framework VLCVideoView header
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
*
* 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 Lesser General Public License for more details.
*
* 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 <QuartzCore/QuartzCore.h>
@interface VLCVideoView : NSView
{
id delegate;
NSColor * backColor;
BOOL stretchesVideo;
id layoutManager;
BOOL hasVideo;
}
/* Properties */
@property (assign) id delegate;
@property (copy) NSColor *backColor;
@property BOOL fillScreen;
@property (readonly) BOOL hasVideo;
@end
VLCKit.zip: VLCKit
zip -r -y -9 $@ $<
VLCKit: build/Debug/VLCKit.framework
rm -rf $@-tmp && mkdir -p $@-tmp
cp -R $< $@-tmp
cp ../../../COPYING $@-tmp
mv $@-tmp $@ && touch $@
build/Debug/VLCKit.framework:
xcodebuild -project VLCKit.xcodeproj -target "Build Everything"
clean:
xcodebuild -project VLCKit.xcodeproj clean
rm -fr VLCKit VLCKit.zip
.PHONY: clean
#!/bin/sh
# Pre-Compile.sh
# MobileVLC
#
# Created by Pierre d'Herbemont on 6/27/10.
# Copyright 2010 __MyCompanyName__. All rights reserved.
pushd `dirname $0` > /dev/null
PROJECT_DIR=`pwd`
popd > /dev/null
echo "PROJECT DIR = $PROJECT_DIR"
VLC_ARCH="arm"
ARCH="arm"
VLC_SRC_DIR="$PROJECT_DIR/../../../.."
VLC_BUILD_DIR="$VLC_SRC_DIR/build-ios-OS"
VLC_INSTALL_DIR="$VLC_SRC_DIR/install-ios-OS"
VLC_CONTRIB_DIR="$VLC_SRC_DIR/extras/contrib/hosts/\$(VLC_ARCH)-apple-darwin10/ios"
LDFLAGS=""
echo "VLC_BUILD_DIR = $VLC_BUILD_DIR"
echo "VLC_INSTALL_DIR = $VLC_INSTALL_DIR"
echo "SRC DIR = $VLC_SRC_DIR"
echo "VLC_CONTRIB_DIR = $VLC_CONTRIB_DIR"
echo "=== Building for $ARCH ==="
echo "-"
echo "// This file is autogenerated by $(basename $0)\n\n" > $PROJECT_DIR/vlc-plugins.h
echo "// This file is autogenerated by $(basename $0)\n\n" > $PROJECT_DIR/vlc-plugins.xcconfig
VLC_MODULES=`find $VLC_BUILD_DIR/modules -name 'lib*_plugin.a'|grep -v stats|tr \\\\n \ `
#echo $VLC_MODULES
BUILTINS="const void *vlc_static_modules[] = {\n"; \
LDFLAGS=""
DEFINITION=""
for file in $VLC_MODULES; do
name=`echo $file | sed 's/.*\.libs\/lib//' | sed 's/_plugin\.a//'`
DEFINITION+="int vlc_entry__$name (int (*)(void *, void *, int, ...), void *);\n";
BUILTINS+=" vlc_entry__$name,\n"
LDFLAGS+="\$(VLC_INSTALL_DIR)/lib/vlc/plugins/lib${name}_plugin.a "
echo $name
done;
BUILTINS="$BUILTINS NULL\n};\n"
echo -e "VLC_PLUGINS_LDFLAGS=$LDFLAGS" >> $PROJECT_DIR/vlc-plugins.xcconfig
echo -e "$DEFINITION\n$BUILTINS" >> $PROJECT_DIR/vlc-plugins.h
//
// vlc.xcconfig
// VLC
//
// Created by Pierre d'Herbemont on 6/26/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
VLC_SRC_DIR=$(PROJECT_DIR)/../../..
VLC_ARCH[sdk=iphonesimulator*]=i686
VLC_ARCH[sdk=iphoneos*]=arm
VLC_PLATFORM[sdk=iphonesimulator*]=Simulator
VLC_PLATFORM[sdk=iphoneos*]=OS
VLC_INSTALL_DIR=$(VLC_SRC_DIR)/install-ios-$(VLC_PLATFORM)
//OTHER_CFLAGS= -ObjC -all_load
#include "vlc-plugins.xcconfig"
VLC_CONTRIB_DIR=$VLC_SRC_DIR/contrib/$(VLC_ARCH)-apple-darwin11
DVBPSI=$(VLC_CONTRIB_DIR)/lib/libdvbpsi.a
AVCODEC=$(VLC_CONTRIB_DIR)/lib/libavutil.a ${VLC_CONTRIB_DIR}/lib/libavcodec.a $(VLC_CONTRIB_DIR)/lib/libavformat.a $(VLC_CONTRIB_DIR)/lib/libswscale.a $(VLC_CONTRIB_DIR)/lib/libpostproc.a $(VLC_CONTRIB_DIR)/lib/libgsm.a
LIVE555=$(VLC_CONTRIB_DIR)/lib/libUsageEnvironment.a $(VLC_CONTRIB_DIR)/lib/libBasicUsageEnvironment.a $(VLC_CONTRIB_DIR)/lib/libgroupsock.a $(VLC_CONTRIB_DIR)/lib/libz.a $(VLC_CONTRIB_DIR)/lib/libliveMedia.a
FLAC=$(VLC_CONTRIB_DIR)/lib/libFLAC.a
A52=$(VLC_CONTRIB_DIR)/lib/liba52.a
DCA=$(VLC_CONTRIB_DIR)/lib/libdca.a
MKV=$(VLC_CONTRIB_DIR)/lib/libebml.a $(VLC_CONTRIB_DIR)/lib/libmatroska.a
MODPLUG=$(VLC_CONTRIB_DIR)/lib/libmodplug.a
SPEEX=$(VLC_CONTRIB_DIR)/lib/libspeex.a $(VLC_CONTRIB_DIR)/lib/libspeexdsp.a
TAGLIB=$(VLC_CONTRIB_DIR)/lib/libtag.a
OGG=$(VLC_CONTRIB_DIR)/lib/libogg.a $(VLC_CONTRIB_DIR)/lib/libtheora.a $(VLC_CONTRIB_DIR)/lib/libtheoradec.a $(VLC_CONTRIB_DIR)/lib/libtheoraenc.a
XML=$(VLC_CONTRIB_DIR)/lib/libxml2.a
PICS=$(VLC_CONTRIB_DIR)/lib/libpng.a $(VLC_CONTRIB_DIR)/lib/libopenjpeg.a
OTHER_LIBTOOLFLAGS=$(AVCODEC) $(DVBPSI) $(LIVE555) $(MODPLUG) $(A52) $(DCA) $(MKV) $(TAGLIB) $(XML) $(PICS) $(VLC_INSTALL_DIR)/lib/vlc/libcompat.a $(VLC_INSTALL_DIR)/lib/libvlc.a $(VLC_INSTALL_DIR)/lib/libvlccore.a $(VLC_PLUGINS_LDFLAGS)
//
// Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
#import <vlc/vlc.h>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Quartz</string>
<key>CFBundleIdentifier</key>
<string>org.videolan.vlckitframework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VLC</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleVersion</key>
<string>0.1</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>ProjectName</key>
<string>VLC</string>
</dict>
</plist>
/*****************************************************************************
* VLCAudio.m: VLCKit.framework VLCAudio implementation
*****************************************************************************
* Copyright (C) 2007 Faustino E. Osuna
* Copyright (C) 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Faustino E. Osuna <enrique.osuna # gmail.com>
*
* 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 Lesser General Public License for more details.
*
* 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 "VLCAudio.h"
#import "VLCLibVLCBridging.h"
#define VOLUME_STEP 6
#define VOLUME_MAX 200
#define VOLUME_MIN 0
/* Notification Messages */
NSString * VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged";
/* libvlc event callback */
// TODO: Callbacks
@implementation VLCAudio
/**
* Use this method instead of instance directly as this one is type checked.
*/
- (libvlc_media_player_t *)instance
{
return instance;
}
- (id)init
{
return nil;
}
- (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer
{
self = [super init];
if (!self)
return nil;
instance = [mediaPlayer libVLCMediaPlayer];
libvlc_media_player_retain([self instance]);
return self;
}
- (void) dealloc
{
libvlc_media_player_release([self instance]);
[super dealloc];
}
- (void)setMute:(BOOL)value
{
libvlc_audio_set_mute([self instance], value);
}
- (BOOL)isMuted
{
return libvlc_audio_get_mute([self instance]);
}
- (void)setVolume:(NSUInteger)value
{
if (value < VOLUME_MIN)
value = VOLUME_MIN;
else if (value > VOLUME_MAX)
value = VOLUME_MAX;
libvlc_audio_set_volume([self instance], value);
}
- (void)volumeUp
{
NSUInteger tempVolume = [self volume] + VOLUME_STEP;
if (tempVolume > VOLUME_MAX)
tempVolume = VOLUME_MAX;
else if (tempVolume < VOLUME_MIN)
tempVolume = VOLUME_MIN;
[self setVolume: tempVolume];
}
- (void)volumeDown
{
NSUInteger tempVolume = [self volume] - VOLUME_STEP;
if (tempVolume > VOLUME_MAX)
tempVolume = VOLUME_MAX;
else if (tempVolume < VOLUME_MIN)
tempVolume = VOLUME_MIN;
[self setVolume: tempVolume];
}
- (NSUInteger)volume
{
return libvlc_audio_get_volume([self instance]);
}
@end
This diff is collapsed.
//
// VLCExtension.m
// VLCKit
//
// Created by Pierre d'Herbemont on 1/26/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "VLCExtension.h"
#import <vlc_extensions.h>
@implementation VLCExtension
- (NSString *)description
{
return [NSString stringWithFormat:@"VLC Extension %@", [self name]];
}
- (id)initWithInstance:(struct extension_t *)instance
{
self = [super init];
if (!self)
return nil;
_instance = instance;
return self;
}
- (struct extension_t *)instance
{
return _instance;
}
- (NSString *)name
{
return [NSString stringWithUTF8String:_instance->psz_name];
}
- (NSString *)title
{
return [NSString stringWithUTF8String:_instance->psz_title];
}
@end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Quartz</string>
<key>CFBundleIdentifier</key>
<string>org.videolan.vlckitframework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>VLC</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleVersion</key>
<string>0.1</string>
</dict>
</plist>
This diff is collapsed.
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