Bug 1766646 - Vendor libwebrtc from 06e4fc548c

Upstream commit: https://webrtc.googlesource.com/src/+/06e4fc548c663f20e025f9c3fa378e137dd4f4ba
    Remove dependency on //build/config/linux/gtk

    I'm planning on removing //build/config/linux/gtk in Chrome, so this
    CL removes the dep in WebRTC.

    Bug: None
    Change-Id: I8b644ae38402335ba98fc4bf9932d132b6c816b4
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258261
    Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
    Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
    Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#36514}
This commit is contained in:
Michael Froman 2022-07-13 12:16:51 -05:00 коммит произвёл Connor Sheehan
Родитель 4889ec2f11
Коммит 12abbab761
4 изменённых файлов: 20 добавлений и 29 удалений

3
third_party/libwebrtc/README.moz-ff-commit поставляемый
Просмотреть файл

@ -13080,3 +13080,6 @@ a30d767a6d
# MOZ_LIBWEBRTC_SRC=/home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src MOZ_LIBWEBRTC_COMMIT=mjfdev bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
a14e6ed09a
# MOZ_LIBWEBRTC_SRC=/home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src MOZ_LIBWEBRTC_COMMIT=mjfdev bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
06e4fc548c

2
third_party/libwebrtc/README.mozilla поставляемый
Просмотреть файл

@ -8732,3 +8732,5 @@ libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwe
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-07-13T17:15:26.175112.
# python3 vendor-libwebrtc.py --from-local /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src --commit mjfdev libwebrtc
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-07-13T17:16:06.775728.
# python3 vendor-libwebrtc.py --from-local /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src --commit mjfdev libwebrtc
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-07-13T17:16:46.363193.

16
third_party/libwebrtc/examples/BUILD.gn поставляемый
Просмотреть файл

@ -15,6 +15,8 @@ if (is_android) {
import("//build/config/mac/rules.gni")
} else if (is_ios) {
import("//build/config/ios/rules.gni")
} else if (is_linux || is_chromeos) {
import("//build/config/linux/pkg_config.gni")
}
group("examples") {
@ -660,6 +662,18 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
}
if (is_linux || is_chromeos || is_win) {
if (is_linux || is_chromeos) {
pkg_config("gtk_config") {
packages = [
# Gtk requires gmodule, but it does not list it as a dependency in some
# misconfigured systems.
"gmodule-2.0",
"gthread-2.0",
"gtk+-3.0",
]
}
}
rtc_executable("peerconnection_client") {
testonly = true
sources = [
@ -726,7 +740,7 @@ if (is_linux || is_chromeos || is_win) {
"Xext",
"Xrender",
]
deps += [ "//build/config/linux/gtk" ]
configs += [ ":gtk_config" ]
}
deps += [

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

@ -264,20 +264,12 @@ void GtkMainWnd::SwitchToConnectUI() {
peer_list_ = NULL;
}
#if GTK_MAJOR_VERSION == 2
vbox_ = gtk_vbox_new(FALSE, 5);
#else
vbox_ = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
#endif
GtkWidget* valign = gtk_alignment_new(0, 1, 0, 0);
gtk_container_add(GTK_CONTAINER(vbox_), valign);
gtk_container_add(GTK_CONTAINER(window_), vbox_);
#if GTK_MAJOR_VERSION == 2
GtkWidget* hbox = gtk_hbox_new(FALSE, 5);
#else
GtkWidget* hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
#endif
GtkWidget* label = gtk_label_new("Server");
gtk_container_add(GTK_CONTAINER(hbox), label);
@ -386,11 +378,7 @@ void GtkMainWnd::OnClicked(GtkWidget* widget) {
void GtkMainWnd::OnKeyPress(GtkWidget* widget, GdkEventKey* key) {
if (key->type == GDK_KEY_PRESS) {
switch (key->keyval) {
#if GTK_MAJOR_VERSION == 2
case GDK_Escape:
#else
case GDK_KEY_Escape:
#endif
if (draw_area_) {
callback_->DisconnectFromCurrentPeer();
} else if (peer_list_) {
@ -398,13 +386,8 @@ void GtkMainWnd::OnKeyPress(GtkWidget* widget, GdkEventKey* key) {
}
break;
#if GTK_MAJOR_VERSION == 2
case GDK_KP_Enter:
case GDK_Return:
#else
case GDK_KEY_KP_Enter:
case GDK_KEY_Return:
#endif
if (vbox_) {
OnClicked(NULL);
} else if (peer_list_) {
@ -490,21 +473,13 @@ void GtkMainWnd::OnRedraw() {
}
}
#if GTK_MAJOR_VERSION == 2
gdk_draw_rgb_32_image(draw_area_->window,
draw_area_->style->fg_gc[GTK_STATE_NORMAL], 0, 0,
width_ * 2, height_ * 2, GDK_RGB_DITHER_MAX,
draw_buffer_.get(), (width_ * 2) * 4);
#else
gtk_widget_queue_draw(draw_area_);
#endif
}
gdk_threads_leave();
}
void GtkMainWnd::Draw(GtkWidget* widget, cairo_t* cr) {
#if GTK_MAJOR_VERSION != 2
cairo_format_t format = CAIRO_FORMAT_ARGB32;
cairo_surface_t* surface = cairo_image_surface_create_for_data(
draw_buffer_.get(), format, width_ * 2, height_ * 2,
@ -513,9 +488,6 @@ void GtkMainWnd::Draw(GtkWidget* widget, cairo_t* cr) {
cairo_rectangle(cr, 0, 0, width_ * 2, height_ * 2);
cairo_fill(cr);
cairo_surface_destroy(surface);
#else
RTC_DCHECK_NOTREACHED();
#endif
}
GtkMainWnd::VideoRenderer::VideoRenderer(