gstreamer_webrtc/
web_rtc_ice_candidate_pair.rs1use crate::{WebRTCICECandidate, WebRTCICECandidatePair};
4
5impl WebRTCICECandidatePair {
6 pub fn local(&self) -> Option<&WebRTCICECandidate> {
7 unsafe {
8 if (*self.as_ptr()).local.is_null() {
9 None
10 } else {
11 Some(WebRTCICECandidate::from_glib_ptr_borrow(
12 &(*self.as_ptr()).local,
13 ))
14 }
15 }
16 }
17
18 pub fn remote(&self) -> Option<&WebRTCICECandidate> {
19 unsafe {
20 if (*self.as_ptr()).remote.is_null() {
21 None
22 } else {
23 Some(WebRTCICECandidate::from_glib_ptr_borrow(
24 &(*self.as_ptr()).remote,
25 ))
26 }
27 }
28 }
29}