mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-04 15:18:17 +00:00
feat(rdpsnd): add support for client custom flags
Client can support various flags, but always set ALIVE. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
5e78f91713
commit
7bd92c0ce5
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,10 @@ use crate::pdu::{self, AudioFormat, PitchPdu, ServerAudioFormatPdu, TrainingPdu,
|
|||
use crate::server::RdpsndSvcMessages;
|
||||
|
||||
pub trait RdpsndClientHandler: Send + core::fmt::Debug {
|
||||
fn get_flags(&self) -> pdu::AudioFormatFlags {
|
||||
pdu::AudioFormatFlags::empty()
|
||||
}
|
||||
|
||||
fn get_formats(&self) -> &[AudioFormat];
|
||||
|
||||
fn wave(&mut self, format: &AudioFormat, ts: u32, data: Cow<'_, [u8]>);
|
||||
|
@ -91,7 +95,7 @@ impl Rdpsnd {
|
|||
pub fn client_formats(&mut self) -> PduResult<RdpsndSvcMessages> {
|
||||
let pdu = pdu::ClientAudioFormatPdu {
|
||||
version: self.version()?,
|
||||
flags: pdu::AudioFormatFlags::empty(),
|
||||
flags: self.handler.get_flags() | pdu::AudioFormatFlags::ALIVE,
|
||||
formats: self.handler.get_formats().to_vec(),
|
||||
volume_left: 0xFFFF,
|
||||
volume_right: 0xFFFF,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue