Use macro for answer_sdp, formatting

This commit is contained in:
Marshall Quander 2017-09-28 03:12:29 -07:00
Родитель f2638f900d
Коммит 2718d82dde
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1,2 +1,4 @@
max_width = 140
fn_call_width = 100
reorder_imports = true
reorder_imported_names = true

Просмотреть файл

@ -1,9 +1,7 @@
#[macro_use]
extern crate cstr_macro;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate janus_plugin as janus;
extern crate jansson_sys as jansson;
@ -203,8 +201,8 @@ extern "C" fn handle_message(
} else {
let offer_str = unsafe { CString::from_raw(sdp_val as *mut _) };
janus::log(LogLevel::Info, &format!("Received SDP offer: {}", offer_str.to_str().unwrap()));
let offer = janus::sdp::parse_sdp(offer_str, 512).unwrap();
let answer = janus::sdp::answer_sdp(&offer);
let offer = janus::sdp::parse_sdp(offer_str).unwrap();
let answer = answer_sdp!(&offer);
let answer_str = janus::sdp::write_sdp(&answer);
unsafe {
let jsep = jansson::json_object();