Upgrade media / GStreamer / GLib (#30750)

- Upgrade the version of GStreamer for Windows

This upgrades the Windows build to use the most recent version of
GStreamer. This is necessary to upgrade our GStreamer dependency.

- Stop shipping GStreamer binaries on Linux

The binary bundle of GStreamer that we package is not used to compile --
only to run layout tests. It's too old for the APIs that we are using
(as evidenced by needed 1.18 for WebRTC) and nowadays Linux
distributions carry a new version so it's unecessary for our build
machines. No longer using this binary bundle will allow us to upgrade
our GStreamer dependency -- which now has stricter checks that we
are using at least version 1.18.

- Upgrade media to use newer versions of GStreamer / GLib dependencies
This commit is contained in:
Martin Robinson 2024-01-05 09:01:58 +01:00 committed by GitHub
parent c219204084
commit 7fa4ea9740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 517 additions and 338 deletions

View file

@ -378,9 +378,9 @@ impl From<&RTCDataChannelInit> for DataChannelInit {
impl From<DataChannelState> for RTCDataChannelState {
fn from(state: DataChannelState) -> RTCDataChannelState {
match state {
DataChannelState::New |
DataChannelState::Connecting |
DataChannelState::__Unknown(_) => RTCDataChannelState::Connecting,
DataChannelState::Connecting | DataChannelState::__Unknown(_) => {
RTCDataChannelState::Connecting
},
DataChannelState::Open => RTCDataChannelState::Open,
DataChannelState::Closing => RTCDataChannelState::Closing,
DataChannelState::Closed => RTCDataChannelState::Closed,

View file

@ -458,8 +458,11 @@ impl RTCPeerConnection {
.task_manager()
.networking_task_source_with_canceller();
let this = Trusted::new(self);
self.controller.borrow_mut().as_ref().unwrap().create_offer(
(move |desc: SessionDescription| {
self.controller
.borrow_mut()
.as_ref()
.unwrap()
.create_offer(Box::new(move |desc: SessionDescription| {
let _ = task_source.queue_with_canceller(
task!(offer_created: move || {
let this = this.root();
@ -476,9 +479,7 @@ impl RTCPeerConnection {
}),
&canceller,
);
})
.into(),
);
}));
}
fn create_answer(&self) {
@ -493,27 +494,24 @@ impl RTCPeerConnection {
.borrow_mut()
.as_ref()
.unwrap()
.create_answer(
(move |desc: SessionDescription| {
let _ = task_source.queue_with_canceller(
task!(answer_created: move || {
let this = this.root();
if this.offer_answer_generation.get() != generation {
// the state has changed since we last created the offer,
// create a fresh one
this.create_answer();
} else {
let init: RTCSessionDescriptionInit = desc.into();
for promise in this.answer_promises.borrow_mut().drain(..) {
promise.resolve_native(&init);
}
.create_answer(Box::new(move |desc: SessionDescription| {
let _ = task_source.queue_with_canceller(
task!(answer_created: move || {
let this = this.root();
if this.offer_answer_generation.get() != generation {
// the state has changed since we last created the offer,
// create a fresh one
this.create_answer();
} else {
let init: RTCSessionDescriptionInit = desc.into();
for promise in this.answer_promises.borrow_mut().drain(..) {
promise.resolve_native(&init);
}
}),
&canceller,
);
})
.into(),
);
}
}),
&canceller,
);
}));
}
}
@ -642,7 +640,7 @@ impl RTCPeerConnectionMethods for RTCPeerConnection {
.unwrap()
.set_local_description(
desc.clone(),
(move || {
Box::new(move || {
let _ = task_source.queue_with_canceller(
task!(local_description_set: move || {
// XXXManishearth spec actually asks for an intricate
@ -659,8 +657,7 @@ impl RTCPeerConnectionMethods for RTCPeerConnection {
}),
&canceller,
);
})
.into(),
}),
);
p
}
@ -683,7 +680,7 @@ impl RTCPeerConnectionMethods for RTCPeerConnection {
.unwrap()
.set_remote_description(
desc.clone(),
(move || {
Box::new(move || {
let _ = task_source.queue_with_canceller(
task!(remote_description_set: move || {
// XXXManishearth spec actually asks for an intricate
@ -700,8 +697,7 @@ impl RTCPeerConnectionMethods for RTCPeerConnection {
}),
&canceller,
);
})
.into(),
}),
);
p
}