Unverified 提交 f88f68ed authored 作者: José Luis Millán's avatar José Luis Millán 提交者: GitHub

FBS: LayersChangeNotification body must be optional (#1227)

上级 3d2556fc
# Changelog # Changelog
### NEXT
* FBS: `LayersChangeNotification` body must be optional ([PR #1227](https://github.com/versatica/mediasoup/pull/1227)).
### 3.13.1 ### 3.13.1
* Node: Extract version from `package.json` using `require()` ([PR #1217](https://github.com/versatica/mediasoup/pull/1217) by @arcinston). * Node: Extract version from `package.json` using `require()` ([PR #1217](https://github.com/versatica/mediasoup/pull/1217) by @arcinston).
......
...@@ -621,12 +621,16 @@ impl Notification { ...@@ -621,12 +621,16 @@ impl Notification {
panic!("Wrong message from worker: {notification:?}"); panic!("Wrong message from worker: {notification:?}");
}; };
let layers_fbs = match body.layers().unwrap() {
consumer::ConsumerLayers::try_from(body.layers().unwrap()).unwrap(); Some(layers) => {
let layers_fbs = consumer::ConsumerLayers::try_from(layers).unwrap();
let layers = ConsumerLayers::from_fbs(layers_fbs); let layers = ConsumerLayers::from_fbs(layers_fbs);
Ok(Notification::LayersChange(Some(layers))) Ok(Notification::LayersChange(Some(layers)))
} }
None => Ok(Notification::LayersChange(None)),
}
}
notification::Event::ConsumerTrace => { notification::Event::ConsumerTrace => {
let Ok(Some(notification::BodyRef::ConsumerTraceNotification(body))) = let Ok(Some(notification::BodyRef::ConsumerTraceNotification(body))) =
notification.body() notification.body()
......
...@@ -80,7 +80,7 @@ table GetStatsResponse { ...@@ -80,7 +80,7 @@ table GetStatsResponse {
// Notifications from Worker. // Notifications from Worker.
table LayersChangeNotification { table LayersChangeNotification {
layers: ConsumerLayers (required); layers: ConsumerLayers;
} }
table RtpNotification { table RtpNotification {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论