1# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2# 3# Use of this source code is governed by a BSD-style license 4# that can be found in the LICENSE file in the root of the source 5# tree. An additional intellectual property rights grant can be found 6# in the file PATENTS. All contributing project authors may 7# be found in the AUTHORS file in the root of the source tree. 8 9import("../../build/webrtc.gni") 10 11source_set("video_render") { 12 sources = [ 13 "external/video_render_external_impl.cc", 14 "external/video_render_external_impl.h", 15 "i_video_render.h", 16 "include/video_render.h", 17 "include/video_render_defines.h", 18 "incoming_video_stream.cc", 19 "incoming_video_stream.h", 20 "video_render_frames.cc", 21 "video_render_frames.h", 22 "video_render_impl.h", 23 ] 24 25 deps = [ 26 "../../common_video", 27 "../../system_wrappers", 28 "../utility", 29 ] 30 31 if (is_clang) { 32 # Suppress warnings from Chrome's Clang plugins. 33 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 34 configs -= [ "//build/config/clang:find_bad_constructs" ] 35 } 36} 37 38source_set("video_render_impl") { 39 sources = [ 40 "video_render_impl.cc", 41 ] 42 deps = [ 43 ":video_render", 44 "../../system_wrappers", 45 ] 46 47 if (is_clang) { 48 # Suppress warnings from Chrome's Clang plugins. 49 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 50 configs -= [ "//build/config/clang:find_bad_constructs" ] 51 } 52} 53 54config("video_render_internal_impl_config") { 55 if (is_ios) { 56 libs = [ 57 "OpenGLES.framework", 58 "QuartzCore.framework", 59 ] 60 } 61} 62 63source_set("video_render_internal_impl") { 64 libs = [] 65 sources = [ 66 "video_render_internal_impl.cc", 67 ] 68 deps = [ 69 ":video_render", 70 "../../system_wrappers", 71 ] 72 73 if (is_linux) { 74 sources += [ 75 "linux/video_render_linux_impl.cc", 76 "linux/video_render_linux_impl.h", 77 "linux/video_x11_channel.cc", 78 "linux/video_x11_channel.h", 79 "linux/video_x11_render.cc", 80 "linux/video_x11_render.h", 81 ] 82 83 libs += [ "Xext" ] 84 } 85 if (is_mac) { 86 sources += [ 87 "mac/cocoa_full_screen_window.h", 88 "mac/cocoa_full_screen_window.mm", 89 "mac/cocoa_render_view.h", 90 "mac/cocoa_render_view.mm", 91 "mac/video_render_agl.cc", 92 "mac/video_render_agl.h", 93 "mac/video_render_mac_carbon_impl.cc", 94 "mac/video_render_mac_carbon_impl.h", 95 "mac/video_render_mac_cocoa_impl.h", 96 "mac/video_render_mac_cocoa_impl.mm", 97 "mac/video_render_nsopengl.h", 98 "mac/video_render_nsopengl.mm", 99 ] 100 101 libs += [ 102 "CoreVideo.framework", 103 "QTKit.framework", 104 ] 105 } 106 if (is_win) { 107 sources += [ 108 "windows/i_video_render_win.h", 109 "windows/video_render_direct3d9.cc", 110 "windows/video_render_direct3d9.h", 111 "windows/video_render_windows_impl.cc", 112 "windows/video_render_windows_impl.h", 113 ] 114 115 directxsdk_exists = 116 (exec_script("//build/dir_exists.py", 117 [ rebase_path("//third_party/directxsdk/files", 118 root_build_dir) ], 119 "trim string") == "True") 120 if (directxsdk_exists) { 121 directxsdk_path = "//third_party/directxsdk/files" 122 } else { 123 directxsdk_path = getenv("DXSDK_DIR") 124 } 125 include_dirs = [ directxsdk_path + "/Include" ] 126 } 127 if (is_android) { 128 sources += [ 129 "android/video_render_android_impl.cc", 130 "android/video_render_android_impl.h", 131 "android/video_render_android_native_opengl2.cc", 132 "android/video_render_android_native_opengl2.h", 133 "android/video_render_android_surface_view.cc", 134 "android/video_render_android_surface_view.h", 135 "android/video_render_opengles20.cc", 136 "android/video_render_opengles20.h", 137 ] 138 139 libs += [ "GLESv2" ] 140 } 141 if (is_ios) { 142 sources += [ 143 "ios/open_gles20.h", 144 "ios/open_gles20.mm", 145 "ios/video_render_ios_channel.h", 146 "ios/video_render_ios_channel.mm", 147 "ios/video_render_ios_gles20.h", 148 "ios/video_render_ios_gles20.mm", 149 "ios/video_render_ios_impl.h", 150 "ios/video_render_ios_impl.mm", 151 "ios/video_render_ios_view.h", 152 "ios/video_render_ios_view.mm", 153 ] 154 155 cflags += [ "-fobjc-arc" ] # CLANG_ENABLE_OBJC_ARC = YES. 156 } 157 158 all_dependent_configs = [ ":video_render_internal_impl_config"] 159 160 if (is_clang) { 161 # Suppress warnings from Chrome's Clang plugins. 162 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 163 configs -= [ "//build/config/clang:find_bad_constructs" ] 164 } 165} 166