diff --git a/generic/originalbuffer/src/originalbufferrestore/imp.rs b/generic/originalbuffer/src/originalbufferrestore/imp.rs index 544bebf1..ff43cb68 100644 --- a/generic/originalbuffer/src/originalbufferrestore/imp.rs +++ b/generic/originalbuffer/src/originalbufferrestore/imp.rs @@ -44,7 +44,7 @@ pub struct OriginalBufferRestore { } use once_cell::sync::Lazy; -#[cfg(unused_code)] +#[allow(dead_code)] static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "originalbufferrestore", diff --git a/generic/originalbuffer/src/originalbuffersave/imp.rs b/generic/originalbuffer/src/originalbuffersave/imp.rs index 6d77614d..d9518cd8 100644 --- a/generic/originalbuffer/src/originalbuffersave/imp.rs +++ b/generic/originalbuffer/src/originalbuffersave/imp.rs @@ -19,7 +19,7 @@ pub struct OriginalBufferSave { } use once_cell::sync::Lazy; -#[cfg(unused_code)] +#[allow(dead_code)] static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "originalbuffersave", diff --git a/generic/threadshare/src/socket.rs b/generic/threadshare/src/socket.rs index 889bcca2..4e8f4900 100644 --- a/generic/threadshare/src/socket.rs +++ b/generic/threadshare/src/socket.rs @@ -33,7 +33,10 @@ use std::net::UdpSocket; use crate::runtime::Async; #[cfg(unix)] -use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; +use std::os::{ + fd::BorrowedFd, + unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}, +}; #[cfg(windows)] use std::os::windows::io::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket}; @@ -231,8 +234,14 @@ impl GioSocketWrapper { } #[cfg(any( - bsd, - linux_like, + target_os = "macos", + target_os = "ios", + target_os = "freebsd", + target_os = "dragonfly", + target_os = "openbsd", + target_os = "netbsd", + target_os = "linux", + target_os = "android", target_os = "aix", target_os = "fuchsia", target_os = "haiku", @@ -246,18 +255,30 @@ impl GioSocketWrapper { let socket = self.as_socket(); - sockopt::set_ip_tos(socket, tos)?; + sockopt::set_ip_tos( + unsafe { BorrowedFd::borrow_raw(socket.as_raw_fd()) }, + tos as u8, + )?; if socket.family() == gio::SocketFamily::Ipv6 { - sockopt::set_ipv6_tclass(socket, tos)?; + sockopt::set_ipv6_tclass( + unsafe { BorrowedFd::borrow_raw(socket.as_raw_fd()) }, + tos as u32, + )?; } Ok(()) } #[cfg(not(any( - bsd, - linux_like, + target_os = "macos", + target_os = "ios", + target_os = "freebsd", + target_os = "dragonfly", + target_os = "openbsd", + target_os = "netbsd", + target_os = "linux", + target_os = "android", target_os = "aix", target_os = "fuchsia", target_os = "haiku", diff --git a/net/reqwest/tests/reqwesthttpsrc.rs b/net/reqwest/tests/reqwesthttpsrc.rs index 0e5407df..3bbdf125 100644 --- a/net/reqwest/tests/reqwesthttpsrc.rs +++ b/net/reqwest/tests/reqwesthttpsrc.rs @@ -503,7 +503,7 @@ fn test_extra_headers() { |src| { src.set_property( "extra-headers", - &gst::Structure::builder("headers") + gst::Structure::builder("headers") .field("foo", "bar") .field("baz", 1i32) .field("list", gst::List::new([1i32, 2i32])) diff --git a/net/rtp/src/rtpbin2/rtprecv.rs b/net/rtp/src/rtpbin2/rtprecv.rs index f2dbc01a..82459ab5 100644 --- a/net/rtp/src/rtpbin2/rtprecv.rs +++ b/net/rtp/src/rtpbin2/rtprecv.rs @@ -1215,7 +1215,7 @@ impl RtpRecv { // TODO what to do with the ssrc? let event = gst_video::UpstreamForceKeyUnitEvent::builder() .all_headers(fir) - .other_field("ssrcs", &gst::Array::new(ssrcs)) + .other_field("ssrcs", gst::Array::new(ssrcs)) .build(); let _ = rtp_send_sinkpad.push_event(event); diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index 4dbf71e9..d7739cc8 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -3513,7 +3513,7 @@ impl BaseWebRTCSink { if let gst::EventView::Caps(caps) = event.view() { sink.post_message(gst::message::Application::new( gst::Structure::builder("payloaded_caps") - .field("caps", &caps.caps().to_owned()) + .field("caps", caps.caps_owned()) .build(), )) .expect("Could not send message");