Index: webrtc/api/BUILD.gn |
diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn |
index 01aacb745928c2f1ed09e47a6e4dd577084b31ff..e327d74f9c20d2ca0ad22437fe5d23ded19d306b 100644 |
--- a/webrtc/api/BUILD.gn |
+++ b/webrtc/api/BUILD.gn |
@@ -14,7 +14,7 @@ if (is_android) { |
group("api") { |
public_deps = [ |
- ":libjingle_peerconnection", |
+ ":libjingle_peerconnection_api", |
] |
if (is_android && !build_with_chromium) { |
public_deps += [ |
@@ -43,115 +43,43 @@ rtc_source_set("call_api") { |
] |
} |
-config("libjingle_peerconnection_warnings_config") { |
- # GN orders flags on a target before flags from configs. The default config |
- # adds these flags so to cancel them out they need to come from a config and |
- # cannot be on the target directly. |
- if (!is_win && !is_clang) { |
- cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
- } |
-} |
- |
-rtc_static_library("libjingle_peerconnection") { |
+rtc_static_library("libjingle_peerconnection_api") { |
Taylor Brandstetter
2016/12/02 04:15:29
Do we need to keep around an api:libjingle_peercon
ossu
2016/12/08 19:16:39
Yes, you're right! I've added this back in just de
|
cflags = [] |
sources = [ |
- "audiotrack.cc", |
- "audiotrack.h", |
- "datachannel.cc", |
- "datachannel.h", |
"datachannelinterface.h", |
- "dtmfsender.cc", |
- "dtmfsender.h", |
"dtmfsenderinterface.h", |
+ "fakemetricsobserver.cc", |
+ "fakemetricsobserver.h", |
Taylor Brandstetter
2016/12/02 04:15:29
Does this need to be in the API target?
ossu
2016/12/08 19:16:39
I'm not sure. Having mocks and possibly fakes for
Taylor Brandstetter
2016/12/08 20:14:35
Ah yes, I forgot about that. Though ideally it sho
|
"jsep.h", |
- "jsepicecandidate.cc", |
- "jsepicecandidate.h", |
- "jsepsessiondescription.cc", |
- "jsepsessiondescription.h", |
- "localaudiosource.cc", |
- "localaudiosource.h", |
"mediaconstraintsinterface.cc", |
"mediaconstraintsinterface.h", |
- "mediacontroller.cc", |
- "mediacontroller.h", |
- "mediastream.cc", |
- "mediastream.h", |
"mediastreaminterface.h", |
- "mediastreamobserver.cc", |
- "mediastreamobserver.h", |
"mediastreamproxy.h", |
- "mediastreamtrack.h", |
"mediastreamtrackproxy.h", |
+ "mediatypes.cc", |
+ "mediatypes.h", |
"notifier.h", |
- "peerconnection.cc", |
- "peerconnection.h", |
- "peerconnectionfactory.cc", |
- "peerconnectionfactory.h", |
"peerconnectionfactoryproxy.h", |
"peerconnectioninterface.h", |
"peerconnectionproxy.h", |
"proxy.h", |
- "remoteaudiosource.cc", |
- "remoteaudiosource.h", |
- "rtcstatscollector.cc", |
- "rtcstatscollector.h", |
"rtpparameters.h", |
- "rtpreceiver.cc", |
- "rtpreceiver.h", |
"rtpreceiverinterface.h", |
- "rtpsender.cc", |
- "rtpsender.h", |
"rtpsenderinterface.h", |
- "sctputils.cc", |
- "sctputils.h", |
- "statscollector.cc", |
- "statscollector.h", |
"statstypes.cc", |
"statstypes.h", |
- "streamcollection.h", |
- "videocapturertracksource.cc", |
- "videocapturertracksource.h", |
+ "umametrics.h", |
"videosourceproxy.h", |
- "videotrack.cc", |
- "videotrack.h", |
- "videotracksource.cc", |
- "videotracksource.h", |
- "webrtcsdp.cc", |
- "webrtcsdp.h", |
- "webrtcsession.cc", |
- "webrtcsession.h", |
- "webrtcsessiondescriptionfactory.cc", |
- "webrtcsessiondescriptionfactory.h", |
] |
- configs += [ ":libjingle_peerconnection_warnings_config" ] |
- |
if (!build_with_chromium && is_clang) { |
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
} |
deps = [ |
- ":call_api", |
":rtc_stats_api", |
- "../call", |
- "../media", |
- "../pc", |
- "../stats", |
] |
- |
- if (rtc_use_quic) { |
- sources += [ |
- "quicdatachannel.cc", |
- "quicdatachannel.h", |
- "quicdatatransport.cc", |
- "quicdatatransport.h", |
- ] |
- deps += [ "//third_party/libquic" ] |
- public_deps = [ |
- "//third_party/libquic", |
- ] |
- } |
} |
# Exclude the targets below from the Chromium build since they cannot be built |
@@ -214,7 +142,7 @@ if (is_android && !build_with_chromium) { |
} |
deps = [ |
- ":libjingle_peerconnection", |
+ "../pc:libjingle_peerconnection", |
"../system_wrappers:field_trial_default", |
"../system_wrappers:metrics_default", |
] |
@@ -238,8 +166,8 @@ if (is_android && !build_with_chromium) { |
suppressed_configs += [ "//build/config/android:hide_native_jni_exports" ] |
deps = [ |
- ":libjingle_peerconnection", |
":libjingle_peerconnection_jni", |
+ "../pc:libjingle_peerconnection", |
] |
output_extension = "so" |
} |
@@ -323,6 +251,7 @@ rtc_source_set("rtc_stats_api") { |
sources = [ |
"stats/rtcstats.h", |
"stats/rtcstats_objects.h", |
+ "stats/rtcstatscollectorcallback.h", |
"stats/rtcstatsreport.h", |
] |
@@ -342,154 +271,4 @@ rtc_source_set("audio_mixer_api") { |
} |
if (rtc_include_tests) { |
- config("peerconnection_unittests_config") { |
- # The warnings below are enabled by default. Since GN orders compiler flags |
- # for a target before flags from configs, the only way to disable such |
- # warnings is by having them in a separate config, loaded from the target. |
- # TODO(kjellander): Make the code compile without disabling these flags. |
- # See https://bugs.webrtc.org/3307. |
- if (is_clang && is_win) { |
- cflags = [ |
- # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267 |
- # for -Wno-sign-compare |
- "-Wno-sign-compare", |
- "-Wno-unused-function", |
- ] |
- } |
- |
- if (!is_win) { |
- cflags = [ "-Wno-sign-compare" ] |
- } |
- } |
- |
- rtc_test("peerconnection_unittests") { |
- testonly = true |
- sources = [ |
- "datachannel_unittest.cc", |
- "dtmfsender_unittest.cc", |
- "fakemetricsobserver.cc", |
- "fakemetricsobserver.h", |
- "jsepsessiondescription_unittest.cc", |
- "localaudiosource_unittest.cc", |
- "mediaconstraintsinterface_unittest.cc", |
- "mediastream_unittest.cc", |
- "peerconnection_unittest.cc", |
- "peerconnectionendtoend_unittest.cc", |
- "peerconnectionfactory_unittest.cc", |
- "peerconnectioninterface_unittest.cc", |
- "proxy_unittest.cc", |
- "rtcstatscollector_unittest.cc", |
- "rtpsenderreceiver_unittest.cc", |
- "sctputils_unittest.cc", |
- "statscollector_unittest.cc", |
- "test/fakeaudiocapturemodule.cc", |
- "test/fakeaudiocapturemodule.h", |
- "test/fakeaudiocapturemodule_unittest.cc", |
- "test/fakeconstraints.h", |
- "test/fakedatachannelprovider.h", |
- "test/fakeperiodicvideocapturer.h", |
- "test/fakertccertificategenerator.h", |
- "test/fakevideotrackrenderer.h", |
- "test/mock_datachannel.h", |
- "test/mock_peerconnection.h", |
- "test/mock_webrtcsession.h", |
- "test/mockpeerconnectionobservers.h", |
- "test/peerconnectiontestwrapper.cc", |
- "test/peerconnectiontestwrapper.h", |
- "test/testsdpstrings.h", |
- "videocapturertracksource_unittest.cc", |
- "videotrack_unittest.cc", |
- "webrtcsdp_unittest.cc", |
- "webrtcsession_unittest.cc", |
- ] |
- |
- defines = [ "HAVE_SCTP" ] |
- |
- configs += [ ":peerconnection_unittests_config" ] |
- |
- if (!build_with_chromium && is_clang) { |
- # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
- suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
- } |
- |
- # TODO(jschuh): Bug 1348: fix this warning. |
- configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
- |
- if (is_win) { |
- cflags = [ |
- "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. |
- "/wd4389", # signed/unsigned mismatch. |
- ] |
- } |
- |
- if (rtc_use_quic) { |
- public_deps = [ |
- "//third_party/libquic", |
- ] |
- sources += [ |
- "quicdatachannel_unittest.cc", |
- "quicdatatransport_unittest.cc", |
- ] |
- } |
- |
- deps = [] |
- if (is_android) { |
- sources += [ |
- "test/androidtestinitializer.cc", |
- "test/androidtestinitializer.h", |
- ] |
- deps += [ |
- ":libjingle_peerconnection_java", |
- ":libjingle_peerconnection_jni", |
- "//testing/android/native_test:native_test_support", |
- ] |
- } |
- |
- deps += [ |
- ":libjingle_peerconnection", |
- "..:webrtc_common", |
- "../base:rtc_base_tests_utils", |
- "../media:rtc_unittest_main", |
- "../pc:rtc_pc", |
- "../system_wrappers:metrics_default", |
- "//testing/gmock", |
- ] |
- |
- if (is_android) { |
- deps += [ "//testing/android/native_test:native_test_support" ] |
- |
- shard_timeout = 900 |
- } |
- } |
- |
- if (is_android) { |
- instrumentation_test_apk("libjingle_peerconnection_android_unittest") { |
- apk_name = "libjingle_peerconnection_android_unittest" |
- android_manifest = "androidtests/AndroidManifest.xml" |
- |
- java_files = [ |
- "androidtests/src/org/webrtc/Camera1CapturerUsingByteBufferTest.java", |
- "androidtests/src/org/webrtc/Camera1CapturerUsingTextureTest.java", |
- "androidtests/src/org/webrtc/Camera2CapturerTest.java", |
- "androidtests/src/org/webrtc/CameraVideoCapturerTestFixtures.java", |
- "androidtests/src/org/webrtc/EglRendererTest.java", |
- "androidtests/src/org/webrtc/GlRectDrawerTest.java", |
- "androidtests/src/org/webrtc/MediaCodecVideoEncoderTest.java", |
- "androidtests/src/org/webrtc/NetworkMonitorTest.java", |
- "androidtests/src/org/webrtc/PeerConnectionTest.java", |
- "androidtests/src/org/webrtc/RendererCommonTest.java", |
- "androidtests/src/org/webrtc/SurfaceTextureHelperTest.java", |
- "androidtests/src/org/webrtc/SurfaceViewRendererOnMeasureTest.java", |
- "androidtests/src/org/webrtc/WebRtcJniBootTest.java", |
- ] |
- |
- deps = [ |
- ":libjingle_peerconnection_java", |
- "../base:base_java", |
- "//base:base_java", |
- ] |
- |
- shared_libraries = [ ":libjingle_peerconnection_so" ] |
- } |
- } |
} |