Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

809 lines
32 KiB

  1. /****************************************************************************
  2. *
  3. * $Archive: S:/STURGEON/SRC/INCLUDE/VCS/strmspif.h_v $
  4. *
  5. * INTEL Corporation Prorietary Information
  6. *
  7. * This listing is supplied under the terms of a license agreement
  8. * with INTEL Corporation and may not be copied nor disclosed except
  9. * in accordance with the terms of that agreement.
  10. *
  11. * Copyright (c) 1993-1994 Intel Corporation.
  12. *
  13. * $Revision: 1.5 $
  14. * $Date: 09 Oct 1996 08:48:50 $
  15. * $Author: RKUHN $
  16. *
  17. * Deliverable:
  18. *
  19. * Abstract:
  20. * Media Service Manager "public" header file. This file contains
  21. * #defines, typedefs, struct definitions and prototypes used by
  22. * and in conjunction with MSM. Any EXE or DLL which interacts with
  23. * MSM will include this header file.
  24. *
  25. * Notes:
  26. *
  27. ***************************************************************************/
  28. // strmspif.h
  29. #ifndef _STRMSPIF_H_
  30. #define _STRMSPIF_H_
  31. #include "smtypes.h"
  32. #include "rrcm_dll.h"
  33. #include "apimsp.h"
  34. #include "apierror.h"
  35. // define Source and Sink MSP IDs
  36. #define STRMSP_SRC "IntelNetIORTPStreamSrc"
  37. #define STRMSP_SNK "IntelNetIORTPStreamSnk"
  38. // version number
  39. #define STRMSP_INTERFACE_VERSION 0x1
  40. typedef DWORD STRMSP_HSESSION;
  41. //**********************************
  42. // structures used in interface calls
  43. //**********************************
  44. //***************************************************************************************
  45. /* STRMSP_SESSION_ATTRIBUTES
  46. uMulticastFlags Flags defining the multicast characteristics of this session.
  47. Valid flag values are WSA_FLAG_MULTIPOINT_C_ROOT,
  48. WSA_FLAG_MULTIPOINT_C_LEAF, WSA_FLAG_MULTIPOINT_D_ROOT, and
  49. WSA_FLAG_MULTIPOINT_D_LEAF with usage and semantics as defined
  50. in the Winsock 2 used.
  51. dwSSRC Is a DWORD specifying the SSRC value to be used to identify the
  52. RTP session. This will be the SSRC value used for the first
  53. sending stream created within this session or for RTCP receiver
  54. reports for this session even if no sending stream is opened.
  55. If the value of the SSRCSpecified parameter is FALSE, the value
  56. of this parameter is ignored and an SSRC value will be generated
  57. during the call. NOTE: The SSRC value of a stream can be
  58. reassigned dynamically because of collisions. Applications should
  59. use the STRMSP_NEWSOURCE Application Command facility to track any
  60. such changes.
  61. bSSRCSpecified Is a BOOLEAN specifying whether a user supplied SSRC value has been
  62. placed in the buffer pointed to by dSSRC. If TRUE, the user has
  63. specified an SSRC value to use used.
  64. pGroupInfo Pointer to a STRM_SOCKET_GROUP_INFO structure specifying group id
  65. and relative priority for sockets created for this RTP session.
  66. If the groupID field is zero, sockets are not grouped. If the
  67. groupID field is SG_UNCONSTRAINED_GROUP, a new socket group will
  68. be created. Otherwise any sockets created will be part of the socket
  69. group specified by the GroupID field used.
  70. pSessionUser Pointer to a STRM_USER_DESCRIPTION structure containing information
  71. about the user of this session. This information is used by RTCP to
  72. generate session description packets. A CNAME description field must
  73. be included, and other fields may be required based on the RTP profile
  74. being used.
  75. */
  76. typedef struct _strmsp_session_attributes
  77. {
  78. UINT uMulticastFlags;
  79. DWORD dwSSRC;
  80. BOOL bSSRCSpecified;
  81. STRM_SOCKET_GROUP_INFO *pGroupInfo;
  82. STRM_USER_DESCRIPTION *pSessionUser;
  83. } STRMSP_SESSION_ATTRIBUTES, *LPSTRMSP_SESSION_ATTRIBUTES;
  84. //***************************************************************************************
  85. /* STRMSP_SESSION_STARTUP_PARAMS
  86. DestAddr Is a STRM_SESSION_ADDRESSES structure containing the addresses that
  87. data and control messages for this RTP session will be sent to.
  88. These values must be specified even if no sink ports will be created
  89. on this RTP session.
  90. uMulticastScope Is a UINT specifying the IP multicast time-to-live (TTL) value to use
  91. for transmitting streams on this session. The multicast scope for this
  92. session may also be modified at any time by using
  93. STRMSP_SETMULTICASTSCOPE MSP command. If the DestAddr field does not
  94. specify a multicast address, this field is ignored.
  95. SingleQOS Is a QOS structure containing the requested QOS parameters for this RTP
  96. session.
  97. GroupQOS Is a QOS structure containing the requested QOS parameters for the group
  98. this RTP session belongs to. This field is only valid when used in
  99. conjunction with the initial RTP session in a group.
  100. BufferInfo Is a STRM_BUFFERING_INFO structure where the initial buffering
  101. requirements for this session are specified. The value of the uBufferSize
  102. field of this structure will be used as the size for all buffers required
  103. on this session. The uMinimumCount field value will set the initial and
  104. minimum number of buffers for the session (and maximum also if the Streams
  105. manager implementation does not support dynamic buffer allocation.) The
  106. uMaximumCount field value will set an upper limit for the total number of
  107. buffers allowed in this session.
  108. EncriptionInfo Is a STRM_ENCRYPTION_INFORMATION structure containing information about
  109. any encryption or decryption to be done on the session.
  110. iStreamClock Is an integer specifying the clocking frequency for the initial sending
  111. stream in this session (in hz.).
  112. */
  113. typedef struct _strmsp_session_startup_params
  114. {
  115. STRM_SESSION_ADDRESSES DestAddr;
  116. UINT uMulticastScope;
  117. QOS SingleQOS;
  118. QOS GroupQOS;
  119. STRM_BUFFERING_INFO BufferInfo;
  120. STRM_ENCRYPTION_INFORMATION EncryptionInfo;
  121. int iStreamClock;
  122. } STRMSP_SESSION_STARTUP_PARAMS, *LPSTRMSP_SESSION_STARTUP_PARAMS;
  123. //***************************************************************************************
  124. /* STRMSP_OPENSERVICE_IN_INFO
  125. uVersion Is the version identifier for this data structure. The value
  126. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  127. protInfo Is a pointer to a WSAPROTOCOL_INFO structure that contains information about the network
  128. protocol to use and the type of sockets to create for this service instance.
  129. The structure may be empty (all nulls) when passed to this function, in
  130. which case a UDP service provider will be searched for and used for data
  131. transport. The structure also may be initialized with only the iProtocol
  132. field initialized, in which case a service provider of the specified type
  133. and supporting an unconnected socket type will be searched for and used.
  134. Finally, the entire structure may be initialized (as with WSAEnumProtocols)
  135. to unequivocally specify the protocol and socket type to be used.
  136. */
  137. typedef struct _strmsp_openservice_in_info
  138. {
  139. UINT uVersion;
  140. WSAPROTOCOL_INFO *pProtocolInfo;
  141. } STRMSP_OPENSERVICE_IN_INFO, *LPSTRMSP_OPENSERVICE_IN_INFO;
  142. //***************************************************************************************
  143. /* STRMSP_OPENSERVICE_OUT_INFO
  144. uVersion Is the version identifier for this data structure. The value
  145. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  146. protInfo A pointer to a WSAPROTOCOL_INFO structure where the Winsock 2 Service Provider
  147. protocol information actual used for this STRMSP service instance will be returned.
  148. */
  149. typedef struct _strmsp_openservice_out_info
  150. {
  151. UINT uVersion;
  152. WSAPROTOCOL_INFO *pProtocolInfo;
  153. } STRMSP_OPENSERVICE_OUT_INFO, *LPSTRMSP_OPENSERVICE_OUT_INFO;
  154. //***************************************************************************************
  155. /* STRMSP_CREATESESSION_IN_INFO
  156. uVersion Is the version identifier for this data structure. The value
  157. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  158. SessionAddr Is a STRM_SESSION_ADDRESSES structure containing requested RTP and RTCP
  159. network addresses for this session. If session addresses specified here
  160. are empty (null) when passed to MSM_SendServiceCmd(), appropriate
  161. addresses will be assigned and returned in the corresponding output
  162. structure. If the addresses are specified, they must conform to the
  163. conventions established for RTP/RTCP sockets in RFC 1889. The value of
  164. the sa_family fields of these addresses, if specified, must be the address
  165. family supported by the protocol specified (implicitly or explicitly) in
  166. MSM_OpenService() call.
  167. SessionAttribs Is a STRMSP_SESSION_ATTRIBUTES structure containing requested attributes
  168. for this session. See description of STRMSP_SESSION_ATTRIBUTES above for
  169. specifics on the contents of each field.
  170. dwSessionToken Is a uninterpreted DWORD value which will be passed back as a parameter
  171. to application commands relating to this session. The application may use
  172. this as a reference to session specific data.
  173. */
  174. typedef struct _strmsp_createsession_in_info
  175. {
  176. UINT uVersion;
  177. STRM_SESSION_ADDRESSES SessionAddr;
  178. STRMSP_SESSION_ATTRIBUTES SessionAttribs;
  179. DWORD dwSessionToken;
  180. } STRMSP_CREATESESSION_IN_INFO, *LPSTRMSP_CREATESESSION_IN_INFO;
  181. //***************************************************************************************
  182. /* STRMSP_CREATESESSION_OUT_INFO
  183. uVersion Is the version identifier for this data structure. The value
  184. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  185. hSession Returns a handle to be used in commands referring to this session.
  186. SessionAddr Returns a STRM_SESSION_ADDRESSES structure containing the actual RTP and RTCP
  187. network addresses for this session.
  188. dwSSRC Returns a DWORD containing the actual SSRC value assigned to this session.
  189. uGroup Returns a UINT containing the socket group assigned to sockets in this session.
  190. This is only returned in a non-zero group identifier was specified in the group
  191. information field of the Session Attributes structure of the input information.
  192. */
  193. typedef struct _strmsp_createsession_out_info
  194. {
  195. UINT uVersion;
  196. STRMSP_HSESSION hSession;
  197. STRM_SESSION_ADDRESSES SessionAddr;
  198. DWORD dwSSRC;
  199. UINT uGroup;
  200. } STRMSP_CREATESESSION_OUT_INFO, *LPSTRMSP_CREATESESSION_OUT_INFO;
  201. //***************************************************************************************
  202. /* STRMSP_STARTSESSION_IN_INFO
  203. uVersion Is the version identifier for this data structure. The value
  204. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  205. hSession Is a STRMSP_HSESSION containing the handle for the session to be started,
  206. as returned from a successful CREATESESSION command.
  207. StartupParams Is a STRMSP_SESSION_STARTUP_PARAMS structure containing startup parameters
  208. for this session. See description of STRMSP_SESSION_STARTUP_PARAMS above
  209. for specifics on the contents of each field.
  210. */
  211. typedef struct _strmsp_startsession_in_info
  212. {
  213. UINT uVersion;
  214. STRMSP_HSESSION hSession;
  215. STRMSP_SESSION_STARTUP_PARAMS StartupParams;
  216. } STRMSP_STARTSESSION_IN_INFO, *LPSTRMSP_STARTSESSION_IN_INFO;
  217. //***************************************************************************************
  218. /* STRMSP_CLOSESESSION_IN_INFO
  219. uVersion Is the version identifier for this data structure. The value
  220. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  221. hSession Is a STRMSP_HSESSION containing the handle for the session to be started,
  222. as returned from a successful CREATESESSION command.
  223. lpReason Is a pointer to a optional null terminated string declaring a reason for
  224. closing the RTP Streams Manager session. The contents of this string are
  225. passed to remote participants for application use.
  226. */
  227. typedef struct _strmsp_closesession_in_info
  228. {
  229. UINT uVersion;
  230. STRMSP_HSESSION hSession;
  231. const char* lpReason;
  232. } STRMSP_CLOSESESSION_IN_INFO, *LPSTRMSP_CLOSESESSION_IN_INFO;
  233. //***************************************************************************************
  234. /* STRMSP_GETMTUSIZE_OUT_INFO
  235. uVersion Is the version identifier for this data structure. The value
  236. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  237. hSession Is a STRMSP_HSESSION containing the handle for the session referenced, as
  238. returned from a successful CREATESESSION command.
  239. uMTUSize UINT that is the maximum size of a transport data unit.
  240. This is the size of the largest buffer that may be submitted to a port created
  241. from this STRMSP session.
  242. */
  243. typedef struct _strmsp_getmtusize_out_info
  244. {
  245. UINT uVersion;
  246. STRMSP_HSESSION hSession;
  247. int iMTUSize;
  248. } STRMSP_GETMTUSIZE_OUT_INFO, *LPSTRMSP_GETMTUSIZE_OUT_INFO;
  249. //***************************************************************************************
  250. /* STRMSP_SETMULTICASTSCOPE_IN_INFO
  251. uVersion Is the version identifier for this data structure. The value
  252. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  253. hSession Is a STRMSP_HSESSION containing the handle for the session, as returned
  254. from a successful CREATESESSION command.
  255. uMulticastScope Is a UINT that specifies the IP multicast time-to-live (TTL) value to use
  256. for transmitting streams on this session.
  257. */
  258. typedef struct _strmsp_setmulticastscope_in_info
  259. {
  260. UINT uVersion;
  261. STRMSP_HSESSION hSession;
  262. UINT uMulticastScope;
  263. } STRMSP_SETMULTICASTSCOPE_IN_INFO, *LPSTRMSP_SETMULTICASTSCOPE_IN_INFO;
  264. //***************************************************************************************
  265. /* STRMSP_SETQOS_IN_INFO
  266. uVersion Is the version identifier for this data structure. The value
  267. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  268. hSession Is a STRMSP_HSESSION containing the handle for the session, as returned from
  269. a successful CREATESESSION command.
  270. bGroupQOS Is a BOOLEAN specifying whether the QOS structure field is for a socket group
  271. (TRUE) or for this session only (FALSE.) If this value is TRUE, the Handle
  272. field must contain the session handle for the initial session of the group
  273. (the session on which the creation of the group was specified.)
  274. RequestedQOS is a QOS structure containing the newly requested QOS parameters.
  275. */
  276. typedef struct _strmsp_setqos_in_info
  277. {
  278. UINT uVersion;
  279. STRMSP_HSESSION hSession;
  280. BOOL bGroupQOS;
  281. QOS RequestedQOS;
  282. } STRMSP_SETQOS_IN_INFO, *LPSTRMSP_SETQOS_IN_INFO;
  283. //***************************************************************************************
  284. /* STRMSP_GETSESSIONREPORTS_IN_INFO
  285. uVersion Is the version identifier for this data structure. The value
  286. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  287. hSession Is a STRMSP_HSESSION containing the handle for the session, as returned
  288. from a successful CREATESESSION command.
  289. iFilterFlags Is an int containing bit flags specifying filters that can be used to
  290. select subsets of the RTCP_REPORT structures available on this session.
  291. The value 0 disables all filtering and allows all available report data
  292. to be read. Other filter flag definitions TBD.
  293. iFilterPattern Is an int containing a pattern to be used for filtering the reports.
  294. Format of this pattern depends on the filter flags selected in the
  295. iFilterFlags parameter. Specifics TBD.
  296. iEntryIndex Is an int containing the index of first RTCP_REPORT structure to be
  297. returned. Valid index values start from 0 (for the first RTCP_REPORT
  298. structure) and go up to one less that the total number of entries.
  299. lpReport Is a pointer to a caller supplied buffer where RTCP_REPORT structures will
  300. be copied. This buffer should be sized to hold an integral number of
  301. RTCP_REPORT structures.
  302. iReportLen Is an int containing the size in bytes of the buffer pointed to by the
  303. lpReport field.
  304. */
  305. typedef struct _strmsp_getsessionreports_in_info
  306. {
  307. UINT uVersion;
  308. STRMSP_HSESSION hSession;
  309. int iFilterFlags;
  310. int iFilterPattern;
  311. int iEntryIndex;
  312. RTCP_REPORT* lpReport;
  313. int iReportLen;
  314. } STRMSP_GETSESSIONREPORTS_IN_INFO, *LPSTRMSP_GETSESSIONREPORTS_IN_INFO;
  315. //***************************************************************************************
  316. /* STRMSP_GETSESSIONREPORTS_OUT_INFO
  317. uVersion Is the version identifier for this data structure. The value
  318. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  319. iEntriesReturned Is an int where the number of RTCP_REPORT structures actually copied
  320. into buffer pointer to by the lpReport field will be returned.
  321. iNextIndex Is an int where the index of the next RTCP_REPORT structure will be
  322. returned. This value can be used as the value of the iEntryIndex
  323. field of subsequent calls to obtain all reports when the report buffer
  324. size is too small to hold then all at once. A value of zero (0)
  325. returned here indicates that all remaining reports have been returned.
  326. */
  327. typedef struct _strmsp_getsessionreports_out_info
  328. {
  329. UINT uVersion;
  330. int iEntriesReturned;
  331. int iNextIndex;
  332. } STRMSP_GETSESSIONREPORTS_OUT_INFO, *LPSTRMSP_GETSESSIONREPORTS_OUT_INFO;
  333. //***************************************************************************************
  334. /* STRMSP_SETDESTINATIONADDRESS_IN_INFO
  335. uVersion Is the version identifier for this data structure. The value
  336. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  337. hSession Is a STRMSP_HSESSION containing the handle for the session referenced, as
  338. returned from a successful CREATESESSION command.
  339. pDestinationAddr is a pointer to the network address to be used for sending data
  340. iDestinationAddrLength is the length in bytes of the data network address
  341. */
  342. typedef struct _strmsp_setdestinationaddress_in_info
  343. {
  344. UINT uVersion;
  345. STRMSP_HSESSION hSession;
  346. LPSOCKADDR pDestinationAddr;
  347. int iDestinationAddrLength;
  348. } STRMSP_SETDESTINATIONADDRESS_IN_INFO;
  349. //***************************************************************************************
  350. /* STRMSP_GENERATESSRC_IN_INFO
  351. uVersion Is the version identifier for this data structure. The value
  352. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  353. hSession Is a STRMSP_HSESSION containing the handle for the session referenced, as
  354. returned from a successful CREATESESSION command.
  355. pdwSSRC pointer to where the newly generated SSRC will be stored
  356. */
  357. typedef struct _strmsp_generatessrc_out_info
  358. {
  359. UINT uVersion;
  360. STRMSP_HSESSION hSession;
  361. DWORD *pdwSSRC;
  362. } STRMSP_GENERATESSRC_OUT_INFO;
  363. //***************************************************************************************
  364. /* STRMSP_NEWSOURCE_IN_INFO
  365. uVersion Is the version identifier for this data structure. A value of 1 or
  366. greater indicates that the fields of this data structure is are valid.
  367. uSessionToken Is the UINT value the application provided as a reference when creating
  368. this session.
  369. dwSSRC Is the RTP SSRC identifier for the newly detected source. This value can
  370. be used for creating a STRMSP source port mapped to this data stream.
  371. wPayloadType Is the RTP payload type identifier for the newly detected source. This
  372. value is used to match this stream of data with an appropriate payload
  373. handler.
  374. */
  375. typedef struct _strmsp_newsource_in_info
  376. {
  377. UINT uVersion;
  378. DWORD dwSessionToken;
  379. DWORD dwSSRC;
  380. WORD wPayloadType;
  381. } STRMSP_NEWSOURCE_IN_INFO, *LPSTRMSP_NEWSOURCE_IN_INFO;
  382. //***************************************************************************************
  383. /* STRMSP_RECVREPORT_IN_INFO
  384. uVersion Is the version identifier for this data structure. A value of 1 or
  385. greater indicates that the fields of this data structure are valid.
  386. dwSessionToken Is the DWORD value the application provided as a reference when creating
  387. this session.
  388. dwSSRC Is the RTP SSRC identifier for the data stream a report has been received
  389. for. This value can be used for identifying the newly arrived report when
  390. using the GETSESSIONREPORTS service command.
  391. */
  392. typedef struct _strmsp_recvreport_in_info
  393. {
  394. UINT uVersion;
  395. DWORD dwSessionToken;
  396. DWORD dwSSRC;
  397. } STRMSP_RECVREPORT_IN_INFO, *LPSTRMSP_RECVREPORT_IN_INFO;
  398. //***************************************************************************************
  399. /* STRMSP_QOSCHANGE_IN_INFO
  400. uVersion Is the version identifier for this data structure. A value of 1 or
  401. greater indicates that the fields of this data structure are valid.
  402. dwSessionToken Is the DWORD value the application provided as a reference when creating
  403. this session.
  404. bGroup Is a Boolean indicating whether the QOS change is associated with a socket
  405. group (TRUE) or with this session only (FALSE.)
  406. NewQOS Is a QOS structure giving the new QOS parameters for this sessions data
  407. socket or socket group.
  408. */
  409. typedef struct _strmsp_qoschange_in_info
  410. {
  411. UINT uVersion;
  412. DWORD dwSessionToken;
  413. BOOL bGroup;
  414. QOS NewQOS;
  415. } STRMSP_QOSCHANGE_IN_INFO, *LPSTRMSP_QOSCHANGE_IN_INFO;
  416. //***************************************************************************************
  417. /* STRMSP_SRCTIMEOUT_IN_INFO
  418. uVersion Is the version identifier for this data structure. A value of 1 or
  419. greater indicates that the fields of this data structure are valid.
  420. uSessionToken Is the UINT value the application provided as a reference when creating
  421. this session.
  422. dwSSRC Is the RTP SSRC identifier for the data stream that has timed-out.
  423. */
  424. typedef struct _strmsp_srctimeout_in_info
  425. {
  426. UINT uVersion;
  427. DWORD dwSessionToken;
  428. DWORD dwSSRC;
  429. } STRMSP_SRCTIMEOUT_IN_INFO, *LPSTRMSP_SRCTIMEOUT_IN_INFO;
  430. //***************************************************************************************
  431. /* STRMSP_SRCBYE_IN_INFO
  432. uVersion Is the version identifier for this data structure. A value of 1 or
  433. greater indicates that the fields of this data structure are valid.
  434. dwSessionToken Is the DWORD value the application provided as a reference when creating
  435. this session.
  436. dwSSRC Is the RTP SSRC identifier for the data stream that is closing.
  437. */
  438. typedef struct _strmsp_srcbye_in_info
  439. {
  440. UINT uVersion;
  441. DWORD dwSessionToken;
  442. DWORD dwSSRC;
  443. } STRMSP_SRCBYE_IN_INFO, *LPSTRMSP_SRCBYE_IN_INFO;
  444. //***************************************************************************************
  445. /* STRMSP_NEWSSRC_IN_INFO
  446. uVersion Is the version identifier for this data structure. A value of 1 or
  447. greater indicates that the fields of this data structure are valid.
  448. dwSessionToken Is the DWORD value the application provided as a reference when creating
  449. this session.
  450. dwSSRC Is the newly assigned RTP SSRC identifier for this data stream.
  451. */
  452. typedef struct _strmsp_newssrc_in_info
  453. {
  454. UINT uVersion;
  455. DWORD dwSessionToken;
  456. DWORD dwSSRC;
  457. } STRMSP_NEWSSRC_IN_INFO, *LPSTRMSP_NEWSSRC_IN_INFO;
  458. //***************************************************************************************
  459. /* STRMSP_SINK_OPENPORT_IN_INFO
  460. uVersion Is a UINT specifying the version identifier for this data structure.
  461. The value STRMSP_INTERFACE_VERSION should always be used to initialize it.
  462. hSession Is a STRMSP_HSESSION containing the handle for the session to be started,
  463. as returned from a successful CREATESESSION command.
  464. dwSSRC Is a DWORD where the SSRC value to be used for this port may be specified.
  465. If the value of the SSRCSpecified parameter is FALSE, the input value of
  466. this parameter is ignored and an SSRC value will be generated during the call.
  467. NOTE: The SSRC value of a stream can be reassigned dynamically because of
  468. collisions. Applications should use the STRMSP_NEWSSRC command passed to the
  469. port callback handler to track any such changes.
  470. bSSRCSpecified Boolean specifying whether a user supplied SSRC value has been placed in SSRC.
  471. If TRUE, the user has specified an SSRC value to use.
  472. pStreamUser Pointer to a STRM_USER_DESCRIPTION structure containing information about
  473. the user of this stream. This information is used by RTCP to generate session
  474. description packets. A CNAME description field must be included, and other
  475. fields may be required based on the RTP profile being used. If this is the
  476. first send stream being created this field will be ignored and the user
  477. description information specified in the CREATESESSION service command for
  478. this session will be used instead.
  479. uBufferCount Is a UINT requesting the number of buffer resources to have available for
  480. the use of this stream. In the case of send streams, this is the number of
  481. buffers that may be expected to sent in a single burst. Although the caller
  482. provides the data buffers themselves, the Streams MSP must allocate resources
  483. for tracking those buffers. This value allows versions of the Streams MSP that
  484. support dynamic buffer allocation to efficiently allocate buffer resources.
  485. Note that this value is advisory only and may be ignored by some Streams MSP
  486. implementations.
  487. iStreamClock Is an integer specifying the clocking frequency for this stream (in hz.). If
  488. this is the first send stream being created this field will be ignored and the
  489. iStreamClock value specified in the STARTSESSION service command for this
  490. session will be used instead.
  491. */
  492. typedef struct _strmsp_sink_openport_in_info
  493. {
  494. UINT uVersion;
  495. STRMSP_HSESSION hSession;
  496. STRM_USER_DESCRIPTION *pStreamUser;
  497. DWORD dwSSRC;
  498. BOOL bSSRCSpecified;
  499. UINT uBufferCount;
  500. int iStreamClock;
  501. } STRMSP_SINK_OPENPORT_IN_INFO, *LPSTRMSP_SINK_OPENPORT_IN_INFO;
  502. //***************************************************************************************
  503. /* STRMSP_SINK_OPENPORT_OUT_INFO
  504. uVersion Is the version identifier for this data structure. The value
  505. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  506. dwSSRC Is a DWORD returning the actual SSRC assigned to this output stream. This
  507. value is used for determining what RTCP reports apply to this data stream.
  508. */
  509. typedef struct _strmsp_sink_openport_out_info
  510. {
  511. UINT uVersion;
  512. DWORD dwSSRC;
  513. } STRMSP_SINK_OPENPORT_OUT_INFO, *LPSTRMSP_SINK_OPENPORT_OUT_INFO;
  514. //***************************************************************************************
  515. /* STRMSP_SETUSERDESCRIPTION_IN_INFO
  516. uVersion Is the version identifier for this data structure. The value
  517. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  518. pStreamUser Is a pointer to a STRM_USER_DESCRIPTION structure containing information
  519. about the user of this session. This information is used by RTCP to generate
  520. session description packets. A CNAME description field must be included, and
  521. other fields may be required based on the RTP profile being used.
  522. */
  523. typedef struct _strmsp_setuserdescription_in_info
  524. {
  525. UINT uVersion;
  526. STRM_USER_DESCRIPTION *pStreamUser;
  527. } STRMSP_SETUSERDESCRIPTION_IN_INFO, *LPSTRMSP_SETUSERDESCRIPTION_IN_INFO;
  528. //***************************************************************************************
  529. /* STRMSP_GETMAPPING_OUT_INFO
  530. uVersion Is the version identifier for this data structure. The value
  531. STRMSP_INTERFACE_VERSION should always be used to initialize it.
  532. dwSessionToken Is the DWORD value the application provided as a reference to the session
  533. this source port is a part of.
  534. dwSSRC Is the RTP SSRC identifier for the arriving data stream that has been
  535. mapped to this source port.
  536. */
  537. typedef struct _strmsp_getmapping_out_info
  538. {
  539. UINT uVersion;
  540. DWORD dwSessionToken;
  541. DWORD dwSSRC;
  542. } STRMSP_GETMAPPING_OUT_INFO, *LPSTRMSP_GETMAPPING_OUT_INFO;
  543. //***************************************************************************************
  544. /* STRMSP_SOURCE_OPNEPORT_IN_INFO
  545. uVersion Is a UINT specifying the version identifier for this data structure.
  546. The value STRMSP_INTERFACE_VERSION should always be used to initialize it.
  547. hSession Is a STRMSP_HSESSION containing the handle for the session to be started,
  548. as returned from a successful CREATESESSION command.
  549. dwSSRC Is a DWORD where the SSRC value of the data source to be mapped to may be
  550. specified. If the value of the SSRCSpecified field is FALSE, the value of
  551. this field is ignored and the stream will be automatically mapped to the
  552. next available data source.
  553. bSSRCSpecified Boolean specifying whether a user supplied SSRC value has been placed in
  554. SSRC. If TRUE, the user has specified an SSRC value and the stream will
  555. be mapped to the data source with that SSRC value only.
  556. uBufferCount Is a UINT requesting the number of buffer resources to have available for
  557. the use of this stream. In the case of receive streams, this is the number
  558. of buffers that may be expected to be in process at any one time. The
  559. Streams MSP must allocate these buffers itself for receiving from the
  560. network. This value allows versions of the Streams MSP that support
  561. dynamic buffer allocation to efficiently allocate buffer resources. Note
  562. that this value is advisory only and may be ignored by some Streams manager
  563. implementations.
  564. */
  565. typedef struct _strmsp_source_openport_in_info
  566. {
  567. UINT uVersion;
  568. STRMSP_HSESSION hSession;
  569. DWORD dwSSRC;
  570. BOOL bSSRCSpecified;
  571. UINT uBufferCount;
  572. } STRMSP_SOURCE_OPENPORT_IN_INFO, *LPSTRMSP_SOURCE_OPENPORT_IN_INFO;
  573. //***************************************************************************************
  574. /* STRMSP_MAPPED_IN_INFO
  575. uVersion Is the version identifier for this data structure. A value of 1 or
  576. greater indicates that the fields of this data structure are valid.
  577. dwSessionToken Is the DWORD value the application provided as a reference when creating
  578. this session.
  579. dwSSRC Is the newly assigned RTP SSRC identifier for the arriving data stream.
  580. */
  581. typedef struct _strmsp_mapped_in_info
  582. {
  583. UINT uVersion;
  584. DWORD dwSessionToken;
  585. DWORD dwSSRC;
  586. } STRMSP_MAPPED_IN_INFO, *LPSTRMSP_MAPPED_IN_INFO;
  587. //*****************************************
  588. // MSP Service Commands
  589. //*****************************************
  590. // MSP_ServiceCmdProc()
  591. #define STRMSP_CREATESESSION 0x0001 // create session
  592. #define STRMSP_STARTSESSION 0x0002 // start session
  593. #define STRMSP_CLOSESESSION 0x0003 // close session
  594. #define STRMSP_GETMTUSIZE 0x0004 // get max packet size
  595. #define STRMSP_SETMULTICASTSCOPE 0x0005 // set multicast scope
  596. #define STRMSP_SETQOS 0x0006 // set QOS
  597. #define STRMSP_GETSESSIONREPORTS 0x0007 // get session reports
  598. // Sink Port Service Commands
  599. #define STRMSP_SETUSERDESCRIPTION 0x0008 // set user desc info
  600. // Sink or Source Port Service Command.
  601. // The GETMAPPING command allows the application to determine
  602. // the SSRC value of the data stream to the SINK or SOURCE port.
  603. #define STRMSP_GETMAPPING 0x0009 // get mapping info
  604. #define STRMSP_SETDESTINATIONADDRESS 0x0010
  605. #define STRMSP_GENERATESSRC 0x0011
  606. //*****************************************
  607. // Application Commands from MSP
  608. //*****************************************
  609. #define STRMSP_NEWSOURCE 0x0001
  610. #define STRMSP_RECVREPORT 0x0002
  611. #define STRMSP_QOSCHANGE 0x0003
  612. #define STRMSP_SRCTIMEOUT 0x0004
  613. #define STRMSP_SRCBYE 0x0005
  614. #define STRMSP_NEWSSRC 0x0006
  615. #define STRMSP_MAPPED 0x0007
  616. //**********************************
  617. // error code definitions
  618. //**********************************
  619. // STRMSP defined error codes
  620. #define STRMSP_ERR_BASE (ERROR_BASE_ID)
  621. #define STRMSP_ERR_NOPROVIDER (STRMSP_ERR_BASE +1)
  622. // these error codes are standard codes within the RMS architecture
  623. #define STRMSP_ERR_INVALID_SERVICE (ERROR_INVALID_SERVICE)
  624. #define STRMSP_ERR_INVALID_MSPTYPE (ERROR_INVALID_SERVICE_DLL)
  625. #define STRMSP_ERR_INVALID_PORT (ERROR_INVALID_PORT)
  626. #define STRMSP_ERR_INVALID_BUFFER (ERROR_INVALID_BUFFER)
  627. #define STRMSP_ERR_INVALID_VERSION (ERROR_INVALID_VERSION)
  628. #define STRMSP_ERR_NOTINITIALIZED (ERROR_INVALID_CALL_ORDER)
  629. // these error codes are defined in "winerror.h"
  630. #define STRMSP_ERR_NOTIMPL E_NOTIMPL // not implemented
  631. #define STRMSP_ERR_NOT_ENOUGH_MEMORY E_OUTOFMEMORY // out of memory
  632. #define STRMSP_ERR_NOINTERFACE E_NOINTERFACE // no such interface
  633. #define STRMSP_ERR_INVALIDARG E_INVALIDARG // one or more parameters invalid
  634. #define STRMSP_ERR_FAIL E_FAIL // simply failed(unspecified error)
  635. #endif