Commit graph

35 commits

Author SHA1 Message Date
Björn Terelius
3baefbf2dd Return absl::optional<size_t> from FileWrapper::FileSize()
Bug: None
Change-Id: If5219a8f7f7e81ea660b0495c48f96adb6948228
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348860
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42206}
2024-05-02 10:40:38 +00:00
Byoungchan Lee
3e4e05d28b Use generate_stubs without //base dependency
For this I added a header called no_cfi_icall.h and use it.
Also, some files use the gio header, but if the //base dependency is
not used, compilation errors occur. So I added an explicit dependency
on gio.

Bug: webrtc:13662
Change-Id: If732ede202dd413be6702bf06bf024cd203fdae2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267340
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37395}
2022-07-01 10:50:54 +00:00
Ali Tofigh
2ab914c6ab Adopt absl::string_view in rtc_base/ (straightforward cases)
Bug: webrtc:13579
Change-Id: I240db6285abb22652242bc0b2ebe9844ec4a45f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258723
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36561}
2022-04-17 12:11:56 +00:00
Niels Möller
e0a92f9a42 Delete unused ScopedRegisterThreadForDebugging facility
Bug: webrtc:6424
Change-Id: I3564d204e8c886ce53e82426ef1d3896d7f6409d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258021
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36441}
2022-04-05 09:21:39 +00:00
Björn Terelius
cbd6156591 Add FileSize method to FileWrapper
Bug: webrtc:11933
Change-Id: I8d8dfc29aefa0208cf4ad64c86bb9f45251be757
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212966
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33566}
2021-03-25 15:59:05 +00:00
Mirko Bonadei
90776cb0ef Enable RTC_NO_UNIQUE_ADDRESS on MSan builds.
The issue with MSan has been fixed in LLVM in
https://reviews.llvm.org/D92727.

Bug: webrtc:12218
Change-Id: I73a4831d2ee544948c499ff06c65fe4ce6bee18c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203266
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33064}
2021-01-23 14:07:28 +00:00
Mirko Bonadei
85e62e6d13 Use RTC_HAS_MSAN to check for MSan builds.
Bug: None
Change-Id: Iba1d66d9985f449c5d3710d7d615d4b25acf763b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196360
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32772}
2020-12-04 10:38:03 +00:00
Mirko Bonadei
20e4c80fbe Reland "Introduce RTC_NO_UNIQUE_ADDRESS."
This is a reland of f5e261aaf6

This CL disables RTC_NO_UNIQUE_ADDRESS on MSan builds since
there have been some issues.

Original change's description:
> Introduce RTC_NO_UNIQUE_ADDRESS.
>
> This macro introduces the possibility to suggest the compiler that a
> data member doesn't need an address different from other non static
> data members.
>
> The usage of a macro is to maintain portability since at the moment
> the attribute [[no_unique_address]] is only supported by clang
> with at least -std=c++11 but it should be supported by all the
> compilers starting from C++20.
>
> Bug: webrtc:11495
> Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32246}

Bug: webrtc:11495, webrtc:12218
Change-Id: I4e6c7cc37d3daffad2407c9a2acfa897fa5b426a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189968
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32668}
2020-11-23 11:29:36 +00:00
Mirko Bonadei
0abd518abd Revert "Introduce RTC_NO_UNIQUE_ADDRESS."
This reverts commit f5e261aaf6.

Reason for revert: Breaks downstream projects.

Original change's description:
> Introduce RTC_NO_UNIQUE_ADDRESS.
>
> This macro introduces the possibility to suggest the compiler that a
> data member doesn't need an address different from other non static
> data members.
>
> The usage of a macro is to maintain portability since at the moment
> the attribute [[no_unique_address]] is only supported by clang
> with at least -std=c++11 but it should be supported by all the
> compilers starting from C++20.
>
> Bug: webrtc:11495
> Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32246}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:11495
Change-Id: Ice318d1b11ca3dff09c190187a0b0a32ca945fe3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32335}
2020-10-07 07:37:01 +00:00
Mirko Bonadei
f5e261aaf6 Introduce RTC_NO_UNIQUE_ADDRESS.
This macro introduces the possibility to suggest the compiler that a
data member doesn't need an address different from other non static
data members.

The usage of a macro is to maintain portability since at the moment
the attribute [[no_unique_address]] is only supported by clang
with at least -std=c++11 but it should be supported by all the
compilers starting from C++20.

