Add support for stand-alone Fuchsia build.
When target_os is set to "fuchsia": BUILD: suppress Wundef flag DEPS: download the Fuchsia SDK audio_encoding: add header include video_capture: video_capture_factory is not yet implemented for Fuchsia so we add a null capture factory when building for Fuchsia. Bug: webrtc:14061 Change-Id: Id6ca7418859c85293a0a5e2a8427807ee039db2c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262200 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37030}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
39b6cb651e
commit
e9c3f0158c
12
BUILD.gn
12
BUILD.gn
@ -356,10 +356,14 @@ config("common_config") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags += [
|
cflags += [ "-Wc++11-narrowing" ]
|
||||||
"-Wc++11-narrowing",
|
|
||||||
"-Wundef",
|
if (!is_fuchsia) {
|
||||||
]
|
# Compiling with the Fuchsia SDK results in Wundef errors
|
||||||
|
# TODO(bugs.fuchsia.dev/100722): Remove from (!is_fuchsia) branch when
|
||||||
|
# Fuchsia build errors are fixed.
|
||||||
|
cflags += [ "-Wundef" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_nacl) {
|
if (!is_nacl) {
|
||||||
# Flags NaCl (Clang 3.7) do not recognize.
|
# Flags NaCl (Clang 3.7) do not recognize.
|
||||||
|
|||||||
11
DEPS
11
DEPS
@ -2255,6 +2255,17 @@ hooks = [
|
|||||||
'condition': 'checkout_mac',
|
'condition': 'checkout_mac',
|
||||||
'action': ['python3', 'src/build/mac_toolchain.py'],
|
'action': ['python3', 'src/build/mac_toolchain.py'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Update the Fuchsia SDK if necessary.
|
||||||
|
'name': 'Download Fuchsia SDK',
|
||||||
|
'pattern': '.',
|
||||||
|
'condition': 'checkout_fuchsia',
|
||||||
|
'action': [
|
||||||
|
'python3',
|
||||||
|
'src/build/fuchsia/update_sdk.py',
|
||||||
|
'--default-bucket=fuchsia',
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
# Note: On Win, this should run after win_toolchain, as it may use it.
|
# Note: On Win, this should run after win_toolchain, as it may use it.
|
||||||
'name': 'clang',
|
'name': 'clang',
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_LINUX
|
#if defined(WEBRTC_LINUX) || defined(WEBRTC_FUCHSIA)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -102,6 +102,9 @@ if (!build_with_chromium) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (is_fuchsia) {
|
||||||
|
sources = [ "video_capture_factory_null.cc" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (build_with_mozilla && is_android) {
|
if (build_with_mozilla && is_android) {
|
||||||
include_dirs = [
|
include_dirs = [
|
||||||
|
|||||||
27
modules/video_capture/video_capture_factory_null.cc
Normal file
27
modules/video_capture/video_capture_factory_null.cc
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modules/video_capture/video_capture_impl.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
namespace videocapturemodule {
|
||||||
|
|
||||||
|
// static
|
||||||
|
VideoCaptureModule::DeviceInfo* VideoCaptureImpl::CreateDeviceInfo() {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc::scoped_refptr<VideoCaptureModule> VideoCaptureImpl::Create(
|
||||||
|
const char* device_id) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace videocapturemodule
|
||||||
|
} // namespace webrtc
|
||||||
Reference in New Issue
Block a user