1 /****************************************************************************
3 * $Id: rmadtcvt.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-2000 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 Stream Data Conversion Interfaces.
22 typedef _INTERFACE IRMADataConvertSystemObject
23 IRMADataConvertSystemObject
;
24 typedef _INTERFACE IRMADataConvert IRMADataConvert
;
25 typedef _INTERFACE IRMADataConvertResponse IRMADataConvertResponse
;
26 typedef _INTERFACE IRMADataRevert IRMADataRevert
;
27 typedef _INTERFACE IRMADataRevertResponse IRMADataRevertResponse
;
29 /****************************************************************************
33 * IRMADataConvertSystemObject
37 * Object that allows Controller to communicate with a specific
38 * Data Convert plugin session (similar to IRMAFileSystemObject)
44 * IID_IMADataConvertSystemObject:
46 * {00003900-0901-11d1-8B06-00A024406D59}
49 DEFINE_GUID(IID_IRMADataConvertSystemObject
,
50 0x00003900, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
53 #define INTERFACE IRMADataConvertSystemObject
55 DECLARE_INTERFACE_(IRMADataConvertSystemObject
, IUnknown
)
60 STDMETHOD(QueryInterface
) (THIS_
64 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
66 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
69 * IRMADataConvertSystemObject
72 /***********************************************************************
73 * Method: GetDataConvertInfo
76 * Returns information needed for proper instantiation of data
77 * convert plugin. pShortName should be a short, human readable
78 * name in the form of "company-dcname". For example:
79 * pShortName = "rn-dataconvert"
81 STDMETHOD(GetDataConvertInfo
) (THIS_
REF(const char*) pShortName
) PURE
;
83 /***********************************************************************
84 * Method: InitDataConvertSystem
87 * Pass in options from config file from under DataConvertMount
88 * for this specific plugin.
90 STDMETHOD(InitDataConvertSystem
) (THIS_ IRMAValues
* pOptions
) PURE
;
92 /***********************************************************************
93 * Method: CreateDataConvert
97 * System is requesting an IRMADataConvert object for this mount
100 STDMETHOD(CreateDataConvert
) (THIS_ IUnknown
** /*OUT*/ ppConvObj
) PURE
;
104 /****************************************************************************
112 * Per connection object to handle the actual data and header
117 * Server side plugin.
119 * IID_IMADataConvert:
121 * {00003901-0901-11d1-8B06-00A024406D59}
124 DEFINE_GUID(IID_IRMADataConvert
,
125 0x00003901, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
128 #define INTERFACE IRMADataConvert
130 DECLARE_INTERFACE_(IRMADataConvert
, IUnknown
)
135 STDMETHOD(QueryInterface
) (THIS_
139 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
141 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
148 * NOTE: for each of ConvertFileHeader, ConvertStreamHeader,
149 * ConvertData, you can call the appropriate done method on
150 * the response object with a result of PNR_OK and a NULL buffer
151 * and the system will use the original header/packet. Do this
152 * if you aren't going to change things in the header/packet.
154 /************************************************************************
155 * Method: DataConvertInit
158 * Basic initialization, mainly just to pass in response object.
160 STDMETHOD(DataConvertInit
) (THIS_ IRMADataConvertResponse
* pResponse
) PURE
;
162 /************************************************************************
163 * Method: ConvertFileHeader
166 * Pass in file headers for data conversion.
168 STDMETHOD(ConvertFileHeader
) (THIS_ IRMAValues
* pFileHeader
) PURE
;
170 /************************************************************************
171 * Method: ConvertStreamHeader
174 * Pass in stream headers for data conversion.
176 STDMETHOD(ConvertStreamHeader
) (THIS_ IRMAValues
* pStreamHeader
) PURE
;
178 /************************************************************************
179 * Method: GetConversionMimeType
182 * Tell the server what converstion type you are using for the
185 STDMETHOD(GetConversionMimeType
)
186 (THIS_
REF(const char*) pConversionType
) PURE
;
188 /************************************************************************
189 * Method: ConvertData
192 * Pass in data to be converted.
194 STDMETHOD(ConvertData
) (THIS_ IRMAPacket
* pPacket
) PURE
;
196 /************************************************************************
197 * Method: ControlBufferReady
200 * Pass in a control channel buffer sent from the IRMADataRevert
201 * on the other side (player).
203 STDMETHOD(ControlBufferReady
) (THIS_ IRMABuffer
* pBuffer
) PURE
;
205 /************************************************************************
206 * Method: SetMulticastTransportConverter
209 * In this case the IRMADataConvert is only handling the header
210 * conversions per player and this call is handing you the data
211 * converter which is doing the data. This will a different
212 * instance of the same object.
214 STDMETHOD(SetMulticastTransportConverter
) (THIS_
215 IRMADataConvert
* pConverter
) PURE
;
218 /************************************************************************
219 * Method: AddMulticastControlConverter
222 * In this case the IRMADataConvert is only handling the data
223 * conversions for all of the players (but only once because it's
224 * multicast). This call is handing you one of a possible many
225 * IRMADataConvert objects which will be handling the header
228 STDMETHOD(AddMulticastControlConverter
) (THIS_
229 IRMADataConvert
* pConverter
) PURE
;
231 /************************************************************************
235 * Let IRMADataConvert know that it is done. This is mainly to clear
236 * circular refs between multicast transport and controllers.
238 STDMETHOD(Done
) (THIS
) PURE
;
242 /****************************************************************************
246 * IRMADataConvertResponse
250 * Response object for IRMADataConvert.
256 * IID_IMADataConvertResponse:
258 * {00003902-0901-11d1-8B06-00A024406D59}
261 DEFINE_GUID(IID_IRMADataConvertResponse
,
262 0x00003902, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
265 #define INTERFACE IRMADataConvertResponse
267 DECLARE_INTERFACE_(IRMADataConvertResponse
, IUnknown
)
272 STDMETHOD(QueryInterface
) (THIS_
276 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
278 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
281 * IRMADataConvertResponse
285 * NOTE: for each of ConvertFileHeader, ConvertStreamHeader,
286 * ConvertData, you can call the appropriate done method on
287 * the response object with a result of PNR_OK and a NULL buffer
288 * and the system will use the original header/packet. Do this
289 * if you aren't going to change things in the header/packet.
291 /************************************************************************
292 * Method: DataConvertInitDone
295 * Async notification that the IRMADataConvert is done with
298 STDMETHOD(DataConvertInitDone
) (THIS_ PN_RESULT status
) PURE
;
300 /************************************************************************
301 * Method: ConvertedFileHeaderReady
304 * Async notification that the IRMADataCovert is done converting the
307 STDMETHOD(ConvertedFileHeaderReady
) (THIS_
308 PN_RESULT status
, IRMAValues
* pFileHeader
) PURE
;
310 /************************************************************************
311 * Method: ConvertedStreamHeaderReady
314 * Async notification that the IRMADataConvert is done converting the
317 STDMETHOD(ConvertedStreamHeaderReady
) (THIS_
318 PN_RESULT status
, IRMAValues
* pStreamHeader
) PURE
;
320 /************************************************************************
321 * Method: ConvertedDataReady
324 * Async notification that the IRMADataConvert is done converting
325 * the stream data packet.
327 STDMETHOD(ConvertedDataReady
) (THIS_ PN_RESULT status
,
328 IRMAPacket
* pPacket
) PURE
;
330 /************************************************************************
331 * Method: SendControlBuffer
334 * Provided to allow IRMADataConvert to send an arbitrary buffer
335 * to the IRMADataRevert on the other side (player).
337 STDMETHOD(SendControlBuffer
) (THIS_ IRMABuffer
* pBuffer
) PURE
;
341 /****************************************************************************
349 * Revert data coming from coresponding IRMADataConvert on server.
353 * Player side plugin.
357 * {00003903-0901-11d1-8B06-00A024406D59}
360 DEFINE_GUID(IID_IRMADataRevert
,
361 0x00003903, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
364 #define INTERFACE IRMADataRevert
366 DECLARE_INTERFACE_(IRMADataRevert
, IUnknown
)
371 STDMETHOD(QueryInterface
) (THIS_
375 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
377 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
383 /************************************************************************
384 * Method: DataRevertInit
387 * Basic inialization of IRMADataRevert. Mainly just to pass in
390 STDMETHOD(DataRevertInit
) (THIS_ IRMADataRevertResponse
* pResponse
) PURE
;
392 /************************************************************************
393 * Method: GetDataRevertInfo
396 * Allow IRMADataRevert to notify player core about which data
397 * conversion mime types it is willing to handle.
399 STDMETHOD(GetDataRevertInfo
) (THIS_
REF(const char**)
400 ppConversionMimeTypes
) PURE
;
402 /************************************************************************
403 * Method: RevertFileHeader
406 * Pass in converted FileHeader to allow IRMADataRevert to revert
409 STDMETHOD(RevertFileHeader
) (THIS_ IRMAValues
* pFileHeader
) PURE
;
411 /************************************************************************
412 * Method: RevertStreamHeader
415 * Pass in converted StreamHeader to allow IRMADataRevert to revert
418 STDMETHOD(RevertStreamHeader
)(THIS_ IRMAValues
* pStreamHeader
) PURE
;
420 /************************************************************************
424 * Pass in converted stream data to allow IRMADataRevert to
427 STDMETHOD(RevertData
) (THIS_ IRMAPacket
* pPacket
) PURE
;
429 /************************************************************************
430 * Method: ControlBufferReady
433 * Pass in control channel buffer received from corresponding
434 * IRMADataConvert on server side.
436 STDMETHOD(ControlBufferReady
) (THIS_ IRMABuffer
* pBuffer
) PURE
;
440 /****************************************************************************
444 * IRMADataRevertResponse
448 * Response ojbect for IRMADataRevert.
454 * IID_IMADataRevertResponse:
456 * {00003904-0901-11d1-8B06-00A024406D59}
459 DEFINE_GUID(IID_IRMADataRevertResponse
,
460 0x00003904, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
463 #define INTERFACE IRMADataRevertResponse
465 DECLARE_INTERFACE_(IRMADataRevertResponse
, IUnknown
)
470 STDMETHOD(QueryInterface
) (THIS_
474 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
476 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
479 * IRMADataRevertResponse
482 /************************************************************************
483 * Method: DataRevertInitDone
486 * Async notification that the IRMADataRevert is done intializing
487 * and can begin processing headers.
489 STDMETHOD(DataRevertInitDone
) (THIS_ PN_RESULT status
) PURE
;
491 /************************************************************************
492 * Method: RevertedFileHeaderReady
495 * Async notification that the IRMADataRevert is done reverting the
498 STDMETHOD(RevertedFileHeaderReady
) (THIS_
499 PN_RESULT status
, IRMAValues
* pHeader
) PURE
;
501 /************************************************************************
502 * Method: RevertedStreamHeaderReady
505 * Async notification that the IRMADataRevert is done reverting the
508 STDMETHOD(RevertedStreamHeaderReady
) (THIS_
509 PN_RESULT status
, IRMAValues
* pHeader
) PURE
;
511 /************************************************************************
512 * Method: RevertedDataReady
515 * Async notification that the IRMADataRevert is done reverting the
518 STDMETHOD(RevertedDataReady
) (THIS_ PN_RESULT status
,
519 IRMAPacket
* pPacket
) PURE
;
521 /************************************************************************
522 * Method: SendControlBuffer
525 * Provided to allow IRMADataRevert to send an arbitrary control
526 * buffer to the IRMADataConvert on the other side (server).
528 STDMETHOD(SendControlBuffer
) (THIS_ IRMABuffer
* pBuffer
) PURE
;