X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=projects%2Fmacosx%2Fframework%2FHeaders%2FPublic%2FVLCMediaPlayer.h;h=6945b7fe725e914ea71e91ed6729ecb2ac7899d1;hb=4c1a614be06811db86dac6abc68c155e3c6af538;hp=34e31a181485cadd16901e11f837d062da32db6b;hpb=55a60c20e9132c7f4b3cfde1d8bfd11728c7f81b;p=vlc diff --git a/projects/macosx/framework/Headers/Public/VLCMediaPlayer.h b/projects/macosx/framework/Headers/Public/VLCMediaPlayer.h index 34e31a1814..6945b7fe72 100644 --- a/projects/macosx/framework/Headers/Public/VLCMediaPlayer.h +++ b/projects/macosx/framework/Headers/Public/VLCMediaPlayer.h @@ -1,11 +1,13 @@ /***************************************************************************** * VLCMediaPlayer.h: VLCKit.framework VLCMediaPlayer header ***************************************************************************** - * Copyright (C) 2007 Pierre d'Herbemont - * Copyright (C) 2007 the VideoLAN team + * Copyright (C) 2007-2009 Pierre d'Herbemont + * Copyright (C) 2007-2009 the VideoLAN team + * Partial Copyright (C) 2009 Felix Paul Kühne * $Id$ * * Authors: Pierre d'Herbemont + * Felix Paul Kühne * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +24,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#import #import "VLCMedia.h" #import "VLCVideoView.h" #import "VLCVideoLayer.h" @@ -81,8 +82,10 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); void * instance; // Internal VLCMedia * media; //< Current media being played VLCTime * cachedTime; //< Cached time of the media being played + VLCTime * cachedRemainingTime; //< Cached remaining time of the media being played VLCMediaPlayerState cachedState; //< Cached state of the media being played float position; //< The position of the media being played + id drawable; //< The drawable associated to this media player } /* Initializers */ @@ -103,14 +106,32 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); - (void)setVideoAspectRatio:(char *)value; - (char *)videoAspectRatio; -- (void)setVideoSubTitles:(int)value; -- (int)videoSubTitles; - (void)setVideoCropGeometry:(char *)value; - (char *)videoCropGeometry; -- (void)setVideoTeleText:(int)value; -- (int)videoTeleText; +- (void)setVideoTeleText:(NSUInteger)value; +- (NSUInteger)videoTeleText; + +/** + * Take a snapshot of the current video. + * + * If width AND height is 0, original size is used. + * If width OR height is 0, original aspect-ratio is preserved. + * + * \param path the path where to save the screenshot to + * \param width the snapshot's width + * \param height the snapshot's height + */ +- (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height; + +/** + * Enable or disable deinterlace filter + * + * \param name of deinterlace filter to use (availability depends on underlying VLC version) + * \param enable boolean to enable or disable deinterlace filter + */ +- (void)setDeinterlaceFilter: (NSString *)name enabled: (BOOL)enabled; @property float rate; @@ -133,17 +154,73 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); */ - (VLCTime *)time; -- (void)setChapter:(int)value; -- (int)chapter; -- (int)countOfChapters; +@property (readonly) VLCTime *remainingTime; +@property (readonly) NSUInteger fps; + +/** + * Return the current video subtitle index + * \return 0 if none is set. + * + * Pass 0 to disable. + */ +@property (readwrite) NSUInteger currentVideoSubTitleIndex; + +/** + * Return the video subtitle tracks + * + * It includes the disabled fake track at index 0. + */ +- (NSArray *)videoSubTitles; + +/** + * Load and set a specific video subtitle, from a file. + * \param path to a file + * \return if the call succeed.. + */ +- (BOOL)openVideoSubTitlesFromFile:(NSString *)path; + +/** + * Chapter selection and enumeration, it is bound + * to a title option. + */ + +/** + * Return the current video subtitle index, or + * \return NSNotFound if none is set. + * + * To disable subtitle pass NSNotFound. + */ +@property (readwrite) NSUInteger currentChapterIndex; +- (void)previousChapter; +- (void)nextChapter; +- (NSArray *)chaptersForTitleIndex:(NSUInteger)titleIndex; + +/** + * Title selection and enumeration + * \return NSNotFound if none is set. + */ +@property (readwrite) NSUInteger currentTitleIndex; +- (NSArray *)titles; /* Audio Options */ -- (void)setAudioTrack:(int)value; -- (int)audioTrack; -- (int)countOfAudioTracks; -- (void)setAudioChannel:(int)value; -- (int)audioChannel; +/** + * Return the current audio track index + * \return 0 if none is set. + * + * Pass 0 to disable. + */ +@property (readwrite) NSUInteger currentAudioTrackIndex; + +/** + * Return the audio tracks + * + * It includes the "Disable" fake track at index 0. + */ +- (NSArray *)audioTracks; + +- (void)setAudioChannel:(NSInteger)value; +- (NSInteger)audioChannel; /* Media Options */ - (void)setMedia:(VLCMedia *)value;