2014-06-23 19:21:07 +00:00
|
|
|
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
#
|
|
|
|
|
# Use of this source code is governed by a BSD-style license
|
|
|
|
|
# that can be found in the LICENSE file in the root of the source
|
|
|
|
|
# tree. An additional intellectual property rights grant can be found
|
|
|
|
|
# in the file PATENTS. All contributing project authors may
|
|
|
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
import("../webrtc.gni")
|
2014-06-23 19:21:07 +00:00
|
|
|
|
2014-07-03 17:04:12 +00:00
|
|
|
config("common_video_config") {
|
|
|
|
|
include_dirs = [
|
2015-11-16 13:52:24 -08:00
|
|
|
"include",
|
2017-10-15 23:32:09 -04:00
|
|
|
"$rtc_libyuv_dir/include",
|
2014-07-03 17:04:12 +00:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-23 00:38:52 -07:00
|
|
|
rtc_static_library("common_video") {
|
2014-07-03 17:04:12 +00:00
|
|
|
sources = [
|
2016-04-26 12:55:07 -07:00
|
|
|
"bitrate_adjuster.cc",
|
2016-10-26 02:48:16 -07:00
|
|
|
"h264/h264_bitstream_parser.cc",
|
|
|
|
|
"h264/h264_bitstream_parser.h",
|
2016-06-02 02:43:32 -07:00
|
|
|
"h264/h264_common.cc",
|
|
|
|
|
"h264/h264_common.h",
|
|
|
|
|
"h264/pps_parser.cc",
|
|
|
|
|
"h264/pps_parser.h",
|
2016-10-31 05:55:57 -07:00
|
|
|
"h264/profile_level_id.h",
|
2016-06-02 02:43:32 -07:00
|
|
|
"h264/sps_parser.cc",
|
|
|
|
|
"h264/sps_parser.h",
|
|
|
|
|
"h264/sps_vui_rewriter.cc",
|
|
|
|
|
"h264/sps_vui_rewriter.h",
|
2015-03-17 11:40:45 +00:00
|
|
|
"i420_buffer_pool.cc",
|
2016-04-26 12:55:07 -07:00
|
|
|
"include/bitrate_adjuster.h",
|
2016-04-18 21:12:48 -07:00
|
|
|
"include/frame_callback.h",
|
2015-11-16 13:52:24 -08:00
|
|
|
"include/i420_buffer_pool.h",
|
|
|
|
|
"include/incoming_video_stream.h",
|
2016-11-16 16:41:30 +01:00
|
|
|
"include/video_bitrate_allocator.h",
|
2017-05-15 02:42:11 -07:00
|
|
|
"include/video_frame.h",
|
2015-11-16 13:52:24 -08:00
|
|
|
"include/video_frame_buffer.h",
|
2015-05-13 13:28:11 +02:00
|
|
|
"incoming_video_stream.cc",
|
2014-07-03 17:04:12 +00:00
|
|
|
"libyuv/include/webrtc_libyuv.h",
|
|
|
|
|
"libyuv/webrtc_libyuv.cc",
|
2015-05-29 17:21:40 -07:00
|
|
|
"video_frame.cc",
|
Revert 8599 "Revert 8580 "Unify underlying frame buffer in I420VideoFrame and...""
It's possible to build Chrome on Windows with this patch now.
BUG=1128
> This is unfortunately causing build problems in Chrome on Windows.
>> Unify underlying frame buffer in I420VideoFrame and WebRtcVideoFrame
>>
>> Currently, I420VideoFrame uses three webrtc::Plane to store pixel data, and WebRtcVideoFrame uses WebRtcVideoFrame::FrameBuffer/webrtc::VideoFrame. The two subclasses WebRtcTextureVideoFrame and TextureVideoFrame use a NativeHandle to store pixel data, and there is also a class WebRtcVideoRenderFrame that wraps an I420VideoFrame.
>>
>> This CL replaces these classes with a new interface VideoFrameBuffer that provides the common functionality. This makes it possible to remove deep frame copies between cricket::VideoFrame and I420VideoFrame.
>>
>> Some additional minor changes are:
>> * Disallow creation of 0x0 texture frames.
>> * Remove the half-implemented ref count functions in I420VideoFrame.
>> * Remove the Alias functionality in WebRtcVideoFrame
>>
>> The final goal is to eliminate all frame copies, but to limit the scope of this CL, some planned changes are postponed to follow-up CL:s (see planned changes in https://webrtc-codereview.appspot.com/38879004, or https://docs.google.com/document/d/1bxoJZNmlo-Z9GnQwIaWpEG6hDlL_W-bzka8Zb_K2NbA/preview). Specifically, this CL:
>> * Keeps empty subclasses WebRtcTextureVideoFrame and TextureVideoFrame, and just delegates the construction to the superclass.
>> * Keeps the deep copies from cricket::VideoFrame to I420VideoFrame.
>>
>> BUG=1128
>> R=mflodman@webrtc.org, pbos@webrtc.org, perkj@webrtc.org, tommi@webrtc.org
>>
>> Review URL: https://webrtc-codereview.appspot.com/42469004
R=pbos@webrtc.org
TBR=mflodman, pbos, perkj, tommi
Review URL: https://webrtc-codereview.appspot.com/45489004
Cr-Commit-Position: refs/heads/master@{#8616}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8616 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-05 14:03:08 +00:00
|
|
|
"video_frame_buffer.cc",
|
2015-05-13 13:28:11 +02:00
|
|
|
"video_render_frames.cc",
|
|
|
|
|
"video_render_frames.h",
|
2014-07-03 17:04:12 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
include_dirs = [ "../modules/interface" ]
|
|
|
|
|
|
2016-09-05 06:10:18 -07:00
|
|
|
public_configs = [ ":common_video_config" ]
|
2014-07-03 17:04:12 +00:00
|
|
|
|
2016-10-16 23:56:12 -07:00
|
|
|
if (!build_with_chromium && is_clang) {
|
|
|
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
2014-08-25 14:15:35 +00:00
|
|
|
}
|
|
|
|
|
|
2015-02-26 13:59:22 +00:00
|
|
|
deps = [
|
|
|
|
|
"..:webrtc_common",
|
2017-09-05 08:43:13 -07:00
|
|
|
"../api:optional",
|
2017-11-13 10:19:58 +01:00
|
|
|
"../api:video_frame_api_i420",
|
2017-06-21 01:02:59 -07:00
|
|
|
"../media:rtc_h264_profile_id",
|
2017-04-26 03:38:35 -07:00
|
|
|
"../modules:module_api",
|
2017-07-19 10:40:47 -07:00
|
|
|
"../rtc_base:rtc_base",
|
|
|
|
|
"../rtc_base:rtc_task_queue",
|
2015-02-26 13:59:22 +00:00
|
|
|
"../system_wrappers",
|
|
|
|
|
]
|
2017-01-10 07:44:26 -08:00
|
|
|
public_deps = [
|
|
|
|
|
"../api:video_frame_api",
|
|
|
|
|
]
|
2014-07-03 17:04:12 +00:00
|
|
|
|
2014-09-07 17:36:10 +00:00
|
|
|
if (rtc_build_libyuv) {
|
2015-02-16 12:47:20 +00:00
|
|
|
deps += [ "$rtc_libyuv_dir" ]
|
2017-01-10 07:44:26 -08:00
|
|
|
public_deps += [ "$rtc_libyuv_dir" ]
|
2014-07-03 17:04:12 +00:00
|
|
|
} else {
|
|
|
|
|
# Need to add a directory normally exported by libyuv.
|
2015-02-16 12:47:20 +00:00
|
|
|
include_dirs += [ "$rtc_libyuv_dir/include" ]
|
2014-07-03 17:04:12 +00:00
|
|
|
}
|
2014-06-23 19:21:07 +00:00
|
|
|
}
|
2016-06-08 01:27:52 -07:00
|
|
|
|
|
|
|
|
if (rtc_include_tests) {
|
2017-09-15 06:47:31 +02:00
|
|
|
common_video_resources = [ "../resources/foreman_cif.yuv" ]
|
2016-08-30 02:53:49 -07:00
|
|
|
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
bundle_data("common_video_unittests_bundle_data") {
|
|
|
|
|
testonly = true
|
|
|
|
|
sources = common_video_resources
|
|
|
|
|
outputs = [
|
|
|
|
|
"{{bundle_resources_dir}}/{{source_file_part}}",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-02 04:10:34 -07:00
|
|
|
rtc_test("common_video_unittests") {
|
2016-06-08 01:27:52 -07:00
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"bitrate_adjuster_unittest.cc",
|
2016-10-26 02:48:16 -07:00
|
|
|
"h264/h264_bitstream_parser_unittest.cc",
|
2016-06-08 01:27:52 -07:00
|
|
|
"h264/pps_parser_unittest.cc",
|
2016-10-31 05:55:57 -07:00
|
|
|
"h264/profile_level_id_unittest.cc",
|
2016-06-08 01:27:52 -07:00
|
|
|
"h264/sps_parser_unittest.cc",
|
|
|
|
|
"h264/sps_vui_rewriter_unittest.cc",
|
|
|
|
|
"i420_buffer_pool_unittest.cc",
|
|
|
|
|
"i420_video_frame_unittest.cc",
|
|
|
|
|
"libyuv/libyuv_unittest.cc",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
# TODO(jschuh): Bug 1348: fix this warning.
|
|
|
|
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
|
|
|
|
|
2016-10-16 23:56:12 -07:00
|
|
|
if (!build_with_chromium && is_clang) {
|
|
|
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
2016-09-02 04:10:34 -07:00
|
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
2016-06-08 01:27:52 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":common_video",
|
2017-11-13 10:19:58 +01:00
|
|
|
"../api:video_frame_api_i420",
|
2017-02-06 02:21:11 -08:00
|
|
|
"../modules/video_capture:video_capture",
|
2017-07-19 10:40:47 -07:00
|
|
|
"../rtc_base:rtc_base",
|
|
|
|
|
"../rtc_base:rtc_base_approved",
|
2016-06-08 01:27:52 -07:00
|
|
|
"../system_wrappers:system_wrappers",
|
2016-11-30 06:12:01 -08:00
|
|
|
"../test:test_main",
|
2016-06-08 01:27:52 -07:00
|
|
|
"../test:video_test_common",
|
|
|
|
|
"//testing/gmock",
|
|
|
|
|
"//testing/gtest",
|
|
|
|
|
]
|
|
|
|
|
|
2016-09-14 05:10:01 -07:00
|
|
|
data = common_video_resources
|
2016-06-08 01:27:52 -07:00
|
|
|
if (is_android) {
|
|
|
|
|
deps += [ "//testing/android/native_test:native_test_support" ]
|
2016-08-24 07:48:42 -07:00
|
|
|
shard_timeout = 900
|
|
|
|
|
}
|
2016-06-08 01:27:52 -07:00
|
|
|
|
2016-08-30 02:53:49 -07:00
|
|
|
if (is_ios) {
|
|
|
|
|
deps += [ ":common_video_unittests_bundle_data" ]
|
2016-06-08 01:27:52 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|