Bug: webrtc:11495
Change-Id: I9f12b67b4422a2749649eaa6b004a67d5fd572d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173331
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32246}
2020-09-30 09:52:49 +00:00
Karl Wiberg
3d452cf710 Proof of concept: Cancer Stick Castle, a sigslot replacement
This needs to be followed immediately by a CL that adds unit tests for
CancerStickCastle and UntypedFunction.

Bug: none
Change-Id: I5ade68cc4721d7442db7695f218ecd9be1d639ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182460
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32085}
2020-09-11 15:31:51 +00:00
Markus Handell
0dd35d3732 Migrate to webrtc::GlobalMutex.
Bug: webrtc:11567
Change-Id: I853434745c427e54474739e9c573e0f6f4fcedef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179283
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31732}
2020-07-15 10:32:20 +00:00
Sylvain Defresne
c7f0dff191 Convert GN libs lists to frameworks
GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.

Bug: chromium:1052560
Change-Id: I263230ddd3c468061584423bba9e1f887503bcaa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178601
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#31632}
2020-07-06 10:08:09 +00:00
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Yura Yaroshevich
ebf739be7b Reland "Leverage dispatch_queue_create_with_target when possible."
This is a reland of de86381161

Original change's description:
> Leverage dispatch_queue_create_with_target when possible.
> 
> Replacing dispatch_queue_create followed by
> dispatch_set_target_queue with dispatch_queue_create_with_target
> is claimed to be source of GCD performance improvement:
> https://developer.apple.com/videos/play/wwdc2017/706/
> Video since 40 min. Slides since 199.
> 
> Bug: webrtc:9055
> Change-Id: I0136f7faaef0951a7ad243bc8772f3ee952d5470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168491
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#30781}

Bug: webrtc:9055
Change-Id: I36b0b6423c81c0497f66f7c993741c33ff6ec5ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170443
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30821}
2020-03-18 16:06:09 +00:00
Alex Loiko
fcafbfdbf0 Revert "Leverage dispatch_queue_create_with_target when possible."
This reverts commit de86381161.

Reason for revert: Fails downstream project, """fatal error: 'rtc_base/system/gcd_helpers.h' file not found"""

Original change's description:
> Leverage dispatch_queue_create_with_target when possible.
> 
> Replacing dispatch_queue_create followed by
> dispatch_set_target_queue with dispatch_queue_create_with_target
> is claimed to be source of GCD performance improvement:
> https://developer.apple.com/videos/play/wwdc2017/706/
> Video since 40 min. Slides since 199.
> 
> Bug: webrtc:9055
> Change-Id: I0136f7faaef0951a7ad243bc8772f3ee952d5470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168491
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#30781}

TBR=tommi@webrtc.org,kthelgason@webrtc.org,yura.yaroshevich@gmail.com

Change-Id: I47fafa47afa2c825c8f100253d8a1f035203d9e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9055
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170361
Reviewed-by: Alex Loiko <aleloi@google.com>
Commit-Queue: Alex Loiko <aleloi@google.com>
Cr-Commit-Position: refs/heads/master@{#30785}
2020-03-13 08:02:34 +00:00
Yura Yaroshevich
de86381161 Leverage dispatch_queue_create_with_target when possible.
Replacing dispatch_queue_create followed by
dispatch_set_target_queue with dispatch_queue_create_with_target
is claimed to be source of GCD performance improvement:
https://developer.apple.com/videos/play/wwdc2017/706/
Video since 40 min. Slides since 199.

Bug: webrtc:9055
Change-Id: I0136f7faaef0951a7ad243bc8772f3ee952d5470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168491
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#30781}
2020-03-12 20:33:48 +00:00
Danil Chapovalov
64f1f3f04e Replace RTC_FALLTHROUGH with ABSL_FALLTHROUGH_INTENTED
Bug: None
Change-Id: I7287403f3fb13b8e30f92ca3cf1882b03bb53a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166176
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30283}
2020-01-16 15:20:35 +00:00
Mirko Bonadei
c35333d1fd Add RTC_EXPORT_TEMPLATE_{DECLARE,DEFINE} macros.
This CL adds macros to correctly export template instantiation
declarations and definitions. These macros have been borrowed from
Chromium's //base/export_template.h [1] and are supposed to be used
together with RTC_EXPORT [2].

