1 /****************************************************************************
3 * $Id: rmarendr.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
7 * http://www.real.com/devzone
9 * This program contains proprietary
10 * information of Progressive Networks, Inc, and is licensed
11 * subject to restrictions on use and distribution.
14 * RealMedia Architecture Rendering Interfaces.
22 * Forward declarations of some interfaces defined or used here-in.
24 typedef _INTERFACE IRMARenderer IRMARenderer
;
25 typedef _INTERFACE IRMAStream IRMAStream
;
26 typedef _INTERFACE IRMAStreamSource IRMAStreamSource
;
27 typedef _INTERFACE IRMAPlayer IRMAPlayer
;
28 typedef _INTERFACE IRMAClientEngine IRMAClientEngine
;
31 /****************************************************************************
39 * Interface implemented by all renderers. Parts of this interface are
40 * called by the client engine to provide data packets to the
41 * individual renderers.
45 * {00000300-0901-11d1-8B06-00A024406D59}
48 DEFINE_GUID(IID_IRMARenderer
, 0x00000300, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
49 0xa0, 0x24, 0x40, 0x6d, 0x59);
52 #define INTERFACE IRMARenderer
54 typedef ULONG32 RMA_DISPLAY_TYPE
;
56 #define RMA_DISPLAY_NONE 0x00000000
57 #define RMA_DISPLAY_WINDOW 0x00000001
58 #define RMA_DISPLAY_SUPPORTS_RESIZE 0x00000002
59 #define RMA_DISPLAY_SUPPORTS_FULLSCREEN 0x00000004
60 #define RMA_DISPLAY_SUPPORTS_VIDCONTROLS 0x00000008
63 DECLARE_INTERFACE_(IRMARenderer
, IUnknown
)
68 STDMETHOD(QueryInterface
) (THIS_
72 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
74 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
77 * IRMARenderer methods
80 /************************************************************************
82 * IRMARenderer::GetRendererInfo
84 * Returns information vital to the instantiation of rendering
87 STDMETHOD(GetRendererInfo
) (THIS_
88 REF(const char**)/*OUT*/ pStreamMimeTypes
,
89 REF(UINT32
) /*OUT*/ unInitialGranularity
92 /************************************************************************
94 * IRMARenderer::StartStream
96 * Called by client engine to inform the renderer of the stream it
97 * will be rendering. The stream interface can provide access to
98 * its source or player. This method also provides access to the
99 * primary client controller interface.
102 STDMETHOD(StartStream
) (THIS_
104 IRMAPlayer
* pPlayer
) PURE
;
106 /************************************************************************
108 * IRMARenderer::EndStream
110 * Called by client engine to inform the renderer that the stream
111 * is was rendering is closed.
114 STDMETHOD(EndStream
) (THIS
) PURE
;
116 /************************************************************************
118 * IRMARenderer::OnHeader
120 * Called by client engine when a header for this renderer is
121 * available. The header will arrive before any packets.
124 STDMETHOD(OnHeader
) (THIS_
125 IRMAValues
* pHeader
) PURE
;
127 /************************************************************************
129 * IRMARenderer::OnPacket
131 * Called by client engine when a packet for this renderer is
135 STDMETHOD(OnPacket
) (THIS_
137 LONG32 lTimeOffset
) PURE
;
139 /************************************************************************
141 * IRMARenderer::OnTimeSync
143 * Called by client engine to inform the renderer of the current
144 * time relative to the streams synchronized time-line. The
145 * renderer should use this time value to update its display or
146 * render it's stream data accordingly.
149 STDMETHOD(OnTimeSync
) (THIS_
150 ULONG32 ulTime
) PURE
;
152 /************************************************************************
154 * IRMARenderer::OnPreSeek
156 * Called by client engine to inform the renderer that a seek is
157 * about to occur. The render is informed the last time for the
158 * stream's time line before the seek, as well as the first new
159 * time for the stream's time line after the seek will be completed.
162 STDMETHOD(OnPreSeek
) (THIS_
164 ULONG32 ulNewTime
) PURE
;
166 /************************************************************************
168 * IRMARenderer::OnPostSeek
170 * Called by client engine to inform the renderer that a seek has
171 * just occurred. The render is informed the last time for the
172 * stream's time line before the seek, as well as the first new
173 * time for the stream's time line after the seek.
176 STDMETHOD(OnPostSeek
) (THIS_
178 ULONG32 ulNewTime
) PURE
;
180 /************************************************************************
182 * IRMARenderer::OnPause
184 * Called by client engine to inform the renderer that a pause has
185 * just occurred. The render is informed the last time for the
186 * stream's time line before the pause.
189 STDMETHOD(OnPause
) (THIS_
190 ULONG32 ulTime
) PURE
;
192 /************************************************************************
194 * IRMARenderer::OnBegin
196 * Called by client engine to inform the renderer that a begin or
197 * resume has just occurred. The render is informed the first time
198 * for the stream's time line after the resume.
201 STDMETHOD(OnBegin
) (THIS_
202 ULONG32 ulTime
) PURE
;
204 /************************************************************************
206 * IRMARenderer::OnBuffering
208 * Called by client engine to inform the renderer that buffering
209 * of data is occuring. The render is informed of the reason for
210 * the buffering (start-up of stream, seek has occurred, network
211 * congestion, etc.), as well as percentage complete of the
215 STDMETHOD(OnBuffering
) (THIS_
217 UINT16 unPercentComplete
) PURE
;
219 /************************************************************************
221 * IRMARenderer::GetDisplayType
223 * Called by client engine to ask the renderer for it's preferred
224 * display type. When layout information is not present, the
225 * renderer will be asked for it's prefered display type. Depending
226 * on the display type a buffer of additional information may be
227 * needed. This buffer could contain information about preferred
231 STDMETHOD(GetDisplayType
) (THIS_
232 REF(RMA_DISPLAY_TYPE
) ulFlags
,
233 REF(IRMABuffer
*) pBuffer
) PURE
;
235 /************************************************************************
237 * IRMARenderer::OnEndofPackets
239 * Called by client engine to inform the renderer that all the
240 * packets have been delivered. However, if the user seeks before
241 * EndStream() is called, renderer may start getting packets again
242 * and the client engine will eventually call this function again.
244 STDMETHOD(OnEndofPackets
) (THIS
) PURE
;
247 #endif /* _RMARENDR_H_ */