webrtc/api
Alex Loiko 8b3db59b6e Revert "Reland of https://webrtc-review.googlesource.com/c/src/+/114883"
This reverts commit 5341aaccdb.

Reason for revert: Order of initialization of global static strings.

Original change's description:
> Reland of https://webrtc-review.googlesource.com/c/src/+/114883
> 
> The difference to the original is new bitexactness strings AND
> global static file string constants. The reason for reland is breaking
> downstream projects.
> 
> Original CL description:
> 
> Tests for multi-stream Opus.
> 
> This CL (mainly) adds bit-exactness tests for multi-stream Opus. The
> tests are in audio_coding_unittest.cc. Some refactoring of
> AcmSendTestOldApi, AcmSenderBitExactnessOldApi is done to make it
> possible. A few checks for "channels \in {1, 2}" are replaced with
> "channels \in {1, 2, 4, 6, 8}" in the WebRTC Opus codec wrapper. A few
> other changes are made to be able to write and read multi-channel WAV
> files.
> 
> The SDP changes are NOT included; as of this CL there is no way to set
> up a multi-stream opus en/de-coder from SDP strings.
> 
> Bug: webrtc:8649
> Change-Id: I9fd47c790c241c1876c4a731b0840bec30b4f1b2
> Reviewed-on: https://webrtc-review.googlesource.com/c/123387
> Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
> Commit-Queue: Alex Loiko <aleloi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26774}

TBR=aleloi@webrtc.org,ossu@webrtc.org

