├── Packaging ├── dmg_setup.scpt ├── mobile_dmg_setup.scpt └── create-dmg.sh ├── Examples_iOS ├── DropIn-Player │ ├── Dropin-Player │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── Default-568h@2x.png │ │ ├── Dropin-Player-Info.plist │ │ ├── Dropin-Player-Prefix.pch │ │ ├── main.m │ │ ├── VDLAppDelegate.h │ │ ├── VDLPlaybackViewController.h │ │ └── VDLAppDelegate.m │ ├── VDLMainViewController.h │ ├── VDLMainViewController.m │ └── VDLMainViewController.xib └── SimplePlayback │ └── SimplePlayback │ ├── en.lproj │ └── InfoPlist.strings │ ├── Default.png │ ├── Default@2x.png │ ├── Default-568h@2x.png │ ├── SimplePlayback-Info.plist │ ├── SimplePlayback-Prefix.pch │ ├── VDLViewController.h │ ├── main.m │ ├── VDLAppDelegate.h │ ├── VDLViewController.m │ └── VDLAppDelegate.m ├── Examples_OSX ├── iPodConverter │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ └── MainMenu.nib │ │ │ ├── keyedobjects.nib │ │ │ ├── info.nib │ │ │ └── classes.nib │ ├── iPodConverter_Prefix.pch │ ├── Info.plist │ ├── main.m │ ├── GradientBackgroundView.h │ ├── MovieReceiver.h │ ├── Controller.h │ ├── GradientBackgroundView.m │ ├── MovieReceiver.m │ └── Controller.m ├── FlashVideoDownloader │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ └── MainMenu.nib │ │ │ ├── keyedobjects.nib │ │ │ ├── info.nib │ │ │ └── classes.nib │ ├── FlashVideoDownloader_Prefix.pch │ ├── Info.plist │ ├── GradientBackgroundView.h │ ├── main.m │ ├── GradientBackgroundView.m │ └── Controller.h └── BasicPlayerWithPlaylist │ ├── English.lproj │ ├── InfoPlist.strings │ └── MainMenu.nib │ │ └── keyedobjects.nib │ ├── test_Prefix.pch │ ├── Info.plist │ ├── main.m │ ├── Controller.h │ └── Controller.m ├── .gitignore ├── StaticLibVLC └── StaticLibVLC.m ├── Resources ├── version.plist └── Info.plist ├── MobileVLCKit_Prefix.pch ├── Makefile ├── VLCKit-Info.plist ├── MobileVLCKit └── patches │ ├── 0009-arm_neon-work-around-libtool-issue.patch │ ├── 0011-disable-neon-volume-plugin.patch │ ├── 0008-lib-media-player-inherit-deinterlace-variable-to-ach.patch │ ├── 0010-libvlc-media-re-parse-if-flags-changed.patch │ ├── 0003-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch │ ├── 0001-arm_neon-added-function-macro-to-handle-the-undersco.patch │ ├── 0004-libass-fix-text-rendering-on-iOS-by-providing-a-font.patch │ ├── 0005-freetype-added-a-fake-font-lookup-mechanism-for-iOS-.patch │ ├── 0007-contrib-gcrypt-simplify-compilation-by-disabling-doc.patch │ └── 0002-arm_neon-use-a-macro-to-fix-compilation-for-iOS.patch ├── VLC_Prefix.pch ├── MobileVLCKit-dynamic └── Info.plist ├── DynamicMobileVLCKit ├── Info.plist └── DynamicMobileVLCKit.h ├── MobileVLCKit.podspec ├── Headers ├── Public │ ├── VLCServicesDiscoverer.h │ ├── VLCVideoLayer.h │ ├── VLCExtensionsManager.h │ ├── VLCVideoView.h │ ├── VLCMediaLibrary.h │ ├── VLCExtension.h │ ├── VLCStreamSession.h │ ├── VLCAudio.h │ ├── MobileVLCKit.h │ ├── VLCKit.h │ ├── VLCStreamOutput.h │ ├── VLCTime.h │ ├── VLCMediaListPlayer.h │ ├── VLCMediaThumbnailer.h │ ├── VLCMediaDiscoverer.h │ ├── VLCPlaylistDataSource.h │ ├── VLCLibrary.h │ └── VLCMediaList.h └── Internal │ ├── VLCVideoCommon.h │ ├── VLCEventManager.h │ └── VLCLibVLCBridging.h ├── Sources ├── VLCExtension.m ├── VLCServicesDiscoverer.m ├── VLCMediaLibrary.m ├── VLCVideoCommon.m ├── VLCAudio.m ├── VLCVideoLayer.m ├── VLCMediaDiscoverer.m ├── VLCVideoView.m ├── VLCStreamSession.m ├── VLCTime.m ├── VLCMediaListPlayer.m └── VLCExtensionsManager.m └── Configure.sh /Packaging/dmg_setup.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Packaging/dmg_setup.scpt -------------------------------------------------------------------------------- /Packaging/mobile_dmg_setup.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Packaging/mobile_dmg_setup.scpt -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_iOS/DropIn-Player/Dropin-Player/Default.png -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_iOS/DropIn-Player/Dropin-Player/Default@2x.png -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_iOS/SimplePlayback/SimplePlayback/Default.png -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_iOS/SimplePlayback/SimplePlayback/Default@2x.png -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_OSX/iPodConverter/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_iOS/DropIn-Player/Dropin-Player/Default-568h@2x.png -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_iOS/SimplePlayback/SimplePlayback/Default-568h@2x.png -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_OSX/FlashVideoDownloader/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_OSX/BasicPlayerWithPlaylist/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_OSX/iPodConverter/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_OSX/FlashVideoDownloader/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/strukturag/VLCKit/HEAD/Examples_OSX/BasicPlayerWithPlaylist/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/iPodConverter_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'test' target in the 'test' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/test_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'test' target in the 'test' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/FlashVideoDownloader_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'test' target in the 'test' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | !Makefile 2 | *.mode* 3 | *.pbxuser 4 | *.xcworkspace 5 | xcuserdata 6 | MobileVLCKit/vlc-plugins.xcconfig 7 | MobileVLCKit/vlc-plugins.h 8 | .DS_Store 9 | build 10 | /vlc-unstable 11 | DerivedData 12 | MobileVLCKit/ImportedSources 13 | -------------------------------------------------------------------------------- /StaticLibVLC/StaticLibVLC.m: -------------------------------------------------------------------------------- 1 | // 2 | // StaticLibVLC.m 3 | // StaticLibVLC 4 | // 5 | // Created by Felix Paul Kühne on 10/07/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface StaticLibVLC : NSObject 12 | 13 | @end 14 | 15 | @implementation StaticLibVLC 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/VDLMainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VDLMainViewController.h 3 | // Dropin-Player 4 | // 5 | // Created by Felix Paul Kühne on 19.11.13. 6 | // Copyright (c) 2013 VideoLAN. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VDLMainViewController : UIViewController 12 | 13 | - (IBAction)startPlayback:(id)sender; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Resources/version.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleShortVersionString 6 | 0.1 7 | CFBundleVersion 8 | 0.1 9 | ProjectName 10 | VLC 11 | 12 | 13 | -------------------------------------------------------------------------------- /MobileVLCKit_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CocoaTouchStaticLibrary' target in the 'CocoaTouchStaticLibrary' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | #import 10 | 11 | #ifndef NDEBUG 12 | #define VKLog(format, ...) NSLog(format, ## __VA_ARGS__) 13 | #else 14 | #define VKLog(format, ...) 15 | #endif 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | VLCKit.zip: VLCKit 2 | zip -r -y -9 $@ $< 3 | 4 | VLCKit: build/Debug/VLCKit.framework 5 | rm -rf $@-tmp && mkdir -p $@-tmp 6 | cp -R $< $@-tmp 7 | cp COPYING $@-tmp 8 | mv $@-tmp $@ && touch $@ 9 | 10 | build/Debug/VLCKit.framework: 11 | xcodebuild -project VLCKit.xcodeproj -target "Build Everything" 12 | 13 | clean: 14 | xcodebuild -project VLCKit.xcodeproj clean 15 | rm -fr VLCKit VLCKit.zip 16 | 17 | .PHONY: clean 18 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 629 7 | IBLastKnownRelativeProjectPath 8 | ../../iPodConverter.xcodeproj 9 | IBOldestOS 10 | 5 11 | IBOpenObjects 12 | 13 | 317 14 | 15 | IBSystem Version 16 | 9B18 17 | targetFramework 18 | IBCocoaFramework 19 | 20 | 21 | -------------------------------------------------------------------------------- /VLCKit-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Quartz 9 | CFBundleIdentifier 10 | org.videolan.vlckitframework 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | VLC 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1 19 | CFBundleVersion 20 | 0.1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | VLCKit 9 | CFBundleIdentifier 10 | org.videolan.vlckitframework 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | VLC 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1 19 | CFBundleVersion 20 | 0.1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0009-arm_neon-work-around-libtool-issue.patch: -------------------------------------------------------------------------------- 1 | From f2b955348c86405fddc697acec7bc531fcb92b41 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Wed, 18 Feb 2015 21:35:16 +0100 4 | Subject: [PATCH 09/10] arm_neon: work-around libtool issue 5 | 6 | --- 7 | modules/arm_neon/Makefile.am | 2 ++ 8 | 1 file changed, 2 insertions(+) 9 | 10 | diff --git a/modules/arm_neon/Makefile.am b/modules/arm_neon/Makefile.am 11 | index 4e73a4f..43ef527 100644 12 | --- a/modules/arm_neon/Makefile.am 13 | +++ b/modules/arm_neon/Makefile.am 14 | @@ -1,3 +1,5 @@ 15 | +LIBTOOL=@LIBTOOL@ --tag=CC 16 | + 17 | neondir = $(pluginsdir)/arm_neon 18 | 19 | libsimple_channel_mixer_neon_plugin_la_SOURCES = \ 20 | -- 21 | 2.4.4 22 | 23 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 629 7 | IBLastKnownRelativeProjectPath 8 | ../../FlashVideoDownloader.xcodeproj 9 | IBOldestOS 10 | 5 11 | IBOpenObjects 12 | 13 | 21 14 | 169 15 | 940 16 | 704 17 | 18 | IBSystem Version 19 | 9B18 20 | targetFramework 21 | IBCocoaFramework 22 | 23 | 24 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0011-disable-neon-volume-plugin.patch: -------------------------------------------------------------------------------- 1 | From b049fc61efe79c76fc44766b82a29b6997e03ad8 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Fri, 10 Jul 2015 19:57:18 +0200 4 | Subject: [PATCH 12/12] disable neon volume plugin 5 | 6 | --- 7 | modules/arm_neon/Makefile.am | 1 - 8 | 1 file changed, 1 deletion(-) 9 | 10 | diff --git a/modules/arm_neon/Makefile.am b/modules/arm_neon/Makefile.am 11 | index 43ef527..db81e3e 100644 12 | --- a/modules/arm_neon/Makefile.am 13 | +++ b/modules/arm_neon/Makefile.am 14 | @@ -34,6 +34,5 @@ if HAVE_NEON 15 | neon_LTLIBRARIES = \ 16 | libsimple_channel_mixer_neon_plugin.la \ 17 | libchroma_yuv_neon_plugin.la \ 18 | - libvolume_neon_plugin.la \ 19 | libyuv_rgb_neon_plugin.la 20 | endif 21 | -- 22 | 2.4.4 23 | 24 | -------------------------------------------------------------------------------- /VLC_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'VLC' target in the 'VLC' project. 3 | // 4 | 5 | 6 | #ifdef __OBJC__ 7 | # import 8 | #endif 9 | 10 | #ifdef HAVE_CONFIG_H 11 | # include "config.h" 12 | #endif 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | #ifndef NDEBUG 19 | #define VKLog(format, ...) NSLog(format, ## __VA_ARGS__) 20 | #else 21 | #define VKLog(format, ...) 22 | #endif 23 | 24 | #ifndef N_ 25 | #define N_(str) gettext_noop(str) 26 | #define gettext_noop(str) (str) 27 | #endif 28 | 29 | #ifndef NS_DESIGNATED_INITIALIZER 30 | #if __has_attribute(objc_designated_initializer) 31 | #define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer)) 32 | #else 33 | #define NS_DESIGNATED_INITIALIZER 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /MobileVLCKit-dynamic/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.videolan.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | MobileVLCKit 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /DynamicMobileVLCKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.videolan.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | iPodConverter 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | org.videolan.ipodconverter 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.test 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Flash Video Downloader 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | org.videolan.flashvideodownloader 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Flash Video Downloader 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /MobileVLCKit.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'MobileVLCKit' 3 | s.version = '3.0.0' 4 | s.summary = "MobileVLCKit is an Objective-C wrapper for libvlc's external interface on iOS." 5 | s.homepage = 'https://wiki.videolan.org/VLCKit/' 6 | s.license = { 7 | :type => 'LGPLv2.1', :file => 'MobileVLCKit-binary/COPYING.txt' 8 | } 9 | s.authors = 'Pierre d\'Herbemont', { 'Felix Paul Kühne' => 'fkuehne@videolan.org' } 10 | s.source = { 11 | :http => 'http://download.videolan.org/pub/cocoapods/MobileVLCKit-2.2.2.zip' 12 | } 13 | s.ios.vendored_framework = 'MobileVLCKit-binary/MobileVLCKit.framework' 14 | s.public_header_files = 'MobileVLCKit-binary/MobileVLCKit.framework/Headers/*.h' 15 | s.ios.deployment_target = '7.0.0' 16 | s.frameworks = 'QuartzCore', 'CoreText', 'AVFoundation', 'Security', 'CFNetwork', 'AudioToolbox', 'OpenGLES', 'CoreGraphics', 'VideoToolbox', 'CoreMedia' 17 | s.libraries = 'libc++', 'xml2', 'z', 'bz2', 'iconv' 18 | s.requires_arc = false 19 | s.xcconfig = { 20 | 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11', 21 | 'CLANG_CXX_LIBRARY' => 'libc++' 22 | } 23 | end 24 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0008-lib-media-player-inherit-deinterlace-variable-to-ach.patch: -------------------------------------------------------------------------------- 1 | From 5175b5b287061ce06139418bfc99cf5b64440ba5 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Tue, 9 Dec 2014 22:14:55 +0100 4 | Subject: [PATCH 08/10] lib/media player: inherit deinterlace variable to 5 | achieve correct value on first use 6 | 7 | --- 8 | lib/media_player.c | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | diff --git a/lib/media_player.c b/lib/media_player.c 12 | index f701a49..d9dde1a 100644 13 | --- a/lib/media_player.c 14 | +++ b/lib/media_player.c 15 | @@ -530,7 +530,7 @@ libvlc_media_player_new( libvlc_instance_t *instance ) 16 | var_Create (mp, "zoom", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT); 17 | var_Create (mp, "aspect-ratio", VLC_VAR_STRING); 18 | var_Create (mp, "crop", VLC_VAR_STRING); 19 | - var_Create (mp, "deinterlace", VLC_VAR_INTEGER); 20 | + var_Create (mp, "deinterlace", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); 21 | var_Create (mp, "deinterlace-mode", VLC_VAR_STRING); 22 | 23 | var_Create (mp, "vbi-page", VLC_VAR_INTEGER); 24 | -- 25 | 2.4.4 26 | 27 | -------------------------------------------------------------------------------- /DynamicMobileVLCKit/DynamicMobileVLCKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // DynamicMobileVLCKit.h 3 | // DynamicMobileVLCKit 4 | // 5 | // Created by Felix Paul Kühne on 10/07/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for DynamicMobileVLCKit. 12 | FOUNDATION_EXPORT double DynamicMobileVLCKitVersionNumber; 13 | 14 | //! Project version string for DynamicMobileVLCKit. 15 | FOUNDATION_EXPORT const unsigned char DynamicMobileVLCKitVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | 28 | @class VLCMedia; 29 | @class VLCMediaLibrary; 30 | @class VLCMediaList; 31 | @class VLCTime; 32 | @class VLCVideoView; 33 | @class VLCAudio; 34 | @class VLCMediaThumbnailer; 35 | @class VLCMediaListPlayer; 36 | @class VLCMediaPlayer; 37 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/VDLMainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VDLMainViewController.m 3 | // Dropin-Player 4 | // 5 | // Created by Felix Paul Kühne on 19.11.13. 6 | // Copyright (c) 2013 VideoLAN. All rights reserved. 7 | // 8 | 9 | #import "VDLMainViewController.h" 10 | #import "VDLAppDelegate.h" 11 | 12 | @interface VDLMainViewController () 13 | 14 | @end 15 | 16 | @implementation VDLMainViewController 17 | 18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 19 | { 20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 21 | if (self) { 22 | // Custom initialization 23 | } 24 | return self; 25 | } 26 | 27 | - (void)viewDidLoad 28 | { 29 | [super viewDidLoad]; 30 | // Do any additional setup after loading the view from its nib. 31 | } 32 | 33 | - (IBAction)startPlayback:(id)sender 34 | { 35 | VDLAppDelegate *appDelegate = (VDLAppDelegate *)[UIApplication sharedApplication].delegate; 36 | [appDelegate playStreamFromURL:[NSURL URLWithString:@"http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4"]]; 37 | } 38 | 39 | - (void)didReceiveMemoryWarning 40 | { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/main.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 3 | * 4 | * Authors: Pierre d'Herbemont 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, write to the Free Software Foundation, 18 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 19 | *****************************************************************************/ 20 | 21 | #import 22 | #import 23 | #include 24 | 25 | int main(int argc, char *argv[]) 26 | { 27 | return NSApplicationMain(argc, (const char **) argv); 28 | } 29 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/GradientBackgroundView.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * iPodConverter: GradientBackgroundView 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | 25 | 26 | @interface GradientBackgroundView : NSImageView { 27 | 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/GradientBackgroundView.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * FlashVideoDownloader: GradientBackgroundView 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | 25 | 26 | @interface GradientBackgroundView : NSImageView { 27 | 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/main.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * test: Controller.m 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | #include 25 | 26 | int main(int argc, char *argv[]) 27 | { 28 | return NSApplicationMain(argc, (const char **) argv); 29 | } 30 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/SimplePlayback-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.videolan.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/MovieReceiver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * iPodConverter: MovieReceiver 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | #import "Controller.h" 25 | 26 | @interface MovieReceiver : NSView { 27 | IBOutlet Controller * controller; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0010-libvlc-media-re-parse-if-flags-changed.patch: -------------------------------------------------------------------------------- 1 | From 50a5d0ad39c707e2b4fcb5319fd85f30b37e9223 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Fri, 19 Jun 2015 15:26:06 +0200 4 | Subject: [PATCH 10/10] libvlc/media: re-parse if flags changed 5 | 6 | --- 7 | lib/media.c | 6 ++++++ 8 | lib/media_internal.h | 1 + 9 | 2 files changed, 7 insertions(+) 10 | 11 | diff --git a/lib/media.c b/lib/media.c 12 | index f5886ad..87a02d8 100644 13 | --- a/lib/media.c 14 | +++ b/lib/media.c 15 | @@ -724,6 +724,12 @@ static int media_parse(libvlc_media_t *media, bool b_async, 16 | vlc_mutex_lock(&media->parsed_lock); 17 | needed = !media->has_asked_preparse; 18 | media->has_asked_preparse = true; 19 | + if (!needed) 20 | + { 21 | + if (media->parse_flag != parse_flag) 22 | + needed = true; 23 | + } 24 | + media->parse_flag = parse_flag; 25 | vlc_mutex_unlock(&media->parsed_lock); 26 | 27 | if (needed) 28 | diff --git a/lib/media_internal.h b/lib/media_internal.h 29 | index 35f06a4..d28297e 100644 30 | --- a/lib/media_internal.h 31 | +++ b/lib/media_internal.h 32 | @@ -47,6 +47,7 @@ struct libvlc_media_t 33 | 34 | bool is_parsed; 35 | bool has_asked_preparse; 36 | + libvlc_media_parse_flag_t parse_flag; 37 | }; 38 | 39 | /* Media Descriptor */ 40 | -- 41 | 2.4.4 42 | 43 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/main.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * FlashVideoDownloader: main file 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | #import 25 | #include 26 | 27 | int main(int argc, char *argv[]) 28 | { 29 | return NSApplicationMain(argc, (const char **) argv); 30 | } 31 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/Dropin-Player-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | org.videolan.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Headers/Public/VLCServicesDiscoverer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCServicesDiscoverer.h: VLC.framework VLCMediaDiscoverer header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | @interface VLCServicesDiscoverer : NSObject 26 | { 27 | NSArray * services; 28 | } 29 | + (id)sharedDiscoverer; 30 | - (id)init; 31 | - (NSArray *)services; 32 | @end 33 | -------------------------------------------------------------------------------- /Headers/Public/VLCVideoLayer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCVideoLayer.h: VLCKit.framework VLCVideoLayer header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | 27 | @interface VLCVideoLayer : CALayer 28 | 29 | @property (nonatomic, readonly) BOOL hasVideo; 30 | @property (nonatomic) BOOL fillScreen; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Headers/Public/VLCExtensionsManager.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCKit: VLCExtensionsManager 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2014 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | 25 | @class VLCExtension; 26 | @class VLCMediaPlayer; 27 | 28 | @interface VLCExtensionsManager : NSObject 29 | 30 | + (VLCExtensionsManager *)sharedManager; 31 | @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *extensions; 32 | - (void)runExtension:(VLCExtension *)extension; 33 | 34 | @property (readwrite, strong) VLCMediaPlayer *mediaPlayer; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Headers/Public/VLCVideoView.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCVideoView.h: VLCKit.framework VLCVideoView header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import 27 | 28 | @interface VLCVideoView : NSView 29 | 30 | /* Properties */ 31 | @property (nonatomic, weak) id delegate; 32 | @property (nonatomic, copy) NSColor *backColor; 33 | 34 | @property BOOL fillScreen; 35 | @property (nonatomic, readonly) BOOL hasVideo; 36 | @end 37 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/Dropin-Player-Prefix.pch: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | #import 28 | 29 | #import 30 | -------------------------------------------------------------------------------- /Headers/Internal/VLCVideoCommon.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCVideoCommon.h: VLCKit.framework VLCVideoCommon header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | 27 | /** 28 | * TODO: Documentation 29 | */ 30 | @interface VLCVideoLayoutManager : NSObject 31 | 32 | /* Factories */ 33 | + (id)layoutManager; 34 | 35 | /* Properties */ 36 | @property (nonatomic) BOOL fillScreenEntirely; 37 | @property (nonatomic) CGSize originalVideoSize; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/SimplePlayback-Prefix.pch: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | #import 28 | 29 | #import 30 | -------------------------------------------------------------------------------- /Headers/Public/VLCMediaLibrary.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaLibrary.h: VLCKit.framework VLCMediaDiscoverer header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007, 2014 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCMediaList.h" 26 | 27 | @class VLCMediaList; 28 | 29 | /** 30 | * TODO: Documentation 31 | */ 32 | @interface VLCMediaLibrary : NSObject 33 | 34 | /* Factories */ 35 | + (VLCMediaLibrary*)sharedMediaLibrary; 36 | 37 | /* Properties */ 38 | @property (nonatomic, readonly, strong) VLCMediaList * allMedia; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Headers/Public/VLCExtension.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCKit: VLCExtensions 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2014 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | 25 | 26 | @interface VLCExtension : NSObject 27 | 28 | - (instancetype)initWithInstance:(struct extension_t *)instance NS_DESIGNATED_INITIALIZER; // FIXME: Should be internal 29 | @property (NS_NONATOMIC_IOSONLY, readonly) struct extension_t *instance; // FIXME: Should be internal 30 | 31 | @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *name; 32 | @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *title; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/English.lproj/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBClasses 6 | 7 | 8 | CLASS 9 | GradientBackgroundView 10 | LANGUAGE 11 | ObjC 12 | SUPERCLASS 13 | NSImageView 14 | 15 | 16 | CLASS 17 | FirstResponder 18 | LANGUAGE 19 | ObjC 20 | SUPERCLASS 21 | NSObject 22 | 23 | 24 | ACTIONS 25 | 26 | convert 27 | id 28 | openConvertedEnclosingFolder 29 | id 30 | openConvertedFile 31 | id 32 | pickOutputFolderPath 33 | id 34 | 35 | CLASS 36 | Controller 37 | LANGUAGE 38 | ObjC 39 | OUTLETS 40 | 41 | openConvertedFileButton 42 | NSButton 43 | remoteURLView 44 | NSView 45 | titleView 46 | NSView 47 | window 48 | NSWindow 49 | workingView 50 | NSView 51 | 52 | SUPERCLASS 53 | NSObject 54 | 55 | 56 | IBVersion 57 | 1 58 | 59 | 60 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/VDLViewController.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | 28 | @interface VDLViewController : UIViewController 29 | 30 | @property (nonatomic, strong) IBOutlet UIView *movieView; 31 | 32 | - (IBAction)playandPause:(id)sender; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/main.m: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | 28 | #import "VDLAppDelegate.h" 29 | 30 | int main(int argc, char *argv[]) 31 | { 32 | @autoreleasepool { 33 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([VDLAppDelegate class])); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/main.m: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | 28 | #import "VDLAppDelegate.h" 29 | 30 | int main(int argc, char *argv[]) 31 | { 32 | @autoreleasepool { 33 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([VDLAppDelegate class])); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/Controller.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * test: Controller 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | #import 25 | 26 | @interface Controller : NSObject 27 | { 28 | IBOutlet id window; 29 | IBOutlet id playlistOutline; 30 | IBOutlet id videoHolderView; 31 | IBOutlet id spuPopup; 32 | 33 | VLCVideoView * videoView; 34 | VLCMediaList *playlist; 35 | VLCMediaPlayer *player; 36 | int mediaIndex; 37 | } 38 | - (void)awakeFromNib; 39 | 40 | - (void)setMediaIndex:(int)value; 41 | - (void)play:(id)sender; 42 | - (void)pause:(id)sender; 43 | 44 | - (IBAction)setSPU:(id)sender; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Headers/Public/VLCStreamSession.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCStreamSession.h: VLCKit.framework VLCStreamSession header 3 | ***************************************************************************** 4 | * Copyright (C) 2008 Pierre d'Herbemont 5 | * Copyright (C) 2008 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import 27 | #import 28 | 29 | 30 | @interface VLCStreamSession : VLCMediaPlayer 31 | 32 | + (instancetype)streamSession; 33 | 34 | @property (nonatomic, strong) VLCStreamOutput * streamOutput; 35 | @property (nonatomic, readonly) BOOL isComplete; 36 | @property (nonatomic, readonly) NSUInteger reattemptedConnections; 37 | 38 | - (void)startStreaming; 39 | - (void)stopStreaming; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/VDLAppDelegate.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | 28 | @class VDLViewController; 29 | 30 | @interface VDLAppDelegate : UIResponder 31 | 32 | @property (strong, nonatomic) UIWindow *window; 33 | 34 | @property (strong, nonatomic) VDLViewController *viewController; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/English.lproj/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBClasses 6 | 7 | 8 | CLASS 9 | GradientBackgroundView 10 | LANGUAGE 11 | ObjC 12 | SUPERCLASS 13 | NSImageView 14 | 15 | 16 | CLASS 17 | FirstResponder 18 | LANGUAGE 19 | ObjC 20 | SUPERCLASS 21 | NSObject 22 | 23 | 24 | ACTIONS 25 | 26 | convert 27 | id 28 | openConvertedEnclosingFolder 29 | id 30 | openConvertedFile 31 | id 32 | 33 | CLASS 34 | Controller 35 | LANGUAGE 36 | ObjC 37 | OUTLETS 38 | 39 | conversionView 40 | NSView 41 | openConvertedFileButton 42 | NSButton 43 | window 44 | NSWindow 45 | 46 | SUPERCLASS 47 | NSObject 48 | 49 | 50 | CLASS 51 | MovieReceiver 52 | LANGUAGE 53 | ObjC 54 | OUTLETS 55 | 56 | controller 57 | Controller 58 | 59 | SUPERCLASS 60 | NSView 61 | 62 | 63 | IBVersion 64 | 1 65 | 66 | 67 | -------------------------------------------------------------------------------- /Headers/Public/VLCAudio.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCAudio.h: VLCKit.framework VLCAudio header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Faustino E. Osuna 5 | * Copyright (C) 2007, 2014 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Faustino E. Osuna 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | 27 | /* Notification Messages */ 28 | /** 29 | * Standard notification messages that are emitted by VLCAudio object. 30 | */ 31 | extern NSString *const VLCMediaPlayerVolumeChanged; 32 | 33 | @class VLCMediaPlayer; 34 | 35 | /** 36 | * TODO: Documentation VLCAudio 37 | */ 38 | @interface VLCAudio : NSObject 39 | 40 | /* Properties */ 41 | - (void)setMute:(BOOL)value; 42 | 43 | @property (setter=setMute:) BOOL isMuted; 44 | @property (assign) int volume; 45 | 46 | - (void)volumeDown; 47 | - (void)volumeUp; 48 | @end 49 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/VDLAppDelegate.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | 28 | @class VDLMainViewController; 29 | 30 | @interface VDLAppDelegate : UIResponder 31 | 32 | @property (strong, nonatomic) UIWindow *window; 33 | 34 | @property (strong, nonatomic) VDLMainViewController *viewController; 35 | 36 | - (void)playStreamFromURL:(NSURL *)url; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Headers/Public/MobileVLCKit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCKit: MobileVLCKit 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2013 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * Felix Paul Kühne 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | 33 | @class VLCMedia; 34 | @class VLCMediaLibrary; 35 | @class VLCMediaList; 36 | @class VLCTime; 37 | @class VLCVideoView; 38 | @class VLCAudio; 39 | @class VLCMediaThumbnailer; 40 | @class VLCMediaListPlayer; 41 | @class VLCMediaPlayer; 42 | -------------------------------------------------------------------------------- /Headers/Public/VLCKit.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCKit.h: VLCKit.framework main header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007, 2013-2014 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | 41 | @class VLCMedia; 42 | @class VLCMediaLibrary; 43 | @class VLCMediaList; 44 | @class VLCTime; 45 | @class VLCVideoView; 46 | -------------------------------------------------------------------------------- /Sources/VLCExtension.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCKit: VLCExtensions 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2012, 2014 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import "VLCExtension.h" 24 | #import 25 | 26 | @interface VLCExtension () 27 | { 28 | struct extension_t *_instance; 29 | } 30 | @end 31 | 32 | @implementation VLCExtension 33 | - (NSString *)description 34 | { 35 | return [NSString stringWithFormat:@"VLC Extension %@", [self name]]; 36 | } 37 | 38 | - (instancetype)initWithInstance:(struct extension_t *)instance 39 | { 40 | self = [super init]; 41 | if (!self) 42 | return nil; 43 | _instance = instance; 44 | return self; 45 | } 46 | 47 | - (struct extension_t *)instance 48 | { 49 | return _instance; 50 | } 51 | 52 | - (NSString *)name 53 | { 54 | return @(_instance->psz_name); 55 | } 56 | 57 | - (NSString *)title 58 | { 59 | return @(_instance->psz_title); 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/Controller.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * iPodConverter: Controller 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import 24 | #import 25 | #import 26 | 27 | @interface Controller : NSObject 28 | { 29 | IBOutlet NSView * conversionView; 30 | IBOutlet NSWindow * window; 31 | IBOutlet NSButton * openConvertedFileButton; 32 | 33 | NSNumber * selectedStreamOutput; 34 | 35 | VLCMedia * media; 36 | VLCStreamSession * streamSession; 37 | } 38 | 39 | - (void)awakeFromNib; 40 | 41 | @property (retain) VLCMedia * media; 42 | @property (retain) VLCStreamSession * streamSession; 43 | @property (assign) NSNumber * selectedStreamOutput; 44 | @property (retain,readonly) NSString * outputFilePath; 45 | 46 | - (IBAction)convert:(id)sender; 47 | - (IBAction)openConvertedFile:(id)sender; 48 | - (IBAction)openConvertedEnclosingFolder:(id)sender; 49 | @end 50 | -------------------------------------------------------------------------------- /Headers/Public/VLCStreamOutput.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCStreamOutput.h: VLCKit.framework VLCStreamOutput header 3 | ***************************************************************************** 4 | * Copyright (C) 2008 Pierre d'Herbemont 5 | * Copyright (C) 2008, 2014 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | extern NSString * VLCDefaultStreamOutputRTSP; 26 | extern NSString * VLCDefaultStreamOutputRTP; 27 | extern NSString * VLCDefaultStreamOutputRTP; 28 | 29 | @interface VLCStreamOutput : NSObject 30 | 31 | - (instancetype)initWithOptionDictionary:(NSDictionary *)dictionary NS_DESIGNATED_INITIALIZER; 32 | + (instancetype)streamOutputWithOptionDictionary:(NSDictionary *)dictionary; 33 | 34 | + (id)rtpBroadcastStreamOutputWithSAPAnnounce:(NSString *)announceName; 35 | + (id)rtpBroadcastStreamOutput; 36 | + (id)ipodStreamOutputWithFilePath:(NSString *)filePath; 37 | + (instancetype)streamOutputWithFilePath:(NSString *)filePath; 38 | + (id)mpeg2StreamOutputWithFilePath:(NSString *)filePath; 39 | + (id)mpeg4StreamOutputWithFilePath:(NSString *)filePath; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/GradientBackgroundView.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 3 | * 4 | * Authors: Pierre d'Herbemont 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, write to the Free Software Foundation, 18 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 19 | *****************************************************************************/ 20 | 21 | #import "GradientBackgroundView.h" 22 | 23 | /********************************************************** 24 | * Why not drawing something nice? 25 | */ 26 | 27 | @implementation GradientBackgroundView 28 | - (void)awakeFromNib 29 | { 30 | /* Buggy nib files... Force us to be on the back of the view hierarchy */ 31 | NSView * superView; 32 | [self retain]; 33 | superView = [self superview]; 34 | [self removeFromSuperview]; 35 | [superView addSubview:self positioned: NSWindowBelow relativeTo:nil]; 36 | } 37 | - (void)drawRect:(NSRect)rect 38 | { 39 | 40 | NSColor * topGradient = [NSColor colorWithCalibratedWhite:.12f alpha:1.0]; 41 | NSColor * bottomGradient = [NSColor colorWithCalibratedWhite:0.55f alpha:0.9]; 42 | NSGradient * gradient = [[NSGradient alloc] initWithColorsAndLocations:bottomGradient, 0.f, bottomGradient, 0.1f, topGradient, 1.f, nil]; 43 | [gradient drawInRect:self.bounds angle:90.0]; 44 | [super drawRect:rect]; 45 | } 46 | @end 47 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/MovieReceiver.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * iPodConverter: MovieReceiver.m 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2013 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import "MovieReceiver.h" 24 | 25 | /********************************************************** 26 | * This handles drag-and-drop in the main window 27 | */ 28 | 29 | @implementation MovieReceiver 30 | 31 | - (void)awakeFromNib 32 | { 33 | [self registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, NSURLPboardType, nil]]; 34 | 35 | } 36 | 37 | - (NSDragOperation)draggingEntered:(id )sender 38 | { 39 | return NSDragOperationGeneric; 40 | } 41 | 42 | - (BOOL)performDragOperation:(id )sender 43 | { 44 | NSPasteboard *pboard = [sender draggingPasteboard]; 45 | 46 | if ( [[pboard types] containsObject:NSFilenamesPboardType] ) 47 | { 48 | NSArray *files = [pboard propertyListForType:NSFilenamesPboardType]; 49 | for( NSString * filename in files ) 50 | { 51 | [controller setMedia:[VLCMedia mediaWithPath:filename]]; 52 | } 53 | } 54 | return YES; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /Headers/Public/VLCTime.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCTime.h: VLCKit.framework VLCTime header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | 27 | /** 28 | * Provides an object to define VLCMedia's time. 29 | */ 30 | @interface VLCTime : NSObject 31 | 32 | /* Factories */ 33 | + (VLCTime *)nullTime; 34 | + (VLCTime *)timeWithNumber:(NSNumber *)aNumber; 35 | + (VLCTime *)timeWithInt:(int)aInt; 36 | 37 | /* Initializers */ 38 | - (instancetype)initWithNumber:(NSNumber *)aNumber; 39 | - (instancetype)initWithInt:(int)aInt; 40 | 41 | /* Properties */ 42 | @property (nonatomic, readonly) NSNumber * value; //< Holds, in milliseconds, the VLCTime value 43 | @property (readonly) NSNumber * numberValue; // here for backwards compatibility 44 | @property (readonly) NSString * stringValue; 45 | @property (readonly) NSString * verboseStringValue; 46 | @property (readonly) NSString * minuteStringValue; 47 | @property (readonly) int intValue; 48 | 49 | /* Comparators */ 50 | - (NSComparisonResult)compare:(VLCTime *)aTime; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/GradientBackgroundView.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * FlashVideoDownloader: GradientBackgroundView.m 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import "GradientBackgroundView.h" 24 | 25 | /********************************************************** 26 | * Why not drawing something nice? 27 | */ 28 | 29 | @implementation GradientBackgroundView 30 | - (void)awakeFromNib 31 | { 32 | /* Buggy nib files... Force us to be on the back of the view hierarchy */ 33 | NSView * superView; 34 | [self retain]; 35 | superView = [self superview]; 36 | [self removeFromSuperview]; 37 | [superView addSubview:self positioned: NSWindowBelow relativeTo:nil]; 38 | } 39 | - (void)drawRect:(NSRect)rect 40 | { 41 | 42 | NSColor * topGradient = [NSColor colorWithCalibratedWhite:.12f alpha:1.0]; 43 | NSColor * bottomGradient = [NSColor colorWithCalibratedWhite:0.55f alpha:0.9]; 44 | NSGradient * gradient = [[NSGradient alloc] initWithColorsAndLocations:bottomGradient, 0.f, bottomGradient, 0.1f, topGradient, 1.f, nil]; 45 | [gradient drawInRect:self.bounds angle:90.0]; 46 | [super drawRect:rect]; 47 | } 48 | @end 49 | -------------------------------------------------------------------------------- /Examples_OSX/FlashVideoDownloader/Controller.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * FlashVideoDownloader: Controller.m 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | 24 | #import 25 | #import 26 | 27 | @interface Controller : NSObject 28 | { 29 | IBOutlet NSView * remoteURLView; 30 | IBOutlet NSView * workingView; 31 | IBOutlet NSWindow * window; 32 | IBOutlet NSButton * openConvertedFileButton; 33 | 34 | NSNumber * selectedStreamOutput; 35 | NSString * remoteURLAsString; 36 | 37 | VLCMedia * media; 38 | VLCStreamSession * streamSession; 39 | 40 | NSString * outputFilePath; 41 | NSString * outputFolderPath; 42 | } 43 | 44 | - (void)awakeFromNib; 45 | 46 | @property (retain) VLCMedia * media; 47 | @property (retain) VLCStreamSession * streamSession; 48 | @property (assign) NSNumber * selectedStreamOutput; 49 | @property (retain,readonly) NSString * outputFilePath; 50 | @property (retain,readonly) NSString * outputFolderPath; 51 | @property (retain) NSString * remoteURLAsString; 52 | 53 | - (IBAction)convert:(id)sender; 54 | - (IBAction)openConvertedFile:(id)sender; 55 | - (IBAction)openConvertedEnclosingFolder:(id)sender; 56 | - (IBAction)pickOutputFolderPath:(id)sender; 57 | @end 58 | -------------------------------------------------------------------------------- /Sources/VLCServicesDiscoverer.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCServicesDiscoverer.m: VLC.framework VLCMediaDiscoverer implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import 27 | #import 28 | #import "VLCLibrary.h" 29 | 30 | #include 31 | 32 | static VLCServicesDiscoverer * sharedDiscoverer = nil; 33 | 34 | @implementation VLCServicesDiscoverer 35 | + (id)sharedDiscoverer 36 | { 37 | if (!sharedDiscoverer) 38 | { 39 | sharedDiscoverer = [[self alloc] init]; 40 | } 41 | return sharedDiscoverer; 42 | } 43 | 44 | - (id) init 45 | { 46 | if( self = [super init] ) 47 | { 48 | services = [[NSArray arrayWithObjects: 49 | [[[VLCMediaDiscoverer alloc] initWithName:@"sap"] autorelease], 50 | [[[VLCMediaDiscoverer alloc] initWithName:@"shoutcast"] autorelease], 51 | [[[VLCMediaDiscoverer alloc] initWithName:@"shoutcasttv"] autorelease], nil] retain]; 52 | } 53 | return self; 54 | } 55 | 56 | - (NSArray *) services 57 | { 58 | return [[services copy] autorelease]; 59 | } 60 | @end 61 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/VDLMainViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0003-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch: -------------------------------------------------------------------------------- 1 | From c477ea16265a3bd28f8280eea80a92b65ed12d59 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Fri, 10 Aug 2012 16:02:07 +0200 4 | Subject: [PATCH 03/10] deinterlace/merge: use a macro to fix compilation for 5 | iOS 6 | 7 | --- 8 | modules/video_filter/deinterlace/merge_arm.S | 26 ++++++++++---------------- 9 | 1 file changed, 10 insertions(+), 16 deletions(-) 10 | 11 | diff --git a/modules/video_filter/deinterlace/merge_arm.S b/modules/video_filter/deinterlace/merge_arm.S 12 | index dd77902..03e5042 100644 13 | --- a/modules/video_filter/deinterlace/merge_arm.S 14 | +++ b/modules/video_filter/deinterlace/merge_arm.S 15 | @@ -18,6 +18,8 @@ 16 | @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 17 | @****************************************************************************/ 18 | 19 | +#include "../../arm_neon/asm.S" 20 | + 21 | .syntax unified 22 | .arm 23 | .arch armv6 24 | @@ -29,11 +31,8 @@ 25 | #define SRC2 r2 26 | #define SIZE r3 27 | 28 | - .align 2 29 | - .global merge8_arm_neon 30 | - .type merge8_arm_neon, %function 31 | @ NOTE: Offset and pitch must be multiple of 16-bytes in VLC. 32 | -merge8_arm_neon: 33 | +function merge8_arm_neon, export=1 34 | cmp SIZE, #64 35 | blo 2f 36 | 1: 37 | @@ -70,11 +69,9 @@ merge8_arm_neon: 38 | vhadd.u8 q0, q0, q8 39 | vst1.u8 {q0}, [DEST,:128]! 40 | bx lr 41 | +endfunc 42 | 43 | - .align 2 44 | - .global merge16_arm_neon 45 | - .type merge16_arm_neon, %function 46 | -merge16_arm_neon: 47 | +function merge16_arm_neon, export=1 48 | cmp SIZE, #64 49 | blo 2f 50 | 1: 51 | @@ -111,11 +108,9 @@ merge16_arm_neon: 52 | vhadd.u16 q0, q0, q8 53 | vst1.u16 {q0}, [DEST,:128]! 54 | bx lr 55 | +endfunc 56 | 57 | - .align 2 58 | - .global merge8_armv6 59 | - .type merge8_armv6, %function 60 | -merge8_armv6: 61 | +function merge8_armv6, export=1 62 | push {r4-r9,lr} 63 | 1: 64 | pld [SRC1, #64] 65 | @@ -133,11 +128,9 @@ merge8_armv6: 66 | stm DEST!, {r6-r7} 67 | popeq {r4-r9,pc} 68 | b 1b 69 | +endfunc 70 | 71 | - .align 2 72 | - .global merge16_armv6 73 | - .type merge16_armv6, %function 74 | -merge16_armv6: 75 | +function merge16_armv6, export=1 76 | push {r4-r9,lr} 77 | 1: 78 | pld [SRC1, #64] 79 | @@ -155,3 +148,4 @@ merge16_armv6: 80 | stm DEST!, {r6-r7} 81 | popeq {r4-r9,pc} 82 | b 1b 83 | +endfunc 84 | -- 85 | 2.4.4 86 | 87 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch: -------------------------------------------------------------------------------- 1 | From f46e3693a5412b729564a6c3818b0c8b208a12a6 Mon Sep 17 00:00:00 2001 2 | From: David Geldreich 3 | Date: Fri, 20 Apr 2012 16:41:19 +0200 4 | Subject: [PATCH 01/10] arm_neon: added function macro to handle the underscore 5 | prefix for the iOS ARM ABI 6 | 7 | --- 8 | modules/arm_neon/asm.S | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 9 | 1 file changed, 49 insertions(+) 10 | create mode 100644 modules/arm_neon/asm.S 11 | 12 | diff --git a/modules/arm_neon/asm.S b/modules/arm_neon/asm.S 13 | new file mode 100644 14 | index 0000000..d853255 15 | --- /dev/null 16 | +++ b/modules/arm_neon/asm.S 17 | @@ -0,0 +1,49 @@ 18 | +@***************************************************************************** 19 | +@ asm.S : defines and macros 20 | +@***************************************************************************** 21 | +@ Copyright (C) 2012 David Geldreich 22 | +@ 23 | +@ This program is free software; you can redistribute it and/or modify 24 | +@ it under the terms of the GNU General Public License as published by 25 | +@ the Free Software Foundation; either version 2 of the License, or 26 | +@ (at your option) any later version. 27 | +@ 28 | +@ This program is distributed in the hope that it will be useful, 29 | +@ but WITHOUT ANY WARRANTY; without even the implied warranty of 30 | +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 31 | +@ GNU General Public License for more details. 32 | +@ 33 | +@ You should have received a copy of the GNU General Public License 34 | +@ along with this program; if not, write to the Free Software Foundation, 35 | +@ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 36 | +@****************************************************************************/ 37 | + 38 | +#ifdef __APPLE__ 39 | +# define EXTERN_ASM _ 40 | +#else 41 | +# define EXTERN_ASM 42 | +#endif 43 | + 44 | +#ifdef __ELF__ 45 | +# define ELF 46 | +#else 47 | +# define ELF @ 48 | +#endif 49 | + 50 | +.macro function name, export=0 51 | + .macro endfunc 52 | +ELF .size \name, . - \name 53 | + .endfunc 54 | + .purgem endfunc 55 | + .endm 56 | + .text 57 | + .align 2 58 | + .if \export 59 | + .global EXTERN_ASM\name 60 | +EXTERN_ASM\name: 61 | + .endif 62 | +ELF .type \name, %function 63 | + .func \name 64 | +\name: 65 | +.endm 66 | + 67 | -- 68 | 2.4.4 69 | 70 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/VDLViewController.m: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import "VDLViewController.h" 27 | 28 | @interface VDLViewController () 29 | { 30 | VLCMediaPlayer *_mediaplayer; 31 | } 32 | 33 | @end 34 | 35 | @implementation VDLViewController 36 | 37 | - (void)viewDidLoad 38 | { 39 | [super viewDidLoad]; 40 | 41 | /* setup the media player instance, give it a delegate and something to draw into */ 42 | _mediaplayer = [[VLCMediaPlayer alloc] init]; 43 | _mediaplayer.delegate = self; 44 | _mediaplayer.drawable = self.movieView; 45 | 46 | /* create a media object and give it to the player */ 47 | _mediaplayer.media = [VLCMedia mediaWithURL:[NSURL URLWithString:@"http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4"]]; 48 | } 49 | 50 | - (IBAction)playandPause:(id)sender 51 | { 52 | if (_mediaplayer.isPlaying) 53 | [_mediaplayer pause]; 54 | 55 | [_mediaplayer play]; 56 | } 57 | 58 | - (void)didReceiveMemoryWarning 59 | { 60 | [super didReceiveMemoryWarning]; 61 | // Dispose of any resources that can be recreated. 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0004-libass-fix-text-rendering-on-iOS-by-providing-a-font.patch: -------------------------------------------------------------------------------- 1 | From 15ef7ebbc9dd138380ed3c8429783a85e7519586 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Wed, 29 May 2013 13:25:54 +0200 4 | Subject: [PATCH 04/10] libass: fix text rendering on iOS by providing a font 5 | lookup mechanism for the font shipped with Aspen 6 | 7 | --- 8 | modules/codec/libass.c | 38 ++++++++++++++++++++++++++++++++++++++ 9 | 1 file changed, 38 insertions(+) 10 | 11 | diff --git a/modules/codec/libass.c b/modules/codec/libass.c 12 | index 067ef6b..8460dad 100644 13 | --- a/modules/codec/libass.c 14 | +++ b/modules/codec/libass.c 15 | @@ -29,6 +29,13 @@ 16 | # include "config.h" 17 | #endif 18 | 19 | +#if defined (__APPLE__) 20 | +#include 21 | +#if TARGET_OS_IPHONE 22 | +#include 23 | +#endif 24 | +#endif 25 | + 26 | #include 27 | #include 28 | #include 29 | @@ -213,6 +220,37 @@ static int Create( vlc_object_t *p_this ) 30 | #if defined( __ANDROID__ ) 31 | const char *psz_font = "/system/fonts/DroidSans-Bold.ttf"; 32 | const char *psz_family = "Droid Sans Bold"; 33 | +#elif defined (__APPLE__) 34 | +#if !TARGET_OS_IPHONE 35 | + const char *psz_font = NULL; /* We don't ship a default font with VLC */ 36 | + const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */ 37 | +#else 38 | + CFURLRef fileURL; 39 | + fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("OpenSans-Regular.ttf"), 40 | + NULL, 41 | + NULL); 42 | + if (!fileURL) 43 | + return VLC_EGENERIC; 44 | + 45 | + CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle); 46 | + CFRelease(fileURL); 47 | + 48 | + if (!urlString) 49 | + return VLC_EGENERIC; 50 | + 51 | + CFIndex length = CFStringGetLength(urlString); 52 | + if (!length) 53 | + return VLC_EGENERIC; 54 | + length++; 55 | + 56 | + char *psz_path = (char *)malloc(length); 57 | + CFStringGetCString(urlString, psz_path, length, kCFStringEncodingUTF8); 58 | + CFRelease(urlString); 59 | + 60 | + const char *psz_font = (const char *)strdup(psz_path); 61 | + free(psz_path); 62 | + const char *psz_family = "Open Sans"; 63 | +#endif 64 | #else 65 | const char *psz_font = NULL; /* We don't ship a default font with VLC */ 66 | const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */ 67 | -- 68 | 2.4.4 69 | 70 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/VDLPlaybackViewController.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import 27 | #import 28 | 29 | @interface VDLPlaybackViewController : UIViewController 30 | 31 | @property (nonatomic, strong) IBOutlet UIView *movieView; 32 | @property (nonatomic, strong) IBOutlet UISlider *positionSlider; 33 | @property (nonatomic, strong) IBOutlet UIButton *timeDisplay; 34 | @property (nonatomic, strong) IBOutlet UIButton *playPauseButton; 35 | @property (nonatomic, strong) IBOutlet UIButton *subtitleSwitcherButton; 36 | @property (nonatomic, strong) IBOutlet UIButton *audioSwitcherButton; 37 | @property (nonatomic, strong) IBOutlet UINavigationBar *toolbar; 38 | @property (nonatomic, strong) IBOutlet UIView *controllerPanel; 39 | @property (nonatomic, strong) IBOutlet MPVolumeView *volumeView; 40 | 41 | - (void)playMediaFromURL:(NSURL*)theURL; 42 | 43 | - (IBAction)closePlayback:(id)sender; 44 | 45 | - (IBAction)positionSliderDrag:(id)sender; 46 | - (IBAction)positionSliderAction:(id)sender; 47 | - (IBAction)toggleTimeDisplay:(id)sender; 48 | 49 | - (IBAction)playandPause:(id)sender; 50 | - (IBAction)switchAudioTrack:(id)sender; 51 | - (IBAction)switchSubtitleTrack:(id)sender; 52 | - (IBAction)switchVideoDimensions:(id)sender; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Sources/VLCMediaLibrary.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaLibrary.m: VLCKit.framework VLCMediaLibrary implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007, 2014 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import "VLCMediaLibrary.h" 27 | #import "VLCLibrary.h" 28 | #import "VLCLibVLCBridging.h" 29 | 30 | #include 31 | 32 | @interface VLCMediaLibrary () 33 | 34 | { 35 | void *_mlib; 36 | } 37 | 38 | @property (nonatomic) dispatch_once_t once; 39 | @property (nonatomic, readwrite, strong) VLCMediaList * allMedia; 40 | 41 | @end 42 | 43 | @implementation VLCMediaLibrary 44 | 45 | + (VLCMediaLibrary*)sharedMediaLibrary 46 | { 47 | static VLCMediaLibrary * sharedMediaLibrary = nil; 48 | static dispatch_once_t onceToken; 49 | 50 | dispatch_once(&onceToken, ^{ 51 | sharedMediaLibrary = [[VLCMediaLibrary alloc] init]; 52 | }); 53 | 54 | return sharedMediaLibrary; 55 | } 56 | 57 | - (instancetype)init 58 | { 59 | if (self = [super init]) { 60 | _mlib = libvlc_media_library_new( [VLCLibrary sharedInstance]); 61 | libvlc_media_library_load( _mlib ); 62 | } 63 | return self; 64 | } 65 | 66 | - (void)dealloc 67 | { 68 | libvlc_media_library_release(_mlib); 69 | _mlib = nil; // make sure that the pointer is dead 70 | } 71 | 72 | - (VLCMediaList *)allMedia 73 | { 74 | dispatch_once(&_once, ^{ 75 | libvlc_media_list_t * p_mlist = libvlc_media_library_media_list( _mlib ); 76 | _allMedia = [VLCMediaList mediaListWithLibVLCMediaList:p_mlist]; 77 | libvlc_media_list_release(p_mlist); 78 | }); 79 | return _allMedia; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /Headers/Public/VLCMediaListPlayer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaListPlayer.h: VLCKit.framework VLCMediaListPlayer implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2009 Pierre d'Herbemont 5 | * Partial Copyright (C) 2009-2013 Felix Paul Kühne 6 | * Copyright (C) 2009-2013 VLC authors and VideoLAN 7 | * $Id$ 8 | * 9 | * Authors: Pierre d'Herbemont 10 | * Felix Paul Kühne 24 | #if TARGET_OS_IPHONE 25 | # import 26 | #endif 27 | 28 | @class VLCMedia; 29 | @class VLCLibrary; 30 | @protocol VLCMediaThumbnailerDelegate; 31 | 32 | @interface VLCMediaThumbnailer : NSObject 33 | 34 | + (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media andDelegate:(id)delegate; 35 | + (VLCMediaThumbnailer *)thumbnailerWithMedia:(VLCMedia *)media delegate:(id)delegate andVLCLibrary:(VLCLibrary *)library; 36 | - (void)fetchThumbnail; 37 | 38 | @property (readwrite, weak) id delegate; 39 | @property (readwrite) VLCMedia *media; 40 | @property (readwrite, assign) CGImageRef thumbnail; 41 | @property (readwrite) void * libVLCinstance; 42 | 43 | /** 44 | * Thumbnail Height 45 | * You shouldn't change this after -fetchThumbnail 46 | * has been called. 47 | * @return thumbnail height. Default value 240. 48 | */ 49 | @property (readwrite, assign) CGFloat thumbnailHeight; 50 | 51 | /** 52 | * Thumbnail Width 53 | * You shouldn't change this after -fetchThumbnail 54 | * has been called. 55 | * @return thumbnail height. Default value 320 56 | */ 57 | @property (readwrite, assign) CGFloat thumbnailWidth; 58 | 59 | /** 60 | * Snapshot Position 61 | * You shouldn't change this after -fetchThumbnail 62 | * has been called. 63 | * @return snapshot position. Default value 0.5 64 | */ 65 | @property (readwrite, assign) float snapshotPosition; 66 | @end 67 | 68 | @protocol VLCMediaThumbnailerDelegate 69 | @required 70 | - (void)mediaThumbnailerDidTimeOut:(VLCMediaThumbnailer *)mediaThumbnailer; 71 | - (void)mediaThumbnailer:(VLCMediaThumbnailer *)mediaThumbnailer didFinishThumbnail:(CGImageRef)thumbnail; 72 | @end 73 | -------------------------------------------------------------------------------- /Headers/Public/VLCMediaDiscoverer.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaDiscoverer.h: VLCKit.framework VLCMediaDiscoverer header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2015 Felix Paul Kühne 6 | * Copyright (C) 2007, 2015 VLC authors and VideoLAN 7 | * $Id$ 8 | * 9 | * Authors: Pierre d'Herbemont 10 | * Felix Paul Kühne 11 | * 12 | * This program is free software; you can redistribute it and/or modify it 13 | * under the terms of the GNU Lesser General Public License as published by 14 | * the Free Software Foundation; either version 2.1 of the License, or 15 | * (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Lesser General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Lesser General Public License 23 | * along with this program; if not, write to the Free Software Foundation, 24 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 25 | *****************************************************************************/ 26 | 27 | #import 28 | #import "VLCMediaList.h" 29 | 30 | @class VLCLibrary; 31 | @class VLCMediaList; 32 | @class VLCMediaDiscoverer; 33 | 34 | /** 35 | * VLCMediaDiscoverer 36 | */ 37 | 38 | @interface VLCMediaDiscoverer : NSObject 39 | 40 | @property (nonatomic, readonly) VLCLibrary *libraryInstance; 41 | 42 | /** 43 | * \return returns an empty array, will be removed in subsequent releases 44 | */ 45 | + (NSArray *)availableMediaDiscoverer __attribute__((deprecated)); 46 | 47 | /* Initializers */ 48 | /** 49 | * Initializes new object with specified name. 50 | * \param aServiceName Name of the service for this VLCMediaDiscoverer object. 51 | * \returns Newly created media discoverer. 52 | * \note with VLCKit 3.0 and above, you need to start the discoverer explicitly after creation 53 | */ 54 | - (instancetype)initWithName:(NSString *)aServiceName; 55 | 56 | /** 57 | * start media discovery 58 | * \returns -1 if start failed, otherwise 0 59 | */ 60 | - (int)startDiscoverer; 61 | 62 | /** 63 | * stop media discovery 64 | */ 65 | - (void)stopDiscoverer; 66 | 67 | /** 68 | * a read-only property to retrieve the list of discovered media items 69 | */ 70 | @property (weak, readonly) VLCMediaList *discoveredMedia; 71 | 72 | /** 73 | * returns the localized name of the discovery module if available, otherwise in US English 74 | */ 75 | @property (readonly, copy) NSString *localizedName; 76 | 77 | /** 78 | * read-only property to check if the discovery service is active 79 | * \return boolean value 80 | */ 81 | @property (readonly) BOOL isRunning; 82 | @end 83 | -------------------------------------------------------------------------------- /Sources/VLCVideoCommon.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCVideoCommon.m: VLCKit.framework VLCVideoCommon implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCVideoCommon.h" 26 | 27 | /****************************************************************************** 28 | * Implementation VLCVideoLayoutManager 29 | * 30 | * Manage the size of the video layer 31 | */ 32 | 33 | @implementation VLCVideoLayoutManager 34 | 35 | + (id)layoutManager 36 | { 37 | static id sLayoutManager = nil; 38 | static dispatch_once_t onceToken; 39 | dispatch_once(&onceToken, ^{ 40 | sLayoutManager = [[self alloc] init]; 41 | }); 42 | return sLayoutManager; 43 | } 44 | 45 | /* CALayoutManager Implementation */ 46 | - (void)layoutSublayersOfLayer:(CALayer *)layer 47 | { 48 | /* After having done everything normally resize the vlcopengllayer */ 49 | if( [[layer sublayers] count] > 0 && [[[layer sublayers][0] name] isEqualToString:@"vlcopengllayer"]) 50 | { 51 | CALayer * videolayer = [layer sublayers][0]; 52 | CGRect bounds = layer.bounds; 53 | CGRect videoRect = bounds; 54 | CGSize original = self.originalVideoSize; 55 | if (original.height > 0 && original.width > 0) 56 | { 57 | CGFloat xRatio = CGRectGetWidth(bounds) / original.width; 58 | CGFloat yRatio = CGRectGetHeight(bounds) / original.height; 59 | CGFloat ratio = self.fillScreenEntirely ? MAX(xRatio, yRatio) : MIN(xRatio, yRatio); 60 | 61 | videoRect.size.width = ratio * original.width; 62 | videoRect.size.height = ratio * original.height; 63 | videoRect.origin.x += (CGRectGetWidth(bounds) - CGRectGetWidth(videoRect)) / 2.0; 64 | videoRect.origin.y += (CGRectGetHeight(bounds) - CGRectGetHeight(videoRect)) / 2.0; 65 | } 66 | videolayer.frame = videoRect; 67 | } 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Headers/Public/VLCPlaylistDataSource.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCPlaylistDataSource.h: VLC.framework VLCPlaylistDataSource header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import 27 | 28 | /* This class can be used as a data source for an NSOutlineView 29 | * it will display the playlist content. If provided the videoView 30 | * will automatically be associated to the given playlist, and actions 31 | * in the outlineView will trigger the videoView, visual feedback of the 32 | * current item in the videoview will be displayed in the outlineview 33 | */ 34 | @interface VLCPlaylistDataSource : NSObject 35 | { 36 | VLCPlaylist * playlist; 37 | VLCVideoView * videoView; 38 | 39 | NSOutlineView *outlineView; 40 | } 41 | - (id)initWithPlaylist:(VLCPlaylist *)aPlaylist; 42 | - (id)initWithPlaylist:(VLCPlaylist *)aPlaylist videoView:(VLCVideoView *)aVideoView; 43 | 44 | - (VLCPlaylist *)playlist; 45 | - (VLCVideoView *)videoView; 46 | @end 47 | 48 | /* It could be really useful to use that, this probably need to be reviewed to see 49 | * if it really belongs here */ 50 | @interface VLCPlaylistDataSource (OutlineViewDataSource) 51 | - (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item; 52 | - (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item; 53 | - (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item; 54 | - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item; 55 | @end 56 | 57 | @interface VLCPlaylistDataSource (OutlineViewDataSourceDropping) 58 | - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id )info item:(id)item childIndex:(int)index; 59 | - (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id )info proposedItem:(id)item proposedChildIndex:(int)index; 60 | @end 61 | 62 | 63 | -------------------------------------------------------------------------------- /Configure.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Configure script 3 | # 4 | # used by VLCKit.xcodeproj 5 | 6 | if test "x$SYMROOT" = "x"; then 7 | echo " This script is bound to be launched by VLCKit.xcodeproj, not you" 8 | exit 1 9 | fi 10 | 11 | if test "$ACTION" = "clean"; then 12 | rm -Rf $VLC_BUILD_DIR 13 | exit 0 14 | fi 15 | 16 | # Construct the vlc_build_dir 17 | mkdir -p $VLC_BUILD_DIR 18 | cd $VLC_BUILD_DIR 19 | 20 | # Construct the argument list 21 | echo "Building for $ARCHS with sdk=\"$SDKROOT\" in $VLC_BUILD_DIR" 22 | 23 | args="--disable-nls $args" 24 | 25 | # Mac OS X related options 26 | args="--disable-macosx $args" # Disable old gui/macosx 27 | args="--disable-macosx-vlc-app $args" # Don't build old vlc.app 28 | 29 | args="--with-macosx-version-min=10.7 $args" 30 | 31 | # optional modules 32 | args="--enable-merge-ffmpeg $args" 33 | args="--enable-faad $args" 34 | args="--enable-flac $args" 35 | args="--enable-theora $args" 36 | args="--enable-shout $args" 37 | args="--enable-twolame $args" 38 | args="--enable-realrtsp $args" 39 | args="--enable-libass $args" 40 | args="--enable-macosx-audio $args" 41 | args="--enable-macosx-dialog-provider $args" 42 | args="--enable-macosx-eyetv $args" 43 | args="--disable-macosx-qtkit $args" 44 | args="--disable-quicktime $args" 45 | args="--enable-macosx-vout $args" 46 | 47 | # disabled stuff 48 | args="--disable-growl $args" 49 | args="--disable-caca $args" 50 | args="--disable-ncurses $args" 51 | args="--disable-httpd $args" 52 | args="--disable-vlm $args" 53 | args="--disable-skins2 $args" 54 | args="--disable-glx $args" 55 | args="--disable-xvideo $args" 56 | args="--disable-xcb $args" 57 | args="--disable-sdl $args" 58 | args="--disable-sdl-image $args" 59 | args="--disable-samplerate $args" 60 | args="--disable-vda $args" 61 | 62 | if test "x$SDKROOT" != "x" 63 | then 64 | args="--with-macosx-sdk=$SDKROOT $args" 65 | fi 66 | 67 | # Debug Flags 68 | if test "$CONFIGURATION" = "Debug"; then 69 | optim="-g" 70 | else 71 | optim="" 72 | fi 73 | 74 | # 64 bits switches 75 | for arch in $ARCHS; do 76 | this_args="$args" 77 | 78 | # where to install 79 | this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args" 80 | 81 | input="$VLC_SRC_DIR/configure" 82 | output="$arch/Makefile" 83 | if test -e ${output} && test ${output} -nt ${input}; then 84 | echo "No need to re-run configure for $arch" 85 | continue; 86 | fi 87 | 88 | # Construct the vlc_build_dir/$arch 89 | mkdir -p $arch 90 | cd $arch 91 | 92 | if test $arch = "x86_64"; then 93 | export CFLAGS="-m64 -arch x86_64 $optim" 94 | export CXXFLAGS="-m64 -arch x86_64 $optim" 95 | export OBJCFLAGS="-m64 -arch x86_64 $optim" 96 | export CPPFLAGS="-m64 -arch x86_64 $optim" 97 | this_args="--build=x86_64-apple-darwin11 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11 $this_args" 98 | export PATH=$VLC_SRC_DIR/extras/tools/build/bin:$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/bin:$PATH 99 | export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/lib/pkgconfig 100 | fi 101 | echo "Running [$arch] configure $this_args" 102 | 103 | $VLC_SRC_DIR/configure $this_args 104 | err=$? 105 | if test $err != 0; then 106 | exit $err 107 | fi 108 | cd .. 109 | done 110 | -------------------------------------------------------------------------------- /Sources/VLCAudio.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCAudio.m: VLCKit.framework VLCAudio implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Faustino E. Osuna 5 | * Copyright (C) 2007, 2014 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Faustino E. Osuna 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCAudio.h" 26 | #import "VLCLibVLCBridging.h" 27 | 28 | #define VOLUME_STEP 6 29 | #define VOLUME_MAX 200 30 | #define VOLUME_MIN 0 31 | 32 | @interface VLCAudio () 33 | { 34 | void *_instance; 35 | } 36 | @end 37 | 38 | /* Notification Messages */ 39 | NSString *const VLCMediaPlayerVolumeChanged = @"VLCMediaPlayerVolumeChanged"; 40 | 41 | /* libvlc event callback */ 42 | // TODO: Callbacks 43 | 44 | 45 | @implementation VLCAudio 46 | /** 47 | * Use this method instead of instance directly as this one is type checked. 48 | */ 49 | - (libvlc_media_player_t *)instance 50 | { 51 | return _instance; 52 | } 53 | 54 | - (instancetype)init 55 | { 56 | return nil; 57 | } 58 | 59 | - (instancetype)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer 60 | { 61 | self = [super init]; 62 | if (!self) 63 | return nil; 64 | _instance = [mediaPlayer libVLCMediaPlayer]; 65 | libvlc_media_player_retain([self instance]); 66 | return self; 67 | } 68 | 69 | - (void) dealloc 70 | { 71 | libvlc_media_player_release([self instance]); 72 | } 73 | 74 | - (void)setMute:(BOOL)value 75 | { 76 | libvlc_audio_set_mute([self instance], value); 77 | } 78 | 79 | - (BOOL)isMuted 80 | { 81 | return libvlc_audio_get_mute([self instance]); 82 | } 83 | 84 | - (void)setVolume:(int)value 85 | { 86 | if (value < VOLUME_MIN) 87 | value = VOLUME_MIN; 88 | else if (value > VOLUME_MAX) 89 | value = VOLUME_MAX; 90 | libvlc_audio_set_volume([self instance], value); 91 | } 92 | 93 | - (void)volumeUp 94 | { 95 | int tempVolume = [self volume] + VOLUME_STEP; 96 | if (tempVolume > VOLUME_MAX) 97 | tempVolume = VOLUME_MAX; 98 | else if (tempVolume < VOLUME_MIN) 99 | tempVolume = VOLUME_MIN; 100 | [self setVolume: tempVolume]; 101 | } 102 | 103 | - (void)volumeDown 104 | { 105 | int tempVolume = [self volume] - VOLUME_STEP; 106 | if (tempVolume > VOLUME_MAX) 107 | tempVolume = VOLUME_MAX; 108 | else if (tempVolume < VOLUME_MIN) 109 | tempVolume = VOLUME_MIN; 110 | [self setVolume: tempVolume]; 111 | } 112 | 113 | - (int)volume 114 | { 115 | return libvlc_audio_get_volume([self instance]); 116 | } 117 | @end 118 | -------------------------------------------------------------------------------- /Packaging/create-dmg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | info() 5 | { 6 | local green="\033[1;32m" 7 | local normal="\033[0m" 8 | echo "[${green}Package${normal}] $1" 9 | } 10 | 11 | spushd() 12 | { 13 | pushd "$1" > /dev/null 14 | } 15 | 16 | spopd() 17 | { 18 | popd > /dev/null 19 | } 20 | 21 | MOBILE=no 22 | VERBOSE=no 23 | USEZIP=no 24 | 25 | usage() 26 | { 27 | cat << EOF 28 | usage: $0 [options] 29 | 30 | Build vlc in the current directory 31 | 32 | OPTIONS: 33 | -h Show some help 34 | -v Be verbose 35 | -m Package MobileVLCKit 36 | -z Use zip file format 37 | EOF 38 | 39 | } 40 | 41 | while getopts "hvmz" OPTION 42 | do 43 | case $OPTION in 44 | h) 45 | usage 46 | exit 1 47 | ;; 48 | v) 49 | VERBOSE=yes 50 | ;; 51 | m) 52 | MOBILE=yes 53 | ;; 54 | z) 55 | USEZIP=yes 56 | ;; 57 | esac 58 | done 59 | shift $(($OPTIND - 1)) 60 | 61 | out="/dev/null" 62 | if [ "$VERBOSE" = "yes" ]; then 63 | out="/dev/stdout" 64 | fi 65 | 66 | if [ "x$1" != "x" ]; then 67 | usage 68 | exit 1 69 | fi 70 | 71 | root=`dirname $0`/../ 72 | 73 | DMGFOLDERNAME="VLCKit - binary package" 74 | DMGITEMNAME="VLCKit-REPLACEWITHVERSION" 75 | 76 | if [ "$MOBILE" = "yes" ]; then 77 | if [ "$USEZIP" = "yes" ]; then 78 | DMGFOLDERNAME="MobileVLCKit-binary" 79 | else 80 | DMGFOLDERNAME="MobileVLCKit - binary package" 81 | fi 82 | DMGITEMNAME="MobileVLCKit-REPLACEWITHVERSION" 83 | fi 84 | 85 | info "checking for distributable binary package" 86 | 87 | spushd ${root} 88 | if [ "$MOBILE" = "no" ]; then 89 | if [ ! -e "VLCKit" ]; then 90 | info "VLCKit not found for distribution, creating..." 91 | if [ "$VERBOSE" = "yes" ]; then 92 | make VLCKit V=1 93 | else 94 | make VLCKit 95 | fi 96 | fi 97 | else 98 | if [ ! -e "build/MobileVLCKit.framework" ]; then 99 | info "MobileVLCKit not found for distribution, creating... this will take long" 100 | ./buildMobileVLCKit.sh -f 101 | fi 102 | fi 103 | 104 | if [ ! -e "${DMGFOLDERNAME}" ]; then 105 | info "Collecting items" 106 | mkdir -p "${DMGFOLDERNAME}" 107 | mkdir -p "${DMGFOLDERNAME}/Sample Code" 108 | if [ "$MOBILE" = "no" ]; then 109 | cp -R VLCKit/* "${DMGFOLDERNAME}" 110 | cp -R Examples_OSX/* "${DMGFOLDERNAME}/Sample Code" 111 | else 112 | cp -R build/MobileVLCKit.framework "${DMGFOLDERNAME}" 113 | cp -R Examples_iOS/* "${DMGFOLDERNAME}/Sample Code" 114 | cp COPYING "${DMGFOLDERNAME}" 115 | fi 116 | cp NEWS "${DMGFOLDERNAME}" 117 | spushd "${DMGFOLDERNAME}" 118 | mv NEWS NEWS.txt 119 | mv COPYING COPYING.txt 120 | spopd 121 | rm -f ${DMGITEMNAME}-rw.dmg 122 | fi 123 | 124 | if [ "$USEZIP" = "no" ]; then 125 | info "Creating disk-image" 126 | hdiutil create -srcfolder "${DMGFOLDERNAME}" "${DMGITEMNAME}-rw.dmg" -scrub -format UDRW 127 | mkdir -p ./mount 128 | 129 | info "Moving file icons around" 130 | hdiutil attach -readwrite -noverify -noautoopen -mountRoot ./mount ${DMGITEMNAME}-rw.dmg 131 | if [ "$MOBILE" = "no" ]; then 132 | osascript Packaging/dmg_setup.scpt "${DMGFOLDERNAME}" 133 | else 134 | osascript Packaging/mobile_dmg_setup.scpt "${DMGFOLDERNAME}" 135 | fi 136 | hdiutil detach ./mount/"${DMGFOLDERNAME}" 137 | 138 | info "Compressing disk-image" 139 | rm -f ${DMGITEMNAME}.dmg 140 | hdiutil convert "${DMGITEMNAME}-rw.dmg" -format UDBZ -o "${DMGITEMNAME}.dmg" 141 | rm -f ${DMGITEMNAME}-rw.dmg 142 | rm -rf "${DMGFOLDERNAME}" 143 | else 144 | info "Creating zip-archive" 145 | zip -r ${DMGITEMNAME}.zip "${DMGFOLDERNAME}" 146 | fi 147 | 148 | spopd 149 | 150 | info "Distributable package created" 151 | -------------------------------------------------------------------------------- /Sources/VLCVideoLayer.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCVideoLayer.m: VLCKit.framework VLCVideoLayer implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCVideoLayer.h" 26 | #import "VLCLibrary.h" 27 | #import "VLCEventManager.h" 28 | #import "VLCVideoCommon.h" 29 | 30 | /* Libvlc */ 31 | #ifdef HAVE_CONFIG_H 32 | # include "config.h" 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | #import 39 | 40 | /****************************************************************************** 41 | * VLCVideoLayer (Private) 42 | */ 43 | 44 | @interface VLCVideoLayer () 45 | 46 | @property (nonatomic, readwrite) BOOL hasVideo; 47 | 48 | - (void)addVoutLayer:(CALayer *)aLayer; 49 | 50 | @end 51 | 52 | /****************************************************************************** 53 | * Implementation VLCVideoLayer 54 | */ 55 | 56 | @implementation VLCVideoLayer 57 | 58 | - (BOOL)fillScreen 59 | { 60 | return [self.layoutManager fillScreenEntirely]; 61 | } 62 | 63 | - (void)setFillScreen:(BOOL)fillScreen 64 | { 65 | [self.layoutManager setFillScreenEntirely:fillScreen]; 66 | [self setNeedsLayout]; 67 | } 68 | 69 | /****************************************************************************** 70 | * Implementation VLCVideoLayer (Private) 71 | */ 72 | 73 | /* This is called by the libvlc module 'opengllayer' as soon as there is one 74 | * vout available 75 | */ 76 | - (void)addVoutLayer:(CALayer *)voutLayer 77 | { 78 | [CATransaction begin]; 79 | 80 | voutLayer.name = @"vlcopengllayer"; 81 | 82 | VLCVideoLayoutManager * layoutManager = [VLCVideoLayoutManager layoutManager]; 83 | layoutManager.originalVideoSize = voutLayer.bounds.size; 84 | self.layoutManager = layoutManager; 85 | 86 | [self insertSublayer:voutLayer atIndex:0]; 87 | [self setNeedsDisplayOnBoundsChange:YES]; 88 | 89 | [CATransaction commit]; 90 | 91 | /* Trigger by hand, as it doesn't go through else. Assumed bug from Cocoa */ 92 | [self willChangeValueForKey:@"hasVideo"]; 93 | self.hasVideo = YES; 94 | [self didChangeValueForKey:@"hasVideo"]; 95 | } 96 | 97 | - (void)removeVoutLayer:(CALayer*)voutLayer 98 | { 99 | [CATransaction begin]; 100 | [voutLayer removeFromSuperlayer]; 101 | [CATransaction commit]; 102 | 103 | /* Trigger by hand, as it doesn't go through else. Assumed bug from Cocoa */ 104 | [self willChangeValueForKey:@"hasVideo"]; 105 | _hasVideo = NO; 106 | [self didChangeValueForKey:@"hasVideo"]; 107 | } 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /Examples_iOS/SimplePlayback/SimplePlayback/VDLAppDelegate.m: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import "VDLAppDelegate.h" 27 | 28 | #import "VDLViewController.h" 29 | 30 | @implementation VDLAppDelegate 31 | 32 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 33 | { 34 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 35 | // Override point for customization after application launch. 36 | self.viewController = [[VDLViewController alloc] initWithNibName:@"VDLViewController" bundle:nil]; 37 | self.window.rootViewController = self.viewController; 38 | [self.window makeKeyAndVisible]; 39 | return YES; 40 | } 41 | 42 | - (void)applicationWillResignActive:(UIApplication *)application 43 | { 44 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 45 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 46 | } 47 | 48 | - (void)applicationDidEnterBackground:(UIApplication *)application 49 | { 50 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 51 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 52 | } 53 | 54 | - (void)applicationWillEnterForeground:(UIApplication *)application 55 | { 56 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 57 | } 58 | 59 | - (void)applicationDidBecomeActive:(UIApplication *)application 60 | { 61 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 62 | } 63 | 64 | - (void)applicationWillTerminate:(UIApplication *)application 65 | { 66 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0005-freetype-added-a-fake-font-lookup-mechanism-for-iOS-.patch: -------------------------------------------------------------------------------- 1 | From 16d400237fcab9d20bfb1c6fc723d591102ded76 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Wed, 22 Jan 2014 13:55:16 +0100 4 | Subject: [PATCH 05/10] freetype: added a fake font lookup mechanism for iOS to 5 | use the packaged demo fonts 6 | 7 | --- 8 | modules/text_renderer/freetype.c | 2 ++ 9 | modules/text_renderer/platform_fonts.c | 40 ++++++++++++++++++++++++++++++++++ 10 | modules/text_renderer/platform_fonts.h | 3 +++ 11 | 3 files changed, 45 insertions(+) 12 | 13 | diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c 14 | index 2773779..3bca706 100644 15 | --- a/modules/text_renderer/freetype.c 16 | +++ b/modules/text_renderer/freetype.c 17 | @@ -1280,6 +1280,8 @@ static int Create( vlc_object_t *p_this ) 18 | #elif defined( __APPLE__ ) 19 | #if !TARGET_OS_IPHONE 20 | p_sys->pf_select = MacLegacy_Select; 21 | +#else 22 | + p_sys->pf_select = iOSFake_Select; 23 | #endif 24 | #elif defined( _WIN32 ) && defined( HAVE_GET_FONT_BY_FAMILY_NAME ) 25 | p_sys->pf_select = Win32_Select; 26 | diff --git a/modules/text_renderer/platform_fonts.c b/modules/text_renderer/platform_fonts.c 27 | index 7869dba..deeaa7d 100644 28 | --- a/modules/text_renderer/platform_fonts.c 29 | +++ b/modules/text_renderer/platform_fonts.c 30 | @@ -42,6 +42,9 @@ 31 | #include 32 | #if !TARGET_OS_IPHONE 33 | #include 34 | +#else 35 | +#include 36 | +#include 37 | #endif 38 | #include /* for MAXPATHLEN */ 39 | #undef HAVE_FONTCONFIG 40 | @@ -405,6 +408,43 @@ char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname, 41 | 42 | return psz_path; 43 | } 44 | +#else 45 | +char *iOSFake_Select( filter_t *p_filter, const char* psz_fontname, 46 | + bool b_bold, bool b_italic, int i_size, int *i_idx ) 47 | +{ 48 | + VLC_UNUSED(p_filter); 49 | + VLC_UNUSED(psz_fontname); 50 | + VLC_UNUSED(b_bold); 51 | + VLC_UNUSED(b_italic); 52 | + VLC_UNUSED(i_size); 53 | + VLC_UNUSED(i_idx); 54 | + 55 | + CFURLRef fileURL; 56 | + fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), 57 | + CFSTR("OpenSans-Regular.ttf"), 58 | + NULL, 59 | + NULL); 60 | + if (!fileURL) 61 | + return NULL; 62 | + CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle); 63 | + CFRelease(fileURL); 64 | + 65 | + if (!urlString) 66 | + return NULL; 67 | + 68 | + CFIndex length = CFStringGetLength(urlString); 69 | + if (!length) 70 | + return NULL; 71 | + length++; 72 | + 73 | + char *psz_path = (char *)malloc(length); 74 | + CFStringGetCString(urlString, psz_path, length, kCFStringEncodingUTF8); 75 | + CFRelease(urlString); 76 | + 77 | + psz_path = strdup(psz_path); 78 | + 79 | + return psz_path; 80 | +} 81 | #endif 82 | #endif 83 | 84 | diff --git a/modules/text_renderer/platform_fonts.h b/modules/text_renderer/platform_fonts.h 85 | index cff52b1..40b25fb 100644 86 | --- a/modules/text_renderer/platform_fonts.h 87 | +++ b/modules/text_renderer/platform_fonts.h 88 | @@ -95,6 +95,9 @@ char* Win32_Select( filter_t *p_filter, const char* family, 89 | #if !TARGET_OS_IPHONE 90 | char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname, 91 | bool b_bold, bool b_italic, int i_size, int *i_idx ); 92 | +#else 93 | +char *iOSFake_Select( filter_t *p_filter, const char* psz_fontname, 94 | + bool b_bold, bool b_italic, int i_size, int *i_idx ); 95 | #endif 96 | #endif 97 | 98 | -- 99 | 2.4.4 100 | 101 | -------------------------------------------------------------------------------- /Headers/Internal/VLCEventManager.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCEventManager.h: VLCKit.framework VLCEventManager header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | 27 | /** 28 | * The VLCEventManager class provides a safe way for inter-thread communications. 29 | */ 30 | @interface VLCEventManager : NSObject 31 | 32 | /* Factories */ 33 | /** 34 | * Returns the shared VLCEventManager. There should only be one instance of this class. 35 | * \return Shared event manager. 36 | */ 37 | + (id)sharedManager; 38 | 39 | /* Operations */ 40 | /** 41 | * Sends a message to the target's delegate on the main thread. 42 | * \discussion The main thread is the one in which the main run loop is run, which usually 43 | * means the one in which the NSApplication object receives events. The method is performed 44 | * when the main thread runs the run loop in one of the common run loop modes (as specified 45 | * in the CFRunLoop documentation). 46 | * 47 | * The receiver is retained until the call is finished. 48 | * \param aTarget The target object who's delegate should receive the specified message. 49 | * \param aSelector A selector that identifies the method to invoke. The method should not 50 | * have a significant return value and should take a single argument of type NSNotification, 51 | * or no arguments. 52 | * 53 | * See ‚ÄúSelectors‚Äù for a description of the SEL type. 54 | * \param aNotificiationName The name of the notification that should be sent to the 55 | * distributed notification center. 56 | */ 57 | - (void)callOnMainThreadDelegateOfObject:(id)aTarget 58 | withDelegateMethod:(SEL)aSelector 59 | withNotificationName:(NSString *)aNotificationName; 60 | 61 | /** 62 | * Sends a message to the target on the main thread. 63 | * \discussion The main thread is the one in which the main run loop is run, which usually 64 | * means the one in which the NSApplication object receives events. The method is performed 65 | * when the main thread runs the run loop in one of the common run loop modes (as specified 66 | * in the CFRunLoop documentation). 67 | * 68 | * The receiver and arg are retained until the call is finished. 69 | * \param aTarget The target object who should receive the specified message. 70 | * \param aSelector A selector that identifies the method to invoke. The method should not 71 | * have a significant return value and should take a single argument of type id, 72 | * or no arguments. 73 | * 74 | * See ‚ÄúSelectors‚Äù for a description of the SEL type. 75 | * \param arg The argument to pass in the message. Pass nil if the method does not take an 76 | * argument. 77 | * distributed notification center. 78 | */ 79 | - (void)callOnMainThreadObject:(id)aTarget 80 | withMethod:(SEL)aSelector 81 | withArgumentAsObject:(id)arg; 82 | 83 | - (void)cancelCallToObject:(id)target; 84 | @end 85 | -------------------------------------------------------------------------------- /Headers/Public/VLCLibrary.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCLibrary.h: VLCKit.framework VLCLibrary header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import 26 | #import "VLCMediaList.h" 27 | #import "VLCMedia.h" 28 | 29 | /** 30 | * The VLCLibrary is the base library of the VLCKit.framework. This object provides a shared instance that exposes the 31 | * internal functionalities of libvlc and libvlc-control. The VLCLibrary object is instantiated automatically when 32 | * VLCKit.framework is loaded into memory. Also, it is automatically destroyed when the VLCKit.framework is unloaded 33 | * from memory. 34 | * 35 | * Currently, the framework does not support multiple instances of VLCLibrary. Furthermore, you cannot destroy any 36 | * instiantiation of VLCLibrary, as previously noted, this is done automatically by the dynamic link loader. 37 | */ 38 | @interface VLCLibrary : NSObject 39 | 40 | /* Factories */ 41 | /** 42 | * Returns the library's shared instance. 43 | * \return The library's shared instance. 44 | */ 45 | + (VLCLibrary *)sharedLibrary; 46 | 47 | /** 48 | * returns an individual instance which can be customized with options 49 | * \param a NSArray with NSString instance containing the options 50 | * \return the individual library instance 51 | */ 52 | - (instancetype)initWithOptions:(NSArray*)options; 53 | 54 | /** 55 | * enables/disables debug logging 56 | * \param BOOL value to enable/disable 57 | * \note we will always log using NSLog 58 | * \return debug logging state 59 | */ 60 | @property (readwrite, nonatomic) BOOL debugLogging; 61 | 62 | /** 63 | * gets/sets the debug logging level 64 | * \param int set level from 0 (all) to 4 (just error messages) 65 | * \return int debug level 66 | */ 67 | @property (readwrite, nonatomic) int debugLoggingLevel; 68 | 69 | /** 70 | * Returns the library's version 71 | * \return The library version example "0.9.0-git Grishenko". 72 | */ 73 | 74 | @property (readonly, copy) NSString *version; 75 | 76 | /** 77 | * Returns the compiler used to build the libvlc binary 78 | * \return The compiler version string. 79 | */ 80 | 81 | @property (readonly, copy) NSString *compiler; 82 | 83 | /** 84 | * Returns the library's changeset 85 | * \return The library version example "adfee99". 86 | */ 87 | 88 | @property (readonly, copy) NSString *changeset; 89 | 90 | /** 91 | * sets the application name and HTTP User Agend 92 | * libvlc will pass it to servers when required by protocol 93 | * \param readableName human-readable application name, e.g. "FooBar player 1.2.3" 94 | * \param userAgent HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0" 95 | */ 96 | - (void)setHumanReadableName:(NSString *)readableName withHTTPUserAgent:(NSString *)userAgent; 97 | 98 | /** 99 | * Sets some meta-information about the application. 100 | * 101 | * \param identifier Java-style application identifier, e.g. "com.acme.foobar" 102 | * \param version application version numbers, e.g. "1.2.3" 103 | * \param icon application icon name, e.g. "foobar" 104 | */ 105 | - (void)setApplicationIdentifier:(NSString *)identifier withVersion:(NSString *)version andApplicationIconName:(NSString *)icon; 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /Sources/VLCMediaDiscoverer.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaDiscoverer.m: VLCKit.framework VLCMediaDiscoverer implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2014-2015 Felix Paul Kühne 6 | * Copyright (C) 2007, 2015 VLC authors and VideoLAN 7 | * $Id$ 8 | * 9 | * Authors: Pierre d'Herbemont 10 | * Felix Paul Kühne 11 | * 12 | * This program is free software; you can redistribute it and/or modify it 13 | * under the terms of the GNU Lesser General Public License as published by 14 | * the Free Software Foundation; either version 2.1 of the License, or 15 | * (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Lesser General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Lesser General Public License 23 | * along with this program; if not, write to the Free Software Foundation, 24 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 25 | *****************************************************************************/ 26 | 27 | #import "VLCMediaDiscoverer.h" 28 | #import "VLCLibrary.h" 29 | #import "VLCLibVLCBridging.h" 30 | #import "VLCEventManager.h" 31 | 32 | #include 33 | #include 34 | 35 | @interface VLCMediaDiscoverer () 36 | { 37 | NSString *_localizedName; 38 | VLCMediaList *_discoveredMedia; 39 | void *_mdis; 40 | BOOL _running; 41 | 42 | VLCLibrary *_privateLibrary; 43 | } 44 | @end 45 | 46 | @implementation VLCMediaDiscoverer 47 | @synthesize libraryInstance = _privateLibrary; 48 | 49 | + (NSArray *)availableMediaDiscoverer 50 | { 51 | return @[]; 52 | } 53 | 54 | - (instancetype)initWithName:(NSString *)aServiceName 55 | { 56 | if (self = [super init]) { 57 | _localizedName = nil; 58 | _discoveredMedia = nil; 59 | 60 | _privateLibrary = [VLCLibrary sharedLibrary]; 61 | libvlc_retain([_privateLibrary instance]); 62 | 63 | _mdis = libvlc_media_discoverer_new([_privateLibrary instance], 64 | [aServiceName UTF8String]); 65 | 66 | if (_mdis == NULL) { 67 | VKLog(@"media discovery initialization failed, maybe no such module?"); 68 | return NULL; 69 | } 70 | } 71 | return self; 72 | } 73 | 74 | - (void)dealloc 75 | { 76 | if (_running) 77 | [self stopDiscoverer]; 78 | 79 | [[VLCEventManager sharedManager] cancelCallToObject:self]; 80 | 81 | libvlc_media_discoverer_release(_mdis); 82 | 83 | libvlc_release(_privateLibrary.instance); 84 | } 85 | 86 | - (int)startDiscoverer 87 | { 88 | int returnValue = libvlc_media_discoverer_start(_mdis); 89 | if (returnValue == -1) { 90 | VKLog(@"media discovery start failed"); 91 | _running = NO; 92 | return returnValue; 93 | } 94 | 95 | _running = libvlc_media_discoverer_is_running(_mdis); 96 | 97 | libvlc_media_list_t *p_mlist = libvlc_media_discoverer_media_list(_mdis); 98 | VLCMediaList *ret = [VLCMediaList mediaListWithLibVLCMediaList:p_mlist]; 99 | libvlc_media_list_release(p_mlist); 100 | 101 | _discoveredMedia = ret; 102 | 103 | return returnValue; 104 | } 105 | 106 | - (void)stopDiscoverer 107 | { 108 | if (!_mdis) { 109 | _running = NO; 110 | return; 111 | } 112 | 113 | libvlc_media_discoverer_stop(_mdis); 114 | _running = libvlc_media_discoverer_is_running(_mdis); 115 | } 116 | 117 | - (VLCMediaList *)discoveredMedia 118 | { 119 | return _discoveredMedia; 120 | } 121 | 122 | - (NSString *)localizedName 123 | { 124 | if (_localizedName) 125 | return _localizedName; 126 | 127 | char *name = libvlc_media_discoverer_localized_name(_mdis); 128 | if (name) { 129 | _localizedName = @(name); 130 | free(name); 131 | } 132 | return _localizedName; 133 | } 134 | 135 | - (BOOL)isRunning 136 | { 137 | return _running; 138 | } 139 | 140 | @end 141 | -------------------------------------------------------------------------------- /Sources/VLCVideoView.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCVideoView.m: VLCKit.framework VLCVideoView implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCVideoView.h" 26 | #import "VLCLibrary.h" 27 | #import "VLCEventManager.h" 28 | #import "VLCVideoCommon.h" 29 | 30 | /* Libvlc */ 31 | #ifdef HAVE_CONFIG_H 32 | # include "config.h" 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | #import 39 | 40 | /****************************************************************************** 41 | * Soon deprecated stuff 42 | */ 43 | 44 | /* This is a forward reference to VLCOpenGLVoutView specified in minimal_macosx 45 | library. We could get rid of this, but it prevents warnings from the 46 | compiler. (Scheduled to deletion) */ 47 | @interface VLCOpenGLVoutView : NSView 48 | - (void)detachFromVout; 49 | @end 50 | 51 | /****************************************************************************** 52 | * VLCVideoView (Private) 53 | */ 54 | 55 | @interface VLCVideoView () 56 | 57 | @property (nonatomic, readwrite) BOOL hasVideo; 58 | @property (nonatomic, retain) VLCVideoLayoutManager *layoutManager; 59 | 60 | - (void)addVoutLayer:(CALayer *)aLayer; 61 | 62 | @end 63 | 64 | /****************************************************************************** 65 | * Implementation VLCVideoView 66 | */ 67 | 68 | @implementation VLCVideoView 69 | 70 | /* Initializers */ 71 | - (instancetype)initWithFrame:(NSRect)rect 72 | { 73 | if (self = [super initWithFrame:rect]) 74 | { 75 | self.backColor = [NSColor blackColor]; 76 | self.autoresizesSubviews = YES; 77 | self.layoutManager = [VLCVideoLayoutManager layoutManager]; 78 | } 79 | return self; 80 | } 81 | 82 | /* NSView Overrides */ 83 | - (void)drawRect:(NSRect)aRect 84 | { 85 | [self lockFocus]; 86 | [self.backColor set]; 87 | NSRectFill(aRect); 88 | [self unlockFocus]; 89 | } 90 | 91 | - (BOOL)isOpaque 92 | { 93 | return YES; 94 | } 95 | 96 | - (BOOL)fillScreen 97 | { 98 | return [self.layoutManager fillScreenEntirely]; 99 | } 100 | 101 | - (void)setFillScreen:(BOOL)fillScreen 102 | { 103 | [self.layoutManager setFillScreenEntirely:fillScreen]; 104 | [self.layer setNeedsLayout]; 105 | } 106 | 107 | /****************************************************************************** 108 | * Implementation VLCVideoView (Private) 109 | */ 110 | 111 | /* This is called by the libvlc module 'opengllayer' as soon as there is one 112 | * vout available 113 | */ 114 | - (void)addVoutLayer:(CALayer *)aLayer 115 | { 116 | aLayer.name = @"vlcopengllayer"; 117 | 118 | [CATransaction begin]; 119 | 120 | self.wantsLayer = YES; 121 | CALayer * rootLayer = self.layer; 122 | 123 | [self.layoutManager setOriginalVideoSize:aLayer.bounds.size]; 124 | [rootLayer setLayoutManager:self.layoutManager]; 125 | [rootLayer insertSublayer:aLayer atIndex:0]; 126 | [aLayer setNeedsDisplayOnBoundsChange:YES]; 127 | 128 | [CATransaction commit]; 129 | 130 | self.hasVideo = YES; 131 | } 132 | 133 | - (void)removeVoutLayer:(CALayer *)voutLayer 134 | { 135 | [CATransaction begin]; 136 | [voutLayer removeFromSuperlayer]; 137 | [CATransaction commit]; 138 | 139 | self.hasVideo = NO; 140 | } 141 | 142 | @end 143 | 144 | -------------------------------------------------------------------------------- /Headers/Public/VLCMediaList.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaList.h: VLCKit.framework VLCMediaList header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2015 Felix Paul Kühne 6 | * Copyright (C) 2007, 2015 VLC authors and VideoLAN 7 | * $Id$ 8 | * 9 | * Authors: Pierre d'Herbemont 10 | * 11 | * This program is free software; you can redistribute it and/or modify it 12 | * under the terms of the GNU Lesser General Public License as published by 13 | * the Free Software Foundation; either version 2.1 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Lesser General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with this program; if not, write to the Free Software Foundation, 23 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 24 | *****************************************************************************/ 25 | 26 | #import 27 | #import "VLCMedia.h" 28 | 29 | /* Notification Messages */ 30 | extern NSString *const VLCMediaListItemAdded; 31 | extern NSString *const VLCMediaListItemDeleted; 32 | 33 | @class VLCMedia; 34 | @class VLCMediaList; 35 | 36 | /** 37 | * VLCMediaListDelegate 38 | */ 39 | @protocol VLCMediaListDelegate 40 | @optional 41 | /** 42 | * delegate method triggered when a media was added to the list 43 | * 44 | * \param the media list 45 | * \param the media object that was added 46 | * \param the index the media object was added at 47 | */ 48 | - (void)mediaList:(VLCMediaList *)aMediaList mediaAdded:(VLCMedia *)media atIndex:(NSInteger)index; 49 | 50 | /** 51 | * delegate method triggered when a media was removed from the list 52 | * 53 | * \param the media list 54 | * \param the index a media item was deleted at 55 | */ 56 | - (void)mediaList:(VLCMediaList *)aMediaList mediaRemovedAtIndex:(NSInteger)index; 57 | @end 58 | 59 | /** 60 | * VLCMediaList 61 | */ 62 | @interface VLCMediaList : NSObject 63 | 64 | - (instancetype)initWithArray:(NSArray *)array; 65 | 66 | /* Operations */ 67 | /** 68 | * lock the media list from being edited by another thread 69 | */ 70 | - (void)lock; 71 | 72 | /** 73 | * unlock the media list from being edited by another thread 74 | */ 75 | - (void)unlock; 76 | 77 | /** 78 | * add a media to a read-write list 79 | * 80 | * \param the media object to add 81 | * \return the index of the newly added media 82 | * \note this function silently fails if the list is read-only 83 | */ 84 | - (NSInteger)addMedia:(VLCMedia *)media; 85 | 86 | /** 87 | * add a media to a read-write list at a given position 88 | * 89 | * \param the media object to add 90 | * \param the index where to add the given media 91 | * \note this function silently fails if the list is read-only 92 | */ 93 | - (void)insertMedia:(VLCMedia *)media atIndex:(NSInteger)index; 94 | 95 | /** 96 | * remove a media from a given position 97 | * 98 | * \param the index of the media to remove 99 | * \note this function silently fails if the list is read-only 100 | */ 101 | - (void)removeMediaAtIndex:(NSInteger)index; 102 | 103 | /** 104 | * retrieve a media from a given position 105 | * 106 | * \param the index of the media you want 107 | * \return the media object 108 | */ 109 | - (VLCMedia *)mediaAtIndex:(NSInteger)index; 110 | 111 | /** 112 | * retrieve the position of a media item 113 | * 114 | * \param the media object to search for 115 | * \return the index position of the media in the list or -1 if not found 116 | */ 117 | - (NSInteger)indexOfMedia:(VLCMedia *)media; 118 | 119 | /* Properties */ 120 | /** 121 | * number of media items in the list 122 | * \return the number of media objects 123 | */ 124 | @property (readonly) NSInteger count; 125 | 126 | /** 127 | * delegate property to listen to addition/removal events 128 | */ 129 | @property (weak) id delegate; 130 | 131 | /** 132 | * read-only property to check if the media list is writable or not 133 | * \return boolean value if the list is read-only 134 | */ 135 | @property (readonly) BOOL isReadOnly; 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /Examples_iOS/DropIn-Player/Dropin-Player/VDLAppDelegate.m: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, Felix Paul Kühne and VideoLAN 2 | * All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1. Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. */ 25 | 26 | #import "VDLAppDelegate.h" 27 | 28 | #import "VDLMainViewController.h" 29 | #import "VDLPlaybackViewController.h" 30 | 31 | @interface VDLAppDelegate () 32 | { 33 | VDLPlaybackViewController *_playbackViewController; 34 | } 35 | 36 | @end 37 | 38 | @implementation VDLAppDelegate 39 | 40 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 41 | { 42 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 43 | // Override point for customization after application launch. 44 | self.viewController = [[VDLMainViewController alloc] initWithNibName:nil bundle:nil]; 45 | self.window.rootViewController = self.viewController; 46 | 47 | /* load the playback VC we will inevitably need later */ 48 | _playbackViewController = [[VDLPlaybackViewController alloc] initWithNibName:nil bundle:nil]; 49 | 50 | [self.window makeKeyAndVisible]; 51 | return YES; 52 | } 53 | 54 | - (void)applicationWillResignActive:(UIApplication *)application 55 | { 56 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 57 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 58 | } 59 | 60 | - (void)applicationDidEnterBackground:(UIApplication *)application 61 | { 62 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 63 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 64 | } 65 | 66 | - (void)applicationWillEnterForeground:(UIApplication *)application 67 | { 68 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 69 | } 70 | 71 | - (void)applicationDidBecomeActive:(UIApplication *)application 72 | { 73 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 74 | } 75 | 76 | - (void)applicationWillTerminate:(UIApplication *)application 77 | { 78 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 79 | } 80 | 81 | - (void)playStreamFromURL:(NSURL *)url 82 | { 83 | UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:_playbackViewController]; 84 | navCon.modalPresentationStyle = UIModalPresentationFullScreen; 85 | [self.window.rootViewController presentViewController:navCon animated:YES completion:nil]; 86 | 87 | [_playbackViewController playMediaFromURL:url]; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /Sources/VLCStreamSession.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCStreamSession.m: VLCKit.framework VLCStreamSession implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2008 Pierre d'Herbemont 5 | * Copyright (C) 2008 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCStreamSession.h" 26 | #import "VLCLibVLCBridging.h" 27 | 28 | @interface VLCStreamSession () 29 | 30 | @property (nonatomic, readwrite) BOOL isComplete; 31 | @property (nonatomic, readwrite) NSUInteger reattemptedConnections; 32 | 33 | @end 34 | 35 | @implementation VLCStreamSession 36 | 37 | - (instancetype)init 38 | { 39 | if( self = [super init] ) 40 | { 41 | [self addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil]; 42 | } 43 | return self; 44 | } 45 | 46 | - (void)dealloc 47 | { 48 | [self removeObserver:self forKeyPath:@"state"]; 49 | } 50 | 51 | + (instancetype)streamSession 52 | { 53 | return [[self alloc] init]; 54 | } 55 | 56 | 57 | - (void)startStreaming 58 | { 59 | self.isComplete = NO; 60 | [self play]; 61 | } 62 | 63 | - (void)stopStreaming 64 | { 65 | self.isComplete = YES; 66 | [super stop]; 67 | } 68 | 69 | - (BOOL)play 70 | { 71 | NSString * libvlcArgs; 72 | if( self.drawable ) 73 | libvlcArgs = [NSString stringWithFormat:@"#duplicate{dst=display,dst=\"%@\"}",[_streamOutput representedLibVLCOptions]]; 74 | else 75 | libvlcArgs = [_streamOutput representedLibVLCOptions]; 76 | if( libvlcArgs ) 77 | { 78 | [super setMedia:[VLCMedia mediaWithMedia:self.media 79 | andLibVLCOptions:@{ 80 | @"sout" : libvlcArgs 81 | }]]; 82 | } 83 | else 84 | { 85 | [super setMedia: self.media]; 86 | } 87 | [super play]; 88 | return YES; 89 | } 90 | 91 | + (NSSet *)keyPathsForValuesAffectingDescription 92 | { 93 | return [NSSet setWithObjects:@"isCompleted", @"state", nil]; 94 | } 95 | 96 | - (NSString *)description 97 | { 98 | if ([self isComplete]) 99 | return @"Done."; 100 | 101 | if ([self state] == VLCMediaPlayerStateError) 102 | return @"Error while Converting. Open Console.app to diagnose."; 103 | 104 | return @"Converting..."; 105 | } 106 | 107 | + (NSSet *)keyPathsForValuesAffectingEncounteredError 108 | { 109 | return [NSSet setWithObjects:@"state", nil]; 110 | } 111 | 112 | - (BOOL)encounteredError; 113 | { 114 | return ([self state] == VLCMediaPlayerStateError); 115 | } 116 | 117 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 118 | { 119 | if([keyPath isEqualToString:@"state"]) 120 | { 121 | if( (([self position] == 1.0 || [self state] == VLCMediaPlayerStateEnded || ([self state] == VLCMediaPlayerStateStopped && self.media)) || 122 | [self encounteredError] ) && ![super.media subitems] ) 123 | { 124 | self.isComplete = YES; 125 | return; 126 | } 127 | if( _reattemptedConnections > 4 ) 128 | return; 129 | 130 | /* Our media has in fact gained subitems, let's change our playing media */ 131 | if( [[super.media subitems] count] > 0 ) 132 | { 133 | [self stop]; 134 | self.media = [[super.media subitems] mediaAtIndex:0]; 135 | [self play]; 136 | _reattemptedConnections++; 137 | } 138 | return; 139 | } 140 | [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; 141 | } 142 | 143 | @end 144 | -------------------------------------------------------------------------------- /Sources/VLCTime.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCTime.m: VLCKit.framework VLCTime implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCTime.h" 26 | 27 | @implementation VLCTime 28 | 29 | /* Factories */ 30 | + (VLCTime *)nullTime 31 | { 32 | static VLCTime * nullTime = nil; 33 | static dispatch_once_t onceToken; 34 | dispatch_once(&onceToken, ^{ 35 | nullTime = [VLCTime timeWithNumber:nil]; 36 | }); 37 | return nullTime; 38 | } 39 | 40 | + (VLCTime *)timeWithNumber:(NSNumber *)aNumber 41 | { 42 | return [[VLCTime alloc] initWithNumber:aNumber]; 43 | } 44 | 45 | + (VLCTime *)timeWithInt:(int)aInt 46 | { 47 | return [[VLCTime alloc] initWithInt:aInt]; 48 | } 49 | 50 | /* Initializers */ 51 | - (instancetype)initWithNumber:(NSNumber *)aNumber 52 | { 53 | if (self = [super init]) { 54 | _value = aNumber; 55 | } 56 | return self; 57 | } 58 | 59 | - (instancetype)initWithInt:(int)aInt 60 | { 61 | if (self = [super init]) { 62 | if (aInt) 63 | _value = @(aInt); 64 | } 65 | return self; 66 | } 67 | 68 | /* NSObject Overrides */ 69 | - (NSString *)description 70 | { 71 | return self.stringValue; 72 | } 73 | 74 | - (NSNumber *)numberValue 75 | { 76 | return _value; 77 | } 78 | 79 | - (NSString *)stringValue 80 | { 81 | if (_value) { 82 | long long duration = [_value longLongValue] / 1000; 83 | long long positiveDuration = llabs(duration); 84 | if (positiveDuration > 3600) 85 | return [NSString stringWithFormat:@"%s%01ld:%02ld:%02ld", 86 | duration < 0 ? "-" : "", 87 | (long) (positiveDuration / 3600), 88 | (long)((positiveDuration / 60) % 60), 89 | (long) (positiveDuration % 60)]; 90 | else 91 | return [NSString stringWithFormat:@"%s%02ld:%02ld", 92 | duration < 0 ? "-" : "", 93 | (long)((positiveDuration / 60) % 60), 94 | (long) (positiveDuration % 60)]; 95 | } else { 96 | // Return a string that represents an undefined time. 97 | return @"--:--"; 98 | } 99 | } 100 | 101 | - (NSString *)verboseStringValue 102 | { 103 | if (_value) { 104 | long long duration = [_value longLongValue] / 1000; 105 | long long positiveDuration = llabs(duration); 106 | long hours = (long)(positiveDuration / 3600); 107 | long mins = (long)((positiveDuration / 60) % 60); 108 | long seconds = (long)(positiveDuration % 60); 109 | const char * remaining = duration < 0 ? " remaining" : ""; 110 | if (hours > 0) 111 | return [NSString stringWithFormat:@"%ld hours %ld minutes%s", hours, mins, remaining]; 112 | if (mins > 5) 113 | return [NSString stringWithFormat:@"%ld minutes%s", mins, remaining]; 114 | if (mins > 0) 115 | return [NSString stringWithFormat:@"%ld minutes %ld seconds%s", mins, seconds, remaining]; 116 | return [NSString stringWithFormat:@"%ld seconds%s", seconds, remaining]; 117 | } 118 | 119 | // Return a string that represents an undefined time. 120 | return @""; 121 | } 122 | 123 | - (NSString *)minuteStringValue 124 | { 125 | if (_value) { 126 | long long positiveDuration = llabs([_value longLongValue]); 127 | long minutes = (long)(positiveDuration / 60000); 128 | return [NSString stringWithFormat:@"%ld", minutes]; 129 | } 130 | return @""; 131 | } 132 | 133 | - (int)intValue 134 | { 135 | return [_value intValue]; 136 | } 137 | 138 | - (NSComparisonResult)compare:(VLCTime *)aTime 139 | { 140 | NSInteger a = [_value integerValue]; 141 | NSInteger b = [aTime.value integerValue]; 142 | 143 | return (a > b) ? NSOrderedDescending : 144 | (a < b) ? NSOrderedAscending : 145 | NSOrderedSame; 146 | } 147 | 148 | @end 149 | -------------------------------------------------------------------------------- /Sources/VLCMediaListPlayer.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMediaListPlayer.m: VLCKit.framework VLCMediaListPlayer implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2009 Pierre d'Herbemont 5 | * Partial Copyright (C) 2009-2013 Felix Paul Kühne 6 | * Copyright (C) 2009-2013 VLC authors and VideoLAN 7 | * $Id$ 8 | * 9 | * Authors: Pierre d'Herbemont 10 | * Felix Paul Kühne 3 | Date: Sun, 7 Dec 2014 20:02:18 +0100 4 | Subject: [PATCH 07/10] contrib/gcrypt: simplify compilation by disabling /doc 5 | and work-around a libtool limitation 6 | 7 | --- 8 | contrib/src/gcrypt/disable-doc-compilation.patch | 43 ++++++++++++++++++++++ 9 | contrib/src/gcrypt/rules.mak | 2 + 10 | .../gcrypt/work-around-libtool-limitation.patch | 25 +++++++++++++ 11 | 3 files changed, 70 insertions(+) 12 | create mode 100644 contrib/src/gcrypt/disable-doc-compilation.patch 13 | create mode 100644 contrib/src/gcrypt/work-around-libtool-limitation.patch 14 | 15 | diff --git a/contrib/src/gcrypt/disable-doc-compilation.patch b/contrib/src/gcrypt/disable-doc-compilation.patch 16 | new file mode 100644 17 | index 0000000..7113a31 18 | --- /dev/null 19 | +++ b/contrib/src/gcrypt/disable-doc-compilation.patch 20 | @@ -0,0 +1,43 @@ 21 | +diff -ru libgcrypt/Makefile.am libgcrypt/Makefile.am 22 | +--- libgcrypt/Makefile.am 2014-08-18 08:46:51.000000000 +0200 23 | ++++ libgcrypt/Makefile.am 2014-12-07 19:54:02.000000000 +0100 24 | +@@ -25,11 +25,11 @@ 25 | + # (A suitable gitlog-to-changelog script can be found in GnuPG master.) 26 | + GITLOG_TO_CHANGELOG=gitlog-to-changelog 27 | + 28 | +-DIST_SUBDIRS = m4 compat mpi cipher random src doc tests 29 | +-SUBDIRS = compat mpi cipher random src doc tests 30 | ++DIST_SUBDIRS = m4 compat mpi cipher random src tests 31 | ++SUBDIRS = compat mpi cipher random src tests 32 | + 33 | + EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \ 34 | +- ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \ 35 | ++ ChangeLog-2011 build-aux/ChangeLog-2011 \ 36 | + m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \ 37 | + random/ChangeLog-2011 tests/ChangeLog-2011 mpi/ChangeLog-2011 \ 38 | + build-aux/git-log-footer build-aux/git-log-fix 39 | +Only in libgcrypt: Makefile.am.orig 40 | +Only in libgcrypt: Makefile.am.rej 41 | +diff -ru libgcrypt-raw/configure.ac libgcrypt/configure.ac 42 | +--- libgcrypt-raw/configure.ac 2014-12-07 19:51:54.000000000 +0100 43 | ++++ libgcrypt/configure.ac 2014-12-07 19:52:48.000000000 +0100 44 | +@@ -2043,7 +2043,6 @@ 45 | + mpi/Makefile 46 | + cipher/Makefile 47 | + random/Makefile 48 | +-doc/Makefile 49 | + src/Makefile 50 | + src/gcrypt.h 51 | + src/libgcrypt-config 52 | +diff -ru libgcrypt-raw/configure.ac.orig libgcrypt/configure.ac.orig 53 | +--- libgcrypt-raw/configure.ac.orig 2014-12-07 19:51:54.000000000 +0100 54 | ++++ libgcrypt/configure.ac.orig 2014-12-07 19:52:37.000000000 +0100 55 | +@@ -1219,7 +1219,7 @@ 56 | + AC_COMPILE_IFELSE([AC_LANG_SOURCE( 57 | + [[__asm__("xorl \$(123456789/12345678), %ebp;\n\t");]])], 58 | + [gcry_cv_gcc_as_const_division_with_wadivide_ok=yes])]) 59 | +- if test "$gcry_cv_gcc_as_const_division_ok_with_wadivide_ok" = "no" ; then 60 | ++ if test "$gcry_cv_gcc_as_const_division_with_wadivide_ok" = "no" ; then 61 | + # '-Wa,--divide' did not work, restore old flags. 62 | + CPPFLAGS="$_gcc_cppflags_save" 63 | + fi 64 | diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak 65 | index 4b2cce0..a3f1545 100644 66 | --- a/contrib/src/gcrypt/rules.mak 67 | +++ b/contrib/src/gcrypt/rules.mak 68 | @@ -13,6 +13,8 @@ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt 69 | $(UNPACK) 70 | $(APPLY) $(SRC)/gcrypt/fix-amd64-assembly-on-solaris.patch 71 | $(APPLY) $(SRC)/gcrypt/0001-Fix-assembly-division-check.patch 72 | + $(APPLY) $(SRC)/gcrypt/work-around-libtool-limitation.patch 73 | + $(APPLY) $(SRC)/gcrypt/disable-doc-compilation.patch 74 | $(MOVE) 75 | 76 | DEPS_gcrypt = gpg-error 77 | diff --git a/contrib/src/gcrypt/work-around-libtool-limitation.patch b/contrib/src/gcrypt/work-around-libtool-limitation.patch 78 | new file mode 100644 79 | index 0000000..df97ffb 80 | --- /dev/null 81 | +++ b/contrib/src/gcrypt/work-around-libtool-limitation.patch 82 | @@ -0,0 +1,25 @@ 83 | +diff -ru libgcrypt-broken/cipher/Makefile.am libgcrypt/cipher/Makefile.am 84 | +--- libgcrypt-broken/cipher/Makefile.am 2013-11-06 23:05:24.000000000 +0100 85 | ++++ libgcrypt/cipher/Makefile.am 2013-11-06 23:21:25.000000000 +0100 86 | +@@ -19,6 +19,8 @@ 87 | + 88 | + # Process this file with automake to produce Makefile.in 89 | + 90 | ++LIBTOOL=@LIBTOOL@ --tag=CC 91 | ++ 92 | + EXTRA_DIST = Manifest 93 | + 94 | + # Need to include ../src in addition to top_srcdir because gcrypt.h is 95 | +diff -ru libgcrypt-broken/mpi/Makefile.am libgcrypt/mpi/Makefile.am 96 | +--- libgcrypt-broken/mpi/Makefile.am 2013-11-06 23:05:24.000000000 +0100 97 | ++++ libgcrypt/mpi/Makefile.am 2013-11-06 23:22:04.000000000 +0100 98 | +@@ -23,6 +23,9 @@ 99 | + 100 | + # Need to include ../src in addition to top_srcdir because gcrypt.h is 101 | + # a built header. 102 | ++ 103 | ++LIBTOOL=@LIBTOOL@ --tag=CC 104 | ++ 105 | + AM_CPPFLAGS = -I../src -I$(top_srcdir)/src 106 | + AM_CFLAGS = $(GPG_ERROR_CFLAGS) 107 | + 108 | -- 109 | 2.4.4 110 | 111 | -------------------------------------------------------------------------------- /MobileVLCKit/patches/0002-arm_neon-use-a-macro-to-fix-compilation-for-iOS.patch: -------------------------------------------------------------------------------- 1 | From 3ad6c2c1c07d9b39a73511c9481e1da4b2c019fe Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= 3 | Date: Fri, 10 Aug 2012 16:01:49 +0200 4 | Subject: [PATCH 02/18] arm_neon: use a macro to fix compilation for iOS 5 | 6 | --- 7 | modules/arm_neon/amplify.S | 9 +++--- 8 | modules/arm_neon/simple_channel_mixer.S | 57 +++++++++++++++------------------ 9 | 2 files changed, 31 insertions(+), 35 deletions(-) 10 | 11 | diff --git a/modules/arm_neon/amplify.S b/modules/arm_neon/amplify.S 12 | index 5938118..578f972 100644 13 | --- a/modules/arm_neon/amplify.S 14 | +++ b/modules/arm_neon/amplify.S 15 | @@ -18,6 +18,8 @@ 16 | @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 17 | @****************************************************************************/ 18 | 19 | +#include "asm.S" 20 | + 21 | .syntax unified 22 | .arm 23 | .fpu neon 24 | @@ -26,10 +28,8 @@ 25 | #define DST r0 26 | #define SRC r1 27 | #define SIZE r2 28 | - .align 2 29 | - .global amplify_float_arm_neon 30 | - .type amplify_float_arm_neon, %function 31 | -amplify_float_arm_neon: 32 | + 33 | +function amplify_float_arm_neon, export=1 34 | cmp SIZE, #0 35 | bxeq lr 36 | #ifdef __ARM_PCS 37 | @@ -79,3 +79,4 @@ amplify_float_arm_neon: 38 | 4: vst1.f32 {d20-d21}, [DST,:128]! 39 | 5: vst1.f32 {d16-d17}, [DST,:128]! 40 | bx lr 41 | +endfunc 42 | diff --git a/modules/arm_neon/simple_channel_mixer.S b/modules/arm_neon/simple_channel_mixer.S 43 | index dcc51ed..4722be4 100644 44 | --- a/modules/arm_neon/simple_channel_mixer.S 45 | +++ b/modules/arm_neon/simple_channel_mixer.S 46 | @@ -19,6 +19,8 @@ 47 | @ Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 48 | @****************************************************************************/ 49 | 50 | +#include "asm.S" 51 | + 52 | .fpu neon 53 | .text 54 | .align 2 55 | @@ -34,9 +36,8 @@ coeff_7to2: 56 | .float 0.5 57 | .float 0.25 58 | .float 0.25 59 | - .global convert_7to2_neon_asm 60 | - .type convert_7to2_neon_asm, %function 61 | -convert_7to2_neon_asm: 62 | + 63 | +function convert_7to2_neon_asm, export=1 64 | push {r4,lr} 65 | 66 | adr COEFF, coeff_7to2 67 | @@ -63,16 +64,15 @@ convert_7to2_neon_asm: 68 | bne 0b 69 | 70 | pop {r4,pc} 71 | - 72 | +endfunc 73 | 74 | coeff_5to2: 75 | .float 0.5 76 | .float 0.5 77 | .float 0.33 78 | .float 0.33 79 | - .global convert_5to2_neon_asm 80 | - .type convert_5to2_neon_asm, %function 81 | -convert_5to2_neon_asm: 82 | + 83 | +function convert_5to2_neon_asm, export=1 84 | push {r4,lr} 85 | 86 | adr COEFF, coeff_5to2 87 | @@ -95,14 +95,13 @@ convert_5to2_neon_asm: 88 | bne 0b 89 | 90 | pop {r4,pc} 91 | - 92 | +endfunc 93 | 94 | coeff_4to2: 95 | .float 0.5 96 | .float 0.5 97 | - .global convert_4to2_neon_asm 98 | - .type convert_4to2_neon_asm, %function 99 | -convert_4to2_neon_asm: 100 | + 101 | +function convert_4to2_neon_asm, export=1 102 | push {r4,lr} 103 | 104 | adr COEFF, coeff_4to2 105 | @@ -119,14 +118,13 @@ convert_4to2_neon_asm: 106 | bne 0b 107 | 108 | pop {r4,pc} 109 | - 110 | +endfunc 111 | 112 | coeff_3to2: 113 | .float 0.5 114 | .float 0.5 115 | - .global convert_3to2_neon_asm 116 | - .type convert_3to2_neon_asm, %function 117 | -convert_3to2_neon_asm: 118 | + 119 | +function convert_3to2_neon_asm, export=1 120 | push {r4,lr} 121 | 122 | adr COEFF, coeff_3to2 123 | @@ -147,16 +145,15 @@ convert_3to2_neon_asm: 124 | bne 0b 125 | 126 | pop {r4,pc} 127 | - 128 | +endfunc 129 | 130 | coeff_7to1: 131 | .float 0.25 132 | .float 0.25 133 | .float 0.125 134 | .float 0.125 135 | - .global convert_7to1_neon_asm 136 | - .type convert_7to1_neon_asm, %function 137 | -convert_7to1_neon_asm: 138 | + 139 | +function convert_7to1_neon_asm, export=1 140 | push {r4,lr} 141 | 142 | adr COEFF, coeff_7to1 143 | @@ -181,16 +178,15 @@ convert_7to1_neon_asm: 144 | bne 0b 145 | 146 | pop {r4,pc} 147 | - 148 | +endfunc 149 | 150 | coeff_5to1: 151 | .float 0.25 152 | .float 0.25 153 | .float 0.16666667 154 | .float 0.16666667 155 | - .global convert_5to1_neon_asm 156 | - .type convert_5to1_neon_asm, %function 157 | -convert_5to1_neon_asm: 158 | + 159 | +function convert_5to1_neon_asm, export=1 160 | push {r4,lr} 161 | 162 | adr COEFF, coeff_5to1 163 | @@ -212,16 +208,15 @@ convert_5to1_neon_asm: 164 | bne 0b 165 | 166 | pop {r4,pc} 167 | - 168 | +endfunc 169 | 170 | coeff_7to4: 171 | .float 0.5 172 | .float 0.5 173 | .float 0.16666667 174 | .float 0.16666667 175 | - .global convert_7to4_neon_asm 176 | - .type convert_7to4_neon_asm, %function 177 | -convert_7to4_neon_asm: 178 | + 179 | +function convert_7to4_neon_asm, export=1 180 | push {r4,lr} 181 | 182 | adr COEFF, coeff_7to4 183 | @@ -247,14 +242,13 @@ convert_7to4_neon_asm: 184 | bne 0b 185 | 186 | pop {r4,pc} 187 | - 188 | +endfunc 189 | 190 | coeff_5to4: 191 | .float 0.5 192 | .float 0.5 193 | - .global convert_5to4_neon_asm 194 | - .type convert_5to4_neon_asm, %function 195 | -convert_5to4_neon_asm: 196 | + 197 | +function convert_5to4_neon_asm, export=1 198 | push {r4,lr} 199 | 200 | adr COEFF, coeff_5to4 201 | @@ -277,3 +271,4 @@ convert_5to4_neon_asm: 202 | bne 0b 203 | 204 | pop {r4,pc} 205 | +endfunc 206 | -- 207 | 2.4.3 208 | 209 | -------------------------------------------------------------------------------- /Headers/Internal/VLCLibVLCBridging.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCLibVLCbridging.h: VLCKit.framework VLCLibVLCBridging (Private) header 3 | ***************************************************************************** 4 | * Copyright (C) 2007 Pierre d'Herbemont 5 | * Copyright (C) 2007 VLC authors and VideoLAN 6 | * $Id$ 7 | * 8 | * Authors: Pierre d'Herbemont 9 | * 10 | * This program is free software; you can redistribute it and/or modify it 11 | * under the terms of the GNU Lesser General Public License as published by 12 | * the Free Software Foundation; either version 2.1 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public License 21 | * along with this program; if not, write to the Free Software Foundation, 22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #import "VLCLibrary.h" 26 | #if !TARGET_OS_IPHONE 27 | #import "VLCStreamOutput.h" 28 | #endif 29 | #import "VLCMediaPlayer.h" 30 | 31 | /** 32 | * Bridges functionality between libvlc and VLCMediaList implementation. 33 | */ 34 | @interface VLCMediaList (LibVLCBridging) 35 | /* Factories */ 36 | /** 37 | * Manufactures new object wrapped around specified media list. 38 | * \param p_new_mlist LibVLC media list pointer. 39 | * \return Newly create media list instance using specified media list 40 | * pointer. 41 | */ 42 | + (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist; 43 | 44 | /* Initializers */ 45 | /** 46 | * Initializes new object wrapped around specified media list. 47 | * \param p_new_mlist LibVLC media list pointer. 48 | * \return Newly create media list instance using specified media list 49 | * pointer. 50 | */ 51 | - (id)initWithLibVLCMediaList:(void *)p_new_mlist; 52 | 53 | /* Properties */ 54 | @property (readonly) void * libVLCMediaList; //< LibVLC media list pointer. 55 | @end 56 | 57 | /** 58 | * Bridges functionality between libvlc and VLCMedia implementation. 59 | */ 60 | @interface VLCMedia (LibVLCBridging) 61 | /* Factories */ 62 | /** 63 | * Manufactures new object wrapped around specified media descriptor. 64 | * \param md LibVLC media descriptor pointer. 65 | * \return Newly created media instance using specified descriptor. 66 | */ 67 | + (id)mediaWithLibVLCMediaDescriptor:(void *)md; 68 | 69 | /* Initializers */ 70 | /** 71 | * Initializes new object wrapped around specified media descriptor. 72 | * \param md LibVLC media descriptor pointer. 73 | * \return Newly created media instance using specified descriptor. 74 | */ 75 | - (id)initWithLibVLCMediaDescriptor:(void *)md; 76 | 77 | + (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options; 78 | 79 | /** 80 | * Returns the receiver's internal media descriptor pointer. 81 | * \return The receiver's internal media descriptor pointer. 82 | */ 83 | @property (readonly) void * libVLCMediaDescriptor; 84 | @end 85 | 86 | /** 87 | * Bridges functionality between VLCMedia and VLCMediaPlayer 88 | */ 89 | @interface VLCMediaPlayer (LibVLCBridging) 90 | 91 | /* Properties */ 92 | @property (readonly) void * libVLCMediaPlayer; //< LibVLC media list pointer. 93 | @end 94 | 95 | /** 96 | * Bridges functionality between VLCMediaPlayer and LibVLC core 97 | */ 98 | @interface VLCMedia (VLCMediaPlayerBridging) 99 | /** 100 | * Set's the length of the media object. This value becomes available once the 101 | * media object is being played. 102 | * \param value 103 | */ 104 | - (void)setLength:(VLCTime *)value; 105 | @end 106 | 107 | /** 108 | * Bridges functionality between VLCLibrary and LibVLC core. 109 | */ 110 | @interface VLCLibrary (VLCLibVLCBridging) 111 | /** 112 | * Shared singleton instance of libvlc library instance. 113 | * \return libvlc pointer of library instance. 114 | */ 115 | + (void *)sharedInstance; 116 | 117 | /** 118 | * Instance of libvlc library instance. 119 | * \return libvlc pointer of library instance. 120 | */ 121 | @property (readonly) void * instance; 122 | @end 123 | 124 | #if !TARGET_OS_IPHONE 125 | /** 126 | * Bridges functionality between VLCLibrary and VLCAudio. 127 | */ 128 | @interface VLCLibrary (VLCAudioBridging) 129 | /** 130 | * Called by VLCAudio, each library has a singleton VLCaudio instance. VLCAudio 131 | * calls this function to let the VLCLibrary instance know how to get in touch 132 | * with the VLCAudio instance. TODO: Each media player instance should have it's 133 | * own audio instance...not each library instance. 134 | */ 135 | - (void)setAudio:(VLCAudio *)value; 136 | @end 137 | 138 | /** 139 | * Bridges functionality between VLCAudio and VLCLibrary. 140 | */ 141 | @interface VLCAudio (VLCAudioBridging) 142 | /* Initializers */ 143 | /** 144 | * Initializes a new object using the specified mediaPlayer instance. 145 | * \return Newly created audio object using specified VLCMediaPlayer instance. 146 | */ 147 | - (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer; 148 | @end 149 | #endif 150 | 151 | /** 152 | * TODO: Documentation 153 | */ 154 | #if !TARGET_OS_IPHONE 155 | @interface VLCStreamOutput (LibVLCBridge) 156 | - (NSString *)representedLibVLCOptions; 157 | @end 158 | #endif 159 | -------------------------------------------------------------------------------- /Sources/VLCExtensionsManager.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCKit: VLCExtensionsManager 3 | ***************************************************************************** 4 | * Copyright (C) 2010-2012, 2014 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * 8 | * This program is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU Lesser General Public License as published by 10 | * the Free Software Foundation; either version 2.1 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #import "VLCExtensionsManager.h" 24 | #import "VLCExtension.h" 25 | #import "VLCLibrary.h" 26 | #import "VLCLibVLCBridging.h" 27 | #import 28 | #import 29 | #include 30 | 31 | // Here comes the nasty hack. 32 | #define MODULE_STRING "VLCKit" 33 | #import "../vlc-unstable/lib/media_player_internal.h" 34 | #import "../vlc-unstable/lib/libvlc_internal.h" 35 | 36 | static input_thread_t *libvlc_media_player_get_input_thread(libvlc_media_player_t *player) 37 | { 38 | vlc_mutex_lock(&player->input.lock); 39 | input_thread_t *input = player->input.p_thread; 40 | if(input) 41 | vlc_object_hold(input); 42 | vlc_mutex_unlock(&player->input.lock); 43 | return input; 44 | } 45 | 46 | static vlc_object_t *libvlc_get_vlc_instance(libvlc_instance_t *instance) 47 | { 48 | vlc_mutex_lock(&instance->instance_lock); 49 | libvlc_int_t *libvlc = instance->p_libvlc_int; 50 | if(libvlc) 51 | vlc_object_hold(libvlc); 52 | vlc_mutex_unlock(&instance->instance_lock); 53 | return VLC_OBJECT(libvlc); 54 | } 55 | 56 | 57 | #define _instance ((extensions_manager_t *)instance) 58 | 59 | @interface VLCExtensionsManager () 60 | { 61 | void *instance; 62 | NSMutableArray *_extensions; 63 | VLCMediaPlayer *_player; 64 | void *_previousInput; 65 | } 66 | @end 67 | 68 | @implementation VLCExtensionsManager 69 | 70 | + (VLCExtensionsManager *)sharedManager 71 | { 72 | static VLCExtensionsManager *sharedManager; 73 | static dispatch_once_t onceToken; 74 | dispatch_once(&onceToken, ^{ 75 | sharedManager = [[self alloc] init]; 76 | }); 77 | return sharedManager; 78 | } 79 | 80 | - (void)dealloc 81 | { 82 | module_unneed(_instance, _instance->p_module); 83 | vlc_object_release(_instance); 84 | 85 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 86 | } 87 | 88 | - (NSArray *)extensions 89 | { 90 | if (!instance) 91 | { 92 | vlc_object_t *libvlc = libvlc_get_vlc_instance([VLCLibrary sharedInstance]); 93 | instance = vlc_object_create(libvlc, sizeof(extensions_manager_t)); 94 | if (!_instance) 95 | { 96 | vlc_object_release(libvlc); 97 | return nil; 98 | } 99 | 100 | _instance->p_module = module_need(_instance, "extension", NULL, false); 101 | NSAssert(_instance->p_module, @"Unable to load extensions module"); 102 | 103 | vlc_object_release(libvlc); 104 | } 105 | 106 | if (_extensions) 107 | return _extensions; 108 | _extensions = [[NSMutableArray alloc] init]; 109 | extension_t *ext; 110 | vlc_mutex_lock(&_instance->lock); 111 | FOREACH_ARRAY(ext, _instance->extensions) 112 | [_extensions addObject:[[VLCExtension alloc] initWithInstance:ext]]; 113 | FOREACH_END() 114 | vlc_mutex_unlock(&_instance->lock); 115 | return _extensions; 116 | } 117 | 118 | - (void)runExtension:(VLCExtension *)extension 119 | { 120 | extension_t *ext = [extension instance]; 121 | 122 | if(extension_TriggerOnly(_instance, ext)) 123 | extension_Trigger(_instance, ext); 124 | else 125 | { 126 | if(!extension_IsActivated(_instance, ext)) 127 | extension_Activate(_instance, ext); 128 | } 129 | } 130 | 131 | - (void)mediaPlayerLikelyChangedInput 132 | { 133 | input_thread_t *input = _player ? libvlc_media_player_get_input_thread([_player libVLCMediaPlayer]) : NULL; 134 | 135 | // Don't send more than appropriate 136 | if (_previousInput == input) 137 | return; 138 | _previousInput = input; 139 | 140 | for(VLCExtension *extension in _extensions) 141 | extension_SetInput(_instance, [extension instance], input); 142 | if (input) 143 | vlc_object_release(input); 144 | } 145 | 146 | - (void)setMediaPlayer:(VLCMediaPlayer *)player 147 | { 148 | if (_player == player) 149 | return; 150 | 151 | // Don't set a NULL mediaPlayer. 152 | // so that we always have an input around. 153 | if (!player) 154 | return; 155 | 156 | NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; 157 | [center removeObserver:self name:VLCMediaPlayerStateChanged object:_player]; 158 | 159 | _player = player; 160 | 161 | [self mediaPlayerLikelyChangedInput]; 162 | 163 | 164 | if (player) 165 | [center addObserver:self selector:@selector(mediaPlayerLikelyChangedInput) name:VLCMediaPlayerStateChanged object:_player]; 166 | } 167 | 168 | - (VLCMediaPlayer *)mediaPlayer 169 | { 170 | return _player; 171 | } 172 | @end 173 | -------------------------------------------------------------------------------- /Examples_OSX/BasicPlayerWithPlaylist/Controller.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * test: Controller.m 3 | ***************************************************************************** 4 | * Copyright (C) 2007-2013 Pierre d'Herbemont and VideoLAN 5 | * 6 | * Authors: Pierre d'Herbemont 7 | * Felix Paul Kühne 8 | * 9 | * This program is free software; you can redistribute it and/or modify it 10 | * under the terms of the GNU Lesser General Public License as published by 11 | * the Free Software Foundation; either version 2.1 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this program; if not, write to the Free Software Foundation, 21 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #import "Controller.h" 25 | 26 | @implementation Controller 27 | 28 | - (void)awakeFromNib 29 | { 30 | [NSApp setDelegate:self]; 31 | 32 | // Allocate a VLCVideoView instance and tell it what area to occupy. 33 | NSRect rect = NSMakeRect(0, 0, 0, 0); 34 | rect.size = [videoHolderView frame].size; 35 | 36 | videoView = [[VLCVideoView alloc] initWithFrame:rect]; 37 | [videoHolderView addSubview:videoView]; 38 | [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable]; 39 | videoView.fillScreen = YES; 40 | 41 | [VLCLibrary sharedLibrary]; 42 | 43 | playlist = [[VLCMediaList alloc] init]; 44 | [playlist addObserver:self forKeyPath:@"media" options:NSKeyValueObservingOptionNew context:nil]; 45 | 46 | player = [[VLCMediaPlayer alloc] initWithVideoView:videoView]; 47 | player.delegate = self; 48 | mediaIndex = -1; 49 | 50 | [playlistOutline registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, NSURLPboardType, nil]]; 51 | [playlistOutline setDoubleAction:@selector(changeAndPlay:)]; 52 | } 53 | 54 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 55 | { 56 | } 57 | 58 | - (void)applicationWillTerminate:(NSNotification *)aNotification 59 | { 60 | [playlist removeObserver:self forKeyPath:@"media"]; 61 | 62 | [player pause]; 63 | [player setMedia:nil]; 64 | [player release]; 65 | [playlist release]; 66 | [videoView release]; 67 | } 68 | 69 | - (void)changeAndPlay:(id)sender 70 | { 71 | if ([playlistOutline selectedRow] != mediaIndex) { 72 | [self setMediaIndex:[playlistOutline selectedRow]]; 73 | if (![player isPlaying]) 74 | [player play]; 75 | } 76 | } 77 | 78 | - (void)setMediaIndex:(int)value 79 | { 80 | if ([playlist count] <= 0) 81 | return; 82 | 83 | if (value < 0) 84 | value = 0; 85 | if (value > [playlist count] - 1) 86 | value = [playlist count] - 1; 87 | 88 | mediaIndex = value; 89 | [player setMedia:[playlist mediaAtIndex:mediaIndex]]; 90 | } 91 | 92 | - (void)play:(id)sender 93 | { 94 | [self setMediaIndex:mediaIndex+1]; 95 | if (![player isPlaying] && [playlist count] > 0) { 96 | NSLog(@"%@ length = %@", [playlist mediaAtIndex:mediaIndex], [[playlist mediaAtIndex:mediaIndex] lengthWaitUntilDate:[NSDate dateWithTimeIntervalSinceNow:60]]); 97 | [player play]; 98 | } 99 | } 100 | 101 | - (void)pause:(id)sender 102 | { 103 | NSLog(@"Sending pause message to media player..."); 104 | [player pause]; 105 | } 106 | 107 | - (void)mediaPlayerStateChanged:(NSNotification *)aNotification 108 | { 109 | if (player.media) { 110 | NSArray *spuTracks = [player videoSubTitlesNames]; 111 | NSArray *spuTrackIndexes = [player videoSubTitlesIndexes]; 112 | 113 | NSUInteger count = [spuTracks count]; 114 | [spuPopup removeAllItems]; 115 | if (count <= 1) 116 | return; 117 | 118 | for (NSUInteger x = 0; x < count; x++) { 119 | [spuPopup addItemWithTitle:spuTracks[x]]; 120 | [[spuPopup lastItem] setTag:spuTrackIndexes[x]]; 121 | } 122 | } 123 | } 124 | 125 | - (void)setSPU:(id)sender 126 | { 127 | if (player.media) 128 | player.currentVideoSubTitleIndex = [[spuPopup selectedItem] tag]; 129 | } 130 | 131 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 132 | { 133 | if ([keyPath isEqualToString:@"media"] && object == playlist) 134 | [playlistOutline reloadData]; 135 | } 136 | 137 | // NSTableView Implementation 138 | - (int)numberOfRowsInTableView:(NSTableView *)tableView 139 | { 140 | return [playlist count]; 141 | } 142 | 143 | - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn 144 | row:(int)row 145 | { 146 | NSString *title = [(VLCMedia *)[playlist mediaAtIndex:row].metaDictionary valueForKey:VLCMetaInformationTitle]; 147 | 148 | return title ? title : [playlist mediaAtIndex:row].url.lastPathComponent; 149 | } 150 | 151 | - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id )info 152 | proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)op 153 | { 154 | return NSDragOperationEvery; /* This is for now */ 155 | } 156 | 157 | - (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id )info 158 | row:(int)row dropOperation:(NSTableViewDropOperation)operation 159 | { 160 | NSArray *droppedItems = [[info draggingPasteboard] propertyListForType:NSFilenamesPboardType]; 161 | 162 | for (int i = 0; i < [droppedItems count]; i++) { 163 | NSString * filename = [droppedItems objectAtIndex:i]; 164 | VLCMedia * media = [VLCMedia mediaWithPath:filename]; 165 | [playlist addMedia:media]; 166 | } 167 | return YES; 168 | } 169 | 170 | @end 171 | -------------------------------------------------------------------------------- /Examples_OSX/iPodConverter/Controller.m: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Copyright (C) 2007-2012 Pierre d'Herbemont and VideoLAN 3 | * 4 | * Authors: Pierre d'Herbemont 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this program; if not, write to the Free Software Foundation, 18 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 19 | *****************************************************************************/ 20 | 21 | 22 | #import "Controller.h" 23 | 24 | 25 | /********************************************************** 26 | * First off, some value transformer to easily play with 27 | * bindings 28 | */ 29 | @interface VLCFloat10000FoldTransformer : NSObject 30 | @end 31 | 32 | @implementation VLCFloat10000FoldTransformer 33 | 34 | + (Class)transformedValueClass 35 | { 36 | return [NSNumber class]; 37 | } 38 | 39 | + (BOOL)allowsReverseTransformation 40 | { 41 | return YES; 42 | } 43 | 44 | - (id)transformedValue:(id)value 45 | { 46 | if( !value ) return nil; 47 | 48 | if(![value respondsToSelector: @selector(floatValue)]) 49 | { 50 | [NSException raise: NSInternalInconsistencyException 51 | format: @"Value (%@) does not respond to -floatValue.", 52 | [value class]]; 53 | return nil; 54 | } 55 | 56 | return [NSNumber numberWithFloat: [value floatValue]*10000.]; 57 | } 58 | 59 | - (id)reverseTransformedValue:(id)value 60 | { 61 | if( !value ) return nil; 62 | 63 | if(![value respondsToSelector: @selector(floatValue)]) 64 | { 65 | [NSException raise: NSInternalInconsistencyException 66 | format: @"Value (%@) does not respond to -floatValue.", 67 | [value class]]; 68 | return nil; 69 | } 70 | 71 | return [NSNumber numberWithFloat: [value floatValue]/10000.]; 72 | } 73 | @end 74 | 75 | 76 | /********************************************************** 77 | * @implementation Controller 78 | */ 79 | 80 | @implementation Controller 81 | - (id)init 82 | { 83 | if(self = [super init]) 84 | { 85 | VLCFloat10000FoldTransformer *float100fold; 86 | float100fold = [[[VLCFloat10000FoldTransformer alloc] init] autorelease]; 87 | [NSValueTransformer setValueTransformer:(id)float100fold forName:@"Float10000FoldTransformer"]; 88 | self.media = nil; 89 | self.streamSession = nil; 90 | selectedStreamOutput = [[NSNumber alloc] initWithInt:0]; 91 | } 92 | return self; 93 | } 94 | 95 | @synthesize streamSession; 96 | @synthesize selectedStreamOutput; 97 | 98 | - (void)awakeFromNib 99 | { 100 | [window setShowsResizeIndicator:NO]; 101 | [NSApp setDelegate: self]; 102 | } 103 | 104 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 105 | { 106 | [VLCLibrary sharedLibrary]; 107 | } 108 | 109 | - (VLCMedia *)media 110 | { 111 | return media; 112 | } 113 | 114 | - (void)setMedia:(VLCMedia *)newMedia 115 | { 116 | [media release]; 117 | media = [newMedia retain]; 118 | NSRect newFrame = [window frameRectForContentRect:[conversionView frame]]; 119 | [[window animator] setFrame:NSMakeRect([window frame].origin.x, [window frame].origin.y+NSHeight([window frame])-NSHeight(newFrame), NSWidth(newFrame), NSHeight(newFrame)) display:YES]; 120 | [[window animator] setContentView:conversionView]; 121 | [window setMinSize:newFrame.size]; 122 | [window setMaxSize:NSMakeSize(10000., NSHeight(newFrame))]; 123 | [window setShowsResizeIndicator:YES]; 124 | } 125 | 126 | + (NSSet *)keyPathsForValuesAffectingOutputFilePath 127 | { 128 | return [NSSet setWithObjects:@"media.metaDictionary.title", nil]; 129 | } 130 | - (NSString *)outputFilePath 131 | { 132 | return [NSString stringWithFormat:[@"~/Movies/%@.mp4" stringByExpandingTildeInPath], 133 | [[[self.media metaDictionary] objectForKey:@"title"] stringByDeletingPathExtension]]; 134 | } 135 | 136 | - (IBAction)convert:(id)sender 137 | { 138 | self.streamSession = [VLCStreamSession streamSession]; 139 | if([selectedStreamOutput intValue] == 0) 140 | { 141 | [self.streamSession setStreamOutput: 142 | [VLCStreamOutput ipodStreamOutputWithFilePath: 143 | [self outputFilePath] 144 | ]]; 145 | } 146 | else 147 | { 148 | /* This doesn't really is useful for the iPod/iPhone... 149 | * But one day we'll figure that out */ 150 | 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); 151 | [self.streamSession setStreamOutput: 152 | [VLCStreamOutput rtpBroadcastStreamOutput]]; 153 | } 154 | 155 | 156 | NSLog(@"Using %@", self.streamSession.streamOutput ); 157 | 158 | [self.streamSession setMedia:self.media]; 159 | [self.streamSession startStreaming]; 160 | 161 | [openConvertedFileButton setImage:[[NSWorkspace sharedWorkspace] iconForFile:[self outputFilePath]]]; 162 | } 163 | 164 | - (IBAction)openConvertedFile:(id)sender 165 | { 166 | [[NSWorkspace sharedWorkspace] openFile:[self outputFilePath]]; 167 | } 168 | - (IBAction)openConvertedEnclosingFolder:(id)sender 169 | { 170 | [[NSWorkspace sharedWorkspace] openFile:[[self outputFilePath] stringByDeletingLastPathComponent]]; 171 | 172 | } 173 | @end 174 | --------------------------------------------------------------------------------