' ########################################################################################
' Microsoft Windows
' File: wmsdatapath.inc
' Contents: Microsoft Windows Media Technologies
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_wmsdatapath_PBI)
#DEFINE PBX_wmsdatapath_PBI
%EQUATE `WMSDATAPATH_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
#INCLUDE ONCE "Legacy/System/nsscore.inc"
#INCLUDE ONCE "Legacy/System/datacontainer.inc"
#INCLUDE ONCE "Legacy/Media/streamdescription.inc"
$IID_IWMSPacketStreamer = GUID$("{72527A81-1119-11D2-9EEE-006097D2D7CF}")
$IID_IWMSPacketStreamerCallback = GUID$("{72527A82-1119-11D2-9EEE-006097D2D7CF}")
$IID_IWMSPushSource = GUID$("{0B840593-115C-11D2-9EEE-006097D2D7CF}")
$IID_IWMSPushSourceCallback = GUID$("{EAD035E4-BE4A-4A7A-BC19-5B0B9E09D74C}")
$IID_IWMSPushSink = GUID$("{0B840594-115C-11D2-9EEE-006097D2D7CF}")
$IID_IWMSPushSink = GUID$("{0B840594-115C-11D2-9EEE-006097D2D7CF}")
$IID_IWMSPacketStreamDataContainer = GUID$("{0B1B6039-572C-11D2-9EFF-006097D2D7CF}")
' WMS_SEEK_AND_PLAY_TYPE enum
%EQUATE `WMSPlayFromCurrentPosition = 0
%EQUATE `WMSSeekToIFrameAndPlay = %WMSPlayFromCurrentPosition + 1
%EQUATE `WMSSeekToPositionAndPlay = %WMSSeekToIFrameAndPlay + 1
%EQUATE `WMS_SEEK_TO_IFRAME = &H0001
' ########################################################################################
' Interface name = IWMSPacketStreamer
' IID = {72527A81-1119-11D2-9EEE-006097D2D7CF}
' Contains methods for retrieving information on streams being sent down a data path and for controlling the streams being sent down a data path.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPacketStreamer_INTERFACE_DEFINED)
 %IWMSPacketStreamer_INTERFACE_DEFINED = 1
INTERFACE IWMSPacketStreamer $IID_IWMSPacketStreamer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetStreamInfo ( ' VTable offset = 12
 BYVAL pCallback AS IWMSPacketStreamerCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD SelectStream ( ' VTable offset = 16
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL pStreamSwitchDescList AS IWMSStreamSwitchDescriptionList
 , BYVAL pCallback AS IWMSPacketStreamerCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 20
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL dwOffsetType AS DWORD
 , BYVAL qwOffset AS QUAD
 , BYVAL dwFlags AS DWORD
 , BYVAL pCallback AS IWMSPacketStreamerCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD ChangeStreamFormat ( ' VTable offset = 24
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL pCallback AS IWMSPacketStreamerCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Interrupt ( ' VTable offset = 28
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL dwOptions AS DWORD
 , BYVAL pCallback AS IWMSPacketStreamerCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD DoExtendedCommand ( ' VTable offset = 32
 BYREF szCommandName AS WSTRINGZ
 , BYVAL pCommand AS IWMSCommandContext
 , BYVAL pCallback AS IWMSPacketStreamerCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD Shutdown ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPacketStreamer_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWMSPacketStreamerCallback
' IID = {72527A82-1119-11D2-9EEE-006097D2D7CF}
' Contains methods that enable a plug-in to respond to IWMSPacketStreamer method calls.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPacketStreamerCallback_INTERFACE_DEFINED)
 %IWMSPacketStreamerCallback_INTERFACE_DEFINED = 1
INTERFACE IWMSPacketStreamerCallback $IID_IWMSPacketStreamerCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnGetStreamInfo ( ' VTable offset = 12
 BYVAL hr AS LONG
 , BYVAL pHeaderList AS IWMSStreamHeaderList
 , BYVAL pContentDescription AS IWMSContentDescriptionList
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnSeek ( ' VTable offset = 16
 BYVAL hr AS LONG
 , BYVAL qwActualPosition AS QUAD
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnSelectStream ( ' VTable offset = 20
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnChangeStreamFormat ( ' VTable offset = 24
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnInterrupt ( ' VTable offset = 28
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnDoExtendedCommand ( ' VTable offset = 32
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPacketStreamerCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWMSPacketStreamDataContainer
' IID = {0B1B6039-572C-11D2-9EFF-006097D2D7CF}
' Contains methods to notify the server of stream signals and to determine the maximum packet size used by a data container.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPacketStreamDataContainer_INTERFACE_DEFINED)
 %IWMSPacketStreamDataContainer_INTERFACE_DEFINED = 1
INTERFACE IWMSPacketStreamDataContainer $IID_IWMSPacketStreamDataContainer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetStreamSignalHandler ( ' VTable offset = 12
 BYVAL pStreamSignalHandler AS IWMSStreamSignalHandler
 ) AS LONG
 ' =====================================================================================
 METHOD GetMaxPacketSize ( ' VTable offset = 16
 BYREF pdwMaxPacketSize AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPacketStreamDataContainer_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWMSPushSource
' IID = {0B840593-115C-11D2-9EEE-006097D2D7CF}
' Contains methods that control the flow of data through a data path.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPushSource_INTERFACE_DEFINED)
 %IWMSPushSource_INTERFACE_DEFINED = 1
INTERFACE IWMSPushSource $IID_IWMSPushSource
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ConnectSink ( ' VTable offset = 12
 BYVAL pDataOutput AS IWMSPushSink
 ) AS LONG
 ' =====================================================================================
 METHOD DisconnectSink ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD StartPushing ( ' VTable offset = 20
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL dblRate AS DOUBLE
 , BYVAL pCallback AS IWMSPushSourceCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD StopPushing ( ' VTable offset = 24
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL pCallback AS IWMSPushSourceCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD PausePushing ( ' VTable offset = 28
 BYVAL pCommand AS IWMSCommandContext
 , BYVAL pCallback AS IWMSPushSourceCallback
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD ResendPacket ( ' VTable offset = 32
 BYVAL IpCommand AS IWMSCommandContext
 , BYVAL dwPacketNum AS DWORD
 , BYVAL dwStreamNum AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPushSource_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWMSPushSourceCallback
' IID = {EAD035E4-BE4A-4A7A-BC19-5B0B9E09D74C}
' Contains methods that enable a plug-in to respond to IWMSPushSource method calls.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPushSourceCallback_INTERFACE_DEFINED)
 %IWMSPushSourceCallback_INTERFACE_DEFINED = 1
INTERFACE IWMSPushSourceCallback $IID_IWMSPushSourceCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnStartPushing ( ' VTable offset = 12
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnStopPushing ( ' VTable offset = 16
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnPausePushing ( ' VTable offset = 20
 BYVAL hr AS LONG
 , BYVAL qwContext AS QUAD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPushSourceCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IWMSPushSink
' IID = {0B840594-115C-11D2-9EEE-006097D2D7CF}
' Contains a method to request that a data path component process a packet list.
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWMSPushSink_INTERFACE_DEFINED)
 %IWMSPushSink_INTERFACE_DEFINED = 1
INTERFACE IWMSPushSink $IID_IWMSPushSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ConnectSource ( ' VTable offset = 12
 BYVAL pDataInput AS IWMSPushSource
 ) AS LONG
 ' =====================================================================================
 METHOD DisconnectSource ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessPackets ( ' VTable offset = 20
 BYVAL pPacketList AS IWMSPacketList
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWMSPushSink_INTERFACE_DEFINED__ */
#ENDIF
