This repository was archived by the owner on Apr 25, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ extern crate ws;
9
9
#[ macro_use]
10
10
extern crate serde_json;
11
11
12
- use glib:: translate:: * ;
13
12
use gst:: prelude:: * ;
14
13
use gst:: { BinExt , ElementExt } ;
15
14
use rand:: Rng ;
@@ -112,14 +111,6 @@ fn register_with_server(app_control: &Arc<Mutex<AppControl>>) -> AppState {
112
111
return AppState :: ServerRegistering ;
113
112
}
114
113
115
- fn sdp_message_as_text ( offer : gstreamer_webrtc:: WebRTCSessionDescription ) -> Option < String > {
116
- unsafe {
117
- from_glib_full ( gstreamer_sdp_sys:: gst_sdp_message_as_text (
118
- ( * offer. to_glib_none ( ) . 0 ) . sdp ,
119
- ) )
120
- }
121
- }
122
-
123
114
fn send_sdp_offer (
124
115
app_control : & Arc < Mutex < AppControl > > ,
125
116
offer : gstreamer_webrtc:: WebRTCSessionDescription ,
@@ -130,11 +121,11 @@ fn send_sdp_offer(
130
121
panic ! ( "Can't send offer, not in call" ) ;
131
122
} ;
132
123
let message = json ! ( {
133
- "sdp" : {
134
- "type" : "offer" ,
135
- "sdp" : sdp_message_as_text ( offer) . unwrap ( ) ,
136
- }
137
- } ) ;
124
+ "sdp" : {
125
+ "type" : "offer" ,
126
+ "sdp" : offer. get_sdp ( ) . as_text ( ) ,
127
+ }
128
+ } ) ;
138
129
app_control. ws_sender . send ( message. to_string ( ) ) . unwrap ( ) ;
139
130
}
140
131
You can’t perform that action at this time.
0 commit comments