VLCLibVLCBridging.h 5.75 KB
Newer Older
1
/*****************************************************************************
2
* VLCLibVLCbridging.h: VLC.framework VLCLibVLCBridging (Private) header
3
4
5
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team
6
* $Id$
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
*
* Authors: Pierre d'Herbemont <pdherbemont # 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.
*****************************************************************************/

25
#import "VLCLibrary.h"
26
#import "VLCMediaListAspect.h"
27
#import "VLCStreamOutput.h"
28

29
30
31
/**
 * Bridges functionality between libvlc and VLCMediaList implementation.
 */
32
33
34
35
36
37
38
39
40
41
42
43

/*
 * Utility function
 */

#define catch_exception( ex ) __catch_exception( (void *)(ex), __FUNCTION__, __FILE__, __LINE__ )
extern void __catch_exception( void * e, const char * function, const char * file, int line_number );

/*
 * @interface VLC(class) (LibVLCBridging)
 */

44
@interface VLCMediaList (LibVLCBridging)
45
46
47
48
49
50
51
/* Factories */
/**
 * Manufactures new object wrapped around specified media list.
 * \param p_new_mlist LibVLC media list pointer.
 * \return Newly create media list instance using specified media list 
 * pointer.
 */
52
+ (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist;
53
54
55
56
57
58
59
60

/* Initializers */
/**
 * Initializes new object wrapped around specified media list.
 * \param p_new_mlist LibVLC media list pointer.
 * \return Newly create media list instance using specified media list
 * pointer.
 */
61
- (id)initWithLibVLCMediaList:(void *)p_new_mlist;
62
63
64

/* Properties */
@property (readonly) void * libVLCMediaList;    //< LibVLC media list pointer.
65
66
67
@end

/**
68
 * Bridges functionality between libvlc and VLCMedia implementation.
69
70
 */
@interface VLCMedia (LibVLCBridging)
71
/* Factories */
72
73
74
75
76
77
78
/**
 * Manufactures new object wrapped around specified media descriptor.
 * \param md LibVLC media descriptor pointer.
 * \return Newly created media instance using specified descriptor.
 */
+ (id)mediaWithLibVLCMediaDescriptor:(void *)md;

79
/* Initializers */
80
81
82
83
84
85
86
/**
 * Initializes new object wrapped around specified media descriptor.
 * \param md LibVLC media descriptor pointer.
 * \return Newly created media instance using specified descriptor.
 */
- (id)initWithLibVLCMediaDescriptor:(void *)md;

87
88
+ (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options;

89
90
91
92
/**
 * Returns the receiver's internal media descriptor pointer.
 * \return The receiver's internal media descriptor pointer.
 */
93
@property (readonly) void * libVLCMediaDescriptor;
94
95
@end

96
97
98
/**
 * Bridges functionality between VLCMedia and VLCMediaPlayer
 */
99
@interface VLCMedia (VLCMediaPlayerBridging)
100
101
102
103
104
/**
 * Set's the length of the media object.  This value becomes available once the
 * media object is being played.
 * \param value
 */
105
- (void)setLength:(VLCTime *)value;
106
107


108
109
@end

110
111
112
/**
 * Bridges functionality between VLCLibrary and LibVLC core.
 */
113
@interface VLCLibrary (VLCLibVLCBridging)
114
115
116
117
/**
 * Shared singleton instance of libvlc library instance.
 * \return libvlc pointer of library instance.
 */
118
+ (void *)sharedInstance;
119
120
121
122
123
124

/**
 * Instance of libvlc library instance.
 * \return libvlc pointer of library instance.
 */
@property (readonly) void * instance;
125
126
@end

127
128
129
/**
 * Bridges functionality between VLCMediaListAspect and libvlc.
 */
130
@interface VLCMediaListAspect (VLCLibVLCBridging)
131
132
133
134
135
/* Factories */
/**
 * Manufactures a new media list aspect object with libvlc media list view instance.
 * \return Newly created media list aspect using specified libvlc media list view.
 */
136
+ (id)mediaListAspectWithLibVLCMediaListView:(libvlc_media_list_view_t *)p_new_mlv;
137
138
139
140
141

/**
 * Manufactures a new media list aspect object with libvlc media list view instance.
 * \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;
143
144
145
146
147
148

/* Initializers */
/**
 * Initializes a new media list aspect object with libvlc media list view instance.
 * \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;
150
151
152

/* Properties */
@property (readonly) libvlc_media_list_view_t * libVLCMediaListView; //< Libvlc pointer to media list view instance.
153
154
@end

155
156
157
/**
 * Bridges functionality between VLCLibrary and VLCAudio.
 */
158
@interface VLCLibrary (VLCAudioBridging)
159
160
161
162
163
164
/**
 * Called by VLCAudio, each library has a singleton VLCaudio instance.  VLCAudio
 * calls this function to let the VLCLibrary instance know how to get in touch 
 * with the VLCAudio instance.  TODO: Each media player instance should have it's
 * own audio instance...not each library instance.
 */
165
166
167
- (void)setAudio:(VLCAudio *)value;
@end

168
169
170
/**
 * Bridges functionality between VLCAudio and VLCLibrary.
 */
171
@interface VLCAudio (VLCAudioBridging)
172
173
174
175
176
/* Initializers */
/**
 * Initializes a new object using the specified library instance.
 * \return Newly created audio object using specified VLCLibrary instance.
 */
177
178
- (id)initWithLibrary:(VLCLibrary *)library;
@end
179
180
181
182

@interface VLCStreamOutput (LibVLCBridge)
- (NSString *)representedLibVLCOptions;
@end