The goal is to start using explicit template instatiation declarations
(introduced in C++11) [3] and remove workarounds that are not compatible
with all the compilers. An example can be found in [4], where in order
to workaround crbug.com/1018579, another workaround was almost created
before being stopped at code review time.

[1] - https://cs.chromium.org/chromium/src/base/export_template.h
[2] - https://cs.chromium.org/chromium/src/third_party/webrtc/rtc_base/system/rtc_export.h
[3] - https://en.cppreference.com/w/cpp/language/class_template#Explicit_instantiation
[4] - https://webrtc-review.googlesource.com/c/src/+/158674

Bug: webrtc:9419
Change-Id: I2e9287a15e28f619462e0b9a5deb0b672be248c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158742
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29661}
2019-10-31 11:12:52 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).

Source sets always pass all the object files to the linker.

On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.

See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set

Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
2019-10-17 21:17:18 +00:00
Niels Möller
7ba3b81ff5 Delete class PlatformFile.
Add seek methods to FileWrapper, and refactor WavReader to use that
class instead.

Bug: webrtc:6463
Change-Id: Ifbb1989a072da6280ea5fc04b4beff991614dd53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147265
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28770}
2019-08-06 09:07:50 +00:00
Niels Möller
9d8eaac4ee Delete unneeded direct includes of common_types.h
And delete corresponding dependencies on :webrtc_common. After this
change, common_types.h is included directly only from code in the
following directories:

api/
api/video/
api/video_codecs/
common_video/libyuv/include/
media/base/
modules/remote_bitrate_estimator/
modules/rtp_rtcp/source/
modules/video_coding/codecs/vp9/

There remains plenty of indirect dependencies on the types declared in
common_types.h, but the fewer direct dependencies should make it
easier to find the proper place for each type.

Bug: webrtc:5876
Change-Id: I93e8f214025ecb613c19fdec2015bd3f96c59aae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27376}
2019-04-01 07:18:13 +00:00
Karl Wiberg
98417037d9 rtc::Event::Wait(kForever): Print stack trace when we deadlock
After being stuck "forever" (3 seconds) waiting for an event to
trigger, log the stack trace of the current thread to aid debugging of
the deadlock.

Bug: webrtc:10308
Change-Id: I04852f191027294d7e7a7f5e63de4c6c7fdd6326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128342
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27263}
2019-03-25 09:37:12 +00:00
Karl Wiberg
ab03638eb6 Let threads opt in to having their stack traces printed
The video decoder thread is the pilot user.

For now this is an Android-only feature, since that's the only
platform we can print stack traces on.

Bug: webrtc:9987
Change-Id: Ie638c619673b5f159d91a32683fd787baf46479a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126222
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27127}
2019-03-14 11:46:28 +00:00
Jiawei Ou
dcbdd2c140 Add Foundation.framework to cocoa_threading target
https://webrtc-review.googlesource.com/c/src/+/105301 remove the dependency to rtc_base_generic, it also removed the dependnecy to Foundation.framework. This CL adds it back.

Bug: webrtc:9838
Change-Id: I861e73d13eb36d2c3a09d998a6def9512066f0d5
Reviewed-on: https://webrtc-review.googlesource.com/c/122621
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jiawei Ou <ouj@fb.com>
Cr-Commit-Position: refs/heads/master@{#26654}
2019-02-12 22:07:20 +00:00
Kári Tristan Helgason
62b1345c85 Get rid of thread_darwin file.
This file has been causing problems for the build. ObjC was required for
a few methods because autoreleasepools are necessary on new threads if
those threads will be running objc code.

This CL introduces a workaround by using ObjC runtime C APIs to create
and drain autoreleasepools, but this comes with the cost of relying on
an internal API that may break on future OS/clang releases.

Bug: webrtc:9838
Change-Id: I18e765020c20c096c9ef8d80dfa82375ecb202ff
Reviewed-on: https://webrtc-review.googlesource.com/c/105301
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25141}
2018-10-12 12:53:59 +00:00
Mirko Bonadei
32ce18c062 Reland "Add RTC_EXPORT macro to export WebRTC symbols."
This is a reland of 55daf1aef6.

In order to avoid problems on case insensitive file systems this CL
moves rtc_export.h to rtc_base/system (avoiding problems with build/).

Diff: https://webrtc-review.googlesource.com/c/src/+/100804/1..2.

