tree: b44f020924c480b714faf08dfc7b603d27834d34 [path history] [tgz]
  1. audio/
  2. audio_codecs/
  3. call/
  4. crypto/
  5. ortc/
  6. rtc_event_log/
  7. stats/
  8. task_queue/
  9. test/
  10. transport/
  11. units/
  12. video/
  13. video_codecs/
  14. array_view.h
  15. array_view_unittest.cc
  16. async_resolver_factory.h
  17. asyncresolverfactory.h
  18. audio_options.cc
  19. audio_options.h
  20. bitrate_constraints.h
  21. BUILD.gn
  22. candidate.cc
  23. candidate.h
  24. congestion_control_interface.h
  25. create_peerconnection_factory.cc
  26. create_peerconnection_factory.h
  27. crypto_params.h
  28. cryptoparams.h
  29. data_channel_interface.cc
  30. data_channel_interface.h
  31. data_channel_transport_interface.cc
  32. data_channel_transport_interface.h
  33. datachannelinterface.cc
  34. datachannelinterface.h
  35. datagram_transport_interface.h
  36. DEPS
  37. DESIGN.md
  38. dtls_transport_interface.cc
  39. dtls_transport_interface.h
  40. dtmf_sender_interface.h
  41. dtmfsenderinterface.h
  42. fec_controller.h
  43. fec_controller_override.h
  44. function_view.h
  45. function_view_unittest.cc
  46. ice_transport_factory.cc
  47. ice_transport_factory.h
  48. ice_transport_interface.h
  49. jsep.cc
  50. jsep.h
  51. jsep_ice_candidate.cc
  52. jsep_ice_candidate.h
  53. jsep_session_description.h
  54. jsepicecandidate.cc
  55. jsepicecandidate.h
  56. jsepsessiondescription.h
  57. media_stream_interface.cc
  58. media_stream_interface.h
  59. media_stream_proxy.h
  60. media_stream_track_proxy.h
  61. media_transport_config.cc
  62. media_transport_config.h
  63. media_transport_interface.cc
  64. media_transport_interface.h
  65. media_types.cc
  66. media_types.h
  67. mediaconstraintsinterface.cc
  68. mediaconstraintsinterface.h
  69. mediastreaminterface.cc
  70. mediastreaminterface.h
  71. mediastreamproxy.h
  72. mediastreamtrackproxy.h
  73. mediatypes.cc
  74. mediatypes.h
  75. network_state_predictor.h
  76. notifier.h
  77. OWNERS
  78. packet_socket_factory.h
  79. peer_connection_factory_proxy.h
  80. peer_connection_interface.cc
  81. peer_connection_interface.h
  82. peer_connection_proxy.h
  83. peerconnectionfactoryproxy.h
  84. peerconnectioninterface.cc
  85. peerconnectioninterface.h
  86. peerconnectionproxy.h
  87. proxy.cc
  88. proxy.h
  89. README.md
  90. ref_counted_base.h
  91. refcountedbase.h
  92. rtc_error.cc
  93. rtc_error.h
  94. rtc_error_unittest.cc
  95. rtc_event_log_output.h
  96. rtc_event_log_output_file.cc
  97. rtc_event_log_output_file.h
  98. rtc_event_log_output_file_unittest.cc
  99. rtcerror.cc
  100. rtcerror.h
  101. rtcerror_unittest.cc
  102. rtceventlogoutput.h
  103. rtp_headers.cc
  104. rtp_headers.h
  105. rtp_packet_info.cc
  106. rtp_packet_info.h
  107. rtp_packet_info_unittest.cc
  108. rtp_packet_infos.h
  109. rtp_packet_infos_unittest.cc
  110. rtp_parameters.cc
  111. rtp_parameters.h
  112. rtp_parameters_unittest.cc
  113. rtp_receiver_interface.cc
  114. rtp_receiver_interface.h
  115. rtp_sender_interface.cc
  116. rtp_sender_interface.h
  117. rtp_transceiver_interface.cc
  118. rtp_transceiver_interface.h
  119. rtpparameters.cc
  120. rtpparameters.h
  121. rtpparameters_unittest.cc
  122. rtpreceiverinterface.cc
  123. rtpreceiverinterface.h
  124. rtpsenderinterface.cc
  125. rtpsenderinterface.h
  126. rtptransceiverinterface.cc
  127. rtptransceiverinterface.h
  128. scoped_refptr.h
  129. sctp_transport_interface.cc
  130. sctp_transport_interface.h
  131. set_remote_description_observer_interface.h
  132. setremotedescriptionobserverinterface.h
  133. stats_types.cc
  134. stats_types.h
  135. statstypes.cc
  136. statstypes.h
  137. turn_customizer.h
  138. turncustomizer.h
  139. uma_metrics.h
  140. umametrics.h
  141. video_track_source_proxy.h
  142. videosourceproxy.h
Source/ThirdParty/libwebrtc/Source/webrtc/api/README.md

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/. It’s not always possible to avoid this, but be aware that it adds to a small mountain of technical debt that we’re 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 won’t 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.