]> git.sesse.net Git - vlc/blob - projects/macosx/framework/Headers/Internal/VLCLibVLCBridging.h
VLCKit: Import MobileVLCKit.
[vlc] / projects / macosx / framework / 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 the VideoLAN team
6 * $Id$
7 *
8 * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 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 General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, 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 /**
125  * Bridges functionality between VLCLibrary and VLCAudio.
126  */
127 @interface VLCLibrary (VLCAudioBridging)
128 /**
129  * Called by VLCAudio, each library has a singleton VLCaudio instance.  VLCAudio
130  * calls this function to let the VLCLibrary instance know how to get in touch
131  * with the VLCAudio instance.  TODO: Each media player instance should have it's
132  * own audio instance...not each library instance.
133  */
134 - (void)setAudio:(VLCAudio *)value;
135 @end
136
137 /**
138  * Bridges functionality between VLCAudio and VLCLibrary.
139  */
140 @interface VLCAudio (VLCAudioBridging)
141 /* Initializers */
142 /**
143  * Initializes a new object using the specified mediaPlayer instance.
144  * \return Newly created audio object using specified VLCMediaPlayer instance.
145  */
146 - (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer;
147 @end
148
149 /**
150  * TODO: Documentation
151  */
152 #if !TARGET_OS_IPHONE
153 @interface VLCStreamOutput (LibVLCBridge)
154 - (NSString *)representedLibVLCOptions;
155 @end
156 #endif