webrtc/api
Florent Castelli f9c5984a1d Move buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I14feff7b1f0182d031b6644d281be44122820ce7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259307
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36629}
2022-04-22 21:19:28 +00:00
..
adaptation Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
audio AEC3: Add hysteresis period before entering stereo processing 2022-04-08 17:01:08 +00:00
audio_codecs Move buffer out of rtc_base_approved 2022-04-22 21:19:28 +00:00
call Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
crypto Rename rtc_base/ssl_stream_adapter.h constants. 2021-07-26 16:33:54 +00:00
g3doc Update links to point at main branch 2021-07-22 16:41:26 +00:00
metronome Introduce Sync-Decoding based on Metronome 2022-02-14 11:14:00 +00:00
neteq Add generated comfort noise counter. 2022-04-20 14:25:03 +00:00
numerics Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
rtc_event_log Prepare for new event log parser. 2022-01-18 16:13:13 +00:00
stats test: replace media_type with kind 2022-04-22 14:53:08 +00:00
task_queue Allow specifying delayed task precision of dcsctp::Timer. 2022-01-26 18:40:24 +00:00
test Revert "Add canonical mock for MediaStreamInterface" 2022-04-22 10:01:47 +00:00
transport Remove //rtc_base:macromagic from public deps 2022-04-05 12:36:12 +00:00
units Rename UNIT_TEST to WEBRTC_UNIT_TEST 2020-12-10 11:04:58 +00:00
video rename functions to be moved to libyuv 2022-04-06 21:48:43 +00:00
video_codecs Added OnResolutionChange to EncoderSelectorInterface. 2022-04-11 10:04:57 +00:00
voip Remove usage of INFO alias for LS_INFO in log messages 2021-11-04 13:46:17 +00:00
array_view.h Fix array_view nested namespace. 2021-08-16 14:38:57 +00:00
array_view_unittest.cc rtc::ArrayView reverse iterators 2020-10-21 08:57:13 +00:00
async_dns_resolver.h Use AsyncDnsResolver in UDPPort class 2021-10-06 05:15:11 +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 Remove typing detection 2022-03-23 10:23:54 +00:00
audio_options.h Remove typing detection 2022-03-23 10:23:54 +00:00
BUILD.gn Move buffer out of rtc_base_approved 2022-04-22 21:19:28 +00:00
candidate.cc ice: fix comment about relay preference 2021-09-30 07:45:19 +00:00
candidate.h Extend RTCIceCandidateStats with non-standard network_adapter_type 2022-03-02 11:13:18 +00:00
create_peerconnection_factory.cc WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 16/inf 2022-04-20 06:35:27 +00:00
create_peerconnection_factory.h WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 16/inf 2022-04-20 06:35:27 +00:00
crypto_params.h Revert "Remove code supporting the SDES crypto mode in SDP" 2021-11-04 14:46:27 +00:00
data_channel_interface.cc datachannel: Add a MaxSendQueueSize() accessor in the API 2021-10-18 11:24:06 +00:00
data_channel_interface.h datachannel: Don't close a data channel when the queue is full 2021-11-04 11:40:28 +00:00
DEPS WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 13/inf 2022-03-30 10:57:49 +00:00
dtls_transport_interface.cc Make DTLS role visible on DtlsTransport interface 2022-02-10 11:04:36 +00:00
dtls_transport_interface.h Make DTLS role visible on DtlsTransport interface 2022-02-10 11:04:36 +00:00
dtmf_sender_interface.h Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
fec_controller.h Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
fec_controller_override.h Define FecControllerOverride and plumb it down to VideoEncoder 2019-06-28 15:57:22 +00:00
field_trials.cc WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 13/inf 2022-03-30 10:57:49 +00:00
field_trials.h WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 13/inf 2022-03-30 10:57:49 +00:00
field_trials_unittest.cc WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 13/inf 2022-03-30 10:57:49 +00:00
field_trials_view.h WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf 2022-03-29 10:14:00 +00:00
frame_transformer_interface.h Add Direction indicator to TransformableFrames 2021-09-27 17:40:36 +00:00
function_view.h Move rtc::FunctionView to the public API 2019-03-21 15:23:05 +00:00
function_view_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
ice_transport_factory.cc WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 6/inf 2022-03-16 12:11:34 +00:00
ice_transport_factory.h Use backticks not vertical bars to denote variables in comments 2021-08-10 10:40:03 +00:00
ice_transport_interface.h WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf 2022-03-29 10:14:00 +00:00
jsep.cc Reland "Remove old-style OnFailure callbacks" 2020-02-21 14:07:57 +00:00
jsep.h Use backticks not vertical bars to denote variables in comments 2021-08-10 10:40:03 +00:00
jsep_ice_candidate.cc Use unique_ptr in JsepCandidateCollection 2019-07-31 01:48:07 +00:00
jsep_ice_candidate.h Remove RTC_DISALLOW_COPY_AND_ASSIGN more. 2022-01-20 11:00:18 +00:00
jsep_session_description.h Remove RTC_DISALLOW_COPY_AND_ASSIGN more. 2022-01-20 11:00:18 +00:00
media_stream_interface.cc New target for api/rtp_parameters.h and api/media_types.h. 2019-08-29 09:04:32 +00:00
media_stream_interface.h Change stream.AddTrack/RemoveTrack to take a scoped_refptr argument 2022-04-21 12:32:17 +00:00
media_stream_track.h Move pc/media_stream_track.h to the api/ directory 2020-10-12 07:28:01 +00:00
media_types.cc Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED 2021-11-15 21:44:59 +00:00
media_types.h Revert "Define cricket::MediaType in terms of webrtc::MediaType" 2021-05-12 17:06:58 +00:00
network_state_predictor.h Add base class NetworkPredictor and NetworkPredictorFactory and wire up. 2019-04-10 12:38:58 +00:00
notifier.h Add SequenceChecker on Notifier 2022-03-02 22:35:46 +00:00
OWNERS Remove inactive owners. 2021-08-31 14:27:49 +00:00
packet_socket_factory.h Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED 2021-11-15 21:44:59 +00:00
peer_connection_interface.cc Deprecate RemoveTrack (old signature) 2022-01-04 20:44:07 +00:00
peer_connection_interface.h WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 16/inf 2022-04-20 06:35:27 +00:00
priority.h Pass datachannel priority in DC open messages 2020-05-17 10:57:27 +00:00
README.md Move style guide and abseil-in-webrtc into g3doc subfolder 2021-05-13 14:43:10 +00:00
ref_counted_base.h Remove RTC_DISALLOW_COPY_AND_ASSIGN more. 2022-01-20 11:00:18 +00:00
rtc_error.cc Return an error when datachannel closes due to network error 2019-12-08 17:33:54 +00:00
rtc_error.h Fix use-after-move in RTCErrorOr 2021-12-14 21:16:18 +00:00
rtc_error_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
rtc_event_log_output.h Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
rtc_event_log_output_file.cc Format almost everything. 2019-07-08 13:45:15 +00:00
rtc_event_log_output_file.h Format almost everything. 2019-07-08 13:45:15 +00:00
rtc_event_log_output_file_unittest.cc Rename several more tests that use EXPECT_DEATH to *DeathTest. 2020-05-18 16:10:04 +00:00
rtp_headers.cc Remove framemarking RTP extension. 2020-06-15 11:18:00 +00:00
rtp_headers.h Update rsid and mid spec links from draft to release version 2021-03-22 12:24:00 +00:00
rtp_packet_info.cc Make local to capturer clock offset a separate entry in PacketInfo. 2021-05-20 13:42:57 +00:00
rtp_packet_info.h Use backticks not vertical bars to denote variables in comments 2021-08-10 10:40:03 +00:00
rtp_packet_info_unittest.cc Make local to capturer clock offset a separate entry in PacketInfo. 2021-05-20 13:42:57 +00:00
rtp_packet_infos.h Extend make_ref_counted to interoperate with RefCountedNonVirtual 2022-01-11 16:06:34 +00:00
rtp_packet_infos_unittest.cc Use Timestamp to represent packet receive timestamps 2021-05-04 13:16:54 +00:00
rtp_parameters.cc Change SetLocalContent in channel classes to avoid Invoke. 2022-01-06 12:52:35 +00:00
rtp_parameters.h Change SetLocalContent in channel classes to avoid Invoke. 2022-01-06 12:52:35 +00:00
rtp_parameters_unittest.cc Change SetLocalContent in channel classes to avoid Invoke. 2022-01-06 12:52:35 +00:00
rtp_receiver_interface.cc Insert frame transformer between Depacketizer and Decoder. 2020-03-02 08:33:44 +00:00
rtp_receiver_interface.h Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
rtp_sender_interface.cc Insert frame transformer between Encoded and Packetizer. 2020-02-28 07:43:13 +00:00
rtp_sender_interface.h Enable Chromium to stop including api/proxy.h indirectly. 2021-05-21 09:35:35 +00:00
rtp_transceiver_direction.h RtpTransceiverInterface: add header_extensions_to_offer() 2020-03-16 13:16:42 +00:00
rtp_transceiver_interface.cc Reland "Remove some default implementations in api/rtp_transcever_interface" 2022-01-19 11:32:24 +00:00
rtp_transceiver_interface.h Reland "Remove some default implementations in api/rtp_transcever_interface" 2022-01-19 11:32:24 +00:00
scoped_refptr.h Update pc/ to not use implicit conversion from scoped_refptr<T> to T*. 2022-04-20 13:18:33 +00:00
scoped_refptr_unittest.cc Update api/ to not use implicit T* --> scoped_refptr<T> conversion 2022-01-12 11:26:05 +00:00
sctp_transport_interface.cc Format almost everything. 2019-07-08 13:45:15 +00:00
sctp_transport_interface.h Reland "Fix unsynchronized access to mid_to_transport_ in JsepTransportController" 2021-02-10 13:40:22 +00:00
sequence_checker.h Fix an example in SequenceChecker documentation 2021-04-19 15:58:15 +00:00
sequence_checker_unittest.cc Reland "Refactor the PlatformThread API." 2021-05-07 14:14:43 +00:00
set_local_description_observer_interface.h Use backticks not vertical bars to denote variables in comments 2021-08-10 10:40:03 +00:00
set_remote_description_observer_interface.h Use backticks not vertical bars to denote variables in comments 2021-08-10 10:40:03 +00:00
stats_types.cc Remove typing detection 2022-03-23 10:23:54 +00:00
stats_types.h Remove typing detection 2022-03-23 10:23:54 +00:00
turn_customizer.h Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
uma_metrics.h count webrtc pranswer usage 2021-06-11 12:59:37 +00:00
video_track_source_constraints.h Route min/max FPS constraints to VideoStreamEncoder. 2021-10-14 06:49:05 +00:00
video_track_source_proxy_factory.h Use backticks not vertical bars to denote variables in comments for /api 2021-07-26 18:27:34 +00:00
webrtc_key_value_config.h WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf 2022-03-29 10:14:00 +00:00
wrapping_async_dns_resolver.cc Add CreateAsyncDnsResolver to PacketSocketFactory API 2021-10-01 16:12:50 +00:00
wrapping_async_dns_resolver.h Add CreateAsyncDnsResolver to PacketSocketFactory API 2021-10-01 16:12:50 +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.