惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
Cloudbric
Cloudbric
G
GRAHAM CLULEY
S
Securelist
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Project Zero
Project Zero
Spread Privacy
Spread Privacy
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
T
Tailwind CSS Blog
博客园_首页
有赞技术团队
有赞技术团队
Simon Willison's Weblog
Simon Willison's Weblog
Stack Overflow Blog
Stack Overflow Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Latest news
Latest news
T
Tor Project blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Attack and Defense Labs
Attack and Defense Labs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
O
OpenAI News
J
Java Code Geeks
T
Tenable Blog
K
Kaspersky official blog
AWS News Blog
AWS News Blog
S
Security @ Cisco Blogs
The GitHub Blog
The GitHub Blog
T
Threatpost
月光博客
月光博客
H
Heimdal Security Blog
Security Latest
Security Latest
The Hacker News
The Hacker News
Y
Y Combinator Blog
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
C
Cisco Blogs
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
C
CERT Recently Published Vulnerability Notes
D
Docker
Google Online Security Blog
Google Online Security Blog
D
DataBreaches.Net
V
Visual Studio Blog
H
Help Net Security

博客园 - talenth

nvm配置nodejs ATL开发office插件 windows编译pp-shitu webdriver windows下不同cpu架构PE文件区别 vs中/EHa、/EHs、/EHsc的区别 主窗口,子窗口,拥有窗口关闭消息顺序 windows下注册一个打开特定扩展名的文件 yara规则学习 usb3.0+mvme固态安装win7 驱动程序获取内核版本号 提取shell32.dll中的字符串 常见编码 修理鼠标微动开关 InfinityHook原理 段描述符 tls1.3报文 签名证书 windows内核同步机制
windows下简单使用webrtc
talenth · 2026-01-28 · via 博客园 - talenth

以下对应webrtc版本: 2025年10月20号的版本

1 下载webrtc源码, 解压

2 下载编译工具, 解压, 添加到path环境变量

depot_tools

3 生成vs项目

powershell切到src目录, 

set DEPOT_TOOLS_UPDATE=0
set DEPOT_TOOLS_WIN_TOOLCHAIN=0

gn gen out\Default --ide=vs

4 修改 src\out\Default\args.gn文件,如下

查看所有可配置选项的命令 gn args --list E:/google/webrtc/src/out/Default

# 关键配置:禁用 libc++,使用 MSVC 标准库
use_libcxx = false
use_custom_libcxx = false

host_cpu="x64"
host_os="win"

# 确保使用 clang-cl 编译器但链接 MSVC 标准库
is_clang = true
clang_use_chrome_plugins = false

is_debug = true
enable_iterator_debugging=true
default_crt = "mt" #这个目前不起作用, 实际生成的就是mtd

# 其他重要配置
rtc_use_h264 = false # 如果不需要 H.264,可以禁用以简化依赖

use_rtti = true # 启用 RTTI(部分库可能需要)

5 打开out\Default\all.sln, 编译 webrtc这个项目, 生成webrtc.lib

6 新启一个项目

<1> 头文件目录添加(根据实际编译出错的地方修改)

E:\google\webrtc\src

E:\google\webrtc\src\third_party\abseil-cpp

<2> 预处理指令添加

NOMINMAX

<3> 链接器输入

webrtc.lib
winmm.lib
ws2_32.lib
dmoguids.lib
msdmo.lib
wmcodecdspuuid.lib

<4> 修改webrtc源文件(编译错误, 改完得重编译webrtc.lib)

system_wrappers/include/clock.h 63行左右

int64_t time_fraction =
DivideRoundToNearest(int64_t{ntp_time.fractions()} * 1'000'000,
NtpTime::kFractionsPerSecond);

为 

int64_t time_fraction =
DivideRoundToNearest(int64_t{ntp_time.fractions()} * 1'000'000,
(int64_t)NtpTime::kFractionsPerSecond);