From b2250e5dbb8fb5aec5ef3c7962667e031a87b9a0 Mon Sep 17 00:00:00 2001 From: nisse Date: Fri, 2 Dec 2016 04:01:14 -0800 Subject: [PATCH] New gn target video_frame_api. This is in preparation for https://codereview.webrtc.org/2517173004/, which needs some updates of downstream dependencies. This cl adds the target to api/BUILD.gn, creates the directory api/video, and a single harmless include file there. BUG=webrtc:5880 Review-Url: https://codereview.webrtc.org/2546723003 Cr-Commit-Position: refs/heads/master@{#15385} --- webrtc/api/BUILD.gn | 23 +++++++++++++++++++++++ webrtc/api/video/video_rotation.h | 26 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 webrtc/api/video/video_rotation.h diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn index dabfb4b2f9..b2f28ab4e2 100644 --- a/webrtc/api/BUILD.gn +++ b/webrtc/api/BUILD.gn @@ -368,6 +368,29 @@ rtc_source_set("transport_api") { "call/transport.h", ] } + +rtc_source_set("video_frame_api") { + sources = [ + "video/video_rotation.h", + ] + + deps = [ + "../base:rtc_base_approved", + ] + + # TODO(nisse): This logic is duplicated in multiple places. + # Define in a single place. + if (rtc_build_libyuv) { + deps += [ "$rtc_libyuv_dir" ] + public_deps = [ + "$rtc_libyuv_dir", + ] + } else { + # Need to add a directory normally exported by libyuv. + include_dirs = [ "$rtc_libyuv_dir/include" ] + } +} + if (rtc_include_tests) { config("peerconnection_unittests_config") { # The warnings below are enabled by default. Since GN orders compiler flags diff --git a/webrtc/api/video/video_rotation.h b/webrtc/api/video/video_rotation.h new file mode 100644 index 0000000000..b8b2767404 --- /dev/null +++ b/webrtc/api/video/video_rotation.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2015 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. + */ + +#ifndef WEBRTC_API_VIDEO_VIDEO_ROTATION_H_ +#define WEBRTC_API_VIDEO_VIDEO_ROTATION_H_ + +namespace webrtc { + +// enum for clockwise rotation. +enum VideoRotation { + kVideoRotation_0 = 0, + kVideoRotation_90 = 90, + kVideoRotation_180 = 180, + kVideoRotation_270 = 270 +}; + +} // namespace webrtc + +#endif // WEBRTC_API_VIDEO_VIDEO_ROTATION_H_