Thanks a lot.
Second, I add some configuration in video_coding/BUILD.gn to add x265 library, as follow:
rtc_static_library("webrtc_h265"){
sources = [
"codecs/h265/h265.cc",
"codecs/h265/include/h265.h",
]
if (!build_with_chromium && is_clang) {
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
defines = []
deps = [
":video_coding_utility",
"../../rtc_base:rtc_base_approved",
"../../media:rtc_media_base",
"../../system_wrappers",
]
if (rtc_use_h265) {
defines += [ "WEBRTC_USE_H265" ]
if (rtc_initialize_ffmpeg) {
defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
}
sources += [
"codecs/h265/h265_encoder_impl.cc",
"codecs/h265/h265_encoder_impl.h",
]
deps += [
"../../common_video",
"../../media:rtc_media_base",
"//third_party/ffmpeg:ffmpeg",
]
libs = ["/home/yangyang/webrtc-build-scripts-master/android/webrtc/src/
libx265.146.so"]
ldflags = ["-L /home/yangyang/webrtc-build-scripts-master/android/webrtc/src"]
}
}
there is a build error like this:
ninja: error: '../../
libx265.146.so', needed by 'obj/webrtc/sdk/android/libjingle_peerconnection_jni.a', missing and no known rule to make it.
Question is how to add library into webrtc, how to modify BUILD.gn file?
It is hard to add X265 source code into webrtc, because there are many predefine values and rules to make x265 library, so in my opinion, It is better to add x265 library directly.
在 2018年2月24日星期六 UTC+8下午7:01:54,Alexandre GOUAILLARD写道: