2.2.2.3 Open PDU (MSG_SNDIN_OPEN)
The Open PDU is sent by the server and indicates that the server requests to start recording from the client device. The wFormatTag, nChannels, nSamplesPerSec, nAvgBytesPerSec, nBlockAlign, wBitsPerSample, cbSize, and ExtraFormatData fields specify the audio format that the client SHOULD use to record from the audio input device. The initialFormat field contains an index into the list of audio formats agreed to by the client and the server. The initialFormat field specifies the format in which audio data MUST be encoded.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Header |
FramesPerPacket |
||||||||||||||||||||||||||||||
... |
initialFormat |
||||||||||||||||||||||||||||||
... |
wFormatTag |
nChannels |
|||||||||||||||||||||||||||||
... |
nSamplesPerSec |
||||||||||||||||||||||||||||||
... |
nAvgBytesPerSec |
||||||||||||||||||||||||||||||
... |
nBlockAlign |
wBitsPerSample |
|||||||||||||||||||||||||||||
... |
cbSize |
ExtraFormatData (variable) (16 bytes) |
|||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
Header (1 byte): A SNDIN_PDU header (section 2.2.1). The MessageId field of the SNDIN_PDU header MUST be set to MSG_SNDIN_OPEN (0x03).
FramesPerPacket (4 bytes): A 32-bit unsigned integer. This field specifies the number of audio frames that the client MUST send in each Data PDU. The product of nChannels, 2, and FramesPerPacket is the size of audio data that the client MUST put in a Data PDU. The audio data size is determined by the server application and is not determined by the Remote Desktop Protocol: Audio Input Redirection Virtual Channel Extension.
initialFormat (4 bytes): A 32-bit unsigned integer. This field is an index into the list of audio formats agreed on by the client and server. This field specifies the initial audio format.
wFormatTag (2 bytes): A 16-bit unsigned integer identifying the compression codec of the audio format. For more information on compression formats, see [RFC2361]. If this field is set to WAVE_FORMAT_EXTENSIBLE (0xFFFE), the cbSize field MUST be equal to 22.
nChannels (2 bytes): A 16-bit unsigned integer. This field specifies the number of channels in the audio format identified by wFormatTag. It is part of the audio format and is not determined by the Remote Desktop Protocol: Audio Input Redirection Virtual Channel Extension.
nSamplesPerSec (4 bytes): A 32-bit unsigned integer. This field specifies the sampling rate, in hertz, for recording audio.
nAvgBytesPerSec (4 bytes): A 32-bit unsigned integer. This field specifies average data-transfer rate for the format, in bytes per second.
nBlockAlign (2 bytes): A 16-bit unsigned integer. This field specifies the block alignment, in bytes. The block alignment is the minimum atomic unit of data for this audio format.
wBitsPerSample (2 bytes): A 16-bit unsigned integer. This field specifies the size, in bits, for each audio sample.
cbSize (2 bytes): A 16-bit unsigned integer specifying the size of the ExtraFormatData field.
ExtraFormatData (variable): Extra data specific to the audio format. The size of ExtraFormatData, in bytes, is cbSize. If cbSize is 0, this field MUST NOT exist. If wFormatTag is set to WAVE_FORMAT_EXTENSIBLE (0xFFFE), this field MUST be a WAVEFORMAT_EXTENSIBLE structure.