You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
4.6 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # API header files
  2. As a user of the WebRTC library, you may use headers and build files
  3. in the following directories:
  4. API directory | Including subdirectories?
  5. --------------|-------------------------
  6. `api` | Yes
  7. For now, you may also use headers and build files in the following
  8. legacy API directories—but see the
  9. [disclaimer](#legacy-disclaimer) below.
  10. Legacy API directory | Including subdirectories?
  11. -------------------------------------------|--------------------------
  12. `common_audio/include` | No
  13. `media/base` | No
  14. `media/engine` | No
  15. `modules/audio_coding/include` | No
  16. `modules/audio_device/include` | No
  17. `modules/audio_processing/include` | No
  18. `modules/bitrate_controller/include` | No
  19. `modules/congestion_controller/include` | No
  20. `modules/include` | No
  21. `modules/remote_bitrate_estimator/include` | No
  22. `modules/rtp_rtcp/include` | No
  23. `modules/rtp_rtcp/source` | No
  24. `modules/utility/include` | No
  25. `modules/video_coding/codecs/h264/include` | No
  26. `modules/video_coding/codecs/vp8/include` | No
  27. `modules/video_coding/codecs/vp9/include` | No
  28. `modules/video_coding/include` | No
  29. `pc` | No
  30. `rtc_base` | No
  31. `system_wrappers/include` | No
  32. While the files, types, functions, macros, build targets, etc. in the
  33. API and legacy API directories will sometimes undergo incompatible
  34. changes, such changes will be announced in advance to
  35. [discuss-webrtc@googlegroups.com][discuss-webrtc], and a migration
  36. path will be provided.
  37. [discuss-webrtc]: https://groups.google.com/forum/#!forum/discuss-webrtc
  38. In the directories not listed in the tables above, incompatible
  39. changes may happen at any time, and are not announced.
  40. ## <a name="legacy-disclaimer"></a>The legacy API directories contain some things you shouldn&rsquo;t use
  41. The legacy API directories, in addition to things that genuinely
  42. should be part of the API, also contain things that should *not* be
  43. part of the API. We are in the process of moving the good stuff to the
  44. `api` directory tree, and will remove directories from the legacy list
  45. once they no longer contain anything that should be in the API.
  46. In other words, if you find things in the legacy API directories that
  47. don&rsquo;t seem like they belong in the WebRTC native API,
  48. don&rsquo;t grow too attached to them.
  49. ## All these worlds are yours&mdash;except Europa
  50. In the API headers, or in files included by the API headers, there are
  51. types, functions, namespaces, etc. that have `impl` or `internal` in
  52. their names (in various styles, such as `CamelCaseImpl`,
  53. `snake_case_impl`). They are not part of the API, and may change
  54. incompatibly at any time; do not use them.
  55. # Preprocessor macros
  56. The following preprocessor macros are read (but never set) by WebRTC; they allow
  57. you to enable or disable parts of WebRTC at compile time.
  58. Be sure to set them the same way in all translation units that include WebRTC
  59. code.
  60. ## `WEBRTC_EXCLUDE_BUILT_IN_SSL_ROOT_CERTS`
  61. If you want to ship your own set of SSL certificates and inject them into WebRTC
  62. PeerConnections, you will probably want to avoid to compile and ship WebRTC's
  63. default set of SSL certificates.
  64. You can achieve this by defining the preprocessor macro
  65. `WEBRTC_EXCLUDE_BUILT_IN_SSL_ROOT_CERTS`. If you use GN, you can just set the GN
  66. argument `rtc_builtin_ssl_root_certificates` to false and GN will define the
  67. macro for you.
  68. ## `WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT`
  69. If you want to provide your own implementation of `webrtc::field_trial` functions
  70. (more info [here][field_trial_h]) you will have to exclude WebRTC's default
  71. implementation.
  72. You can achieve this by defining the preprocessor macro
  73. `WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT`. If you use GN, you can just set the GN
  74. argument `rtc_exclude_field_trial_default` to true and GN will define the
  75. macro for you.
  76. [field_trial_h]: https://webrtc.googlesource.com/src/+/master/system_wrappers/include/field_trial.h
  77. ## `WEBRTC_EXCLUDE_METRICS_DEFAULT`
  78. If you want to provide your own implementation of `webrtc::metrics` functions
  79. (more info [here][metrics_h]) you will have to exclude WebRTC's default
  80. implementation.
  81. You can achieve this by defining the preprocessor macro
  82. `WEBRTC_EXCLUDE_METRICS_DEFAULT`. If you use GN, you can just set the GN
  83. argument `rtc_exclude_metrics_default` to true and GN will define the
  84. macro for you.
  85. [metrics_h]: https://webrtc.googlesource.com/src/+/master/system_wrappers/include/metrics.h