Change-Id: I88060f2050ccee83d6091b042a10f79b3c4edc47
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8649
Reviewed-on: https://webrtc-review.googlesource.com/c/123580
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26777}
2019-02-20 15:17:49 +00:00
..
audio AEC3: Fix delay hysteresis validation 2019-02-12 12:05:20 +00:00
audio_codecs Revert "Reland of https://webrtc-review.googlesource.com/c/src/+/114883" 2019-02-20 15:17:49 +00:00
call (7) Rename files to snake_case: remove forwarding headers 2019-01-26 00:33:46 +00:00
crypto (7) Rename files to snake_case: remove forwarding headers 2019-01-26 00:33:46 +00:00
ortc (7) Rename files to snake_case: remove forwarding headers 2019-01-26 00:33:46 +00:00
stats Expose video freeze metrics in GetStats. 2019-02-04 09:58:08 +00:00
task_queue Migrate libevent task queue implementation to TaskQueueBase interface 2019-02-12 10:58:36 +00:00
test Rejected simulcast layers will no longer appear in GetParameters(). 2019-02-19 22:01:53 +00:00
transport Revert "Add Sender and Receiver interfaces for MediaTransport audio" 2019-02-18 09:52:40 +00:00
units Adds bytes per second to DataType class. 2019-01-31 11:31:55 +00:00
video Use a CopyOnWriteBuffer to back EncodedImage data 2019-02-20 07:41:51 +00:00
video_codecs Add |update_rect| field and UpdateRect struct to VideoFrame. 2019-02-13 12:41:32 +00:00
array_view.h ArrayView: Also accept const references when doing implicit conversions 2019-02-04 13:42:20 +00:00
array_view_unittest.cc ArrayView: Also accept const references when doing implicit conversions 2019-02-04 13:42:20 +00:00
async_resolver_factory.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
audio_options.cc Add PeerConnection option to enable RTX handling in the audio jitter buffer. 2019-01-10 16:28:43 +00:00
audio_options.h Add PeerConnection option to enable RTX handling in the audio jitter buffer. 2019-01-10 16:28:43 +00:00
bitrate_constraints.h Convert video quality test from a TEST_F to a TEST fixture. 2018-06-21 15:49:43 +00:00
BUILD.gn Move video-related MediaTransport interfaces to their own file and target 2019-02-15 08:17:20 +00:00
candidate.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
candidate.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
create_peerconnection_factory.cc Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
create_peerconnection_factory.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
crypto_params.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
data_channel_interface.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
data_channel_interface.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
DEPS Stop hard-coding default IDs for RTP extensions 2019-02-09 01:04:35 +00:00
dtls_transport_interface.h Allow DtlsTransport::Information() to be called off-thread 2019-02-14 13:15:05 +00:00
dtmf_sender_interface.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
fec_controller.h Revert "Revert "Enables PeerConnectionFactory using external fec controller"" 2018-02-20 12:41:55 +00:00
ice_transport_factory.cc IceTransportWithTransportChannel: Initialize |thread_checker_| in declaration 2019-02-13 12:45:12 +00:00
ice_transport_factory.h Add IceTransportInterface object 2019-01-30 16:16:51 +00:00
ice_transport_interface.h Add IceTransportInterface object 2019-01-30 16:16:51 +00:00
jsep.cc Move SdpType from/to string definition close to declaration. 2018-10-12 09:59:40 +00:00
jsep.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
jsep_ice_candidate.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
jsep_ice_candidate.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
jsep_session_description.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_stream_interface.cc Add latency to remote source api. 2019-02-16 02:13:44 +00:00
media_stream_interface.h Add latency to remote source api. 2019-02-16 02:13:44 +00:00
media_stream_proxy.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_stream_track_proxy.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_transport_interface.cc Revert "Add Sender and Receiver interfaces for MediaTransport audio" 2019-02-18 09:52:40 +00:00
media_transport_interface.h Revert "Add Sender and Receiver interfaces for MediaTransport audio" 2019-02-18 09:52:40 +00:00
media_types.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
media_types.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
notifier.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
OWNERS Add owners for media_transport_interface 2018-11-08 17:45:39 +00:00
peer_connection_factory_proxy.h Delete deprecated method PeerConnectionFactory::CreateVideoSource 2019-02-07 14:24:02 +00:00
peer_connection_interface.cc Delete deprecated method PeerConnectionFactory::CreateVideoSource 2019-02-07 14:24:02 +00:00
peer_connection_interface.h Fix PeerConnectionInterface::StartRtcEventLog documentation. 2019-02-11 08:00:39 +00:00
peer_connection_proxy.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
proxy.cc Make member internal::SynchronousMethodCall::e_ a non-pointer. 2018-11-15 10:42:36 +00:00
proxy.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
README.md Add a small README file for api/ 2019-02-01 13:24:47 +00:00
ref_counted_base.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtc_error.cc Using absl::string_view to stringify an RTCErrorType. 2019-01-16 11:49:00 +00:00
rtc_error.h Introcuce RTCError(const T&) constructor. 2019-01-30 13:43:29 +00:00
rtc_error_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtc_event_log_output.h Adds functionality to write logs to memory. 2019-01-16 17:36:31 +00:00
rtp_headers.cc Reland "[cleanup] Remove useless includes." 2018-10-08 07:44:19 +00:00
rtp_headers.h Add struct for feedback request to RTPHeaderExtension 2019-02-15 12:05:03 +00:00
rtp_parameters.cc Create version 01 of Generic Frame Descriptor - with discardability flag 2019-02-20 10:31:58 +00:00
rtp_parameters.h Create version 01 of Generic Frame Descriptor - with discardability flag 2019-02-20 10:31:58 +00:00
rtp_parameters_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_receiver_interface.cc Add DTLSTransport info into sender/receiver state. 2019-01-17 10:21:32 +00:00
rtp_receiver_interface.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
rtp_sender_interface.cc Rejected simulcast layers will no longer appear in GetParameters(). 2019-02-19 22:01:53 +00:00
rtp_sender_interface.h Rejected simulcast layers will no longer appear in GetParameters(). 2019-02-19 22:01:53 +00:00
rtp_transceiver_interface.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
rtp_transceiver_interface.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
scoped_refptr.h Add element_type typedef to rtc::scoped_refptr 2018-12-20 19:11:22 +00:00
set_remote_description_observer_interface.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
stats_types.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
stats_types.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
turn_customizer.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
uma_metrics.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
video_track_source_proxy.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00

How to write code in the api/ directory

Mostly, just follow the regular style guide, but:

  • Note that api/ code is not exempt from the “.h and .cc files come in pairs” rule, so if you declare something in api/path/to/foo.h, it should be defined in api/path/to/foo.cc.
  • Headers in api/ should, if possible, not #include headers outside api/. Its not always possible to avoid this, but be aware that it adds to a small mountain of technical debt that were trying to shrink.
  • .cc files in api/, on the other hand, are free to #include headers outside api/.

That is, the preferred way for api/ code to access non-api/ code is to call it from a .cc file, so that users of our API headers wont transitively #include non-public headers.

For headers in api/ that need to refer to non-public types, forward declarations are often a lesser evil than including non-public header files. The usual rules still apply, though.

.cc files in api/ should preferably be kept reasonably small. If a substantial implementation is needed, consider putting it with our non-public code, and just call it from the api/ .cc file.