2 * Copyright 2012 André Hentschel
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 import
"wmsbuffer.idl";
21 /* import "drmexternals.idl"; */
23 typedef unsigned __int64 QWORD
;
25 typedef struct _WMMediaType
29 BOOL bFixedSizeSamples
;
30 BOOL bTemporalCompression
;
35 [size_is(cbFormat
)] BYTE *pbFormat
;
38 typedef struct _WMWriterStatistics
42 QWORD qwDroppedSampleCount
;
43 QWORD qwDroppedByteCount
;
44 DWORD dwCurrentBitrate
;
45 DWORD dwAverageBitrate
;
46 DWORD dwExpectedBitrate
;
47 DWORD dwCurrentSampleRate
;
48 DWORD dwAverageSampleRate
;
49 DWORD dwExpectedSampleRate
;
50 } WM_WRITER_STATISTICS
;
52 typedef struct _WMWriterStatisticsEx
54 DWORD dwBitratePlusOverhead
;
55 DWORD dwCurrentSampleDropRateInQueue
;
56 DWORD dwCurrentSampleDropRateInCodec
;
57 DWORD dwCurrentSampleDropRateInMultiplexer
;
58 DWORD dwTotalSampleDropsInQueue
;
59 DWORD dwTotalSampleDropsInCodec
;
60 DWORD dwTotalSampleDropsInMultiplexer
;
61 } WM_WRITER_STATISTICS_EX
;
63 typedef struct _WMReaderStatistics
67 DWORD cPacketsReceived
;
68 DWORD cPacketsRecovered
;
71 } WM_READER_STATISTICS
;
73 typedef struct _WMReaderClientInfo
77 WCHAR
*wszBrowserUserAgent
;
78 WCHAR
*wszBrowserWebPage
;
83 WCHAR
*wszPlayerUserAgent
;
84 } WM_READER_CLIENTINFO
;
86 typedef enum WMT_ATTR_DATATYPE
97 typedef enum WMT_STATUS
101 WMT_BUFFERING_START
= 2,
102 WMT_BUFFERING_STOP
= 3,
105 WMT_END_OF_SEGMENT
= 5,
106 WMT_END_OF_STREAMING
= 6,
110 WMT_MISSING_CODEC
= 10,
116 WMT_INDEX_PROGRESS
= 16,
117 WMT_SAVEAS_START
= 17,
118 WMT_SAVEAS_STOP
= 18,
119 WMT_NEW_SOURCEFLAGS
= 19,
120 WMT_NEW_METADATA
= 20,
121 WMT_BACKUPRESTORE_BEGIN
= 21,
122 WMT_SOURCE_SWITCH
= 22,
123 WMT_ACQUIRE_LICENSE
= 23,
124 WMT_INDIVIDUALIZE
= 24,
125 WMT_NEEDS_INDIVIDUALIZATION
= 25,
126 WMT_NO_RIGHTS_EX
= 26,
127 WMT_BACKUPRESTORE_END
= 27,
128 WMT_BACKUPRESTORE_CONNECTING
= 28,
129 WMT_BACKUPRESTORE_DISCONNECTING
= 29,
130 WMT_ERROR_WITHURL
= 30,
131 WMT_RESTRICTED_LICENSE
= 31,
132 WMT_CLIENT_CONNECT
= 32,
133 WMT_CLIENT_DISCONNECT
= 33,
134 WMT_NATIVE_OUTPUT_PROPS_CHANGED
= 34,
135 WMT_RECONNECT_START
= 35,
136 WMT_RECONNECT_END
= 36,
137 WMT_CLIENT_CONNECT_EX
= 37,
138 WMT_CLIENT_DISCONNECT_EX
= 38,
139 WMT_SET_FEC_SPAN
= 39,
140 WMT_PREROLL_READY
= 40,
141 WMT_PREROLL_COMPLETE
= 41,
142 WMT_CLIENT_PROPERTIES
= 42,
143 WMT_LICENSEURL_SIGNATURE_STATE
= 43,
144 WMT_INIT_PLAYLIST_BURN
= 44,
145 WMT_TRANSCRYPTOR_INIT
= 45,
146 WMT_TRANSCRYPTOR_SEEKED
= 46,
147 WMT_TRANSCRYPTOR_READ
= 47,
148 WMT_TRANSCRYPTOR_CLOSED
= 48,
149 WMT_PROXIMITY_RESULT
= 49,
150 WMT_PROXIMITY_COMPLETED
= 50,
151 WMT_CONTENT_ENABLER
= 51
154 typedef enum WMT_STREAM_SELECTION
157 WMT_CLEANPOINT_ONLY
= 1,
159 } WMT_STREAM_SELECTION
;
161 typedef enum WMT_VERSION
163 WMT_VER_4_0
= 0x00040000,
164 WMT_VER_7_0
= 0x00070000,
165 WMT_VER_8_0
= 0x00080000,
166 WMT_VER_9_0
= 0x00090000
169 typedef enum WMT_PLAY_MODE
171 WMT_PLAY_MODE_AUTOSELECT
,
173 WMT_PLAY_MODE_DOWNLOAD
,
174 WMT_PLAY_MODE_STREAMING
177 typedef enum tagWMT_OFFSET_FORMAT
179 WMT_OFFSET_FORMAT_100NS
,
180 WMT_OFFSET_FORMAT_FRAME_NUMBERS
,
181 WMT_OFFSET_FORMAT_PLAYLIST_OFFSET
,
182 WMT_OFFSET_FORMAT_TIMECODE
,
183 WMT_OFFSET_FORMAT_100NS_APPROXIMATE
186 typedef LPCWSTR LPCWSTR_WMSDK_TYPE_SAFE
;
190 uuid(6d7cdc70
-9888-11d3
-8edc
-00c04f6109cf
),
191 pointer_default(unique),
194 interface IWMStatusCallback
: IUnknown
197 [in] WMT_STATUS Status
,
199 [in] WMT_ATTR_DATATYPE dwType
,
201 [in] void *pvContext
);
206 uuid(96406bd8
-2b2b
-11d3
-b36b
-00c04f6108ff
),
207 pointer_default(unique),
210 interface IWMReaderCallback
: IWMStatusCallback
213 [in] DWORD dwOutputNum
,
214 [in] QWORD cnsSampleTime
,
215 [in] QWORD cnsSampleDuration
,
217 [in] INSSBuffer
*pSample
,
218 [in] void *pvContext
);
223 uuid(96406Bdd
-2b2b
-11d3
-b36b
-00c04f6108ff
),
224 pointer_default(unique),
227 interface IWMStreamList
: IUnknown
230 [out, size_is(*pcStreams
)] WORD
*pwStreamNumArray
,
231 [in, out] WORD
*pcStreams
);
233 HRESULT AddStream
([in] WORD wStreamNum
);
234 HRESULT RemoveStream
([in] WORD wStreamNum
);
239 uuid(96406Bde
-2b2b
-11d3
-b36b
-00c04f6108ff
),
240 pointer_default(unique),
243 interface IWMMutualExclusion
: IWMStreamList
245 HRESULT GetType
([out] GUID
*pguidType
);
246 HRESULT SetType
([in] REFGUID guidType
);
251 uuid(96406Bdc
-2b2b
-11d3
-b36b
-00c04f6108ff
),
252 pointer_default(unique),
255 interface IWMStreamConfig
: IUnknown
257 HRESULT GetStreamType
([out] GUID
*pguidStreamType
);
258 HRESULT GetStreamNumber
([out] WORD
*pwStreamNum
);
259 HRESULT SetStreamNumber
([in] WORD wStreamNum
);
261 HRESULT GetStreamName
(
262 [out, size_is(*pcchStreamName
)] WCHAR
*pwszStreamName
,
263 [in, out] WORD
*pcchStreamName
);
265 HRESULT SetStreamName
([in] LPCWSTR_WMSDK_TYPE_SAFE pwszStreamName
);
267 HRESULT GetConnectionName
(
268 [out, size_is(*pcchInputName
)] WCHAR
*pwszInputName
,
269 [in, out] WORD
*pcchInputName
);
271 HRESULT SetConnectionName
([in] LPCWSTR_WMSDK_TYPE_SAFE pwszInputName
);
272 HRESULT GetBitrate
([out] DWORD
*pdwBitrate
);
273 HRESULT SetBitrate
([in] DWORD pdwBitrate
);
274 HRESULT GetBufferWindow
([out] DWORD
*pmsBufferWindow
);
275 HRESULT SetBufferWindow
([in] DWORD msBufferWindow
);
280 uuid(96406bdb
-2b2b
-11d3
-b36b
-00c04f6108ff
),
281 pointer_default(unique),
284 interface IWMProfile
: IUnknown
287 [out] WMT_VERSION
*pdwVersion
);
290 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
291 [in, out] DWORD
*pcchName
);
294 [in] const WCHAR
*pwszName
);
296 HRESULT GetDescription
(
297 [out, size_is(*pcchDescription
)] WCHAR
*pwszDescription
,
298 [in, out] DWORD
*pcchDescription
);
300 HRESULT SetDescription
(
301 [in] const WCHAR
*pwszDescription
);
303 HRESULT GetStreamCount
(
304 [out] DWORD
*pcStreams
);
307 [in] DWORD dwStreamIndex
,
308 [out] IWMStreamConfig
**ppConfig
);
310 HRESULT GetStreamByNumber
(
311 [in] WORD wStreamNum
,
312 [out] IWMStreamConfig
**ppConfig
);
314 HRESULT RemoveStream
(
315 [in] IWMStreamConfig
*pConfig
);
317 HRESULT RemoveStreamByNumber
(
318 [in] WORD wStreamNum
);
321 [in] IWMStreamConfig
*pConfig
);
323 HRESULT ReconfigStream
(
324 [in] IWMStreamConfig
*pConfig
);
326 HRESULT CreateNewStream
(
327 [in] REFGUID guidStreamType
,
328 [out] IWMStreamConfig
**ppConfig
);
330 HRESULT GetMutualExclusionCount
(
333 HRESULT GetMutualExclusion
(
334 [in] DWORD dwMEIndex
,
335 [out] IWMMutualExclusion
**ppME
);
337 HRESULT RemoveMutualExclusion
(
338 [in] IWMMutualExclusion
*pME
);
340 HRESULT AddMutualExclusion
(
341 [in] IWMMutualExclusion
*pME
);
343 HRESULT CreateNewMutualExclusion
(
344 [out] IWMMutualExclusion
**ppME
);
349 uuid(d16679f2
-6ca0
-472d
-8d31
-2f5d55aee155
),
350 pointer_default(unique),
353 interface IWMProfileManager
: IUnknown
355 HRESULT CreateEmptyProfile
(
356 [in] WMT_VERSION dwVersion
,
357 [out] IWMProfile
**ppProfile
);
359 HRESULT LoadProfileByID
(
360 [in] REFGUID guidProfile
,
361 [out] IWMProfile
**ppProfile
);
363 HRESULT LoadProfileByData
(
364 [in] const WCHAR
*pwszProfile
,
365 [out] IWMProfile
**ppProfile
);
368 [in] IWMProfile
*pIWMProfile
,
369 [in] WCHAR
*pwszProfile
,
370 [in, out] DWORD
*pdwLength
);
372 HRESULT GetSystemProfileCount
(
373 [out] DWORD
*pcProfiles
);
375 HRESULT LoadSystemProfile
(
376 [in] DWORD dwProfileIndex
,
377 [out] IWMProfile
**ppProfile
);
380 cpp_quote
("HRESULT WINAPI WMCreateProfileManager(IWMProfileManager**);")
384 uuid(96406bce
-2b2b
-11d3
-b36b
-00c04f6108ff
),
385 pointer_default(unique),
388 interface IWMMediaProps
: IUnknown
391 [out] GUID
*pguidType
);
393 HRESULT GetMediaType
(
394 [out] WM_MEDIA_TYPE
*pType
,
395 [in, out] DWORD
*pcbType
);
397 HRESULT SetMediaType
(
398 [in] WM_MEDIA_TYPE
*pType
);
403 uuid(96406bd7
-2b2b
-11d3
-b36b
-00c04f6108ff
),
404 pointer_default(unique),
407 interface IWMOutputMediaProps
: IWMMediaProps
409 HRESULT GetStreamGroupName
(
410 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
411 [in, out] WORD
*pcchName
);
413 HRESULT GetConnectionName
(
414 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
415 [in, out] WORD
*pcchName
);
420 uuid(96406bd9
-2b2b
-11d3
-b36b
-00c04f6108ff
),
421 pointer_default(unique),
424 interface IWMMetadataEditor
: IUnknown
427 [in] const WCHAR
*pwszFilename
);
436 uuid(96406bd6
-2b2b
-11d3
-b36b
-00c04f6108ff
),
437 pointer_default(unique),
440 interface IWMReader
: IUnknown
443 [in] const WCHAR
*pwszURL
,
444 [in] IWMReaderCallback
*pCallback
,
445 [in] void *pvContext
);
449 HRESULT GetOutputCount
(
450 [out] DWORD
*pcOutputs
);
452 HRESULT GetOutputProps
(
453 [in] DWORD dwOutputNum
,
454 [out] IWMOutputMediaProps
**ppOutput
);
456 HRESULT SetOutputProps
(
457 [in] DWORD dwOutputNum
,
458 [in] IWMOutputMediaProps
*pOutput
);
460 HRESULT GetOutputFormatCount
(
461 [in] DWORD dwOutputNumber
,
462 [out] DWORD
*pcFormats
);
464 HRESULT GetOutputFormat
(
465 [in] DWORD dwOutputNumber
,
466 [in] DWORD dwFormatNumber
,
467 [out] IWMOutputMediaProps
** ppProps
);
471 [in] QWORD cnsDuration
,
473 [in] void *pvContext
);
484 uuid(e5b7ca9a
-0f1c
-4f66
-9002-74ec50d8b304
),
485 pointer_default(unique),
488 interface IWMPlayerHook
: IUnknown
495 uuid(96406bea
-2b2b
-11d3
-b36b
-00c04f6108ff
),
496 pointer_default(unique),
499 interface IWMReaderAdvanced
: IUnknown
501 HRESULT SetUserProvidedClock
(
502 [in] BOOL fUserClock
);
504 HRESULT GetUserProvidedClock
(
505 [out] BOOL
*pfUserClock
);
510 HRESULT SetManualStreamSelection
(
511 [in] BOOL fSelection
);
513 HRESULT GetManualStreamSelection
(
514 [out] BOOL
*pfSelection
);
516 HRESULT SetStreamsSelected
(
517 [in] WORD cStreamCount
,
518 [in] WORD
*pwStreamNumbers
,
519 [in] WMT_STREAM_SELECTION
*pSelections
);
521 HRESULT GetStreamSelected
(
522 [in] WORD wStreamNum
,
523 [out] WMT_STREAM_SELECTION
*pSelection
);
525 HRESULT SetReceiveSelectionCallbacks
(
526 [in] BOOL fGetCallbacks
);
528 HRESULT GetReceiveSelectionCallbacks
(
529 [out] BOOL
*pfGetCallbacks
);
531 HRESULT SetReceiveStreamSamples
(
532 [in] WORD wStreamNum
,
533 [in] BOOL fReceiveStreamSamples
);
535 HRESULT GetReceiveStreamSamples
(
536 [in] WORD wStreamNum
,
537 [out] BOOL
*pfReceiveStreamSamples
);
539 HRESULT SetAllocateForOutput
(
540 [in] DWORD dwOutputNum
,
541 [in] BOOL fAllocate
);
543 HRESULT GetAllocateForOutput
(
544 [in] DWORD dwOutputNum
,
545 [out] BOOL
*pfAllocate
);
547 HRESULT SetAllocateForStream
(
548 [in] WORD wStreamNum
,
549 [in] BOOL fAllocate
);
551 HRESULT GetAllocateForStream
(
552 [in] WORD dwSreamNum
,
553 [out] BOOL
*pfAllocate
);
555 HRESULT GetStatistics
(
556 [in, out] WM_READER_STATISTICS
*pStatistics
);
558 HRESULT SetClientInfo
(
559 [in] WM_READER_CLIENTINFO
*pClientInfo
);
561 HRESULT GetMaxOutputSampleSize
(
563 [out] DWORD
*pcbMax
);
565 HRESULT GetMaxStreamSampleSize
(
567 [out] DWORD
*pcbMax
);
569 HRESULT NotifyLateDelivery
(
575 uuid(ae14a945
-b90c
-4d0d
-9127-80d665f7d73e
),
576 pointer_default(unique),
579 interface IWMReaderAdvanced2
: IWMReaderAdvanced
582 [in] WMT_PLAY_MODE Mode
);
585 [out] WMT_PLAY_MODE
*pMode
);
587 HRESULT GetBufferProgress
(
588 [out] DWORD
*pdwPercent
,
589 [out] QWORD
*pcnsBuffering
);
591 HRESULT GetDownloadProgress
(
592 [out] DWORD
*pdwPercent
,
593 [out] QWORD
*pqwBytesDownloaded
,
594 [out] QWORD
*pcnsDownload
);
596 HRESULT GetSaveAsProgress
(
597 [out] DWORD
*pdwPercent
);
600 [in] const WCHAR
*pwszFilename
);
602 HRESULT GetProtocolName
(
603 [out, size_is(*pcchProtocol
)] WCHAR
*pwszProtocol
,
604 [in, out] DWORD
*pcchProtocol
);
606 HRESULT StartAtMarker
(
607 [in] WORD wMarkerIndex
,
608 [in] QWORD cnsDuration
,
610 [in] void *pvContext
);
612 HRESULT GetOutputSetting
(
613 [in] DWORD dwOutputNum
,
614 [in] LPCWSTR pszName
,
615 [out] WMT_ATTR_DATATYPE
*pType
,
616 [out, size_is(*pcbLength
)] BYTE *pValue
,
617 [in, out] WORD
*pcbLength
);
619 HRESULT SetOutputSetting
(
620 [in] DWORD dwOutputNum
,
621 [in] LPCWSTR pszName
,
622 [in] WMT_ATTR_DATATYPE Type
,
623 [in, size_is(cbLength
)] const BYTE *pValue
,
628 [in] QWORD cnsDuration
,
631 HRESULT SetLogClientID
(
632 [in] BOOL fLogClientID
);
634 HRESULT GetLogClientID
(
635 [out] BOOL
*pfLogClientID
);
637 HRESULT StopBuffering
();
640 [in] IStream
*pStream
,
641 [in] IWMReaderCallback
*pCallback
,
642 [in] void *pvContext
);
647 uuid(5dc0674b
-f04B
-4a4e
-9f2a
-b1afde2c8100
),
648 pointer_default(unique),
651 interface IWMReaderAdvanced3
: IWMReaderAdvanced2
653 HRESULT StopNetStreaming
();
655 HRESULT StartAtPosition
(
656 [in] WORD wStreamNum
,
657 [in] void *pvOffsetStart
,
658 [in] void *pvDuration
,
659 [in] WMT_OFFSET_FORMAT dwOffsetFormat
,
661 [in] void *pvContext
);
666 uuid(945a76a2
-12ae
-4d48
-bd3c
-cd1d90399b85
),
667 pointer_default(unique),
670 interface IWMReaderAdvanced4
: IWMReaderAdvanced3
672 HRESULT GetLanguageCount
(
673 [in] DWORD dwOutputNum
,
674 [out] WORD
*pwLanguageCount
);
677 [in] DWORD dwOutputNum
,
679 [out, size_is(*pcchLanguageStringLength
)] WCHAR
*pwszLanguageString
,
680 [in, out] WORD
*pcchLanguageStringLength
);
682 HRESULT GetMaxSpeedFactor
(
683 [out] double *pdblFactor
);
685 HRESULT IsUsingFastCache
(
686 [out] BOOL
*pfUsingFastCache
);
689 [in] LPCWSTR wszNameSpace
,
690 [in] LPCWSTR wszName
,
691 [in] LPCWSTR wszValue
);
693 HRESULT SendLogParams
();
695 HRESULT CanSaveFileAs
(
696 [out] BOOL
*pfCanSave
);
698 HRESULT CancelSaveFileAs
();
701 [out, size_is(*pcchURL
)] WCHAR
*pwszURL
,
702 [in, out] DWORD
*pcchURL
);
707 uuid(24c44db0
-55d1
-49ae
-a5cc
-f13815e36363
),
708 pointer_default(unique),
711 interface IWMReaderAdvanced5
: IWMReaderAdvanced4
713 HRESULT SetPlayerHook
(
714 [in] DWORD dwOutputNum
,
715 [in] IWMPlayerHook
*pHook
);
720 uuid(18a2e7f8
-428f
-4acd
-8a00
-e64639bc93de
),
721 pointer_default(unique),
724 interface IWMReaderAdvanced6
: IWMReaderAdvanced5
726 HRESULT SetProtectStreamSamples
(
727 [in, size_is(cbCertificate
)] BYTE *pbCertificate
,
728 [in] DWORD cbCertificate
,
729 [in] DWORD dwCertificateType
,
731 [out, size_is(*pcbInitializationVector
)] BYTE *pbInitializationVector
,
732 [in, out] DWORD
*pcbInitializationVector
);
737 uuid(9397f121
-7705-4dc9
-b049
-98b698188414
),
738 pointer_default( unique ),
741 interface IWMSyncReader
: IUnknown
744 [in] const WCHAR
*pwszFilename
);
749 [in] QWORD cnsStartTime
,
750 [in] LONGLONG cnsDuration
);
752 HRESULT SetRangeByFrame
(
753 [in] WORD wStreamNum
,
754 [in] QWORD qwFrameNumber
,
755 [in] LONGLONG cFramesToRead
);
757 HRESULT GetNextSample
(
758 [in] WORD wStreamNum
,
759 [out] INSSBuffer
**ppSample
,
760 [out] QWORD
*pcnsSampleTime
,
761 [out] QWORD
*pcnsDuration
,
762 [out] DWORD
*pdwFlags
,
763 [out] DWORD
*pdwOutputNum
,
764 [out] WORD
*pwStreamNum
);
766 HRESULT SetStreamsSelected
(
767 [in] WORD cStreamCount
,
768 [in] WORD
*pwStreamNumbers
,
769 [in] WMT_STREAM_SELECTION
*pSelections
);
771 HRESULT GetStreamSelected
(
772 [in] WORD wStreamNum
,
773 [out] WMT_STREAM_SELECTION
*pSelection
);
775 HRESULT SetReadStreamSamples
(
776 [in] WORD wStreamNum
,
777 [in] BOOL fCompressed
);
779 HRESULT GetReadStreamSamples
(
780 [in] WORD wStreamNum
,
781 [out] BOOL
*pfCompressed
);
783 HRESULT GetOutputSetting
(
784 [in] DWORD dwOutputNum
,
785 [in] LPCWSTR pszName
,
786 [out] WMT_ATTR_DATATYPE
*pType
,
787 [out, size_is(*pcbLength
)] BYTE *pValue
,
788 [in, out] WORD
*pcbLength
);
790 HRESULT SetOutputSetting
(
791 [in] DWORD dwOutputNum
,
792 [in] LPCWSTR pszName
,
793 [in] WMT_ATTR_DATATYPE Type
,
794 [in, size_is(cbLength
)] const BYTE *pValue
,
797 HRESULT GetOutputCount
(
798 [out] DWORD
*pcOutputs
);
800 HRESULT GetOutputProps
(
801 [in] DWORD dwOutputNum
,
802 [out] IWMOutputMediaProps
**ppOutput
);
804 HRESULT SetOutputProps
(
805 [in] DWORD dwOutputNum
,
806 [in] IWMOutputMediaProps
*pOutput
);
808 HRESULT GetOutputFormatCount
(
809 [in] DWORD dwOutputNum
,
810 [out] DWORD
*pcFormats
);
812 HRESULT GetOutputFormat
(
813 [in] DWORD dwOutputNum
,
814 [in] DWORD dwFormatNum
,
815 [out] IWMOutputMediaProps
**ppProps
);
817 HRESULT GetOutputNumberForStream
(
818 [in] WORD wStreamNum
,
819 [out] DWORD
*pdwOutputNum
);
821 HRESULT GetStreamNumberForOutput
(
822 [in] DWORD dwOutputNum
,
823 [out] WORD
*pwStreamNum
);
825 HRESULT GetMaxOutputSampleSize
(
827 [out] DWORD
*pcbMax
);
829 HRESULT GetMaxStreamSampleSize
(
831 [out] DWORD
*pcbMax
);
834 [in] IStream
*pStream
);
839 uuid(96406bd5
-2b2b
-11d3
-b36b
-00c04f6108ff
),
840 pointer_default(unique),
843 interface IWMInputMediaProps
: IWMMediaProps
845 HRESULT GetConnectionName
(
846 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
847 [in, out] WORD
*pcchName
);
849 HRESULT GetGroupName
(
850 [out, size_is(*pcchName
)] WCHAR
*pwszName
,
851 [in, out] WORD
*pcchName
);
856 uuid(96406be4
-2b2b
-11d3
-b36b
-00c04f6108ff
),
857 pointer_default(unique),
860 interface IWMWriterSink
: IUnknown
863 [in] INSSBuffer
*pHeader
);
866 [out] BOOL
*pfRealTime
);
868 HRESULT AllocateDataUnit
(
869 [in] DWORD cbDataUnit
,
870 [out] INSSBuffer
**ppDataUnit
);
873 [in] INSSBuffer
*pDataUnit
);
875 HRESULT OnEndWriting
();
880 uuid(96406bd4
-2b2b
-11d3
-b36b
-00c04f6108ff
),
881 pointer_default(unique),
884 interface IWMWriter
: IUnknown
886 HRESULT SetProfileByID
(
887 [in] REFGUID guidProfile
);
890 [in] IWMProfile
*pProfile
);
892 HRESULT SetOutputFilename
(
893 [in] const WCHAR
*pwszFilename
);
895 HRESULT GetInputCount
(
896 [out] DWORD
*pcInputs
);
898 HRESULT GetInputProps
(
899 [in] DWORD dwInputNum
,
900 [out] IWMInputMediaProps
**ppInput
);
902 HRESULT SetInputProps
(
903 [in] DWORD dwInputNum
,
904 [in] IWMInputMediaProps
*pInput
);
906 HRESULT GetInputFormatCount
(
907 [in] DWORD dwInputNumber
,
908 [out] DWORD
*pcFormats
);
910 HRESULT GetInputFormat
(
911 [in] DWORD dwInputNumber
,
912 [in] DWORD dwFormatNumber
,
913 [out] IWMInputMediaProps
**pProps
);
915 HRESULT BeginWriting
();
917 HRESULT EndWriting
();
919 HRESULT AllocateSample
(
920 [in] DWORD dwSampleSize
,
921 [out] INSSBuffer
**ppSample
);
924 [in] DWORD dwInputNum
,
925 [in] QWORD cnsSampleTime
,
927 [in] INSSBuffer
*pSample
);
934 uuid(96406be3
-2b2b
-11d3
-b36b
-00C04f6108ff
),
935 pointer_default(unique),
938 interface IWMWriterAdvanced
: IUnknown
940 HRESULT GetSinkCount
(
941 [out] DWORD
*pcSinks
);
944 [in] DWORD dwSinkNum
,
945 [out] IWMWriterSink
**ppSink
);
948 [in] IWMWriterSink
*pSink
);
951 [in] IWMWriterSink
*pSink
);
953 HRESULT WriteStreamSample
(
954 [in] WORD wStreamNum
,
955 [in] QWORD cnsSampleTime
,
956 [in] DWORD msSampleSendTime
,
957 [in] QWORD cnsSampleDuration
,
959 [in] INSSBuffer
*pSample
);
961 HRESULT SetLiveSource
(
965 [out] BOOL
*pfRealTime
);
967 HRESULT GetWriterTime
(
968 [out] QWORD
*pCurrentTime
);
970 HRESULT GetStatistics
(
971 [in] WORD wStreamNum
,
972 [out] WM_WRITER_STATISTICS
*pStats
);
974 HRESULT SetSyncTolerance
(
975 [in] DWORD msWindow
);
977 HRESULT GetSyncTolerance
(
978 [out] DWORD
*pmsWindow
);
983 uuid(962dc1ec
-c046
-4db8
-9cc7
-26ceae500817
),
984 pointer_default(unique),
987 interface IWMWriterAdvanced2
: IWMWriterAdvanced
989 HRESULT GetInputSetting
(
990 [in] DWORD dwInputNum
,
991 [in] LPCWSTR pszName
,
992 [out] WMT_ATTR_DATATYPE
*pType
,
993 [out, size_is(*pcbLength
)] BYTE *pValue
,
994 [in, out] WORD
*pcbLength
);
996 HRESULT SetInputSetting
(
997 [in] DWORD dwInputNum
,
998 [in] LPCWSTR pszName
,
999 [in] WMT_ATTR_DATATYPE Type
,
1000 [in, size_is(cbLength
)] const BYTE *pValue
,
1001 [in] WORD cbLength
);
1006 uuid(2cd6492d
-7c37
-4e76
-9d3b
-59261183a22e
),
1007 pointer_default(unique),
1010 interface IWMWriterAdvanced3
: IWMWriterAdvanced2
1012 HRESULT GetStatisticsEx
(
1013 [in] WORD wStreamNum
,
1014 [out] WM_WRITER_STATISTICS_EX
*pStats
);
1016 HRESULT SetNonBlocking
();
1019 cpp_quote
("HRESULT WINAPI WMCreateWriter(IUnknown*,IWMWriter**);")
1020 cpp_quote
("HRESULT WINAPI WMCreateReader(IUnknown*,DWORD,IWMReader**);")
1022 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_Base, 0x00000000,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1023 cpp_quote
("EXTERN_GUID(WMMEDIATYPE_Video, 0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1024 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB1, 0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1025 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB4, 0xe436eb79,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1026 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB8, 0xe436eb7a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1027 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB565, 0xe436eb7b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1028 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB555, 0xe436eb7c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1029 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB24, 0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1030 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_RGB32, 0xe436eb7e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);")
1031 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_I420, 0x30323449,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1032 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_IYUV, 0x56555949,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1033 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YV12, 0x32315659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1034 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YUY2, 0x32595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1035 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_P422, 0x32323450,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1036 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_UYVY, 0x59565955,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1037 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YVYU, 0x55595659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1038 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_YVU9, 0x39555659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1039 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_VIDEOIMAGE, 0x1d4a45f2,0xe5f6,0x4b44,0x83,0x88,0xf0,0xae,0x5c,0x0e,0x0c,0x37);")
1040 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MP43, 0x3334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1041 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MP4S, 0x5334504d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1042 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_M4S2, 0x3253344d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1043 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMV1, 0x31564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1044 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMV2, 0x32564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1045 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MSS1, 0x3153534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1046 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MPEG2_VIDEO, 0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);")
1047 cpp_quote
("EXTERN_GUID(WMMEDIATYPE_Audio, 0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1048 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_PCM, 0x00000001,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1049 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_DRM, 0x00000009,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1050 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMAudioV9, 0x00000162,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1051 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMAudio_Lossless, 0x00000163,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1052 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_MSS2, 0x3253534d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1053 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMSP1, 0x0000000a,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1054 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMSP2, 0x0000000b,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1055 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMV3, 0x33564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1056 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMVP, 0x50564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1057 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WVP2, 0x32505657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1058 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WMVA, 0x41564d57,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")
1059 cpp_quote
("EXTERN_GUID(WMMEDIASUBTYPE_WVC1, 0x31435657,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);")