API头文件

API header files

API头文件

As a user of the WebRTC library, you may use headers and build files in the following directories:

作为WebRTC库的用户,可以在以下目录中使用头文件和构建文件:

API directoryIncluding subdirectories?
apiYes

For now, you may also use headers and build files in the following legacy API directories—but see the disclaimer below.

​目前,还可以在以下旧版API目录中使用头文件和构建文件,但请参阅下面的免责声明。

Legacy API directoryIncluding subdirectories?
common_audio/includeNo
media/baseNo
media/engineNo
modules/audio_coding/includeNo
modules/audio_device/includeNo
modules/audio_processing/includeNo
modules/congestion_controller/includeNo
modules/includeNo
modules/rtp_rtcp/includeNo
modules/rtp_rtcp/sourceNo
modules/utility/includeNo
modules/video_coding/codecs/h264/includeNo
modules/video_coding/codecs/vp8/includeNo
modules/video_coding/codecs/vp9/includeNo
modules/video_coding/includeNo
pcNo
rtc_baseNo
system_wrappers/includeNo

While the files, types, functions, macros, build targets, etc. in the API and legacy API directories will sometimes undergo incompatible changes, such changes will be announced in advance to discuss-webrtc@googlegroups.com, and a migration path will be provided.

​虽然API和旧版API目录中的文件、类型、函数、宏、构建目标等有时会发生不兼容的更改,但这些更改将提前通知discuss-webrtc@googlegroups.com,并且将提供迁移路径。

In the directories not listed in the tables above, incompatible changes may happen at any time, and are not announced.

在上表中未列出的目录中,不兼容的更改可能随时发生,并且不会公布。

The legacy API directories contain some things you shouldn’t use

旧API目录包含一些不应该使用的内容

The legacy API directories, in addition to things that genuinely should be part of the API, also contain things that should not be part of the API. We are in the process of moving the good stuff to the api directory tree, and will remove directories from the legacy list once they no longer contain anything that should be in the API.

遗留的API目录,除了真正应该成为API一部分的内容外,还包含不应该成为API的一部分的东西。我们正在将好的东西移到api目录树中,一旦目录不再包含api中应该包含的任何内容,我们将从旧列表中删除这些目录。

In other words, if you find things in the legacy API directories that don’t seem like they belong in the WebRTC native API, don’t grow too attached to them.

换句话说,如果在旧API目录中发现的东西似乎不属于WebRTC本地API,请不要过于依赖它们。

All these worlds are yours—except Europa

除了欧罗巴,所有这些世界都是你的

In the API headers, or in files included by the API headers, there are types, functions, namespaces, etc. that have impl or internal in their names (in various styles, such as CamelCaseImplsnake_case_impl). They are not part of the API, and may change incompatibly at any time; do not use them.

在API头中,或在API头所包含的文件中,有一些类型、函数、命名空间等的名称中包含impl或internal(有各种样式,如CamelCaseImpl、snake_case_impl)。它们不是API的一部分,并且可能随时发生不兼容的变化;不要使用它们。

Preprocessor macros

预处理器的宏

The following preprocessor macros are read (but never set) by WebRTC; they allow you to enable or disable parts of WebRTC at compile time.

以下预处理器宏由WebRTC读取(但从未设置);它们允许在编译时启用或禁用部分WebRTC。

Be sure to set them the same way in all translation units that include WebRTC code.

请确保在包括WebRTC代码的所有翻译单元中以相同的方式设置它们。

WEBRTC_EXCLUDE_BUILT_IN_SSL_ROOT_CERTS

If you want to ship your own set of SSL certificates and inject them into WebRTC PeerConnections, you will probably want to avoid to compile and ship WebRTC's default set of SSL certificates.

如果想发送自己的SSL证书集并将其注入WebRTC对等连接,可能需要避免编译和发送WebRTC的默认SSL证书集。

You can achieve this by defining the preprocessor macro WEBRTC_EXCLUDE_BUILT_IN_SSL_ROOT_CERTS. If you use GN, you can just set the GN argument rtc_builtin_ssl_root_certificates to false and GN will define the macro for you.

可以通过定义预处理器宏WEBRTC_EXCLUDE_BUILT_IN_SSL_ROOT_CERTS来实现这一点。如果使用GN,您可以将GN参数rtc_builtin_ssl_root_certificates设置为false,GN将定义宏。

WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT

If you want to provide your own implementation of webrtc::field_trial functions (more info here) you will have to exclude WebRTC's default implementation.

​如果想提供自己的webrtc::field_trial函数实现(此处有更多信息),则必须排除webrtc的默认实现。

You can achieve this by defining the preprocessor macro WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT. If you use GN, you can just set the GN argument rtc_exclude_field_trial_default to true and GN will define the macro for you.

可以通过定义预处理器宏WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT来实现这一点。如果使用GN,您只需将GN参数rtc_exclude_field_trial_default设置为true,GN就会定义宏。

WEBRTC_EXCLUDE_METRICS_DEFAULT

If you want to provide your own implementation of webrtc::metrics functions (more info here) you will have to exclude WebRTC's default implementation.

​如果想提供你自己的webrtc::metrics函数的实现(这里有更多信息),必须排除webrtc的默认实现。

You can achieve this by defining the preprocessor macro WEBRTC_EXCLUDE_METRICS_DEFAULT. If you use GN, you can just set the GN argument rtc_exclude_metrics_default to true and GN will define the macro for you.

可以通过定义预处理器宏WEBRTC_EXCLUDE_METRICS_DEFAULT来实现这一点。如果使用GN,可以将GN参数rtc_exclude_metrics_default设置为true,GN将定义宏。

WEBRTC_EXCLUDE_TRANSIENT_SUPPRESSOR

The transient suppressor functionality in the audio processing module is not always used. If you wish to exclude it from the build in order to preserve binary size, then define the preprocessor macro WEBRTC_EXCLUDE_TRANSIENT_SUPPRESSOR. If you use GN, you can just set the GN argument rtc_exclude_transient_suppressor to true and GN will define the macro for you.

并非总是使用音频处理模块中的瞬态抑制器功能。如果希望将其从生成中排除以保留二进制大小,则定义预处理器宏WEBRTC_EXCLUDE_TRANSIENT_SUPPRESSOR。如果使用GN,只需将GN参数rtc_exclude_transient_suppressor设置为true,GN就会定义宏。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值