Add pgs color type setting
[xy_vsfilter.git] / include / realmedia / rmaformt.h
blob57a9225210b7774ccecb782fc48a6f149b410ad3
1 /****************************************************************************
2 *
3 * $Id: rmaformt.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 Broadcast Format Plug-in Interfaces.
18 #ifndef _RMAFORMT_H_
19 #define _RMAFORMT_H_
21 #include "rmafiles.h"
24 * Forward declarations of some interfaces defined here-in.
26 typedef _INTERFACE IRMAFileFormatObject IRMAFileFormatObject;
27 typedef _INTERFACE IRMABroadcastFormatObject IRMABroadcastFormatObject;
28 typedef _INTERFACE IRMAFormatResponse IRMAFormatResponse;
29 typedef _INTERFACE IRMAFileObject IRMAFileObject;
30 typedef _INTERFACE IRMANetworkServices IRMANetworkServices;
31 typedef _INTERFACE IRMAPacket IRMAPacket;
32 typedef _INTERFACE IRMAValues IRMAValues;
33 typedef _INTERFACE IRMAPacketTimeOffsetHandler IRMAPacketTimeOffsetHandler;
34 typedef _INTERFACE IRMAPacketTimeOffsetHandlerResponse
35 IRMAPacketTimeOffsetHandlerResponse;
36 typedef _INTERFACE IRMALiveFileFormatInfo IRMALiveFileFormatInfo;
39 /****************************************************************************
41 * Interface:
43 * IRMAFileFormatObject
45 * Purpose:
47 * Object that allows a Controller to communicate with a specific
48 * File Format plug-in session
50 * IID_IRMAFileFormatObject:
52 * {00000F00-0901-11d1-8B06-00A024406D59}
55 DEFINE_GUID(IID_IRMAFileFormatObject, 0x00000F00, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
56 0xa0, 0x24, 0x40, 0x6d, 0x59);
58 #undef INTERFACE
59 #define INTERFACE IRMAFileFormatObject
61 DECLARE_INTERFACE_(IRMAFileFormatObject, IUnknown)
64 * IUnknown methods
66 STDMETHOD(QueryInterface) (THIS_
67 REFIID riid,
68 void** ppvObj) PURE;
70 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
72 STDMETHOD_(ULONG,Release) (THIS) PURE;
75 * IRMAFileFormatObject methods
78 /************************************************************************
79 * Method:
80 * IRMAFileFormatObject::GetFileFormatInfo
81 * Purpose:
82 * Returns information vital to the instantiation of file format
83 * plugins.
85 STDMETHOD(GetFileFormatInfo)(THIS_
86 REF(const char**) /*OUT*/ pFileMimeTypes,
87 REF(const char**) /*OUT*/ pFileExtensions,
88 REF(const char**) /*OUT*/ pFileOpenNames
89 ) PURE;
91 STDMETHOD(InitFileFormat)
92 (THIS_
93 IRMARequest* /*IN*/ pRequest,
94 IRMAFormatResponse* /*IN*/ pFormatResponse,
95 IRMAFileObject* /*IN*/ pFileObject) PURE;
97 STDMETHOD(GetFileHeader) (THIS) PURE;
99 STDMETHOD(GetStreamHeader) (THIS_
100 UINT16 unStreamNumber) PURE;
102 STDMETHOD(GetPacket) (THIS_
103 UINT16 unStreamNumber) PURE;
105 STDMETHOD(Seek) (THIS_
106 ULONG32 ulOffset) PURE;
108 STDMETHOD(Close) (THIS) PURE;
112 /****************************************************************************
114 * Interface:
116 * IRMABroadcastFormatObject
118 * Purpose:
120 * Object that allows a Controller to communicate with a specific
121 * Broadcast Format plug-in session
123 * IID_IRMABroadcastFormatObject:
125 * {00000F01-0901-11d1-8B06-00A024406D59}
128 DEFINE_GUID(IID_IRMABroadcastFormatObject, 0x00000F01, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
129 0xa0, 0x24, 0x40, 0x6d, 0x59);
131 #undef INTERFACE
132 #define INTERFACE IRMABroadcastFormatObject
134 DECLARE_INTERFACE_(IRMABroadcastFormatObject, IUnknown)
137 * IUnknown methods
139 STDMETHOD(QueryInterface) (THIS_
140 REFIID riid,
141 void** ppvObj) PURE;
143 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
145 STDMETHOD_(ULONG,Release) (THIS) PURE;
148 * IRMABroadcastFormatObject methods
151 /************************************************************************
152 * Method:
153 * IRMABroadcastFormatObject::GetBroadcastFormatInfo
154 * Purpose:
155 * Returns information vital to the instantiation of broadcast format
156 * plugins.
158 STDMETHOD(GetBroadcastFormatInfo)(THIS_
159 REF(const char*) /*OUT*/ pToken) PURE;
161 STDMETHOD(InitBroadcastFormat) (THIS_
162 const char* /*IN*/ pURL,
163 IRMAFormatResponse* /*IN*/ pFormatResponse
164 ) PURE;
166 STDMETHOD(GetFileHeader) (THIS) PURE;
168 STDMETHOD(GetStreamHeader) (THIS_
169 UINT16 unStreamNumber) PURE;
171 STDMETHOD(StartPackets) (THIS_
172 UINT16 unStreamNumber) PURE;
174 STDMETHOD(StopPackets) (THIS_
175 UINT16 unStreamNumber) PURE;
179 /****************************************************************************
181 * Interface:
183 * IRMAFormatResponse
185 * Purpose:
187 * Object that allows a specific File Format Object to communicate
188 * with its user
190 * IID_IRMAFormatResponse:
192 * {00000F02-0901-11d1-8B06-00A024406D59}
195 DEFINE_GUID(IID_IRMAFormatResponse, 0x00000F02, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
196 0xa0, 0x24, 0x40, 0x6d, 0x59);
198 #undef INTERFACE
199 #define INTERFACE IRMAFormatResponse
201 DECLARE_INTERFACE_(IRMAFormatResponse, IUnknown)
204 * IUnknown methods
206 STDMETHOD(QueryInterface) (THIS_
207 REFIID riid,
208 void** ppvObj) PURE;
210 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
212 STDMETHOD_(ULONG,Release) (THIS) PURE;
215 * IRMAFormatResponse methods
217 STDMETHOD(InitDone) (THIS_
218 PN_RESULT status) PURE;
220 STDMETHOD(PacketReady) (THIS_
221 PN_RESULT status,
222 IRMAPacket* pPacket) PURE;
224 STDMETHOD(SeekDone) (THIS_
225 PN_RESULT status) PURE;
227 STDMETHOD(FileHeaderReady) (THIS_
228 PN_RESULT status,
229 IRMAValues* pHeader) PURE;
231 STDMETHOD(StreamHeaderReady) (THIS_
232 PN_RESULT status,
233 IRMAValues* pHeader) PURE;
235 STDMETHOD(StreamDone) (THIS_
236 UINT16 unStreamNumber) PURE;
239 /****************************************************************************
241 * Interface:
243 * IRMAPacketFormat
245 * Purpose:
247 * Interface that modifies the behavior of an IRMAFileFormat by defining
248 * the packet format it will be creating.
250 * IID_IRMAPacketFormat:
252 * {00000F03-0901-11d1-8B06-00A024406D59}
255 DEFINE_GUID(IID_IRMAPacketFormat, 0x00000F03, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
256 0xa0, 0x24, 0x40, 0x6d, 0x59);
258 #undef INTERFACE
259 #define INTERFACE IRMAPacketFormat
261 DECLARE_INTERFACE_(IRMAPacketFormat, IUnknown)
264 * IUnknown methods
266 STDMETHOD(QueryInterface) (THIS_
267 REFIID riid,
268 void** ppvObj) PURE;
270 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
272 STDMETHOD_(ULONG,Release) (THIS) PURE;
275 * IRMAPacketFormat methods
277 STDMETHOD(GetSupportedPacketFormats)
278 (THIS_
279 REF(const char**) pFormats) PURE;
281 STDMETHOD(SetPacketFormat) (THIS_
282 const char* pFormat) PURE;
285 /****************************************************************************
287 * Interface:
289 * IRMAPacketTimeOffsetHandler
291 * Purpose:
293 * Provides methods for handling the changing of a packets timestamp.
295 * IID_IRMAPacketTimeOffsetHandler:
297 * {00000F04-0901-11d1-8B06-00A024406D59}
300 DEFINE_GUID(IID_IRMAPacketTimeOffsetHandler, 0x00000F04, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
301 0xa0, 0x24, 0x40, 0x6d, 0x59);
304 DECLARE_INTERFACE_(IRMAPacketTimeOffsetHandler, IUnknown)
307 * IUnknown methods
309 STDMETHOD(QueryInterface) (THIS_
310 REFIID riid,
311 void** ppvObj) PURE;
313 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
315 STDMETHOD_(ULONG,Release) (THIS) PURE;
318 * IRMAPacketTimeOffsetHandler methods
321 /************************************************************************
322 * Method:
323 * IRMAPacketTimeOffsetHandler::Init
324 * Purpose:
325 * Initialize the IRMAPacketTimeOffsetHandler and set the response.
326 * Implementors should look up the MimeType.
328 STDMETHOD(Init) (THIS_
329 IRMAPacketTimeOffsetHandlerResponse* pResponse,
330 IRMAValues* pHeader,
331 IUnknown* pContext) PURE;
333 /************************************************************************
334 * Method:
335 * IRMAPacketTimeOffsetHandler::SetTimeOffset
336 * Purpose:
337 * Called to set the time offset. Uses a bool and a UINT32 instead
338 * of and INT32 so that the time offset wraps around after 47 days
339 * instead of 24. bPlus says whether to add or subtract.
341 STDMETHOD(SetTimeOffset) (THIS_
342 UINT32 ulTimeOffset,
343 BOOL bPlus) PURE;
345 /************************************************************************
346 * Method:
347 * IRMAPacketTimeOffsetHandler::HandlePacket
348 * Purpose:
349 * give the IRMAPacketTimeOffsetHandler a packet to modify for the
350 * time offset.
352 STDMETHOD(HandlePacket) (THIS_
353 IRMAPacket* pPacket) PURE;
357 /****************************************************************************
359 * Interface:
361 * IRMAPacketTimeOffsetHandlerResponse
363 * Purpose:
365 * Provides methods for the IRMAPacketTimeOffsetHandler to respond to.
367 * IID_IRMAPacketTimeOffsetHandlerResponse:
369 * {00000F05-0901-11d1-8B06-00A024406D59}
372 DEFINE_GUID(IID_IRMAPacketTimeOffsetHandlerResponse, 0x00000F05, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
373 0xa0, 0x24, 0x40, 0x6d, 0x59);
376 DECLARE_INTERFACE_(IRMAPacketTimeOffsetHandlerResponse, IUnknown)
379 * IUnknown methods
381 STDMETHOD(QueryInterface) (THIS_
382 REFIID riid,
383 void** ppvObj) PURE;
385 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
387 STDMETHOD_(ULONG,Release) (THIS) PURE;
390 * IRMAPacketTimeOffsetHandler methods
393 /************************************************************************
394 * Method:
395 * IRMAPacketTimeOffsetHandler::PacketReady
396 * Purpose:
397 * Called by IRMAPacketTimeOffsetHandler to pass back the packet
398 * when it is done with it.
400 STDMETHOD(TimeOffsetPacketReady) (THIS_
401 IRMAPacket* pPacket) PURE;
405 /****************************************************************************
407 * Interface:
409 * IRMALiveFileFormatInfo
411 * Purpose:
413 * Provides miscellaneous information needed to transmit a live stream.
414 * Optionally implemented by the file format object.
416 * IID_IRMALiveFileFormatInfo:
418 * {00000F06-0901-11d1-8B06-00A024406D59}
421 DEFINE_GUID(IID_IRMALiveFileFormatInfo, 0x00000F06, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
422 0xa0, 0x24, 0x40, 0x6d, 0x59);
424 #undef INTERFACE
425 #define INTERFACE IRMALiveFileFormatInfo
427 DECLARE_INTERFACE_(IRMALiveFileFormatInfo, IUnknown)
430 * IUnknown methods
432 STDMETHOD(QueryInterface) (THIS_
433 REFIID riid,
434 void** ppvObj) PURE;
436 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
438 STDMETHOD_(ULONG,Release) (THIS) PURE;
441 * IRMALiveFileFormatInfo methods
444 /************************************************************************
445 * Method:
446 * IRMALiveFileFormatInfo::VerifyFileCompatibility
447 * Purpose:
448 * Compares two file headers and returns PNR_OK if these two
449 * files can be transmitted sequentially in a single live
450 * presentation.
452 STDMETHOD(VerifyFileCompatibility) (THIS_
453 IRMAValues* pFileHeader1,
454 IRMAValues* pFileHeader2) PURE;
456 /************************************************************************
457 * Method:
458 * IRMALiveFileFormatInfo::VerifyStreamCompatibility
459 * Purpose:
460 * Compares two stream headers and returns PNR_OK if these two
461 * streams can be transmitted sequentially in a single live
462 * presentation.
464 STDMETHOD(VerifyStreamCompatibility) (THIS_
465 IRMAValues* pStreamHeader1,
466 IRMAValues* pStreamHeader2) PURE;
468 /************************************************************************
469 * Method:
470 * IRMALiveFileFormatInfo::IsLiveResendRequired
471 * Purpose:
472 * Returns TRUE if this stream requires the latest packet to be
473 * resent periodically in a live presentation.
475 STDMETHOD_(BOOL,IsLiveResendRequired) (THIS_
476 UINT16 unStreamNumber) PURE;
478 /************************************************************************
479 * Method:
480 * IRMALiveFileFormatInfo::GetResendBitrate
481 * Purpose:
482 * If periodic live resends are required for this stream, this
483 * method returns the rate at which we should resend packets. The
484 * resend rate is measured in bits per second.
486 STDMETHOD(GetResendBitrate) (THIS_
487 UINT16 unStreamNumber,
488 REF(UINT32) ulBitrate) PURE;
490 /************************************************************************
491 * Method:
492 * IRMALiveFileFormatInfo::GetResendDuration
493 * Purpose:
494 * If periodic live resends are required for this stream, this
495 * method returns the number of milliseconds for which this packet
496 * should be resent.
498 STDMETHOD(GetResendDuration) (THIS_
499 IRMAPacket* pPacket,
500 REF(UINT32) ulDuration) PURE;
502 /************************************************************************
503 * Method:
504 * IRMALiveFileFormatInfo::FormResendPacket
505 * Purpose:
506 * Forms a live resend packet based upon the original packet passed
507 * as the first parameter. This allows the file format plugin to
508 * make resend packets distinguishable from original packets.
510 STDMETHOD(FormResendPacket) (THIS_
511 IRMAPacket* pOriginalPacket,
512 REF(IRMAPacket*) pResendPacket) PURE;
518 #endif /* _RMAFORMT_H_ */