[channels,rdpsnd] fix warnings, add new fields

* Fix warnings in client and server channels
* Add some data read from packets to exported fields of RdpsndServerContext
This commit is contained in:
akallabeth 2025-03-07 09:37:23 +01:00
parent 4c1cc2cc0c
commit cb8176d2e7
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 9 additions and 6 deletions

View File

@ -712,9 +712,11 @@ static UINT rdpsnd_recv_wave2_pdu(rdpsndPlugin* rdpsnd, wStream* s, UINT16 BodyS
rdpsnd->waveDataSize = BodySize - 12;
rdpsnd->wArrivalTime = GetTickCount64();
WLog_Print(rdpsnd->log, WLOG_DEBUG,
"%s Wave2PDU: cBlockNo: %" PRIu8 " wFormatNo: %" PRIu16 " [%s] , align=%hu",
"%s Wave2PDU: cBlockNo: %" PRIu8 " wFormatNo: %" PRIu16
" [%s] , align=%hu wTimeStamp=0x%04" PRIx16 ", dwAudioTimeStamp=0x%08" PRIx32,
rdpsnd_is_dyn_str(rdpsnd->dynamic), rdpsnd->cBlockNo, wFormatNo,
audio_format_get_tag_string(format->wFormatTag), format->nBlockAlign);
audio_format_get_tag_string(format->wFormatTag), format->nBlockAlign,
rdpsnd->wTimeStamp, dwAudioTimeStamp);
if (!rdpsnd_ensure_device_is_open(rdpsnd, wFormatNo, format))
return ERROR_INTERNAL_ERROR;

View File

@ -185,8 +185,6 @@ static UINT rdpsnd_server_recv_quality_mode(RdpsndServerContext* context, wStrea
static UINT rdpsnd_server_recv_formats(RdpsndServerContext* context, wStream* s)
{
UINT16 num_known_format = 0;
UINT16 udpPort = 0;
BYTE lastblock = 0;
UINT error = CHANNEL_RC_OK;
WINPR_ASSERT(context);
@ -197,9 +195,9 @@ static UINT rdpsnd_server_recv_formats(RdpsndServerContext* context, wStream* s)
Stream_Read_UINT32(s, context->capsFlags); /* dwFlags */
Stream_Read_UINT32(s, context->initialVolume); /* dwVolume */
Stream_Read_UINT32(s, context->initialPitch); /* dwPitch */
Stream_Read_UINT16(s, udpPort); /* wDGramPort */
Stream_Read_UINT16(s, context->udpPort); /* wDGramPort */
Stream_Read_UINT16(s, context->num_client_formats); /* wNumberOfFormats */
Stream_Read_UINT8(s, lastblock); /* cLastBlockConfirmed */
Stream_Read_UINT8(s, context->lastblock); /* cLastBlockConfirmed */
Stream_Read_UINT16(s, context->clientVersion); /* wVersion */
Stream_Seek_UINT8(s); /* bPad */

View File

@ -177,6 +177,9 @@ extern "C"
* Only called, when use_dynamic_virtual_channel=TRUE.
*/
psRdpsndChannelIdAssigned ChannelIdAssigned;
UINT16 udpPort; /** @since version 3.14.0 */
UINT8 lastblock; /** @since version 3.14.0 */
};
FREERDP_API void rdpsnd_server_context_free(RdpsndServerContext* context);