Skip to content

Commit b46abd1

Browse files
committed
various fixes
1 parent a2b6984 commit b46abd1

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

media-video/capture/src/wayland/stream.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,8 @@ impl UserStreamState {
219219
// check that the fd of all dma buf's are the same, as different ones are currently not supported
220220
if dma_data.iter().any(|data| data.fd != first_data.fd) {
221221
log::warn!(
222-
"Got dma buffers with different fds, discarding as this is not supported"
222+
"Got dma buffers with different fds, not currently sure how to handle this scenario"
223223
);
224-
return;
225224
}
226225

227226
self.handle_dma_data(metas, datas, dma_data)

media/rtc/src/sdp/media.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ impl Media {
134134
}
135135
}
136136

137+
pub fn codec_local_pt(&self) -> u8 {
138+
self.codec_pt.local
139+
}
140+
141+
142+
137143
/// Returns if the payload type is actual media, excludes rtx streams
138144
pub(super) fn is_remote_media_pt(&self, pt: u8) -> bool {
139145
self.codec_pt.remote == pt || self.dtmf_pt.is_some_and(|x| x.remote == pt)

media/rtc/src/sdp/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,10 @@ impl SdpSession {
14131413
payload: media.codec_pt.local,
14141414
encoding: media.codec.name.as_ref().into(),
14151415
clock_rate: media.codec.clock_rate,
1416-
params: Default::default(),
1416+
params: media
1417+
.codec
1418+
.channels
1419+
.map(|channels| channels.to_string().into()),
14171420
});
14181421

14191422
fmtp.extend(media.codec.fmtp.as_ref().map(|param| Fmtp {
@@ -2089,6 +2092,11 @@ pub struct OutboundMedia<'a> {
20892092
}
20902093

20912094
impl OutboundMedia<'_> {
2095+
/// Returns the media associated with this inbound stream
2096+
pub fn media(&self) -> &Media {
2097+
self.media
2098+
}
2099+
20922100
pub fn send_rtp(&mut self, packet: SendRtpPacket) {
20932101
let mid: Option<&Bytes> = match &self.media.mid {
20942102
Some(e) => Some(e.as_ref()),

0 commit comments

Comments
 (0)