mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-23 17:38:20 +00:00
webrtcsrc: Do not pass raw caps in the transceiver
That was not making sense. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1216>
This commit is contained in:
parent
482ff879a4
commit
0b65a2f8af
1 changed files with 5 additions and 9 deletions
|
@ -637,7 +637,7 @@ impl WebRTCSrc {
|
||||||
|
|
||||||
// Creates and adds our `WebRTCSrcPad` source pad, returning caps accepted
|
// Creates and adds our `WebRTCSrcPad` source pad, returning caps accepted
|
||||||
// downstream
|
// downstream
|
||||||
fn create_and_probe_src_pad(&self, caps: &gst::Caps, stream_id: &str) -> Option<gst::Caps> {
|
fn create_and_probe_src_pad(&self, caps: &gst::Caps, stream_id: &str) -> bool {
|
||||||
gst::log!(CAT, "Creating pad for {caps:?}, stream: {stream_id}");
|
gst::log!(CAT, "Creating pad for {caps:?}, stream: {stream_id}");
|
||||||
|
|
||||||
let obj = self.obj();
|
let obj = self.obj();
|
||||||
|
@ -662,7 +662,7 @@ impl WebRTCSrc {
|
||||||
} else {
|
} else {
|
||||||
gst::info!(CAT, imp: self, "Not an audio or video media {media_type:?}");
|
gst::info!(CAT, imp: self, "Not an audio or video media {media_type:?}");
|
||||||
|
|
||||||
return None;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
let caps_with_raw = [caps.clone(), raw_caps.clone()]
|
let caps_with_raw = [caps.clone(), raw_caps.clone()]
|
||||||
|
@ -683,11 +683,7 @@ impl WebRTCSrc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ghost.imp().needs_decoding() {
|
true
|
||||||
Some(caps.clone())
|
|
||||||
} else {
|
|
||||||
Some(downstream_caps)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_offer(&self, offer: &gst_webrtc::WebRTCSessionDescription) {
|
fn handle_offer(&self, offer: &gst_webrtc::WebRTCSessionDescription) {
|
||||||
|
@ -733,11 +729,11 @@ impl WebRTCSrc {
|
||||||
|
|
||||||
if !caps.is_empty() {
|
if !caps.is_empty() {
|
||||||
let stream_id = self.get_stream_id(None, Some(i as u32)).unwrap();
|
let stream_id = self.get_stream_id(None, Some(i as u32)).unwrap();
|
||||||
if let Some(caps) = self.create_and_probe_src_pad(&caps, &stream_id) {
|
if self.create_and_probe_src_pad(&caps, &stream_id) {
|
||||||
gst::info!(
|
gst::info!(
|
||||||
CAT,
|
CAT,
|
||||||
imp: self,
|
imp: self,
|
||||||
"Adding transceiver for {stream_id} with caps: {caps:?}"
|
"Adding transceiver for {stream_id} with caps: {caps:#?}"
|
||||||
);
|
);
|
||||||
let transceiver = webrtcbin.emit_by_name::<gst_webrtc::WebRTCRTPTransceiver>(
|
let transceiver = webrtcbin.emit_by_name::<gst_webrtc::WebRTCRTPTransceiver>(
|
||||||
"add-transceiver",
|
"add-transceiver",
|
||||||
|
|
Loading…
Reference in a new issue