Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
bf7a3973
Unverified
提交
bf7a3973
authored
2月 05, 2024
作者:
Paul Olteanu
提交者:
GitHub
2月 05, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Send and Sync to dyn Errors (#1329)
上级
482afa44
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
158 行增加
和
134 行删除
+158
-134
messages.rs
rust/src/messages.rs
+73
-73
ortc.rs
rust/src/ortc.rs
+3
-3
consumer.rs
rust/src/router/consumer.rs
+13
-7
data_consumer.rs
rust/src/router/data_consumer.rs
+3
-1
data_producer.rs
rust/src/router/data_producer.rs
+3
-1
direct_transport.rs
rust/src/router/direct_transport.rs
+10
-8
pipe_transport.rs
rust/src/router/pipe_transport.rs
+10
-8
plain_transport.rs
rust/src/router/plain_transport.rs
+10
-8
producer.rs
rust/src/router/producer.rs
+5
-3
transport.rs
rust/src/router/transport.rs
+10
-6
webrtc_transport.rs
rust/src/router/webrtc_transport.rs
+10
-8
rtp_parameters.rs
rust/src/rtp_parameters.rs
+7
-7
worker.rs
rust/src/worker.rs
+1
-1
没有找到文件。
rust/src/messages.rs
浏览文件 @
bf7a3973
...
@@ -64,7 +64,7 @@ where
...
@@ -64,7 +64,7 @@ where
/// Convert generic response into specific type of this request.
/// Convert generic response into specific type of this request.
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
;
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
;
}
}
pub
(
crate
)
trait
Notification
:
Debug
{
pub
(
crate
)
trait
Notification
:
Debug
{
...
@@ -102,7 +102,7 @@ impl Request for WorkerCloseRequest {
...
@@ -102,7 +102,7 @@ impl Request for WorkerCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -133,7 +133,7 @@ impl Request for WorkerDumpRequest {
...
@@ -133,7 +133,7 @@ impl Request for WorkerDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
WorkerDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
WorkerDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -215,7 +215,7 @@ impl Request for WorkerUpdateSettingsRequest {
...
@@ -215,7 +215,7 @@ impl Request for WorkerUpdateSettingsRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -255,7 +255,7 @@ impl Request for WorkerCreateWebRtcServerRequest {
...
@@ -255,7 +255,7 @@ impl Request for WorkerCreateWebRtcServerRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -294,7 +294,7 @@ impl Request for WebRtcServerCloseRequest {
...
@@ -294,7 +294,7 @@ impl Request for WebRtcServerCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -325,7 +325,7 @@ impl Request for WebRtcServerDumpRequest {
...
@@ -325,7 +325,7 @@ impl Request for WebRtcServerDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
WebRtcServerDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
WebRtcServerDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -407,7 +407,7 @@ impl Request for WorkerCreateRouterRequest {
...
@@ -407,7 +407,7 @@ impl Request for WorkerCreateRouterRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -442,7 +442,7 @@ impl Request for RouterCloseRequest {
...
@@ -442,7 +442,7 @@ impl Request for RouterCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -473,7 +473,7 @@ impl Request for RouterDumpRequest {
...
@@ -473,7 +473,7 @@ impl Request for RouterDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
RouterDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
RouterDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -486,12 +486,12 @@ impl Request for RouterDumpRequest {
...
@@ -486,12 +486,12 @@ impl Request for RouterDumpRequest {
.map_consumer_id_producer_id
.map_consumer_id_producer_id
.into_iter
()
.into_iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
.parse
()
?
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
.parse
()
?
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_data_consumer_id_data_producer_id
:
data
map_data_consumer_id_data_producer_id
:
data
.map_data_consumer_id_data_producer_id
.map_data_consumer_id_data_producer_id
.into_iter
()
.into_iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
.parse
()
?
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
.parse
()
?
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_data_producer_id_data_consumer_ids
:
data
map_data_producer_id_data_consumer_ids
:
data
.map_data_producer_id_data_consumer_ids
.map_data_producer_id_data_consumer_ids
.into_iter
()
.into_iter
()
...
@@ -505,7 +505,7 @@ impl Request for RouterDumpRequest {
...
@@ -505,7 +505,7 @@ impl Request for RouterDumpRequest {
.collect
::
<
Result
<
_
,
_
>>
()
?
,
.collect
::
<
Result
<
_
,
_
>>
()
?
,
))
))
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_producer_id_consumer_ids
:
data
map_producer_id_consumer_ids
:
data
.map_producer_id_consumer_ids
.map_producer_id_consumer_ids
.into_iter
()
.into_iter
()
...
@@ -519,7 +519,7 @@ impl Request for RouterDumpRequest {
...
@@ -519,7 +519,7 @@ impl Request for RouterDumpRequest {
.collect
::
<
Result
<
_
,
_
>>
()
?
,
.collect
::
<
Result
<
_
,
_
>>
()
?
,
))
))
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_producer_id_observer_ids
:
data
map_producer_id_observer_ids
:
data
.map_producer_id_observer_ids
.map_producer_id_observer_ids
.into_iter
()
.into_iter
()
...
@@ -533,7 +533,7 @@ impl Request for RouterDumpRequest {
...
@@ -533,7 +533,7 @@ impl Request for RouterDumpRequest {
.collect
::
<
Result
<
_
,
_
>>
()
?
,
.collect
::
<
Result
<
_
,
_
>>
()
?
,
))
))
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
rtp_observer_ids
:
data
rtp_observer_ids
:
data
.rtp_observer_ids
.rtp_observer_ids
.into_iter
()
.into_iter
()
...
@@ -618,7 +618,7 @@ impl Request for RouterCreateDirectTransportRequest {
...
@@ -618,7 +618,7 @@ impl Request for RouterCreateDirectTransportRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -784,7 +784,7 @@ impl Request for RouterCreateWebRtcTransportRequest {
...
@@ -784,7 +784,7 @@ impl Request for RouterCreateWebRtcTransportRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
WebRtcTransportDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
WebRtcTransportDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -861,7 +861,7 @@ impl Request for RouterCreateWebRtcTransportWithServerRequest {
...
@@ -861,7 +861,7 @@ impl Request for RouterCreateWebRtcTransportWithServerRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
WebRtcTransportDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
WebRtcTransportDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -994,7 +994,7 @@ impl Request for RouterCreatePlainTransportRequest {
...
@@ -994,7 +994,7 @@ impl Request for RouterCreatePlainTransportRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
PlainTransportDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
PlainTransportDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1120,7 +1120,7 @@ impl Request for RouterCreatePipeTransportRequest {
...
@@ -1120,7 +1120,7 @@ impl Request for RouterCreatePipeTransportRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
PipeTransportDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
PipeTransportDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1221,7 +1221,7 @@ impl Request for RouterCreateAudioLevelObserverRequest {
...
@@ -1221,7 +1221,7 @@ impl Request for RouterCreateAudioLevelObserverRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -1286,7 +1286,7 @@ impl Request for RouterCreateActiveSpeakerObserverRequest {
...
@@ -1286,7 +1286,7 @@ impl Request for RouterCreateActiveSpeakerObserverRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -1317,7 +1317,7 @@ impl Request for TransportDumpRequest {
...
@@ -1317,7 +1317,7 @@ impl Request for TransportDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -1352,7 +1352,7 @@ impl Request for TransportGetStatsRequest {
...
@@ -1352,7 +1352,7 @@ impl Request for TransportGetStatsRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -1393,7 +1393,7 @@ impl Request for TransportCloseRequest {
...
@@ -1393,7 +1393,7 @@ impl Request for TransportCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -1434,7 +1434,7 @@ impl Request for WebRtcTransportConnectRequest {
...
@@ -1434,7 +1434,7 @@ impl Request for WebRtcTransportConnectRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
WebRtcTransportConnectResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
WebRtcTransportConnectResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1488,7 +1488,7 @@ impl Request for PipeTransportConnectRequest {
...
@@ -1488,7 +1488,7 @@ impl Request for PipeTransportConnectRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
PipeTransportConnectResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
PipeTransportConnectResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1547,7 +1547,7 @@ impl Request for TransportConnectPlainRequest {
...
@@ -1547,7 +1547,7 @@ impl Request for TransportConnectPlainRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
PlainTransportConnectResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
PlainTransportConnectResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1597,7 +1597,7 @@ impl Request for TransportSetMaxIncomingBitrateRequest {
...
@@ -1597,7 +1597,7 @@ impl Request for TransportSetMaxIncomingBitrateRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -1633,7 +1633,7 @@ impl Request for TransportSetMaxOutgoingBitrateRequest {
...
@@ -1633,7 +1633,7 @@ impl Request for TransportSetMaxOutgoingBitrateRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -1669,7 +1669,7 @@ impl Request for TransportSetMinOutgoingBitrateRequest {
...
@@ -1669,7 +1669,7 @@ impl Request for TransportSetMinOutgoingBitrateRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -1699,7 +1699,7 @@ impl Request for TransportRestartIceRequest {
...
@@ -1699,7 +1699,7 @@ impl Request for TransportRestartIceRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
TransportRestartIceResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
TransportRestartIceResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1761,7 +1761,7 @@ impl Request for TransportProduceRequest {
...
@@ -1761,7 +1761,7 @@ impl Request for TransportProduceRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
TransportProduceResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
TransportProduceResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1833,7 +1833,7 @@ impl Request for TransportConsumeRequest {
...
@@ -1833,7 +1833,7 @@ impl Request for TransportConsumeRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
TransportConsumeResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
TransportConsumeResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -1915,7 +1915,7 @@ impl Request for TransportProduceDataRequest {
...
@@ -1915,7 +1915,7 @@ impl Request for TransportProduceDataRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
DataProducerDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
DataProducerDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -2006,7 +2006,7 @@ impl Request for TransportConsumeDataRequest {
...
@@ -2006,7 +2006,7 @@ impl Request for TransportConsumeDataRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
DataConsumerDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
DataConsumerDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -2067,7 +2067,7 @@ impl Request for TransportEnableTraceEventRequest {
...
@@ -2067,7 +2067,7 @@ impl Request for TransportEnableTraceEventRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
...
@@ -2138,7 +2138,7 @@ impl Request for ProducerCloseRequest {
...
@@ -2138,7 +2138,7 @@ impl Request for ProducerCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2169,7 +2169,7 @@ impl Request for ProducerDumpRequest {
...
@@ -2169,7 +2169,7 @@ impl Request for ProducerDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
ProducerDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
ProducerDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -2204,7 +2204,7 @@ impl Request for ProducerGetStatsRequest {
...
@@ -2204,7 +2204,7 @@ impl Request for ProducerGetStatsRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -2240,7 +2240,7 @@ impl Request for ProducerPauseRequest {
...
@@ -2240,7 +2240,7 @@ impl Request for ProducerPauseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2271,7 +2271,7 @@ impl Request for ProducerResumeRequest {
...
@@ -2271,7 +2271,7 @@ impl Request for ProducerResumeRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2313,7 +2313,7 @@ impl Request for ProducerEnableTraceEventRequest {
...
@@ -2313,7 +2313,7 @@ impl Request for ProducerEnableTraceEventRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
...
@@ -2384,7 +2384,7 @@ impl Request for ConsumerCloseRequest {
...
@@ -2384,7 +2384,7 @@ impl Request for ConsumerCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2415,7 +2415,7 @@ impl Request for ConsumerDumpRequest {
...
@@ -2415,7 +2415,7 @@ impl Request for ConsumerDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
ConsumerDumpResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
ConsumerDumpResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -2450,7 +2450,7 @@ impl Request for ConsumerGetStatsRequest {
...
@@ -2450,7 +2450,7 @@ impl Request for ConsumerGetStatsRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -2486,7 +2486,7 @@ impl Request for ConsumerPauseRequest {
...
@@ -2486,7 +2486,7 @@ impl Request for ConsumerPauseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2517,7 +2517,7 @@ impl Request for ConsumerResumeRequest {
...
@@ -2517,7 +2517,7 @@ impl Request for ConsumerResumeRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2557,7 +2557,7 @@ impl Request for ConsumerSetPreferredLayersRequest {
...
@@ -2557,7 +2557,7 @@ impl Request for ConsumerSetPreferredLayersRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
ConsumerSetPreferredLayersResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
ConsumerSetPreferredLayersResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -2607,7 +2607,7 @@ impl Request for ConsumerSetPriorityRequest {
...
@@ -2607,7 +2607,7 @@ impl Request for ConsumerSetPriorityRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
ConsumerSetPriorityResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
ConsumerSetPriorityResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -2645,7 +2645,7 @@ impl Request for ConsumerRequestKeyFrameRequest {
...
@@ -2645,7 +2645,7 @@ impl Request for ConsumerRequestKeyFrameRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2687,7 +2687,7 @@ impl Request for ConsumerEnableTraceEventRequest {
...
@@ -2687,7 +2687,7 @@ impl Request for ConsumerEnableTraceEventRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
...
@@ -2730,7 +2730,7 @@ impl Request for DataProducerCloseRequest {
...
@@ -2730,7 +2730,7 @@ impl Request for DataProducerCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2761,7 +2761,7 @@ impl Request for DataProducerDumpRequest {
...
@@ -2761,7 +2761,7 @@ impl Request for DataProducerDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -2797,7 +2797,7 @@ impl Request for DataProducerGetStatsRequest {
...
@@ -2797,7 +2797,7 @@ impl Request for DataProducerGetStatsRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -2833,7 +2833,7 @@ impl Request for DataProducerPauseRequest {
...
@@ -2833,7 +2833,7 @@ impl Request for DataProducerPauseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2864,7 +2864,7 @@ impl Request for DataProducerResumeRequest {
...
@@ -2864,7 +2864,7 @@ impl Request for DataProducerResumeRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2941,7 +2941,7 @@ impl Request for DataConsumerCloseRequest {
...
@@ -2941,7 +2941,7 @@ impl Request for DataConsumerCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -2972,7 +2972,7 @@ impl Request for DataConsumerDumpRequest {
...
@@ -2972,7 +2972,7 @@ impl Request for DataConsumerDumpRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -3008,7 +3008,7 @@ impl Request for DataConsumerGetStatsRequest {
...
@@ -3008,7 +3008,7 @@ impl Request for DataConsumerGetStatsRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
match
response
{
match
response
{
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
Some
(
data
)
=>
Ok
(
data
.try_into
()
.unwrap
()),
_
=>
{
_
=>
{
...
@@ -3044,7 +3044,7 @@ impl Request for DataConsumerPauseRequest {
...
@@ -3044,7 +3044,7 @@ impl Request for DataConsumerPauseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3075,7 +3075,7 @@ impl Request for DataConsumerResumeRequest {
...
@@ -3075,7 +3075,7 @@ impl Request for DataConsumerResumeRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3111,7 +3111,7 @@ impl Request for DataConsumerGetBufferedAmountRequest {
...
@@ -3111,7 +3111,7 @@ impl Request for DataConsumerGetBufferedAmountRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
DataConsumerGetBufferedAmountResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
DataConsumerGetBufferedAmountResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -3162,7 +3162,7 @@ impl Request for DataConsumerSetBufferedAmountLowThresholdRequest {
...
@@ -3162,7 +3162,7 @@ impl Request for DataConsumerSetBufferedAmountLowThresholdRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3200,7 +3200,7 @@ impl Request for DataConsumerSendRequest {
...
@@ -3200,7 +3200,7 @@ impl Request for DataConsumerSendRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3248,7 +3248,7 @@ impl Request for DataConsumerSetSubchannelsRequest {
...
@@ -3248,7 +3248,7 @@ impl Request for DataConsumerSetSubchannelsRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
DataConsumerSetSubchannelsResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
DataConsumerSetSubchannelsResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -3298,7 +3298,7 @@ impl Request for DataConsumerAddSubchannelRequest {
...
@@ -3298,7 +3298,7 @@ impl Request for DataConsumerAddSubchannelRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
DataConsumerAddSubchannelResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
DataConsumerAddSubchannelResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -3348,7 +3348,7 @@ impl Request for DataConsumerRemoveSubchannelRequest {
...
@@ -3348,7 +3348,7 @@ impl Request for DataConsumerRemoveSubchannelRequest {
fn
convert_response
(
fn
convert_response
(
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
Some
(
response
::
BodyRef
::
DataConsumerRemoveSubchannelResponse
(
data
))
=
response
else
{
let
Some
(
response
::
BodyRef
::
DataConsumerRemoveSubchannelResponse
(
data
))
=
response
else
{
panic!
(
"Wrong message from worker: {response:?}"
);
panic!
(
"Wrong message from worker: {response:?}"
);
};
};
...
@@ -3393,7 +3393,7 @@ impl Request for RtpObserverCloseRequest {
...
@@ -3393,7 +3393,7 @@ impl Request for RtpObserverCloseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3423,7 +3423,7 @@ impl Request for RtpObserverPauseRequest {
...
@@ -3423,7 +3423,7 @@ impl Request for RtpObserverPauseRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3453,7 +3453,7 @@ impl Request for RtpObserverResumeRequest {
...
@@ -3453,7 +3453,7 @@ impl Request for RtpObserverResumeRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3492,7 +3492,7 @@ impl Request for RtpObserverAddProducerRequest {
...
@@ -3492,7 +3492,7 @@ impl Request for RtpObserverAddProducerRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
...
@@ -3531,7 +3531,7 @@ impl Request for RtpObserverRemoveProducerRequest {
...
@@ -3531,7 +3531,7 @@ impl Request for RtpObserverRemoveProducerRequest {
fn
convert_response
(
fn
convert_response
(
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
_response
:
Option
<
response
::
BodyRef
<
'_
>>
,
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
::
Response
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(())
Ok
(())
}
}
}
}
rust/src/ortc.rs
浏览文件 @
bf7a3973
...
@@ -80,7 +80,7 @@ impl RtpMapping {
...
@@ -80,7 +80,7 @@ impl RtpMapping {
pub
(
crate
)
fn
from_fbs_ref
(
pub
(
crate
)
fn
from_fbs_ref
(
mapping
:
rtp_parameters
::
RtpMappingRef
<
'_
>
,
mapping
:
rtp_parameters
::
RtpMappingRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
codecs
:
mapping
codecs
:
mapping
.codecs
()
?
.codecs
()
?
...
@@ -91,7 +91,7 @@ impl RtpMapping {
...
@@ -91,7 +91,7 @@ impl RtpMapping {
mapped_payload_type
:
mapping
?
.mapped_payload_type
()
?
,
mapped_payload_type
:
mapping
?
.mapped_payload_type
()
?
,
})
})
})
})
.collect
::
<
Result
<
Vec
<
_
>
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
Vec
<
_
>
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
encodings
:
mapping
encodings
:
mapping
.encodings
()
?
.encodings
()
?
.iter
()
.iter
()
...
@@ -107,7 +107,7 @@ impl RtpMapping {
...
@@ -107,7 +107,7 @@ impl RtpMapping {
mapped_ssrc
:
mapping
?
.mapped_ssrc
()
?
,
mapped_ssrc
:
mapping
?
.mapped_ssrc
()
?
,
})
})
})
})
.collect
::
<
Result
<
Vec
<
_
>
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
Vec
<
_
>
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
})
})
}
}
}
}
...
...
rust/src/router/consumer.rs
浏览文件 @
bf7a3973
...
@@ -163,7 +163,9 @@ pub struct RtpStreamParams {
...
@@ -163,7 +163,9 @@ pub struct RtpStreamParams {
}
}
impl
RtpStreamParams
{
impl
RtpStreamParams
{
pub
(
crate
)
fn
from_fbs_ref
(
params
:
rtp_stream
::
ParamsRef
<
'_
>
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs_ref
(
params
:
rtp_stream
::
ParamsRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
clock_rate
:
params
.clock_rate
()
?
,
clock_rate
:
params
.clock_rate
()
?
,
cname
:
params
.cname
()
?
.to_string
(),
cname
:
params
.cname
()
?
.to_string
(),
...
@@ -197,7 +199,9 @@ pub struct RtxStreamParams {
...
@@ -197,7 +199,9 @@ pub struct RtxStreamParams {
}
}
impl
RtxStreamParams
{
impl
RtxStreamParams
{
pub
(
crate
)
fn
from_fbs_ref
(
params
:
rtx_stream
::
ParamsRef
<
'_
>
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs_ref
(
params
:
rtx_stream
::
ParamsRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
clock_rate
:
params
.clock_rate
()
?
,
clock_rate
:
params
.clock_rate
()
?
,
cname
:
params
.cname
()
?
.to_string
(),
cname
:
params
.cname
()
?
.to_string
(),
...
@@ -218,7 +222,9 @@ pub struct RtpStream {
...
@@ -218,7 +222,9 @@ pub struct RtpStream {
}
}
impl
RtpStream
{
impl
RtpStream
{
pub
(
crate
)
fn
from_fbs_ref
(
dump
:
rtp_stream
::
DumpRef
<
'_
>
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs_ref
(
dump
:
rtp_stream
::
DumpRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
params
:
RtpStreamParams
::
from_fbs_ref
(
dump
.params
()
?
)
?
,
params
:
RtpStreamParams
::
from_fbs_ref
(
dump
.params
()
?
)
?
,
score
:
dump
.score
()
?
,
score
:
dump
.score
()
?
,
...
@@ -267,7 +273,7 @@ pub struct ConsumerDump {
...
@@ -267,7 +273,7 @@ pub struct ConsumerDump {
impl
ConsumerDump
{
impl
ConsumerDump
{
pub
(
crate
)
fn
from_fbs_ref
(
pub
(
crate
)
fn
from_fbs_ref
(
dump
:
consumer
::
DumpResponseRef
<
'_
>
,
dump
:
consumer
::
DumpResponseRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
let
dump
=
dump
.data
();
let
dump
=
dump
.data
();
Ok
(
Self
{
Ok
(
Self
{
...
@@ -286,7 +292,7 @@ impl ConsumerDump {
...
@@ -286,7 +292,7 @@ impl ConsumerDump {
.trace_event_types
()
?
.trace_event_types
()
?
.iter
()
.iter
()
.map
(|
trace_event_type
|
Ok
(
ConsumerTraceEventType
::
from_fbs
(
trace_event_type
?
)))
.map
(|
trace_event_type
|
Ok
(
ConsumerTraceEventType
::
from_fbs
(
trace_event_type
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
r
#
type
:
ConsumerType
::
from_fbs
(
dump
?
.base
()
?
.type_
()
?
),
r
#
type
:
ConsumerType
::
from_fbs
(
dump
?
.base
()
?
.type_
()
?
),
consumable_rtp_encodings
:
dump
?
consumable_rtp_encodings
:
dump
?
.base
()
?
.base
()
?
...
@@ -295,12 +301,12 @@ impl ConsumerDump {
...
@@ -295,12 +301,12 @@ impl ConsumerDump {
.map
(|
encoding_parameters
|
{
.map
(|
encoding_parameters
|
{
RtpEncodingParameters
::
from_fbs_ref
(
encoding_parameters
?
)
RtpEncodingParameters
::
from_fbs_ref
(
encoding_parameters
?
)
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
rtp_streams
:
dump
?
rtp_streams
:
dump
?
.rtp_streams
()
?
.rtp_streams
()
?
.iter
()
.iter
()
.map
(|
stream
|
RtpStream
::
from_fbs_ref
(
stream
?
))
.map
(|
stream
|
RtpStream
::
from_fbs_ref
(
stream
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
preferred_spatial_layer
:
dump
?
.preferred_spatial_layer
()
?
,
preferred_spatial_layer
:
dump
?
.preferred_spatial_layer
()
?
,
target_spatial_layer
:
dump
?
.target_spatial_layer
()
?
,
target_spatial_layer
:
dump
?
.target_spatial_layer
()
?
,
current_spatial_layer
:
dump
?
.current_spatial_layer
()
?
,
current_spatial_layer
:
dump
?
.current_spatial_layer
()
?
,
...
...
rust/src/router/data_consumer.rs
浏览文件 @
bf7a3973
...
@@ -163,7 +163,9 @@ pub struct DataConsumerDump {
...
@@ -163,7 +163,9 @@ pub struct DataConsumerDump {
}
}
impl
DataConsumerDump
{
impl
DataConsumerDump
{
pub
(
crate
)
fn
from_fbs
(
dump
:
data_consumer
::
DumpResponse
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
dump
:
data_consumer
::
DumpResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
id
:
dump
.id
.parse
()
?
,
id
:
dump
.id
.parse
()
?
,
data_producer_id
:
dump
.data_producer_id
.parse
()
?
,
data_producer_id
:
dump
.data_producer_id
.parse
()
?
,
...
...
rust/src/router/data_producer.rs
浏览文件 @
bf7a3973
...
@@ -116,7 +116,9 @@ pub struct DataProducerDump {
...
@@ -116,7 +116,9 @@ pub struct DataProducerDump {
}
}
impl
DataProducerDump
{
impl
DataProducerDump
{
pub
(
crate
)
fn
from_fbs
(
dump
:
data_producer
::
DumpResponse
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
dump
:
data_producer
::
DumpResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
id
:
dump
.id
.parse
()
?
,
id
:
dump
.id
.parse
()
?
,
r
#
type
:
if
dump
.type_
==
data_producer
::
Type
::
Sctp
{
r
#
type
:
if
dump
.type_
==
data_producer
::
Type
::
Sctp
{
...
...
rust/src/router/direct_transport.rs
浏览文件 @
bf7a3973
...
@@ -75,7 +75,9 @@ pub struct DirectTransportDump {
...
@@ -75,7 +75,9 @@ pub struct DirectTransportDump {
}
}
impl
DirectTransportDump
{
impl
DirectTransportDump
{
pub
(
crate
)
fn
from_fbs
(
dump
:
direct_transport
::
DumpResponse
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
dump
:
direct_transport
::
DumpResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
id
:
dump
.base.id
.parse
()
?
,
id
:
dump
.base.id
.parse
()
?
,
direct
:
true
,
direct
:
true
,
...
@@ -84,37 +86,37 @@ impl DirectTransportDump {
...
@@ -84,37 +86,37 @@ impl DirectTransportDump {
.producer_ids
.producer_ids
.iter
()
.iter
()
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
consumer_ids
:
dump
consumer_ids
:
dump
.base
.base
.consumer_ids
.consumer_ids
.iter
()
.iter
()
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_ssrc_consumer_id
:
dump
map_ssrc_consumer_id
:
dump
.base
.base
.map_ssrc_consumer_id
.map_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_rtx_ssrc_consumer_id
:
dump
map_rtx_ssrc_consumer_id
:
dump
.base
.base
.map_rtx_ssrc_consumer_id
.map_rtx_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_producer_ids
:
dump
data_producer_ids
:
dump
.base
.base
.data_producer_ids
.data_producer_ids
.iter
()
.iter
()
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_consumer_ids
:
dump
data_consumer_ids
:
dump
.base
.base
.data_consumer_ids
.data_consumer_ids
.iter
()
.iter
()
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
dump
.base.recv_rtp_header_extensions
.as_ref
(),
dump
.base.recv_rtp_header_extensions
.as_ref
(),
),
),
...
@@ -182,7 +184,7 @@ pub struct DirectTransportStat {
...
@@ -182,7 +184,7 @@ pub struct DirectTransportStat {
impl
DirectTransportStat
{
impl
DirectTransportStat
{
pub
(
crate
)
fn
from_fbs
(
pub
(
crate
)
fn
from_fbs
(
stats
:
direct_transport
::
GetStatsResponse
,
stats
:
direct_transport
::
GetStatsResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
transport_id
:
stats
.base.transport_id
.parse
()
?
,
transport_id
:
stats
.base.transport_id
.parse
()
?
,
timestamp
:
stats
.base.timestamp
,
timestamp
:
stats
.base.timestamp
,
...
...
rust/src/router/pipe_transport.rs
浏览文件 @
bf7a3973
...
@@ -106,7 +106,9 @@ pub struct PipeTransportDump {
...
@@ -106,7 +106,9 @@ pub struct PipeTransportDump {
}
}
impl
PipeTransportDump
{
impl
PipeTransportDump
{
pub
(
crate
)
fn
from_fbs
(
dump
:
pipe_transport
::
DumpResponse
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
dump
:
pipe_transport
::
DumpResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
// Common to all Transports.
// Common to all Transports.
id
:
dump
.base.id
.parse
()
?
,
id
:
dump
.base.id
.parse
()
?
,
...
@@ -116,37 +118,37 @@ impl PipeTransportDump {
...
@@ -116,37 +118,37 @@ impl PipeTransportDump {
.producer_ids
.producer_ids
.iter
()
.iter
()
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
consumer_ids
:
dump
consumer_ids
:
dump
.base
.base
.consumer_ids
.consumer_ids
.iter
()
.iter
()
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_ssrc_consumer_id
:
dump
map_ssrc_consumer_id
:
dump
.base
.base
.map_ssrc_consumer_id
.map_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_rtx_ssrc_consumer_id
:
dump
map_rtx_ssrc_consumer_id
:
dump
.base
.base
.map_rtx_ssrc_consumer_id
.map_rtx_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_producer_ids
:
dump
data_producer_ids
:
dump
.base
.base
.data_producer_ids
.data_producer_ids
.iter
()
.iter
()
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_consumer_ids
:
dump
data_consumer_ids
:
dump
.base
.base
.data_consumer_ids
.data_consumer_ids
.iter
()
.iter
()
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
dump
.base.recv_rtp_header_extensions
.as_ref
(),
dump
.base.recv_rtp_header_extensions
.as_ref
(),
),
),
...
@@ -223,7 +225,7 @@ pub struct PipeTransportStat {
...
@@ -223,7 +225,7 @@ pub struct PipeTransportStat {
impl
PipeTransportStat
{
impl
PipeTransportStat
{
pub
(
crate
)
fn
from_fbs
(
pub
(
crate
)
fn
from_fbs
(
stats
:
pipe_transport
::
GetStatsResponse
,
stats
:
pipe_transport
::
GetStatsResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
transport_id
:
stats
.base.transport_id
.parse
()
?
,
transport_id
:
stats
.base.transport_id
.parse
()
?
,
timestamp
:
stats
.base.timestamp
,
timestamp
:
stats
.base.timestamp
,
...
...
rust/src/router/plain_transport.rs
浏览文件 @
bf7a3973
...
@@ -127,7 +127,9 @@ pub struct PlainTransportDump {
...
@@ -127,7 +127,9 @@ pub struct PlainTransportDump {
}
}
impl
PlainTransportDump
{
impl
PlainTransportDump
{
pub
(
crate
)
fn
from_fbs
(
dump
:
plain_transport
::
DumpResponse
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
dump
:
plain_transport
::
DumpResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
// Common to all Transports.
// Common to all Transports.
id
:
dump
.base.id
.parse
()
?
,
id
:
dump
.base.id
.parse
()
?
,
...
@@ -137,37 +139,37 @@ impl PlainTransportDump {
...
@@ -137,37 +139,37 @@ impl PlainTransportDump {
.producer_ids
.producer_ids
.iter
()
.iter
()
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
consumer_ids
:
dump
consumer_ids
:
dump
.base
.base
.consumer_ids
.consumer_ids
.iter
()
.iter
()
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_ssrc_consumer_id
:
dump
map_ssrc_consumer_id
:
dump
.base
.base
.map_ssrc_consumer_id
.map_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_rtx_ssrc_consumer_id
:
dump
map_rtx_ssrc_consumer_id
:
dump
.base
.base
.map_rtx_ssrc_consumer_id
.map_rtx_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_producer_ids
:
dump
data_producer_ids
:
dump
.base
.base
.data_producer_ids
.data_producer_ids
.iter
()
.iter
()
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_consumer_ids
:
dump
data_consumer_ids
:
dump
.base
.base
.data_consumer_ids
.data_consumer_ids
.iter
()
.iter
()
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
dump
.base.recv_rtp_header_extensions
.as_ref
(),
dump
.base.recv_rtp_header_extensions
.as_ref
(),
),
),
...
@@ -251,7 +253,7 @@ pub struct PlainTransportStat {
...
@@ -251,7 +253,7 @@ pub struct PlainTransportStat {
impl
PlainTransportStat
{
impl
PlainTransportStat
{
pub
(
crate
)
fn
from_fbs
(
pub
(
crate
)
fn
from_fbs
(
stats
:
plain_transport
::
GetStatsResponse
,
stats
:
plain_transport
::
GetStatsResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
transport_id
:
stats
.base.transport_id
.parse
()
?
,
transport_id
:
stats
.base.transport_id
.parse
()
?
,
timestamp
:
stats
.base.timestamp
,
timestamp
:
stats
.base.timestamp
,
...
...
rust/src/router/producer.rs
浏览文件 @
bf7a3973
...
@@ -108,7 +108,9 @@ pub struct RtpStreamRecv {
...
@@ -108,7 +108,9 @@ pub struct RtpStreamRecv {
}
}
impl
RtpStreamRecv
{
impl
RtpStreamRecv
{
pub
(
crate
)
fn
from_fbs_ref
(
dump
:
rtp_stream
::
DumpRef
<
'_
>
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs_ref
(
dump
:
rtp_stream
::
DumpRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
params
:
RtpStreamParams
::
from_fbs_ref
(
dump
.params
()
?
)
?
,
params
:
RtpStreamParams
::
from_fbs_ref
(
dump
.params
()
?
)
?
,
score
:
dump
.score
()
?
,
score
:
dump
.score
()
?
,
...
@@ -141,7 +143,7 @@ pub struct ProducerDump {
...
@@ -141,7 +143,7 @@ pub struct ProducerDump {
impl
ProducerDump
{
impl
ProducerDump
{
pub
(
crate
)
fn
from_fbs_ref
(
pub
(
crate
)
fn
from_fbs_ref
(
dump
:
producer
::
DumpResponseRef
<
'_
>
,
dump
:
producer
::
DumpResponseRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
id
:
dump
.id
()
?
.parse
()
?
,
id
:
dump
.id
()
?
.parse
()
?
,
kind
:
MediaKind
::
from_fbs
(
dump
.kind
()
?
),
kind
:
MediaKind
::
from_fbs
(
dump
.kind
()
?
),
...
@@ -152,7 +154,7 @@ impl ProducerDump {
...
@@ -152,7 +154,7 @@ impl ProducerDump {
.rtp_streams
()
?
.rtp_streams
()
?
.iter
()
.iter
()
.map
(|
rtp_stream
|
RtpStreamRecv
::
from_fbs_ref
(
rtp_stream
?
))
.map
(|
rtp_stream
|
RtpStreamRecv
::
from_fbs_ref
(
rtp_stream
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
trace_event_types
:
dump
trace_event_types
:
dump
.trace_event_types
()
?
.trace_event_types
()
?
.iter
()
.iter
()
...
...
rust/src/router/transport.rs
浏览文件 @
bf7a3973
...
@@ -122,23 +122,25 @@ pub struct RtpListener {
...
@@ -122,23 +122,25 @@ pub struct RtpListener {
}
}
impl
RtpListener
{
impl
RtpListener
{
pub
(
crate
)
fn
from_fbs
(
rtp_listener
:
&
transport
::
RtpListener
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
rtp_listener
:
&
transport
::
RtpListener
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
mid_table
:
rtp_listener
mid_table
:
rtp_listener
.mid_table
.mid_table
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
.to_string
(),
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
.to_string
(),
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
rid_table
:
rtp_listener
rid_table
:
rtp_listener
.rid_table
.rid_table
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
.to_string
(),
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
.to_string
(),
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
ssrc_table
:
rtp_listener
ssrc_table
:
rtp_listener
.ssrc_table
.ssrc_table
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
})
})
}
}
}
}
...
@@ -175,13 +177,15 @@ pub struct SctpListener {
...
@@ -175,13 +177,15 @@ pub struct SctpListener {
}
}
impl
SctpListener
{
impl
SctpListener
{
pub
(
crate
)
fn
from_fbs
(
listener
:
&
transport
::
SctpListener
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
listener
:
&
transport
::
SctpListener
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
stream_id_table
:
listener
stream_id_table
:
listener
.stream_id_table
.stream_id_table
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
})
})
}
}
}
}
...
...
rust/src/router/webrtc_transport.rs
浏览文件 @
bf7a3973
...
@@ -213,7 +213,9 @@ pub struct WebRtcTransportDump {
...
@@ -213,7 +213,9 @@ pub struct WebRtcTransportDump {
}
}
impl
WebRtcTransportDump
{
impl
WebRtcTransportDump
{
pub
(
crate
)
fn
from_fbs
(
dump
:
web_rtc_transport
::
DumpResponse
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
pub
(
crate
)
fn
from_fbs
(
dump
:
web_rtc_transport
::
DumpResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
// Common to all Transports.
// Common to all Transports.
id
:
dump
.base.id
.parse
()
?
,
id
:
dump
.base.id
.parse
()
?
,
...
@@ -223,37 +225,37 @@ impl WebRtcTransportDump {
...
@@ -223,37 +225,37 @@ impl WebRtcTransportDump {
.producer_ids
.producer_ids
.iter
()
.iter
()
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.map
(|
producer_id
|
Ok
(
producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
consumer_ids
:
dump
consumer_ids
:
dump
.base
.base
.consumer_ids
.consumer_ids
.iter
()
.iter
()
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.map
(|
consumer_id
|
Ok
(
consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_ssrc_consumer_id
:
dump
map_ssrc_consumer_id
:
dump
.base
.base
.map_ssrc_consumer_id
.map_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
map_rtx_ssrc_consumer_id
:
dump
map_rtx_ssrc_consumer_id
:
dump
.base
.base
.map_rtx_ssrc_consumer_id
.map_rtx_ssrc_consumer_id
.iter
()
.iter
()
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.map
(|
key_value
|
Ok
((
key_value
.key
,
key_value
.value
.parse
()
?
)))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_producer_ids
:
dump
data_producer_ids
:
dump
.base
.base
.data_producer_ids
.data_producer_ids
.iter
()
.iter
()
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.map
(|
data_producer_id
|
Ok
(
data_producer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
data_consumer_ids
:
dump
data_consumer_ids
:
dump
.base
.base
.data_consumer_ids
.data_consumer_ids
.iter
()
.iter
()
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.map
(|
data_consumer_id
|
Ok
(
data_consumer_id
.parse
()
?
))
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
recv_rtp_header_extensions
:
RecvRtpHeaderExtensions
::
from_fbs
(
dump
.base.recv_rtp_header_extensions
.as_ref
(),
dump
.base.recv_rtp_header_extensions
.as_ref
(),
),
),
...
@@ -342,7 +344,7 @@ pub struct WebRtcTransportStat {
...
@@ -342,7 +344,7 @@ pub struct WebRtcTransportStat {
impl
WebRtcTransportStat
{
impl
WebRtcTransportStat
{
pub
(
crate
)
fn
from_fbs
(
pub
(
crate
)
fn
from_fbs
(
stats
:
web_rtc_transport
::
GetStatsResponse
,
stats
:
web_rtc_transport
::
GetStatsResponse
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
transport_id
:
stats
.base.transport_id
.parse
()
?
,
transport_id
:
stats
.base.transport_id
.parse
()
?
,
timestamp
:
stats
.base.timestamp
,
timestamp
:
stats
.base.timestamp
,
...
...
rust/src/rtp_parameters.rs
浏览文件 @
bf7a3973
...
@@ -789,7 +789,7 @@ pub struct RtpParameters {
...
@@ -789,7 +789,7 @@ pub struct RtpParameters {
impl
RtpParameters
{
impl
RtpParameters
{
pub
(
crate
)
fn
from_fbs_ref
(
pub
(
crate
)
fn
from_fbs_ref
(
rtp_parameters
:
rtp_parameters
::
RtpParametersRef
<
'_
>
,
rtp_parameters
:
rtp_parameters
::
RtpParametersRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
mid
:
rtp_parameters
.mid
()
?
.map
(|
mid
|
mid
.to_string
()),
mid
:
rtp_parameters
.mid
()
?
.map
(|
mid
|
mid
.to_string
()),
codecs
:
rtp_parameters
codecs
:
rtp_parameters
...
@@ -824,7 +824,7 @@ impl RtpParameters {
...
@@ -824,7 +824,7 @@ impl RtpParameters {
},
},
))
))
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
;
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
;
let
rtcp_feedback
=
codec
?
let
rtcp_feedback
=
codec
?
.rtcp_feedback
()
?
.rtcp_feedback
()
?
.unwrap_or
(
planus
::
Vector
::
new_empty
())
.unwrap_or
(
planus
::
Vector
::
new_empty
())
...
@@ -835,7 +835,7 @@ impl RtpParameters {
...
@@ -835,7 +835,7 @@ impl RtpParameters {
rtcp_feedback
?
.parameter
()
?
.unwrap_or_default
(),
rtcp_feedback
?
.parameter
()
?
.unwrap_or_default
(),
)
?
)
)
?
)
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
;
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
;
Ok
(
match
MimeType
::
from_str
(
codec
?
.mime_type
()
?
)
?
{
Ok
(
match
MimeType
::
from_str
(
codec
?
.mime_type
()
?
)
?
{
MimeType
::
Audio
(
mime_type
)
=>
RtpCodecParameters
::
Audio
{
MimeType
::
Audio
(
mime_type
)
=>
RtpCodecParameters
::
Audio
{
...
@@ -858,7 +858,7 @@ impl RtpParameters {
...
@@ -858,7 +858,7 @@ impl RtpParameters {
},
},
})
})
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
header_extensions
:
rtp_parameters
header_extensions
:
rtp_parameters
.header_extensions
()
?
.header_extensions
()
?
.into_iter
()
.into_iter
()
...
@@ -869,7 +869,7 @@ impl RtpParameters {
...
@@ -869,7 +869,7 @@ impl RtpParameters {
encrypt
:
header_extension_parameters
?
.encrypt
()
?
,
encrypt
:
header_extension_parameters
?
.encrypt
()
?
,
})
})
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
encodings
:
rtp_parameters
encodings
:
rtp_parameters
.encodings
()
?
.encodings
()
?
.into_iter
()
.into_iter
()
...
@@ -894,7 +894,7 @@ impl RtpParameters {
...
@@ -894,7 +894,7 @@ impl RtpParameters {
max_bitrate
:
encoding
?
.max_bitrate
()
?
,
max_bitrate
:
encoding
?
.max_bitrate
()
?
,
})
})
})
})
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
>>>
()
?
,
.collect
::
<
Result
<
_
,
Box
<
dyn
Error
+
Send
+
Sync
>>>
()
?
,
rtcp
:
RtcpParameters
{
rtcp
:
RtcpParameters
{
cname
:
rtp_parameters
cname
:
rtp_parameters
.rtcp
()
?
.rtcp
()
?
...
@@ -1310,7 +1310,7 @@ impl RtpEncodingParameters {
...
@@ -1310,7 +1310,7 @@ impl RtpEncodingParameters {
pub
(
crate
)
fn
from_fbs_ref
(
pub
(
crate
)
fn
from_fbs_ref
(
encoding_parameters
:
rtp_parameters
::
RtpEncodingParametersRef
<
'_
>
,
encoding_parameters
:
rtp_parameters
::
RtpEncodingParametersRef
<
'_
>
,
)
->
Result
<
Self
,
Box
<
dyn
Error
>>
{
)
->
Result
<
Self
,
Box
<
dyn
Error
+
Send
+
Sync
>>
{
Ok
(
Self
{
Ok
(
Self
{
ssrc
:
encoding_parameters
.ssrc
()
?
,
ssrc
:
encoding_parameters
.ssrc
()
?
,
rid
:
encoding_parameters
.rid
()
?
.map
(|
rid
|
rid
.to_string
()),
rid
:
encoding_parameters
.rid
()
?
.map
(|
rid
|
rid
.to_string
()),
...
...
rust/src/worker.rs
浏览文件 @
bf7a3973
...
@@ -67,7 +67,7 @@ pub enum RequestError {
...
@@ -67,7 +67,7 @@ pub enum RequestError {
NoData
,
NoData
,
/// Response conversion error.
/// Response conversion error.
#[error(
"Response conversion error: {0}"
)]
#[error(
"Response conversion error: {0}"
)]
ResponseConversion
(
Box
<
dyn
Error
>
),
ResponseConversion
(
Box
<
dyn
Error
+
Send
+
Sync
>
),
}
}
/// Logging level for logs generated by the media worker thread (check the
/// Logging level for logs generated by the media worker thread (check the
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论