...
 
Commits (82)
//
// DynamicMobileVLCKit.h
// DynamicMobileVLCKit
//
// Created by Felix Paul Kühne on 10/07/15.
//
//
/*****************************************************************************
* DynamicMobileVLCKit.h: dynamic library umbrella header
*****************************************************************************
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <UIKit/UIKit.h>
......@@ -25,6 +40,7 @@ FOUNDATION_EXPORT const unsigned char DynamicMobileVLCKitVersionString[];
#import <DynamicMobileVLCKit/VLCMediaListPlayer.h>
#import <DynamicMobileVLCKit/VLCMediaThumbnailer.h>
#import <DynamicMobileVLCKit/VLCTime.h>
#import <DynamicMobileVLCKit/VLCDialogProvider.h>
@class VLCMedia;
@class VLCMediaLibrary;
......@@ -35,3 +51,4 @@ FOUNDATION_EXPORT const unsigned char DynamicMobileVLCKitVersionString[];
@class VLCMediaThumbnailer;
@class VLCMediaListPlayer;
@class VLCMediaPlayer;
@class VLCDialogProvider;
/*****************************************************************************
* DynamicTVVLCKit.h: dynamic library umbrella header
*****************************************************************************
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <UIKit/UIKit.h>
//! Project version number for DynamicTVVLCKit.
FOUNDATION_EXPORT double DynamicTVVLCKitVersionNumber;
//! Project version string for DynamicTVVLCKit.
FOUNDATION_EXPORT const unsigned char DynamicTVVLCKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DynamicTVVLCKit/PublicHeader.h>
#import <DynamicTVVLCKit/VLCAudio.h>
#import <DynamicTVVLCKit/VLCLibrary.h>
#import <DynamicTVVLCKit/VLCMedia.h>
#import <DynamicTVVLCKit/VLCMediaDiscoverer.h>
#import <DynamicTVVLCKit/VLCMediaList.h>
#import <DynamicTVVLCKit/VLCMediaPlayer.h>
#import <DynamicTVVLCKit/VLCMediaListPlayer.h>
#import <DynamicTVVLCKit/VLCMediaThumbnailer.h>
#import <DynamicTVVLCKit/VLCTime.h>
#import <DynamicTVVLCKit/VLCDialogProvider.h>
@class VLCMedia;
@class VLCMediaLibrary;
@class VLCMediaList;
@class VLCTime;
@class VLCVideoView;
@class VLCAudio;
@class VLCMediaThumbnailer;
@class VLCMediaListPlayer;
@class VLCMediaPlayer;
@class VLCDialogProvider;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
/*****************************************************************************
* VLCCustomDialogProvider.h: an implementation of the libvlc dialog API
* Included to allow custom UIs with full flexibility
*****************************************************************************
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan org>
* Pierre d'Herbemont <pdherbemont # videolan org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCDialogProvider.h"
@interface VLCCustomDialogProvider : VLCDialogProvider
/**
* initializer method to run the dialog provider instance on a specific library instance
*
* \param the library instance
* \note if param is NULL, [VLCLibrary sharedLibrary] will be used
* \return the dialog provider instance, can be NULL on malloc failures
*/
- (instancetype _Nullable)initWithLibrary:(VLCLibrary * _Nullable)library;
@end
/*****************************************************************************
* VLCEmbeddedDialogProvider.h: an implementation of the libvlc dialog API
*****************************************************************************
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCDialogProvider.h"
@interface VLCEmbeddedDialogProvider : VLCDialogProvider
/**
* initializer method to run the dialog provider instance on a specific library instance
*
* \param the library instance
* \note if param is NULL, [VLCLibrary sharedLibrary] will be used
* \return the dialog provider instance, can be NULL on malloc failures
*/
- (instancetype _Nullable)initWithLibrary:(VLCLibrary * _Nullable)library;
@end
/*****************************************************************************
* VLCHelperCode.h: generic helper code
*****************************************************************************
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Foundation/Foundation.h>
NSString *toNSStr(const char *str);
/*****************************************************************************
* VLCiOSLegacyDialogProvider.h: an implementation of the libvlc dialog API
* Included for compatiblity with iOS 7
*****************************************************************************
* Copyright (C) 2009, 2014-2015 VLC authors and VideoLAN
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan org>
* Pierre d'Herbemont <pdherbemont # videolan org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCDialogProvider.h"
@interface VLCiOSLegacyDialogProvider : VLCDialogProvider
/**
* initializer method to run the dialog provider instance on a specific library instance
*
* \param the library instance
* \note if param is NULL, [VLCLibrary sharedLibrary] will be used
* \return the dialog provider instance, can be NULL on malloc failures
*/
- (instancetype _Nullable)initWithLibrary:(VLCLibrary * _Nullable)library;
@end
......@@ -29,6 +29,7 @@
#import <MobileVLCKit/VLCMediaPlayer.h>
#import <MobileVLCKit/VLCMediaListPlayer.h>
#import <MobileVLCKit/VLCMediaThumbnailer.h>
#import <MobileVLCKit/VLCDialogProvider.h>
#import <MobileVLCKit/VLCTime.h>
@class VLCMedia;
......@@ -40,3 +41,4 @@
@class VLCMediaThumbnailer;
@class VLCMediaListPlayer;
@class VLCMediaPlayer;
@class VLCDialogProvider;
/*****************************************************************************
* VLCDialogProvider.h: an implementation of the libvlc dialog API
*****************************************************************************
* Copyright (C) 2016 VideoLabs SAS
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
@class VLCLibrary;
typedef NS_ENUM(NSUInteger, VLCDialogQuestionType) {
VLCDialogQuestionNormal,
VLCDialogQuestionWarning,
VLCDialogQuestionCritical,
};
@protocol VLCCustomDialogRendererProtocol <NSObject>
/**
* called when VLC wants to show an error
* \param the dialog title
* \param the error message
*/
- (void)showErrorWithTitle:(NSString * _Nonnull)error
message:(NSString * _Nonnull)message;
/**
* called when user logs in to something
* If VLC includes a keychain module for your platform, a user can store stuff
* \param login title
* \param an explaining message
* \param a default username within context
* \param indicator whether storing is even a possibility
* \param reference you need to send the results to
*/
- (void)showLoginWithTitle:(NSString * _Nonnull)title
message:(NSString * _Nonnull)message
defaultUsername:(NSString * _Nullable)username
askingForStorage:(BOOL)askingForStorage
withReference:(NSValue * _Nonnull)reference;
/**
* called when VLC needs the user to decide something
* \param the dialog title
* \param an explaining message text
* \param a question type
* \param cancel button text
* \param action 1 text
* \param action 2 text
* \param reference you need to send the action to
*/
- (void)showQuestionWithTitle:(NSString * _Nonnull)title
message:(NSString * _Nonnull)message
type:(VLCDialogQuestionType)questionType
cancelString:(NSString * _Nullable)cancelString
action1String:(NSString * _Nullable)action1String
action2String:(NSString * _Nullable)action2String
withReference:(NSValue * _Nonnull)reference;
/**
* called when VLC wants to show some progress
* \param the dialog title
* \param an explaining message
* \param indicator whether progress indeterminate
* \param initial progress position
* \param optional string for cancel button if operation is cancellable
* \param reference VLC will include in updates
*/
- (void)showProgressWithTitle:(NSString * _Nonnull)title
message:(NSString * _Nonnull)message
isIndeterminate:(BOOL)isIndeterminate
position:(float)position
cancelString:(NSString * _Nullable)cancelString
withReference:(NSValue * _Nonnull)reference;
/** called when VLC wants to update an existing progress dialog
* \param reference to the existing progress dialog
* \param updated message
* \param current position
*/
- (void)updateProgressWithReference:(NSValue * _Nonnull)reference
message:(NSString * _Nullable)message
postion:(float)position;
/** VLC decided to destroy a dialog
* \param reference to the dialog to destroy
*/
- (void)cancelDialogWithReference:(NSValue * _Nonnull)reference;
@end
@interface VLCDialogProvider : NSObject
/**
* initializer method to run the dialog provider instance on a specific library instance
*
* \param the library instance
* \param enable custom UI mode
* \note if library param is NULL, [VLCLibrary sharedLibrary] will be used
* \return the dialog provider instance, can be NULL on malloc failures
*/
- (instancetype _Nullable)initWithLibrary:(VLCLibrary * _Nullable)library
customUI:(BOOL)customUI;
/**
* initializer method to run the dialog provider instance on a specific library instance
*
* \param an object implementing the custom dialog rendering API
* \return the object set
*/
@property (weak, readwrite, nonatomic, nullable) id<VLCCustomDialogRendererProtocol> customRenderer;
/**
* if you requested custom UI mode for dialogs, use this method respond to a login dialog
* \param username or NULL if cancelled
* \param password or NULL if cancelled
* \param reference to the dialog you respond to
* \param shall VLC store the login securely?
* \note This method does not have any effect if you don't use custom UI mode */
- (void)postUsername:(NSString * _Nonnull)username
andPassword:(NSString * _Nonnull)password
forDialogReference:(NSValue * _Nonnull)dialogReference
store:(BOOL)store;
/**
* if you requested custom UI mode for dialogs, use this method respond to a question dialog
* \param the button number the user pressed, use 3 if s/he cancelled, otherwise respectively 1 or 2 depending on the selected action
* \param reference to the dialog you respond to
* \note This method does not have any effect if you don't use custom UI mode */
- (void)postAction:(int)buttonNumber
forDialogReference:(NSValue * _Nonnull)dialogReference;
/**
* if you requested custom UI mode for dialogs, use this method to cancel a progress dialog
* \param reference to the dialog you want to cancel
* \note This method does not have any effect if you don't use custom UI mode */
- (void)dismissDialogWithReference:(NSValue * _Nonnull)dialogReference;
@end
......@@ -107,4 +107,6 @@
*/
- (void)setApplicationIdentifier:(NSString *)identifier withVersion:(NSString *)version andApplicationIconName:(NSString *)icon;
@property (nonatomic, assign) void *instance;
@end
......@@ -48,7 +48,9 @@ typedef NS_ENUM(NSInteger, VLCRepeatMode) {
@property (readwrite) VLCMedia *rootMedia;
@property (readonly) VLCMediaPlayer *mediaPlayer;
- (instancetype)initWithDrawable:(id)drawable;
- (instancetype)initWithOptions:(NSArray *)options;
- (instancetype)initWithOptions:(NSArray *)options andDrawable:(id)drawable;
/**
* Basic play, pause and stop are here. For other methods, use the mediaPlayer.
......
......@@ -27,6 +27,7 @@
#import <Foundation/Foundation.h>
#if TARGET_OS_IPHONE
# import <CoreGraphics/CoreGraphics.h>
# import <UIKit/UIKit.h>
#endif
#import "VLCMedia.h"
#import "VLCTime.h"
......@@ -42,6 +43,8 @@
/* Notification Messages */
extern NSString *const VLCMediaPlayerTimeChanged;
extern NSString *const VLCMediaPlayerStateChanged;
extern NSString *const VLCMediaPlayerTitleChanged;
extern NSString *const VLCMediaPlayerChapterChanged;
/**
* VLCMediaPlayerState describes the state of the media player.
......@@ -57,6 +60,18 @@ typedef NS_ENUM(NSInteger, VLCMediaPlayerState)
VLCMediaPlayerStatePaused //< Stream is paused
};
/**
* VLCMediaPlaybackNavigationAction describes actions which can be performed to navigate an interactive title
*/
typedef NS_ENUM(unsigned, VLCMediaPlaybackNavigationAction)
{
VLCMediaPlaybackNavigationActionActivate = 0,
VLCMediaPlaybackNavigationActionUp,
VLCMediaPlaybackNavigationActionDown,
VLCMediaPlaybackNavigationActionLeft,
VLCMediaPlaybackNavigationActionRight
};
/**
* Returns the name of the player state as a string.
* \param state The player state.
......@@ -85,6 +100,21 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
*/
- (void)mediaPlayerTimeChanged:(NSNotification *)aNotification;
/**
* Sent by the default notification center whenever the player's title has changed (if any).
* \details Discussion The value of aNotification is always an VLCMediaPlayerTitleChanged notification. You can retrieve
* the VLCMediaPlayer object in question by sending object to aNotification.
* \note this is about a title in the navigation sense, not about metadata
*/
- (void)mediaPlayerTitleChanged:(NSNotification *)aNotification;
/**
* Sent by the default notification center whenever the player's chapter has changed (if any).
* \details Discussion The value of aNotification is always an VLCMediaPlayerChapterChanged notification. You can retrieve
* the VLCMediaPlayer object in question by sending object to aNotification.
*/
- (void)mediaPlayerChapterChanged:(NSNotification *)aNotification;
#if TARGET_OS_PHONE
/**
* Sent by the default notification center whenever a new snapshot is taken.
......@@ -193,9 +223,9 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
/**
* Set/Get the adjust filter's hue value
*
* \param integer value (range: 0-360, default: 0)
* \param float value (range: -180-180, default: 0.)
*/
@property (nonatomic) int hue;
@property (nonatomic) float hue;
/**
* Set/Get the adjust filter's saturation value
*
......@@ -239,9 +269,11 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
/**
* Frames per second
* \return current media's frames per second value
* \note Deprecated, provided for API compatibility only
* \note To retrieve a media's FPS, use VLCMediaTracksInformationFrameRate.
* \returns 0
*/
@property (NS_NONATOMIC_IOSONLY, readonly) float framesPerSecond;
@property (NS_NONATOMIC_IOSONLY, readonly) float framesPerSecond __attribute__((deprecated));
#pragma mark -
#pragma mark time
......@@ -495,9 +527,8 @@ extern NSString *const VLCTitleDescriptionIsMenu;
* Plays a media resource using the currently selected media controller (or
* default controller. If feed was paused then the feed resumes at the position
* it was paused in.
* \return A Boolean determining whether the stream was played or not.
*/
-(BOOL)play;
- (void)play;
/**
* Toggle's the pause state of the feed.
......@@ -588,6 +619,11 @@ extern NSString *const VLCTitleDescriptionIsMenu;
*/
- (void)longJumpForward;
/**
* performs navigation actions on interactive titles
*/
- (void)performNavigationAction:(VLCMediaPlaybackNavigationAction)action;
#pragma mark -
#pragma mark playback information
/**
......
Pod::Spec.new do |s|
s.name = 'MobileVLCKit-prod'
s.version = '2.7.9'
s.summary = "MobileVLCKit is an Objective-C wrapper for libvlc's external interface on iOS."
s.homepage = 'https://code.videolan.org/videolan/VLCKit'
s.license = {
:type => 'LGPL v2.1', :file => 'MobileVLCKit-binary/COPYING.txt'
}
s.documentation_url = 'https://wiki.videolan.org/VLCKit/'
s.social_media_url = 'https://twitter.com/videolan'
s.platform = :ios
s.authors = { "Pierre d'Herbemont" => "pdherbemont@videolan.org", "Felix Paul Kühne" => "fkuehne@videolan.org", "Carola Nitz" => "nitz.carola@googlemail.com", "Jean-Baptiste Kempf" => "jb@videolan.org", "Rafaël Carré" => "funman@videolan.org", "Faustino E. Osuna" => "riquedafreak@videolan.org", "Rémi Denis-Courmont" => "remi@remlab.net", "Faustino Osuna" => "riquedafreak@videolan.org", "Tanguy Krotoff" => "tkrotoff@gmail.com", "VideoLAN" => "videolan@videolan.org", "Derk-Jan Hartman" => "hartman@videolan.org", "Jean-Paul Saman" => "jpsaman@videolan.org", "Malte Tancred" => "malte@frontbase.com", "Mike Schrag" => "mschrag@pobox.com", "Rafaël Carré" => "rafael.carre@gmail.com", "Sebastien Zwickert" => "dilaroga@free.fr", "Toralf Niebuhr" => "gmthor85@aim.com", "Emmanuel de Roux" => "lostbread@free.fr", "Daniel Mierswa" => "impulze@impulze.org", "Rune Botten" => "rbotten@gmail.com", "Konstantin Pavlov" => "thresh@videolan.org", "Pere Orga" => "gotrunks@gmail.com", "Philippe Coent" => "philippe.coent@gmail.com", "Andrey Utkin" => "andrey.krieger.utkin@gmail.com", "Brendon Justin" => "brendonjustin@gmail.com", "Sylver Bruneau" => "sylver.bruneau@gmail.com", "Gleb Pinigin" => "gpinigin@gmail.com", "Kuang Rufan" => "master@a1983.com.cn", "Paul Williamson" => "squarefrog@gmail.com", "David Fuhrmann" => "david.fuhrmann@googlemail.com", "Brion Vibber" => "brion@pobox.com", "Martin Storsjö" => "martin@martin.st", "Winston Weinert" => "winston@ml1.net", "Florent Pillet" => "fpillet@gmail.com", "Paulo Vitor Magacho da Silva" => "pvmagacho@gmail.com", "James Dumay" => "james.w.dumay@gmail.com", "Jörg Bleyel" => "jbleyel@gmx.net", "Aleksandr Matuzok" => "sherilynhope@gmail.com", "Pierre SAGASPE" => "pierre.sagaspe@me.com", "Shenggang Hu" => "mrhhsg@gmail.com", "Filipe Cabecinhas" => "vlc@filcab.net", "Jeremy Marchand" => "kodlian@users.noreply.github.com", "Andre Silva" => "andre.silva@blip.pt", "Stefan Schmidt-Bilkenroth" => "ssb@mac.com", "Benjamin Adolphi" => "b.adolphi@gmail.com" }
s.source = {
:http => 'http://download.videolan.org/cocoapods/prod/MobileVLCKit-2.7.9.zip',
:sha256 => '1833bcc6a48a1d5c552b1632e3299172dc7add27cd330969d64f873086da862c'
}
s.ios.vendored_framework = 'MobileVLCKit-binary/MobileVLCKit.framework'
s.source_files = 'MobileVLCKit-binary/MobileVLCKit.framework/Headers/*.h'
s.public_header_files = 'MobileVLCKit-binary/MobileVLCKit.framework/Headers/*.h'
s.ios.deployment_target = '7.0'
s.frameworks = 'QuartzCore', 'CoreText', 'AVFoundation', 'Security', 'CFNetwork', 'AudioToolbox', 'OpenGLES', 'CoreGraphics', 'VideoToolbox', 'CoreMedia'
s.libraries = 'c++', 'xml2', 'z', 'bz2', 'iconv'
s.requires_arc = false
s.xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
'CLANG_CXX_LIBRARY' => 'libc++'
}
end
Pod::Spec.new do |s|
s.name = 'MobileVLCKit-unstable'
s.version = '3.0.0a3'
s.summary = "MobileVLCKit is an Objective-C wrapper for libvlc's external interface on iOS."
s.homepage = 'https://code.videolan.org/videolan/VLCKit'
s.license = {
:type => 'LGPL v2.1', :file => 'MobileVLCKit-binary/COPYING.txt'
}
s.documentation_url = 'https://wiki.videolan.org/VLCKit/'
s.platform = :ios
s.authors = 'Pierre d\'Herbemont', { 'Felix Paul Kühne' => 'fkuehne@videolan.org' }
s.source = {
:http => 'http://people.videolan.org/~feepk/MobileVLCKit-unstable/MobileVLCKit-unstable-3.0.0a3.zip'
}
s.ios.vendored_framework = 'MobileVLCKit-binary/MobileVLCKit.framework'
s.public_header_files = 'MobileVLCKit-binary/MobileVLCKit.framework/Headers/*.h'
s.ios.deployment_target = '7.0'
s.frameworks = 'QuartzCore', 'CoreText', 'AVFoundation', 'Security', 'CFNetwork', 'AudioToolbox', 'OpenGLES', 'CoreGraphics', 'VideoToolbox', 'CoreMedia'
s.libraries = 'c++', 'xml2', 'z', 'bz2', 'iconv'
s.requires_arc = false
s.xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
'CLANG_CXX_LIBRARY' => 'libc++'
}
end
......@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.public_header_files = 'MobileVLCKit-binary/MobileVLCKit.framework/Headers/*.h'
s.ios.deployment_target = '7.0'
s.frameworks = 'QuartzCore', 'CoreText', 'AVFoundation', 'Security', 'CFNetwork', 'AudioToolbox', 'OpenGLES', 'CoreGraphics', 'VideoToolbox', 'CoreMedia'
s.libraries = 'libc++', 'xml2', 'z', 'bz2', 'iconv'
s.libraries = 'c++', 'xml2', 'z', 'bz2', 'iconv'
s.requires_arc = false
s.xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
......
This diff is collapsed.
From b47ac179b55ebfea3101ac291ff3cb980c8bd663 Mon Sep 17 00:00:00 2001
From 63ea19c5689143f0091bb47523f7492197aa6457 Mon Sep 17 00:00:00 2001
From: David Geldreich <david.geldreich@free.fr>
Date: Fri, 20 Apr 2012 16:41:19 +0200
Subject: [PATCH 01/14] arm_neon: added function macro to handle the underscore
Subject: [PATCH 01/18] arm_neon: added function macro to handle the underscore
prefix for the iOS ARM ABI
---
......@@ -65,5 +65,5 @@ index 0000000..d853255
+.endm
+
--
2.6.0
2.9.2
From a67fa298de4471d6490a7d1c2dbde481b38560d1 Mon Sep 17 00:00:00 2001
From 8ebe4f062185378d44a153fb43d3ba1878cd770d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Fri, 10 Aug 2012 16:02:07 +0200
Subject: [PATCH 02/14] deinterlace/merge: use a macro to fix compilation for
Subject: [PATCH 02/18] deinterlace/merge: use a macro to fix compilation for
iOS
---
......@@ -82,5 +82,5 @@ index dd77902..03e5042 100644
b 1b
+endfunc
--
2.6.0
2.9.2
From 9ff2994e5399414687b2bea3717b5d7cce3d285f Mon Sep 17 00:00:00 2001
From 4ea74104b56b28c4e34548811bc1f45bcafb4895 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Tue, 9 Dec 2014 22:14:55 +0100
Subject: [PATCH 05/14] lib/media player: inherit deinterlace variable to
Subject: [PATCH 03/18] lib/media player: inherit deinterlace variable to
achieve correct value on first use
---
......@@ -9,10 +9,10 @@ Subject: [PATCH 05/14] lib/media player: inherit deinterlace variable to
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/media_player.c b/lib/media_player.c
index 2136ab8..fc5a82f 100644
index 4761fee..24d0c71 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -595,7 +595,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
@@ -609,7 +609,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "zoom", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
var_Create (mp, "aspect-ratio", VLC_VAR_STRING);
var_Create (mp, "crop", VLC_VAR_STRING);
......@@ -22,5 +22,5 @@ index 2136ab8..fc5a82f 100644
var_Create (mp, "vbi-page", VLC_VAR_INTEGER);
--
2.6.0
2.9.2
From 2832892893d2124a1559d6be538f4c3c948de922 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 29 May 2013 13:25:54 +0200
Subject: [PATCH 03/14] libass: fix text rendering on iOS by providing a font
lookup mechanism for the font shipped with Aspen
---
modules/codec/libass.c | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/modules/codec/libass.c b/modules/codec/libass.c
index 5cd48bc..40f45ac 100644
--- a/modules/codec/libass.c
+++ b/modules/codec/libass.c
@@ -29,6 +29,13 @@
# include "config.h"
#endif
+#if defined (__APPLE__)
+#include <TargetConditionals.h>
+#if TARGET_OS_IPHONE
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+#endif
+
#include <string.h>
#include <limits.h>
#include <assert.h>
@@ -213,6 +220,37 @@ static int Create( vlc_object_t *p_this )
#if defined( __ANDROID__ )
const char *psz_font = "/system/fonts/DroidSans-Bold.ttf";
const char *psz_family = "Droid Sans Bold";
+#elif defined (__APPLE__)
+#if !TARGET_OS_IPHONE
+ const char *psz_font = NULL; /* We don't ship a default font with VLC */
+ const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */
+#else
+ CFURLRef fileURL;
+ fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("OpenSans-Regular.ttf"),
+ NULL,
+ NULL);
+ if (!fileURL)
+ return VLC_EGENERIC;
+
+ CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle);
+ CFRelease(fileURL);
+
+ if (!urlString)
+ return VLC_EGENERIC;
+
+ CFIndex length = CFStringGetLength(urlString);
+ if (!length)
+ return VLC_EGENERIC;
+ length++;
+
+ char *psz_path = (char *)malloc(length);
+ CFStringGetCString(urlString, psz_path, length, kCFStringEncodingUTF8);
+ CFRelease(urlString);
+
+ const char *psz_font = (const char *)strdup(psz_path);
+ free(psz_path);
+ const char *psz_family = "Open Sans";
+#endif
#else
const char *psz_font = NULL; /* We don't ship a default font with VLC */
const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */
--
2.6.0
From af4ed742f7c2084f0b78647bbbd7442e391182f1 Mon Sep 17 00:00:00 2001
From 7e6b3f55405d385a3595ef960209e570618d9174 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 18 Dec 2014 22:14:55 +0100
Subject: [PATCH 06/14] arm_neon: work-around libtool issue
Subject: [PATCH 04/18] arm_neon: work-around libtool issue
---
modules/arm_neon/Makefile.am | 2 ++
......@@ -18,5 +18,5 @@ index db81ec0..e67e07e 100644
libchroma_yuv_neon_plugin_la_SOURCES = \
--
2.6.0
2.9.2
From 0f9caf58c96ae4027eb0fcb395ccaab7f212dbf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 22 Jan 2014 13:55:16 +0100
Subject: [PATCH 04/14] freetype: added a fake font lookup mechanism for iOS to
use the packaged demo fonts
---
modules/text_renderer/freetype.c | 2 ++
modules/text_renderer/platform_fonts.c | 40 ++++++++++++++++++++++++++++++++++
modules/text_renderer/platform_fonts.h | 3 +++
3 files changed, 45 insertions(+)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index f55e23a..bc508c6 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -1206,6 +1206,8 @@ static int Create( vlc_object_t *p_this )
#elif defined( __APPLE__ )
#if !TARGET_OS_IPHONE
p_sys->pf_select = MacLegacy_Select;
+#else
+ p_sys->pf_select = iOSFake_Select;
#endif
#elif defined( _WIN32 ) && defined( HAVE_GET_FONT_BY_FAMILY_NAME )
p_sys->pf_select = Win32_Select;
diff --git a/modules/text_renderer/platform_fonts.c b/modules/text_renderer/platform_fonts.c
index 7869dba..deeaa7d 100644
--- a/modules/text_renderer/platform_fonts.c
+++ b/modules/text_renderer/platform_fonts.c
@@ -42,6 +42,9 @@
#include <TargetConditionals.h>
#if !TARGET_OS_IPHONE
#include <Carbon/Carbon.h>
+#else
+#include <CoreFoundation/CoreFoundation.h>
+#include <vlc_url.h>
#endif
#include <sys/param.h> /* for MAXPATHLEN */
#undef HAVE_FONTCONFIG
@@ -405,6 +408,43 @@ char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
return psz_path;
}
+#else
+char *iOSFake_Select( filter_t *p_filter, const char* psz_fontname,
+ bool b_bold, bool b_italic, int i_size, int *i_idx )
+{
+ VLC_UNUSED(p_filter);
+ VLC_UNUSED(psz_fontname);
+ VLC_UNUSED(b_bold);
+ VLC_UNUSED(b_italic);
+ VLC_UNUSED(i_size);
+ VLC_UNUSED(i_idx);
+
+ CFURLRef fileURL;
+ fileURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(),
+ CFSTR("OpenSans-Regular.ttf"),
+ NULL,
+ NULL);
+ if (!fileURL)
+ return NULL;
+ CFStringRef urlString = CFURLCopyFileSystemPath(fileURL, kCFURLPOSIXPathStyle);
+ CFRelease(fileURL);
+
+ if (!urlString)
+ return NULL;
+
+ CFIndex length = CFStringGetLength(urlString);
+ if (!length)
+ return NULL;
+ length++;
+
+ char *psz_path = (char *)malloc(length);
+ CFStringGetCString(urlString, psz_path, length, kCFStringEncodingUTF8);
+ CFRelease(urlString);
+
+ psz_path = strdup(psz_path);
+
+ return psz_path;
+}
#endif
#endif
diff --git a/modules/text_renderer/platform_fonts.h b/modules/text_renderer/platform_fonts.h
index cff52b1..40b25fb 100644
--- a/modules/text_renderer/platform_fonts.h
+++ b/modules/text_renderer/platform_fonts.h
@@ -95,6 +95,9 @@ char* Win32_Select( filter_t *p_filter, const char* family,
#if !TARGET_OS_IPHONE
char* MacLegacy_Select( filter_t *p_filter, const char* psz_fontname,
bool b_bold, bool b_italic, int i_size, int *i_idx );
+#else
+char *iOSFake_Select( filter_t *p_filter, const char* psz_fontname,
+ bool b_bold, bool b_italic, int i_size, int *i_idx );
#endif
#endif
--
2.6.0
From f83d7ed601d02bfe25afbe591473ec072df157aa Mon Sep 17 00:00:00 2001
From e8c7e83f44de4bd3fd9dceb874792fe4a9675810 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Fri, 19 Dec 2014 22:14:55 +0100
Subject: [PATCH 07/14] libvlc/media: re-parse if flags changed
Subject: [PATCH 05/18] libvlc/media: re-parse if flags changed
---
lib/media.c | 6 ++++++
......@@ -9,10 +9,10 @@ Subject: [PATCH 07/14] libvlc/media: re-parse if flags changed
2 files changed, 7 insertions(+)
diff --git a/lib/media.c b/lib/media.c
index 3b717c7..1b1c033 100644
index 49f5132..6b5504b 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -716,6 +716,12 @@ static int media_parse(libvlc_media_t *media, bool b_async,
@@ -719,6 +719,12 @@ static int media_parse(libvlc_media_t *media, bool b_async,
vlc_mutex_lock(&media->parsed_lock);
needed = !media->has_asked_preparse;
media->has_asked_preparse = true;
......@@ -38,5 +38,5 @@ index 35f06a4..d28297e 100644
/* Media Descriptor */
--
2.6.0
2.9.2
From 51bb789836a81edff3b4f2a9dcc77dd621fc29f2 Mon Sep 17 00:00:00 2001
From 9f36dea2b6aab350057c783b5c76a59ee181c883 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 10 Mar 2014 17:54:01 +0200
Subject: [PATCH 09/14] arm_neon: fix iOS linking
Date: Wed, 10 Dec 2014 22:14:55 +0100
Subject: [PATCH 06/18] arm_neon: fix iOS linking
---
modules/arm_neon/amplify.S | 7 ++---
......@@ -194,5 +194,5 @@ index a94ae85..54b43a7 100644
pop {r4,pc}
+endfunc
--
2.6.0
2.9.2
From 25d2cd4c8d4074c53de8a843f33802ff9bafd67b Mon Sep 17 00:00:00 2001
From e05cd8fcae7d6bf0c108128140ce6d0b9eb5b0e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 10 Mar 2014 17:54:01 +0200
Subject: [PATCH 10/14] disable neon volume plugin
Date: Wed, 10 Dec 2014 22:14:55 +0100
Subject: [PATCH 07/18] disable neon volume plugin
---
modules/arm_neon/Makefile.am | 1 -
......@@ -19,5 +19,5 @@ index e67e07e..6909752 100644
libyuv_rgb_neon_plugin.la
endif
--
2.6.0
2.9.2
From 62d9bc8078db9b97a335ed838d540d164f690e07 Mon Sep 17 00:00:00 2001
From 7ec64a02772516c1d62239f3e5230d2d8c95b5d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sun, 7 Dec 2014 20:02:18 +0100
Subject: [PATCH 11/14] contrib/gcrypt: work-around a libtool limitation
Subject: [PATCH 08/18] contrib/gcrypt: work-around a libtool limitation
---
contrib/src/gcrypt/rules.mak | 1 +
......@@ -10,7 +10,7 @@ Subject: [PATCH 11/14] contrib/gcrypt: work-around a libtool limitation
create mode 100644 contrib/src/gcrypt/work-around-libtool-limitation.patch
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index d817a13..5000488 100644
index 2fed2cd..0471522 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -15,6 +15,7 @@ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
......@@ -53,5 +53,5 @@ index 0000000..df97ffb
+ AM_CFLAGS = $(GPG_ERROR_CFLAGS)
+
--
2.6.0
2.9.2
From 862c7965ff53e8e99554965dfc03cbe445092f88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 31 Mar 2014 17:54:01 +0200
Subject: [PATCH 08/14] libvlc: add preliminary code path to modify quartztext
variables on-the-fly
---
include/vlc/libvlc_media_player.h | 21 ++++++++++++++
lib/libvlc.sym | 4 +++
lib/media_player.c | 6 ++++
lib/video.c | 47 ++++++++++++++++++++++++++++++++
modules/text_renderer/quartztext.c | 56 ++++++++++++++++++++++++++++++++++----
5 files changed, 128 insertions(+), 6 deletions(-)
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 0c7351b..b0b4208 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -1495,6 +1495,27 @@ LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
LIBVLC_API void libvlc_video_set_adjust_float( libvlc_media_player_t *p_mi,
unsigned option, float value );
+/** option values for libvlc_video_{get,set}_adjust_{int,float,bool} */
+enum libvlc_video_textrenderer_option_t {
+ libvlc_textrender_font = 0,
+ libvlc_textrender_fontsize,
+ libvlc_textrender_fontcolor,
+};
+
+LIBVLC_API int libvlc_video_get_textrenderer_int( libvlc_media_player_t *p_mi,
+ unsigned option );
+
+LIBVLC_API void libvlc_video_set_textrenderer_int( libvlc_media_player_t *p_mi,
+ unsigned option, int value );
+
+LIBVLC_API char *libvlc_video_get_textrenderer_string( libvlc_media_player_t *p_mi,
+ unsigned option );
+
+LIBVLC_API void libvlc_video_set_textrenderer_string( libvlc_media_player_t *p_mi,
+ unsigned option,
+ const char *psz_text );
+
+
/** @} video */
/** \defgroup libvlc_audio LibVLC audio controls
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index e7527bd..2f18a00 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -228,6 +228,8 @@ libvlc_video_get_spu_count
libvlc_video_get_spu_delay
libvlc_video_get_spu_description
libvlc_video_get_teletext
+libvlc_video_get_text_renderer_int
+libvlc_video_get_text_renderer_string
libvlc_video_get_title_description
libvlc_video_get_track
libvlc_video_get_track_count
@@ -252,6 +254,8 @@ libvlc_video_set_spu
libvlc_video_set_spu_delay
libvlc_video_set_subtitle_file
libvlc_video_set_teletext
+libvlc_video_set_text_renderer_int
+libvlc_video_set_text_renderer_string
libvlc_video_set_track
libvlc_video_take_snapshot
libvlc_vlm_add_broadcast
diff --git a/lib/media_player.c b/lib/media_player.c
index fc5a82f..b9e8f42 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -625,6 +625,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "saturation", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
var_Create (mp, "gamma", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
+#ifdef __APPLE__
+ var_Create (mp, "quartztext-font", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
+ var_Create (mp, "quartztext-fontsize", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
+ var_Create (mp, "quartztext-color", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
+#endif
+
/* Audio */
var_Create (mp, "aout", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
var_Create (mp, "audio-device", VLC_VAR_STRING);
diff --git a/lib/video.c b/lib/video.c
index b2c9b34..588aa1d 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -910,3 +910,50 @@ float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
{
return get_float( p_mi, "adjust", adjust_option_bynumber(option) );
}
+
+
+static const opt_t *
+textrenderer_option_bynumber( unsigned option )
+{
+ static const opt_t optlist[] =
+ {
+ { "quartztext-font", VLC_VAR_STRING },
+ { "quartztext-fontsize", VLC_VAR_INTEGER },
+ { "quartztext-color", VLC_VAR_INTEGER },
+ };
+ enum { num_opts = sizeof(optlist) / sizeof(*optlist) };
+
+ const opt_t *r = option < num_opts ? optlist+option : NULL;
+ if( !r )
+ libvlc_printerr( "Unknown quartztext option" );
+ return r;
+}
+
+/* basic text renderer support */
+
+void libvlc_video_set_textrenderer_int( libvlc_media_player_t *p_mi,
+ unsigned option, int value )
+{
+ set_int( p_mi, "quartztext", textrenderer_option_bynumber(option), value );
+}
+
+
+int libvlc_video_get_textrenderer_int( libvlc_media_player_t *p_mi,
+ unsigned option )
+{
+ return get_int( p_mi, "quartztext", textrenderer_option_bynumber(option) );
+}
+
+
+void libvlc_video_set_textrenderer_string( libvlc_media_player_t *p_mi,
+ unsigned option, const char *psz_value )
+{
+ set_string( p_mi, "quartztext", textrenderer_option_bynumber(option), psz_value );
+}
+
+
+char * libvlc_video_get_textrenderer_string( libvlc_media_player_t *p_mi,
+ unsigned option )
+{
+ return get_string( p_mi, "quartztext", textrenderer_option_bynumber(option) );
+}
diff --git a/modules/text_renderer/quartztext.c b/modules/text_renderer/quartztext.c
index 8142155..1d05dcd 100644
--- a/modules/text_renderer/quartztext.c
+++ b/modules/text_renderer/quartztext.c
@@ -67,6 +67,10 @@
static int Create (vlc_object_t *);
static void Destroy(vlc_object_t *);
+static int QuartztextCallback( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval,
+ void *p_data );
+
static int LoadFontsFromAttachments(filter_t *p_filter);
static int RenderText(filter_t *, subpicture_region_t *,
@@ -128,16 +132,20 @@ vlc_module_begin ()
false)
add_string("quartztext-monofont", DEFAULT_MONOFONT, MONOSPACE_FONT_TEXT, FONT_LONGTEXT,
false)
- add_integer("quartztext-rel-fontsize", DEFAULT_REL_FONT_SIZE, FONTSIZER_TEXT,
+ change_safe()
+ add_integer("quartztext-fontsize", DEFAULT_REL_FONT_SIZE, FONTSIZER_TEXT,
FONTSIZER_LONGTEXT, false)
+ change_safe()
change_integer_list(pi_sizes, ppsz_sizes_text)
add_integer("quartztext-color", 0x00FFFFFF, COLOR_TEXT,
COLOR_LONGTEXT, false)
+ change_safe()
change_integer_list(pi_color_values, ppsz_color_descriptions)
add_bool("quartztext-outline", false, OUTLINE_TEXT, NULL, false)
add_bool("quartztext-shadow", true, SHADOW_TEXT, NULL, false)
set_capability("text renderer", 50)
add_shortcut("text")
+ add_shortcut("quartztext")
set_callbacks(Create, Destroy)
vlc_module_end ()
@@ -179,6 +187,7 @@ struct offscreen_bitmap_t
*****************************************************************************/
struct filter_sys_t
{
+ vlc_mutex_t lock;
text_style_t *p_default_style;
#ifndef TARGET_OS_IPHONE
@@ -208,11 +217,11 @@ static int Create(vlc_object_t *p_this)
free(p_sys);
return VLC_ENOMEM;
}
- p_sys->p_default_style->psz_fontname = var_CreateGetString(p_this, "quartztext-font");;
+ p_sys->p_default_style->psz_fontname = var_CreateGetStringCommand(p_this, "quartztext-font");;
p_sys->p_default_style->psz_monofontname = var_CreateGetString(p_this, "quartztext-monofont");
p_sys->p_default_style->i_font_size = GetFontSize(p_filter);
- p_sys->p_default_style->i_font_color = VLC_CLIP(var_CreateGetInteger(p_this, "quartztext-color") , 0, 0xFFFFFF);
+ p_sys->p_default_style->i_font_color = VLC_CLIP(var_CreateGetIntegerCommand(p_this, "quartztext-color") , 0, 0xFFFFFF);
p_sys->p_default_style->i_features |= STYLE_HAS_FONT_COLOR;
if( var_InheritBool(p_this, "quartztext-outline") )
@@ -244,6 +253,11 @@ static int Create(vlc_object_t *p_this)
p_sys->i_fonts = 0;
#endif
+ vlc_mutex_init( &p_sys->lock );
+ var_AddCallback( p_filter, "quartztext-font", QuartztextCallback, p_sys );
+ var_AddCallback( p_filter, "quartztext-fontsize", QuartztextCallback, p_sys );
+ var_AddCallback( p_filter, "quartztext-color", QuartztextCallback, p_sys );
+
LoadFontsFromAttachments(p_filter);
return VLC_SUCCESS;
@@ -258,6 +272,16 @@ static void Destroy(vlc_object_t *p_this)
{
filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys = p_filter->p_sys;
+
+ var_DelCallback( p_filter, "quartztext-font", QuartztextCallback, p_sys );
+ var_DelCallback( p_filter, "quartztext-fontsize", QuartztextCallback, p_sys );
+ var_DelCallback( p_filter, "quartztext-color", QuartztextCallback, p_sys );
+ vlc_mutex_destroy( &p_sys->lock );
+
+ var_Destroy( p_filter, "quartztext-font" ) ;
+ var_Destroy( p_filter, "quartztext-fontsize" );
+ var_Destroy( p_filter, "quartztext-color" );
+
#ifndef TARGET_OS_IPHONE
if (p_sys->p_fonts) {
for (int k = 0; k < p_sys->i_fonts; k++) {
@@ -635,12 +659,12 @@ static int GetFontSize(filter_t *p_filter)
{
int i_size = 0;
- int i_ratio = var_CreateGetInteger( p_filter, "quartztext-rel-fontsize" );
+ int i_ratio = var_CreateGetIntegerCommand( p_filter, "quartztext-fontsize" );
+
if( i_ratio > 0 )
i_size = (int)p_filter->fmt_out.video.i_height / i_ratio;
- if( i_size <= 0 )
- {
+ if( i_size <= 0 ) {
msg_Warn( p_filter, "invalid fontsize, using 12" );
i_size = 12;
}
@@ -726,3 +750,23 @@ static int RenderYUVA(filter_t *p_filter, subpicture_region_t *p_region,
return VLC_SUCCESS;
}
+
+static int QuartztextCallback( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval,
+ void *p_data )
+{
+ VLC_UNUSED(oldval);
+ filter_t *p_filter = (filter_t *)p_this;
+ filter_sys_t *p_sys = (filter_sys_t *)p_data;
+
+ vlc_mutex_lock( &p_sys->lock );
+ if( !strcmp( psz_var, "quartztext-font" ) )
+ p_sys->p_default_style->psz_fontname = newval.psz_string;
+ else if( !strcmp( psz_var, "quartztext-fontsize" ) )
+ p_sys->p_default_style->i_font_size = (int)p_filter->fmt_out.video.i_height / newval.i_int;
+ else if( !strcmp( psz_var, "quartztext-color" ) )
+ p_sys->p_default_style->i_font_color = VLC_CLIP(newval.i_int, 0, 0xFFFFFF);
+ vlc_mutex_unlock( &p_sys->lock );
+
+ return VLC_SUCCESS;
+}
--
2.6.0
From e68fc29a7335edd9948171bd55a84a459bdb7e50 Mon Sep 17 00:00:00 2001
From 3b9dd5c03ce79c054e8fd2cc910ea8c4aaef96a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 10 Sep 2015 19:58:40 +0200
Subject: [PATCH 12/14] src/misc: fix compilation for OS without fork()
Subject: [PATCH 09/18] src/misc: fix compilation for OS without fork()
---
src/misc/cpu.c | 2 +-
......@@ -21,5 +21,5 @@ index 4a5f2a0..79b28e4 100644
{
pid_t pid = fork();
--
2.6.0
2.9.2
From 8dbcb912c9c4a2012f546f596cf4f62b3ff01ba8 Mon Sep 17 00:00:00 2001
From 607c4e26eae59570ccd7c5cec55a9b515aa749a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Fri, 11 Sep 2015 18:34:26 +0200
Subject: [PATCH 13/14] libvlc: hack to disable daemon mode
Subject: [PATCH 10/18] libvlc: hack to disable daemon mode
---
src/libvlc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/libvlc.c b/src/libvlc.c
index 34824da..6bad336 100644
index 3468e0e..2d870bd 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -199,6 +199,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
@@ -200,6 +200,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
return VLC_ENOMOD;
}
......@@ -23,5 +23,5 @@ index 34824da..6bad336 100644
/* Check for daemon mode */
if( var_InheritBool( p_libvlc, "daemon" ) )
--
2.6.0
2.9.2
From a97ba7e78370b7130299773761b6b218c5a6291c Mon Sep 17 00:00:00 2001
From 775dae9d86d8e14854f633d8cd7b0053ecbd5569 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sat, 3 Oct 2015 22:45:14 +0200
Subject: [PATCH 14/14] contrib/gcrypt: fix tvOS compilation
Subject: [PATCH 11/18] contrib/gcrypt: fix tvOS compilation
---
contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++
......@@ -32,7 +32,7 @@ index 0000000..f1d3ccc
+ * %rdi: ctx, CTX
+ * %rsi: data (64 bytes)
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index 5000488..6de232b 100644
index 0471522..ac20d02 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -16,6 +16,7 @@ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
......@@ -56,5 +56,5 @@ index 5000488..6de232b 100644
GCRYPT_CONF += --disable-aesni-support
else
--
2.6.0
2.9.2
From bfb23f9bab2e55476854bd029c8b44ff43e226b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 26 Oct 2015 10:47:56 +0100
Subject: [PATCH 12/18] disable videotoolbox
---
extras/package/ios/build.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index 6c264bc..47cb1d8 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@@ -488,6 +488,8 @@ output_http
output_livehttp
libmux
stream_out
+videotoolbox
+cvpx_i420
"
if [ "$SCARY" = "no" ]; then
--
2.9.2
From edd765c16379b247f7ecc68889b9082ff5d7848e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 26 Oct 2015 10:50:26 +0100
Subject: [PATCH 13/18] Revert "libvlc: refactor sfilter enabling/disabling"
This reverts commit 93900cd71aff74d4eec617d8f87be97427f83101.
---
lib/video.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 51 insertions(+), 16 deletions(-)
diff --git a/lib/video.c b/lib/video.c
index b2c9b34..167f76a 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -613,32 +613,33 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
/* module helpers */
/* ************** */
-static bool find_sub_source_by_name( libvlc_media_player_t *p_mi, const char *restrict name )
+