Original change's description:
> Add RTC_EXPORT macro to export WebRTC symbols.
>
> This CL introduces the utility macro RTC_EXPORT which will let WebRTC
> developers decide which symbols are supposed to be exported/imported
> and which ones are private.
>
> RTC_EXPORT will only export/import symbols in a component build, more
> info: https://cs.chromium.org/chromium/src/docs/component_build.md.
> During a component build, the macro COMPONENT_BUILD will be globally
> defined in a consistent fashion so it is safe to rely on it to
> understand how to expand RTC_EXPORT.
> In a non component build, RTC_EXPORT will expand to nothing.
>
> Bug: webrtc:9419
> Change-Id: Ic58162783be7f5883136ade27f324d6d34fdf932
> Reviewed-on: https://webrtc-review.googlesource.com/97960
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Reviewed-by: Yves Gerey <yvesg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24757}

Bug: webrtc:9419
Change-Id: Icfedea5fc3416ea1af2185de443fa879fb2dee8b
Reviewed-on: https://webrtc-review.googlesource.com/100804
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24766}
2018-09-18 12:07:58 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Karl Wiberg
cefc46517e RTC_LOG_* macros: Implement argument passing with a single variadic call
Instead of making multiple calls to the std::stringstream << operator,
collect all the arguments and make a single printf-like variadic call
under the hood.

Besides reducing our reliance on iostreams, this makes each RTC_LOG_*
call site smaller; in aggregate, this reduces the size of
libjingle_peerconnection_so.so by 28-32 kB.

A quick benchmark indicates that this change makes log statements
a few percent slower.

Bug: webrtc:8982, webrtc:9185
Change-Id: I3137a4dd8ac510e8d910acccb0c97ce4fffb61c9
Reviewed-on: https://webrtc-review.googlesource.com/75440
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23375}
2018-05-23 23:15:04 +00:00
Fredrik Solenberg
500e75b467 Remove typedefs.h from webrtc/ root (part 1)
Bug: webrtc:6854
Change-Id: Iadbc73d1913a507c0097ade82b6e406cbfa30a64
Reviewed-on: https://webrtc-review.googlesource.com/78062
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23362}
2018-05-23 12:07:10 +00:00
Karl Wiberg
ee10ea8a41 RTC_LOG(): Internally, pass logging severity as template argument
When the logging severity is statically known, passing it as a
template argument instead of as a function argument saves space at the
call site.

In aggregate, this reduces the size of libjingle_peerconnection_so.so
by 8 kB.

Bug: webrtc:9185
Change-Id: I9ca363845216370e97b230952c86e6d07719962f
Reviewed-on: https://webrtc-review.googlesource.com/74480
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23121}
2018-05-04 14:38:34 +00:00
Karl Wiberg
7ba22b8eea Break out the part of the iSAC codec that's used for Voice Activity Detection
The audio processing code is using parts of the iSAC codec to do voice
activity detection (VAD), but it's undesirable for it to pull in the
entire iSAC codec as a dependency. So this CL factors out the parts of
iSAC that's needed for VAD to a separate build target.

Bug: webrtc:8396
Change-Id: I884e25d8fd0bc815fca664352b0573b4b173880e
Reviewed-on: https://webrtc-review.googlesource.com/69640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23110}
2018-05-04 08:53:34 +00:00
Karl Wiberg
6a4d411023 Move file_wrapper.h to rtc_base/system/
This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.

BUG=webrtc:8445

Change-Id: I440974da4d347b09ff042478720d7983056b62b9
Reviewed-on: https://webrtc-review.googlesource.com/21226
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22579}
2018-03-23 11:17:15 +00:00
Karl Wiberg
7aabd39b4b Move asm_defines.h to rtc_base/system/
This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.

Bug: webrtc:8445
NOPRESUBMIT=true

Change-Id: I30d01fcb9cbe1427a7703a3cdd7befae751066b5
Reviewed-on: https://webrtc-review.googlesource.com/21982
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22550}
2018-03-22 03:12:13 +00:00
Karl Wiberg
80ba333fc5 Move FALLTHROUGH macro to a separate header, and give it an RTC_ prefix
Bug: chromium:805946
Change-Id: Ibb5dce9af27d0e48c9aee6b0a860b6f62b3c76a0
Reviewed-on: https://webrtc-review.googlesource.com/46145
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21889}
2018-02-05 11:24:59 +00:00