• Home
Name Date Size #Lines LOC

..--

adaptation/03-May-2024-13072

audio/03-May-2024-2,7371,945

audio_codecs/03-May-2024-5,3223,487

call/03-May-2024-21796

crypto/03-May-2024-347175

neteq/03-May-2024-1,158623

rtc_event_log/03-May-2024-348186

stats/03-May-2024-1,258803

task_queue/03-May-2024-814472

test/03-May-2024-5,0942,994

transport/03-May-2024-5,5824,069

units/03-May-2024-1,7081,297

video/03-May-2024-5,2123,307

video_codecs/03-May-2024-5,1423,427

voip/03-May-2024-513212

BUILD.gnD03-May-202424.8 KiB1,053948

DEPSD03-May-20246.1 KiB308256

DESIGN.mdD03-May-20243.1 KiB7257

OWNERS.webrtcD03-May-2024273 1512

README.mdD03-May-20241.2 KiB2519

array_view.hD03-May-202411.8 KiB316162

array_view_unittest.ccD03-May-202418 KiB579461

async_resolver_factory.hD03-May-20241 KiB3312

audio_options.ccD03-May-20245.5 KiB134113

audio_options.hD03-May-20243.6 KiB8839

candidate.ccD03-May-20245.4 KiB14499

candidate.hD03-May-20247.5 KiB206123

create_peerconnection_factory.ccD03-May-20242.9 KiB6951

create_peerconnection_factory.hD03-May-20242 KiB5530

crypto_params.hD03-May-20241.2 KiB4221

data_channel_interface.ccD03-May-20241 KiB4424

data_channel_interface.hD03-May-20247.2 KiB19889

dtls_transport_interface.ccD03-May-20242 KiB5638

dtls_transport_interface.hD03-May-20244.1 KiB10965

dtmf_sender_interface.hD03-May-20245.2 KiB12641

fec_controller.hD03-May-20243.7 KiB9344

fec_controller_override.hD03-May-2024840 2911

frame_transformer_interface.hD03-May-20243.5 KiB10052

function_view.hD03-May-20244.6 KiB13164

function_view_unittest.ccD03-May-20244.6 KiB177133

ice_transport_factory.ccD03-May-20242 KiB6741

ice_transport_factory.hD03-May-20241.7 KiB4815

ice_transport_interface.hD03-May-20243.6 KiB9652

jsep.ccD03-May-20241.8 KiB5840

jsep.hD03-May-20249.4 KiB248106

jsep_ice_candidate.ccD03-May-20242.1 KiB7751

jsep_ice_candidate.hD03-May-20242.8 KiB8848

jsep_session_description.hD03-May-20243.1 KiB9160

media_stream_interface.ccD03-May-20241 KiB3921

media_stream_interface.hD03-May-202412.4 KiB337164

media_stream_proxy.hD03-May-20241.5 KiB4526

media_stream_track_proxy.hD03-May-20242.3 KiB6641

media_types.ccD03-May-2024944 3619

media_types.hD03-May-20241 KiB4015

network_state_predictor.hD03-May-20241.7 KiB5726

notifier.hD03-May-20241.7 KiB6135

packet_socket_factory.hD03-May-20242.5 KiB8250

peer_connection_factory_proxy.hD03-May-20242.4 KiB6647

peer_connection_interface.ccD03-May-20243.4 KiB10165

peer_connection_interface.hD03-May-202464.6 KiB1,455520

peer_connection_proxy.hD03-May-20246.2 KiB148129

priority.hD03-May-2024639 2711

proxy.ccD03-May-20241 KiB3821

proxy.hD03-May-202416.8 KiB413290

ref_counted_base.hD03-May-20241.1 KiB4425

rtc_error.ccD03-May-20242 KiB8157

rtc_error.hD03-May-202411.5 KiB332137

rtc_error_unittest.ccD03-May-20247.3 KiB243167

rtc_event_log_output.hD03-May-20241.5 KiB4313

rtc_event_log_output_file.ccD03-May-20243 KiB8650

rtc_event_log_output_file.hD03-May-20241.8 KiB5926

rtc_event_log_output_file_unittest.ccD03-May-20246 KiB168112

rtp_headers.ccD03-May-20241.6 KiB5536

rtp_headers.hD03-May-20246.9 KiB19298

rtp_packet_info.ccD03-May-20242 KiB6140

rtp_packet_info.hD03-May-20243.2 KiB9854

rtp_packet_info_unittest.ccD03-May-20243.7 KiB180113

rtp_packet_infos.hD03-May-20244.2 KiB13184

rtp_packet_infos_unittest.ccD03-May-20242.4 KiB8653

rtp_parameters.ccD03-May-20248.8 KiB227183

rtp_parameters.hD03-May-202425.2 KiB659287

rtp_parameters_unittest.ccD03-May-20241.7 KiB5131

rtp_receiver_interface.ccD03-May-20241.2 KiB4525

rtp_receiver_interface.hD03-May-20246.3 KiB15069

rtp_sender_interface.ccD03-May-20241 KiB3719

rtp_sender_interface.hD03-May-20245.5 KiB13464

rtp_transceiver_direction.hD03-May-2024753 2812

rtp_transceiver_interface.ccD03-May-20241.4 KiB5129

rtp_transceiver_interface.hD03-May-20246.7 KiB15048

scoped_refptr.hD03-May-20244.2 KiB16573

scoped_refptr_unittest.ccD03-May-20242.9 KiB11279

sctp_transport_interface.ccD03-May-20241 KiB3316

sctp_transport_interface.hD03-May-20243.4 KiB9151

set_remote_description_observer_interface.hD03-May-20241.1 KiB3211

stats_types.ccD03-May-202426.8 KiB848719

stats_types.hD03-May-202415.8 KiB456310

turn_customizer.hD03-May-20241.4 KiB4621

uma_metrics.hD03-May-20245.3 KiB16099

video_track_source_proxy.hD03-May-20241.9 KiB5030

README.md

1# How to write code in the `api/` directory
2
3Mostly, just follow the regular [style guide](../style-guide.md), but:
4
5* Note that `api/` code is not exempt from the “`.h` and `.cc` files come in
6  pairs” rule, so if you declare something in `api/path/to/foo.h`, it should be
7  defined in `api/path/to/foo.cc`.
8* Headers in `api/` should, if possible, not `#include` headers outside `api/`.
9  It’s not always possible to avoid this, but be aware that it adds to a small
10  mountain of technical debt that we’re trying to shrink.
11* `.cc` files in `api/`, on the other hand, are free to `#include` headers
12  outside `api/`.
13
14That is, the preferred way for `api/` code to access non-`api/` code is to call
15it from a `.cc` file, so that users of our API headers won’t transitively
16`#include` non-public headers.
17
18For headers in `api/` that need to refer to non-public types, forward
19declarations are often a lesser evil than including non-public header files. The
20usual [rules](../style-guide.md#forward-declarations) still apply, though.
21
22`.cc` files in `api/` should preferably be kept reasonably small. If a
23substantial implementation is needed, consider putting it with our non-public
24code, and just call it from the `api/` `.cc` file.
25