1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
/****************************************************************************
*
* $Id: rmarendr.h 7 2003-05-30 02:18:02Z gabest $
*
* Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
*
* http://www.real.com/devzone
*
* This program contains proprietary
* information of Progressive Networks, Inc, and is licensed
* subject to restrictions on use and distribution.
*
*
* RealMedia Architecture Rendering Interfaces.
*
*/
#ifndef _RMARENDR_H_
#define _RMARENDR_H_
/*
* Forward declarations of some interfaces defined or used here-in.
*/
typedef _INTERFACE IRMARenderer IRMARenderer;
typedef _INTERFACE IRMAStream IRMAStream;
typedef _INTERFACE IRMAStreamSource IRMAStreamSource;
typedef _INTERFACE IRMAPlayer IRMAPlayer;
typedef _INTERFACE IRMAClientEngine IRMAClientEngine;
/****************************************************************************
*
* Interface:
*
* IRMARenderer
*
* Purpose:
*
* Interface implemented by all renderers. Parts of this interface are
* called by the client engine to provide data packets to the
* individual renderers.
*
* IID_IRMARenderer:
*
* {00000300-0901-11d1-8B06-00A024406D59}
*
*/
DEFINE_GUID(IID_IRMARenderer, 0x00000300, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
0xa0, 0x24, 0x40, 0x6d, 0x59);
#undef INTERFACE
#define INTERFACE IRMARenderer
typedef ULONG32 RMA_DISPLAY_TYPE;
#define RMA_DISPLAY_NONE 0x00000000
#define RMA_DISPLAY_WINDOW 0x00000001
#define RMA_DISPLAY_SUPPORTS_RESIZE 0x00000002
#define RMA_DISPLAY_SUPPORTS_FULLSCREEN 0x00000004
#define RMA_DISPLAY_SUPPORTS_VIDCONTROLS 0x00000008
DECLARE_INTERFACE_(IRMARenderer, IUnknown)
{
/*
* IUnknown methods
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*
* IRMARenderer methods
*/
/************************************************************************
* Method:
* IRMARenderer::GetRendererInfo
* Purpose:
* Returns information vital to the instantiation of rendering
* plugins.
*/
STDMETHOD(GetRendererInfo) (THIS_
REF(const char**)/*OUT*/ pStreamMimeTypes,
REF(UINT32) /*OUT*/ unInitialGranularity
) PURE;
/************************************************************************
* Method:
* IRMARenderer::StartStream
* Purpose:
* Called by client engine to inform the renderer of the stream it
* will be rendering. The stream interface can provide access to
* its source or player. This method also provides access to the
* primary client controller interface.
*
*/
STDMETHOD(StartStream) (THIS_
IRMAStream* pStream,
IRMAPlayer* pPlayer) PURE;
/************************************************************************
* Method:
* IRMARenderer::EndStream
* Purpose:
* Called by client engine to inform the renderer that the stream
* is was rendering is closed.
*
*/
STDMETHOD(EndStream) (THIS) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnHeader
* Purpose:
* Called by client engine when a header for this renderer is
* available. The header will arrive before any packets.
*
*/
STDMETHOD(OnHeader) (THIS_
IRMAValues* pHeader) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnPacket
* Purpose:
* Called by client engine when a packet for this renderer is
* due.
*
*/
STDMETHOD(OnPacket) (THIS_
IRMAPacket* pPacket,
LONG32 lTimeOffset) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnTimeSync
* Purpose:
* Called by client engine to inform the renderer of the current
* time relative to the streams synchronized time-line. The
* renderer should use this time value to update its display or
* render it's stream data accordingly.
*
*/
STDMETHOD(OnTimeSync) (THIS_
ULONG32 ulTime) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnPreSeek
* Purpose:
* Called by client engine to inform the renderer that a seek is
* about to occur. The render is informed the last time for the
* stream's time line before the seek, as well as the first new
* time for the stream's time line after the seek will be completed.
*
*/
STDMETHOD(OnPreSeek) (THIS_
ULONG32 ulOldTime,
ULONG32 ulNewTime) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnPostSeek
* Purpose:
* Called by client engine to inform the renderer that a seek has
* just occurred. The render is informed the last time for the
* stream's time line before the seek, as well as the first new
* time for the stream's time line after the seek.
*
*/
STDMETHOD(OnPostSeek) (THIS_
ULONG32 ulOldTime,
ULONG32 ulNewTime) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnPause
* Purpose:
* Called by client engine to inform the renderer that a pause has
* just occurred. The render is informed the last time for the
* stream's time line before the pause.
*
*/
STDMETHOD(OnPause) (THIS_
ULONG32 ulTime) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnBegin
* Purpose:
* Called by client engine to inform the renderer that a begin or
* resume has just occurred. The render is informed the first time
* for the stream's time line after the resume.
*
*/
STDMETHOD(OnBegin) (THIS_
ULONG32 ulTime) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnBuffering
* Purpose:
* Called by client engine to inform the renderer that buffering
* of data is occuring. The render is informed of the reason for
* the buffering (start-up of stream, seek has occurred, network
* congestion, etc.), as well as percentage complete of the
* buffering process.
*
*/
STDMETHOD(OnBuffering) (THIS_
ULONG32 ulFlags,
UINT16 unPercentComplete) PURE;
/************************************************************************
* Method:
* IRMARenderer::GetDisplayType
* Purpose:
* Called by client engine to ask the renderer for it's preferred
* display type. When layout information is not present, the
* renderer will be asked for it's prefered display type. Depending
* on the display type a buffer of additional information may be
* needed. This buffer could contain information about preferred
* window size.
*
*/
STDMETHOD(GetDisplayType) (THIS_
REF(RMA_DISPLAY_TYPE) ulFlags,
REF(IRMABuffer*) pBuffer) PURE;
/************************************************************************
* Method:
* IRMARenderer::OnEndofPackets
* Purpose:
* Called by client engine to inform the renderer that all the
* packets have been delivered. However, if the user seeks before
* EndStream() is called, renderer may start getting packets again
* and the client engine will eventually call this function again.
*/
STDMETHOD(OnEndofPackets) (THIS) PURE;
};
#endif /* _RMARENDR_H_ */
|