File tree Expand file tree Collapse file tree
media-video/capture/src/wayland Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff 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
20912094impl 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 ( ) ) ,
You can’t perform that action at this time.
0 commit comments