- 기준버전: `WEBRTC - Release 60버전`
- 직접빌드 이유: `윈도우버전은 static build 및 vp8, vp9 codec의 사용이 기본이며, h264 미포함
is_component_build 값에 따라 DLL이 생성되며, assert값으로 빌드가 막혀 있으므로 주석처리해야함`
- 수동빌드 참조사이트: http://webrtc.github.io/webrtc-org/native-code/development/
1) git clone https://github.com/StarshipVendingMachine/libwebrtc.git
2) cd libwebrtc
3) cmake -Bout -DCMAKE_BUILD_TYPE=Debug -DTARGET_CPU=x86 -A Win32 && cmake --build out --config Debug
4) 3번항목 1번 실행하면 소스가 다운로드 되며, `is_component_build=true`항목으로 인해 오류가 발생됨 (webrtc.gni - 주석처리)
5) 수정 후 3번항목 재실행
- Release Command - '
cmake -Bout -DCMAKE_BUILD_TYPE=Release -DTARGET_CPU=x86 -A Win32 && cmake --build out --config Release' - Select Branch Option - '
-DWEBRTC_BRANCH_HEAD=refs/branch-heads/57'
-
Debug Build Option:
-
gn gen out/win_x86_debug -args="is_debug=true target_cpu=\"x86\" is_component_build=true proprietary_codecs=true rtc_use_h264=true use_openh264=true ffmpeg_branding=\"Chrome\" rtc_include_tests=false rtc_include_pulse_audio=false use_sysroot=false is_clang=false treat_warnings_as_errors=false" --ide=vs -
ninja -C out/win_x86_debug
-
-
Release Build Option:
-
gn gen out/win_x86_release -args="is_debug=false symbol_level=0 enable_nacl=false target_cpu=\"x86\" is_component_build=true proprietary_codecs=true rtc_use_h264=true use_openh264=true ffmpeg_branding=\"Chrome\" rtc_include_tests=false rtc_include_pulse_audio=false use_sysroot=false is_clang=false treat_warnings_as_errors=false" --ide=vs -
ninja -C out/win_x86_release
-
- Access Violation 발생시 수정
- Path:
.\webrtc\out\Debug\gen\webrtc\logging\rtc_event_log\rtc_event_log.pb.h
inline void DecoderConfig::set_name(const ::std::string& value) {
set_has_name();
std::string copiedValue = value; // <- 추가 (수정항목)
name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), copiedValue);
// @@protoc_insertion_point(field_set:webrtc.rtclog.DecoderConfig.name)
}boringssl.dll
ffmpeg.dll
protobuf_lite.dll
turbojpeg.dll - '외부 DLL파일'
- Python 27, Win32 오류발생 - 모듈없어서 발생
- 'pip install pypiwin32'
- 아래의 코드로 인해 h264빌드에 오류발생 가능
- rtc_use_h264 = proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
See: bugs.webrtc.org/9213#c13.- 오류발생 시 수정할 부분-
대상파일(주석처리):
- .\src\modules\video_coding\codecs\h264\h264_decoder_impl.h
- .\src\modules\video_coding\codecs\h264\h264_encoder_impl.h
- .\src\modules\video_coding\codecs\h264\h264_color_space.h
-
PCM_VIDC FLAG 없어서 발생하는 오류
- .\src\third_party\ffmpeg\libavcodec\pcm.c
- '# PCM_CODEC (PCM_VIDC, AV_SAMPLE_FMT_S16, pcm_vidc, "PCM Archimedes VIDC");' <- 항목주석처리
-
dcheck_always_on=true- DCHECK 버그확인symbol_level=0- 디버깅 심볼제거enable_nacl=false- Native Client 비활성화blick_symbol_level=0- WebCore 심볼제거