]> git.sesse.net Git - vlc/blob - projects/macosx/framework/Headers/Internal/VLCLibVLCBridging.h
f9653aceaa24a3bf727477ebf67ab95df265ae53
[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 #import "VLCStreamOutput.h"
27 #import "VLCMediaPlayer.h"
28
29 /**
30  * Bridges functionality between libvlc and VLCMediaList implementation.
31  */
32 @interface VLCMediaList (LibVLCBridging)
33 /* Factories */
34 /**
35  * Manufactures new object wrapped around specified media list.
36  * \param p_new_mlist LibVLC media list pointer.
37  * \return Newly create media list instance using specified media list
38  * pointer.
39  */
40 + (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist;
41
42 /* Initializers */
43 /**
44  * Initializes new object wrapped around specified media list.
45  * \param p_new_mlist LibVLC media list pointer.
46  * \return Newly create media list instance using specified media list
47  * pointer.
48  */
49 - (id)initWithLibVLCMediaList:(void *)p_new_mlist;
50
51 /* Properties */
52 @property (readonly) void * libVLCMediaList;    //< LibVLC media list pointer.
53 @end
54
55 /**
56  * Bridges functionality between libvlc and VLCMedia implementation.
57  */
58 @interface VLCMedia (LibVLCBridging)
59 /* Factories */
60 /**
61  * Manufactures new object wrapped around specified media descriptor.
62  * \param md LibVLC media descriptor pointer.
63  * \return Newly created media instance using specified descriptor.
64  */
65 + (id)mediaWithLibVLCMediaDescriptor:(void *)md;
66
67 /* Initializers */
68 /**
69  * Initializes new object wrapped around specified media descriptor.
70  * \param md LibVLC media descriptor pointer.
71  * \return Newly created media instance using specified descriptor.
72  */
73 - (id)initWithLibVLCMediaDescriptor:(void *)md;
74
75 + (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options;
76
77 /**
78  * Returns the receiver's internal media descriptor pointer.
79  * \return The receiver's internal media descriptor pointer.
80  */
81 @property (readonly) void * libVLCMediaDescriptor;
82 @end
83
84 /**
85  * Bridges functionality between VLCMedia and VLCMediaPlayer
86  */
87 @interface VLCMediaPlayer (LibVLCBridging)
88
89 /* Properties */
90 @property (readonly) void * libVLCMediaPlayer;    //< LibVLC media list pointer.
91 @end
92
93 /**
94  * Bridges functionality between VLCMediaPlayer and LibVLC core
95  */
96 @interface VLCMedia (VLCMediaPlayerBridging)
97 /**
98  * Set's the length of the media object.  This value becomes available once the
99  * media object is being played.
100  * \param value
101  */
102 - (void)setLength:(VLCTime *)value;
103 @end
104
105 /**
106  * Bridges functionality between VLCLibrary and LibVLC core.
107  */
108 @interface VLCLibrary (VLCLibVLCBridging)
109 /**
110  * Shared singleton instance of libvlc library instance.
111  * \return libvlc pointer of library instance.
112  */
113 + (void *)sharedInstance;
114
115 /**
116  * Instance of libvlc library instance.
117  * \return libvlc pointer of library instance.
118  */
119 @property (readonly) void * instance;
120 @end
121
122 /**
123  * Bridges functionality between VLCLibrary and VLCAudio.
124  */
125 @interface VLCLibrary (VLCAudioBridging)
126 /**
127  * Called by VLCAudio, each library has a singleton VLCaudio instance.  VLCAudio
128  * calls this function to let the VLCLibrary instance know how to get in touch
129  * with the VLCAudio instance.  TODO: Each media player instance should have it's
130  * own audio instance...not each library instance.
131  */
132 - (void)setAudio:(VLCAudio *)value;
133 @end
134
135 /**
136  * Bridges functionality between VLCAudio and VLCLibrary.
137  */
138 @interface VLCAudio (VLCAudioBridging)
139 /* Initializers */
140 /**
141  * Initializes a new object using the specified mediaPlayer instance.
142  * \return Newly created audio object using specified VLCMediaPlayer instance.
143  */
144 - (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer;
145 @end
146
147 /**
148  * TODO: Documentation
149  */
150 @interface VLCStreamOutput (LibVLCBridge)
151 - (NSString *)representedLibVLCOptions;
152 @end