1 /*****************************************************************************
2 * VLCLibVLCbridging.h: VLC.framework VLCLibVLCBridging (Private) header
3 *****************************************************************************
4 * Copyright (C) 2007 Pierre d'Herbemont
5 * Copyright (C) 2007 the VideoLAN team
8 * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
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.
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.
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 *****************************************************************************/
25 #import "VLCLibrary.h"
26 #import "VLCMediaListAspect.h"
27 #import "VLCStreamOutput.h"
30 * Bridges functionality between libvlc and VLCMediaList implementation.
37 #define catch_exception( ex ) __catch_exception( (void *)(ex), __FUNCTION__, __FILE__, __LINE__ )
38 extern void __catch_exception( void * e, const char * function, const char * file, int line_number );
41 * @interface VLC(class) (LibVLCBridging)
44 @interface VLCMediaList (LibVLCBridging)
47 * Manufactures new object wrapped around specified media list.
48 * \param p_new_mlist LibVLC media list pointer.
49 * \return Newly create media list instance using specified media list
52 + (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist;
56 * Initializes new object wrapped around specified media list.
57 * \param p_new_mlist LibVLC media list pointer.
58 * \return Newly create media list instance using specified media list
61 - (id)initWithLibVLCMediaList:(void *)p_new_mlist;
64 @property (readonly) void * libVLCMediaList; //< LibVLC media list pointer.
68 * Bridges functionality between libvlc and VLCMedia implementation.
70 @interface VLCMedia (LibVLCBridging)
73 * Manufactures new object wrapped around specified media descriptor.
74 * \param md LibVLC media descriptor pointer.
75 * \return Newly created media instance using specified descriptor.
77 + (id)mediaWithLibVLCMediaDescriptor:(void *)md;
81 * Initializes new object wrapped around specified media descriptor.
82 * \param md LibVLC media descriptor pointer.
83 * \return Newly created media instance using specified descriptor.
85 - (id)initWithLibVLCMediaDescriptor:(void *)md;
87 + (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options;
90 * Returns the receiver's internal media descriptor pointer.
91 * \return The receiver's internal media descriptor pointer.
93 @property (readonly) void * libVLCMediaDescriptor;
97 * Bridges functionality between VLCMedia and VLCMediaPlayer
99 @interface VLCMedia (VLCMediaPlayerBridging)
101 * Set's the length of the media object. This value becomes available once the
102 * media object is being played.
105 - (void)setLength:(VLCTime *)value;
111 * Bridges functionality between VLCLibrary and LibVLC core.
113 @interface VLCLibrary (VLCLibVLCBridging)
115 * Shared singleton instance of libvlc library instance.
116 * \return libvlc pointer of library instance.
118 + (void *)sharedInstance;
121 * Instance of libvlc library instance.
122 * \return libvlc pointer of library instance.
124 @property (readonly) void * instance;
128 * Bridges functionality between VLCMediaListAspect and libvlc.
130 @interface VLCMediaListAspect (VLCLibVLCBridging)
133 * Manufactures a new media list aspect object with libvlc media list view instance.
134 * \return Newly created media list aspect using specified libvlc media list view.
136 + (id)mediaListAspectWithLibVLCMediaListView:(libvlc_media_list_view_t *)p_new_mlv;
139 * Manufactures a new media list aspect object with libvlc media list view instance.
140 * \return Newly created media list aspect using specified libvlc media list view.
142 + (id)mediaListAspectWithLibVLCMediaListView:(libvlc_media_list_view_t *)p_new_mlv andMediaList:(VLCMediaList*)mediaList;
146 * Initializes a new media list aspect object with libvlc media list view instance.
147 * \return Newly created media list aspect using specified libvlc media list view.
149 - (id)initWithLibVLCMediaListView:(libvlc_media_list_view_t *)p_new_mlv andMediaList:(VLCMediaList*)mediaList;
152 @property (readonly) libvlc_media_list_view_t * libVLCMediaListView; //< Libvlc pointer to media list view instance.
156 * Bridges functionality between VLCLibrary and VLCAudio.
158 @interface VLCLibrary (VLCAudioBridging)
160 * Called by VLCAudio, each library has a singleton VLCaudio instance. VLCAudio
161 * calls this function to let the VLCLibrary instance know how to get in touch
162 * with the VLCAudio instance. TODO: Each media player instance should have it's
163 * own audio instance...not each library instance.
165 - (void)setAudio:(VLCAudio *)value;
169 * Bridges functionality between VLCAudio and VLCLibrary.
171 @interface VLCAudio (VLCAudioBridging)
174 * Initializes a new object using the specified library instance.
175 * \return Newly created audio object using specified VLCLibrary instance.
177 - (id)initWithLibrary:(VLCLibrary *)library;
180 @interface VLCStreamOutput (LibVLCBridge)
181 - (NSString *)representedLibVLCOptions;