Commit 5203cf9a authored by Felix Paul Kühne's avatar Felix Paul Kühne

osx/framework: extended API to cover titles, fps, playback modes and some...

osx/framework: extended API to cover titles, fps, playback modes and some convienience chapter functionality

Additionally, updated some copyright information.
parent f929428e
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
/* Notification Messages */ /* Notification Messages */
/** /**
* Standard notification messages that are emitted by VLCAudio object. * Standard notification messages that are emitted by VLCAudio object.
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "VLCAudio.h" #import "VLCAudio.h"
#import "VLCMediaList.h" #import "VLCMediaList.h"
#import "VLCMedia.h" #import "VLCMedia.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "VLCMediaList.h" #import "VLCMediaList.h"
#import "VLCTime.h" #import "VLCTime.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCMediaList.h> #import <VLCKit/VLCMediaList.h>
@class VLCMediaList; @class VLCMediaList;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "VLCMediaList.h" #import "VLCMediaList.h"
@class VLCMediaList; @class VLCMediaList;
......
// /*****************************************************************************
// VLCMediaListPlayer.h * VLCMediaListPlayer.m: VLCKit.framework VLCMediaListPlayer implementation
// VLCKit *****************************************************************************
// * Copyright (C) 2009 Pierre d'Herbemont
// Created by Pierre d'Herbemont on 8/24/09. * Partial Copyright (C) 2009 Felix Paul Kühne
// Copyright 2009 __MyCompanyName__. All rights reserved. * Copyright (C) 2009 the VideoLAN team
// * $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
* Felix Paul Kühne <fkuehne # videolan.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
@class VLCMedia, VLCMediaPlayer, VLCMediaList; @class VLCMedia, VLCMediaPlayer, VLCMediaList;
...@@ -33,6 +51,13 @@ ...@@ -33,6 +51,13 @@
- (void)play; - (void)play;
- (void)stop; - (void)stop;
/**
* Playmode selection (don't repeat anything, repeat one, repeat all)
*/
- (void)doNotRepeatAnyItem;
- (void)repeatCurrentItem;
- (void)repeatAllItems;
/** /**
* media must be in the current media list. * media must be in the current media list.
*/ */
......
/***************************************************************************** /*****************************************************************************
* VLCMediaPlayer.h: VLCKit.framework VLCMediaPlayer header * VLCMediaPlayer.h: VLCKit.framework VLCMediaPlayer header
***************************************************************************** *****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont * Copyright (C) 2007-2009 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team * Copyright (C) 2007-2009 the VideoLAN team
* Partial Copyright (C) 2009 Felix Paul Kühne
* $Id$ * $Id$
* *
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org> * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
* Felix Paul Kühne <fkuehne # videolan.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -22,7 +24,6 @@ ...@@ -22,7 +24,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "VLCMedia.h" #import "VLCMedia.h"
#import "VLCVideoView.h" #import "VLCVideoView.h"
#import "VLCVideoLayer.h" #import "VLCVideoLayer.h"
...@@ -155,11 +156,16 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -155,11 +156,16 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
- (VLCTime *)time; - (VLCTime *)time;
@property (readonly) VLCTime *remainingTime; @property (readonly) VLCTime *remainingTime;
@property (readonly) int fps;
- (void)setChapter:(int)value; - (void)setChapter:(int)value;
- (int)chapter; - (int)chapter;
- (int)countOfChapters; - (int)countOfChapters;
- (void)setTitle:(int)value;
- (int)title;
- (int)countOfTitles;
/* Audio Options */ /* Audio Options */
- (void)setAudioTrack:(int)value; - (void)setAudioTrack:(int)value;
- (int)audioTrack; - (int)audioTrack;
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
@interface VLCServicesDiscoverer : NSObject @interface VLCServicesDiscoverer : NSObject
{ {
NSArray * services; NSArray * services;
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
extern NSString * VLCDefaultStreamOutputRTSP; extern NSString * VLCDefaultStreamOutputRTSP;
extern NSString * VLCDefaultStreamOutputRTP; extern NSString * VLCDefaultStreamOutputRTP;
extern NSString * VLCDefaultStreamOutputRTP; extern NSString * VLCDefaultStreamOutputRTP;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <VLCKit/VLCStreamOutput.h> #import <VLCKit/VLCStreamOutput.h>
#import <VLCKit/VLCMediaPlayer.h> #import <VLCKit/VLCMediaPlayer.h>
#import <VLCKit/VLCMedia.h> #import <VLCKit/VLCMedia.h>
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
/** /**
* Provides an object to define VLCMedia's time. * Provides an object to define VLCMedia's time.
*/ */
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h> #import <QuartzCore/QuartzCore.h>
@interface VLCVideoView : NSView @interface VLCVideoView : NSView
......
// /*****************************************************************************
// VLCMediaListPlayer.m * VLCMediaListPlayer.m: VLCKit.framework VLCMediaListPlayer implementation
// VLCKit *****************************************************************************
// * Copyright (C) 2009 Pierre d'Herbemont
// Created by Pierre d'Herbemont on 8/24/09. * Partial Copyright (C) 2009 Felix Paul Kühne
// Copyright 2009 __MyCompanyName__. All rights reserved. * Copyright (C) 2009 the VideoLAN team
// * $Id$
*
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
* Felix Paul Kühne <fkuehne # videolan.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCMediaListPlayer.h" #import "VLCMediaListPlayer.h"
#import "VLCMedia.h" #import "VLCMedia.h"
...@@ -112,4 +130,28 @@ ...@@ -112,4 +130,28 @@
libvlc_media_list_player_stop(instance, &ex); libvlc_media_list_player_stop(instance, &ex);
catch_exception(&ex); catch_exception(&ex);
} }
- (void)doNotRepeatAnyItem;
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_media_list_player_set_playback_mode(instance, libvlc_playback_mode_default, &ex);
catch_exception(&ex);
}
- (void)repeatCurrentItem
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_media_list_player_set_playback_mode(instance, libvlc_playback_mode_repeat, &ex);
catch_exception(&ex);
}
- (void)repeatAllItems
{
libvlc_exception_t ex;
libvlc_exception_init(&ex);
libvlc_media_list_player_set_playback_mode(instance, libvlc_playback_mode_loop, &ex);
catch_exception(&ex);
}
@end @end
/***************************************************************************** /*****************************************************************************
* VLCMediaPlayer.m: VLCKit.framework VLCMediaPlayer implementation * VLCMediaPlayer.m: VLCKit.framework VLCMediaPlayer implementation
***************************************************************************** *****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont * Copyright (C) 2007-2009 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team * Copyright (C) 2007-2009 the VideoLAN team
* Partial Copyright (C) 2009 Felix Paul Kühne
* $Id$ * $Id$
* *
* Authors: Pierre d'Herbemont <pdherbemont # videolan.org> * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
* Faustion Osuna <enrique.osuna # gmail.com> * Faustion Osuna <enrique.osuna # gmail.com>
* Felix Paul Kühne <fkuehne # videolan.org>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
...@@ -399,9 +401,21 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -399,9 +401,21 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return [VLCTime timeWithNumber:[NSNumber numberWithDouble:-remaining]]; return [VLCTime timeWithNumber:[NSNumber numberWithDouble:-remaining]];
} }
- (int)fps
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_media_player_get_fps( instance, &ex );
catch_exception( &ex );
return result;
}
- (void)setChapter:(int)value; - (void)setChapter:(int)value;
{ {
libvlc_media_player_set_chapter( instance, value, NULL ); libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_media_player_set_chapter( instance, value, &ex );
catch_exception( &ex );
} }
- (int)chapter - (int)chapter
...@@ -422,6 +436,48 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -422,6 +436,48 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return result; return result;
} }
- (void)nextChapter
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_media_player_next_chapter( instance, &ex );
catch_exception( &ex );
}
- (void)previousChapter
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_media_player_previous_chapter( instance, &ex );
catch_exception( &ex );
}
- (void)setTitle:(int)value
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_media_player_set_title( instance, value, &ex );
catch_exception( &ex );
}
- (int)title
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_media_player_get_title( instance, &ex );
catch_exception( &ex );
return result;
}
- (int)countOfTitles
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_media_player_get_title_count( instance, &ex );
catch_exception( &ex );
return result;
}
- (void)setAudioTrack:(int)value - (void)setAudioTrack:(int)value
{ {
libvlc_audio_set_track( instance, value, NULL ); libvlc_audio_set_track( instance, value, NULL );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment