summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu <sergeyu@chromium.org>2015-08-21 16:37:02 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-21 23:38:18 +0000
commit80f771beaec8b29cc1bb5770f357c5af105e0cd1 (patch)
treed4ba937722c7cf918043e23ebbb149657b5beec4 /remoting
parent8c0780f4237a4a8b6be99cc1073a0df84abe501e (diff)
downloadchromium_src-80f771beaec8b29cc1bb5770f357c5af105e0cd1.zip
chromium_src-80f771beaec8b29cc1bb5770f357c5af105e0cd1.tar.gz
chromium_src-80f771beaec8b29cc1bb5770f357c5af105e0cd1.tar.bz2
remoting: Remove dependency on YUV code in src/media
libyuv is now used for YUV conversions on both ends. BUG=256850 Review URL: https://codereview.chromium.org/1290273004 Cr-Commit-Position: refs/heads/master@{#344905}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/DEPS1
-rw-r--r--remoting/base/run_all_unittests.cc4
-rw-r--r--remoting/base/util.cc155
-rw-r--r--remoting/base/util.h48
-rw-r--r--remoting/base/util_unittest.cc172
-rw-r--r--remoting/client/jni/chromoting_jni_runtime.cc4
-rw-r--r--remoting/client/plugin/chromoting_instance.cc2
-rw-r--r--remoting/codec/DEPS1
-rw-r--r--remoting/codec/video_encoder_vpx_unittest.cc2
-rw-r--r--remoting/host/fake_desktop_capturer.h1
-rw-r--r--remoting/host/it2me/it2me_native_messaging_host.cc4
-rw-r--r--remoting/host/remoting_me2me_host.cc4
-rw-r--r--remoting/remoting_nacl.gyp3
-rw-r--r--remoting/test/test_video_renderer.h1
-rw-r--r--remoting/test/test_video_renderer_unittest.cc1
15 files changed, 11 insertions, 392 deletions
diff --git a/remoting/DEPS b/remoting/DEPS
index f2616fe..675c1c2 100644
--- a/remoting/DEPS
+++ b/remoting/DEPS
@@ -1,7 +1,6 @@
include_rules = [
"+crypto",
"+google_apis",
- "+media/base",
# Note: Only for net::EnableSSLServerSockets(), which must be called by
# unit tests at process start.
diff --git a/remoting/base/run_all_unittests.cc b/remoting/base/run_all_unittests.cc
index a9c5b64..a21e693 100644
--- a/remoting/base/run_all_unittests.cc
+++ b/remoting/base/run_all_unittests.cc
@@ -4,7 +4,6 @@
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
-#include "media/base/media.h"
#include "net/socket/ssl_server_socket.h"
int main(int argc, char** argv) {
@@ -14,9 +13,6 @@ int main(int argc, char** argv) {
// single-threaded.
net::EnableSSLServerSockets();
- // Ensures that media library and specific CPU features are initialized.
- media::InitializeMediaLibrary();
-
return base::LaunchUnitTests(
argc, argv, base::Bind(&base::TestSuite::Run,
base::Unretained(&test_suite)));
diff --git a/remoting/base/util.cc b/remoting/base/util.cc
index 6ee8548..c72f3a8 100644
--- a/remoting/base/util.cc
+++ b/remoting/base/util.cc
@@ -9,17 +9,17 @@
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
-#include "media/base/video_frame.h"
-#include "media/base/yuv_convert.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
-using media::VideoFrame;
-
namespace remoting {
enum { kBytesPerPixelRGB32 = 4 };
+static int CalculateRGBOffset(int x, int y, int stride) {
+ return stride * y + kBytesPerPixelRGB32 * x;
+}
+
// Do not write LOG messages in this routine since it is called from within
// our LOG message handler. Bad things will happen.
std::string GetTimestampString() {
@@ -31,137 +31,6 @@ std::string GetTimestampString() {
tex.hour, tex.minute, tex.second);
}
-int CalculateRGBOffset(int x, int y, int stride) {
- return stride * y + kBytesPerPixelRGB32 * x;
-}
-
-int CalculateYOffset(int x, int y, int stride) {
- DCHECK(((x & 1) == 0) && ((y & 1) == 0));
- return stride * y + x;
-}
-
-int CalculateUVOffset(int x, int y, int stride) {
- DCHECK(((x & 1) == 0) && ((y & 1) == 0));
- return stride * y / 2 + x / 2;
-}
-
-void ConvertAndScaleYUVToRGB32Rect(
- const uint8* source_yplane,
- const uint8* source_uplane,
- const uint8* source_vplane,
- int source_ystride,
- int source_uvstride,
- const webrtc::DesktopSize& source_size,
- const webrtc::DesktopRect& source_buffer_rect,
- uint8* dest_buffer,
- int dest_stride,
- const webrtc::DesktopSize& dest_size,
- const webrtc::DesktopRect& dest_buffer_rect,
- const webrtc::DesktopRect& dest_rect) {
- // N.B. It is caller's responsibility to check if strides are large enough. We
- // cannot do it here anyway.
- DCHECK(DoesRectContain(webrtc::DesktopRect::MakeSize(source_size),
- source_buffer_rect));
- DCHECK(DoesRectContain(webrtc::DesktopRect::MakeSize(dest_size),
- dest_buffer_rect));
- DCHECK(DoesRectContain(dest_buffer_rect, dest_rect));
- DCHECK(DoesRectContain(ScaleRect(source_buffer_rect, source_size, dest_size),
- dest_rect));
-
- // If the source and/or destination buffers don't start at (0, 0)
- // offset the pointers to pretend we have complete buffers.
- int y_offset = - CalculateYOffset(source_buffer_rect.left(),
- source_buffer_rect.top(),
- source_ystride);
- int uv_offset = - CalculateUVOffset(source_buffer_rect.left(),
- source_buffer_rect.top(),
- source_uvstride);
- int rgb_offset = - CalculateRGBOffset(dest_buffer_rect.left(),
- dest_buffer_rect.top(),
- dest_stride);
-
- // See if scaling is needed.
- if (source_size.equals(dest_size)) {
- // Calculate the inner rectangle that can be copied by the optimized
- // libyuv::I420ToARGB().
- webrtc::DesktopRect inner_rect =
- webrtc::DesktopRect::MakeLTRB(RoundToTwosMultiple(dest_rect.left() + 1),
- RoundToTwosMultiple(dest_rect.top() + 1),
- dest_rect.right(), dest_rect.bottom());
-
- // Offset pointers to point to the top left corner of the inner rectangle.
- y_offset += CalculateYOffset(inner_rect.left(), inner_rect.top(),
- source_ystride);
- uv_offset += CalculateUVOffset(inner_rect.left(), inner_rect.top(),
- source_uvstride);
- rgb_offset += CalculateRGBOffset(inner_rect.left(), inner_rect.top(),
- dest_stride);
-
- libyuv::I420ToARGB(source_yplane + y_offset, source_ystride,
- source_uplane + uv_offset, source_uvstride,
- source_vplane + uv_offset, source_uvstride,
- dest_buffer + rgb_offset, dest_stride,
- inner_rect.width(), inner_rect.height());
-
- // Now see if some pixels weren't copied due to alignment.
- if (!dest_rect.equals(inner_rect)) {
- webrtc::DesktopRect outer_rect =
- webrtc::DesktopRect::MakeLTRB(RoundToTwosMultiple(dest_rect.left()),
- RoundToTwosMultiple(dest_rect.top()),
- dest_rect.right(), dest_rect.bottom());
-
- webrtc::DesktopVector offset(outer_rect.left() - inner_rect.left(),
- outer_rect.top() - inner_rect.top());
-
- // Offset the pointers to point to the top left corner of the outer
- // rectangle.
- y_offset += CalculateYOffset(offset.x(), offset.y(), source_ystride);
- uv_offset += CalculateUVOffset(offset.x(), offset.y(), source_uvstride);
- rgb_offset += CalculateRGBOffset(offset.x(), offset.y(), dest_stride);
-
- // Draw unaligned edges.
- webrtc::DesktopRegion edges(dest_rect);
- edges.Subtract(inner_rect);
- for (webrtc::DesktopRegion::Iterator i(edges); !i.IsAtEnd();
- i.Advance()) {
- webrtc::DesktopRect rect = i.rect();
- rect.Translate(-outer_rect.left(), -outer_rect.top());
- media::ScaleYUVToRGB32WithRect(source_yplane + y_offset,
- source_uplane + uv_offset,
- source_vplane + uv_offset,
- dest_buffer + rgb_offset,
- source_size.width(),
- source_size.height(),
- dest_size.width(),
- dest_size.height(),
- rect.left(),
- rect.top(),
- rect.right(),
- rect.bottom(),
- source_ystride,
- source_uvstride,
- dest_stride);
- }
- }
- } else {
- media::ScaleYUVToRGB32WithRect(source_yplane + y_offset,
- source_uplane + uv_offset,
- source_vplane + uv_offset,
- dest_buffer + rgb_offset,
- source_size.width(),
- source_size.height(),
- dest_size.width(),
- dest_size.height(),
- dest_rect.left(),
- dest_rect.top(),
- dest_rect.right(),
- dest_rect.bottom(),
- source_ystride,
- source_uvstride,
- dest_stride);
- }
-}
-
int RoundToTwosMultiple(int x) {
return x & (~1);
}
@@ -174,22 +43,10 @@ webrtc::DesktopRect AlignRect(const webrtc::DesktopRect& rect) {
return webrtc::DesktopRect::MakeLTRB(x, y, right, bottom);
}
-webrtc::DesktopRect ScaleRect(const webrtc::DesktopRect& rect,
- const webrtc::DesktopSize& in_size,
- const webrtc::DesktopSize& out_size) {
- int left = (rect.left() * out_size.width()) / in_size.width();
- int top = (rect.top() * out_size.height()) / in_size.height();
- int right = (rect.right() * out_size.width() + in_size.width() - 1) /
- in_size.width();
- int bottom = (rect.bottom() * out_size.height() + in_size.height() - 1) /
- in_size.height();
- return webrtc::DesktopRect::MakeLTRB(left, top, right, bottom);
-}
-
-void CopyRGB32Rect(const uint8* source_buffer,
+void CopyRGB32Rect(const uint8_t* source_buffer,
int source_stride,
const webrtc::DesktopRect& source_buffer_rect,
- uint8* dest_buffer,
+ uint8_t* dest_buffer,
int dest_stride,
const webrtc::DesktopRect& dest_buffer_rect,
const webrtc::DesktopRect& dest_rect) {
diff --git a/remoting/base/util.h b/remoting/base/util.h
index 2546221..d022a16 100644
--- a/remoting/base/util.h
+++ b/remoting/base/util.h
@@ -5,9 +5,9 @@
#ifndef REMOTING_BASE_UTIL_H_
#define REMOTING_BASE_UTIL_H_
+#include <stdint.h>
#include <string>
-#include "media/base/video_frame.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
namespace remoting {
@@ -15,58 +15,16 @@ namespace remoting {
// Return a string that contains the current date formatted as 'MMDD/HHMMSS:'.
std::string GetTimestampString();
-// Calculate the offset of a specific pixel in an RGB32 buffer.
-int CalculateRGBOffset(int x, int y, int stride);
-
-// Calculate the offset of a specific pixel in a YV12/YUV420 buffer. Note that
-// the X and Y coordinates must both be even owing to the YV12 buffer layout.
-int CalculateYOffset(int x, int y, int stride);
-int CalculateUVOffset(int x, int y, int stride);
-
-// Convert and scale YUV to RGB32 on a specific rectangle. The source and
-// destination buffers are assumed to contain only |source_buffer_rect| and
-// |dest_buffer_rect| areas correspondingly. The scaling factor is determined
-// as ratio between |dest_size| and |source_size|. The target rectangle
-// |dect_rect| is specified in the destination coordinates.
-//
-// |source_buffer_rect| and |dest_buffer_rect| must fall entirely within
-// the source and destination dimensions, respectively. |dest_rect| must be
-// completely contained within the source and destinations buffers boundaries
-// including the case when scaling is requested.
-//
-// N.B. The top left corner coordinates of YUV buffer should have even X and Y
-// coordinates.
-void ConvertAndScaleYUVToRGB32Rect(
- const uint8* source_yplane,
- const uint8* source_uplane,
- const uint8* source_vplane,
- int source_ystride,
- int source_uvstride,
- const webrtc::DesktopSize& source_size,
- const webrtc::DesktopRect& source_buffer_rect,
- uint8* dest_buffer,
- int dest_stride,
- const webrtc::DesktopSize& dest_size,
- const webrtc::DesktopRect& dest_buffer_rect,
- const webrtc::DesktopRect& dest_rect);
-
int RoundToTwosMultiple(int x);
// Align the sides of the rectangle to multiples of 2 (expanding outwards).
webrtc::DesktopRect AlignRect(const webrtc::DesktopRect& rect);
-// Scales the supplied rectangle from |in_size| coordinates to |out_size|.
-// If the result has non-integer coordinates then the smallest integer-
-// coordinate rectangle that wholly encloses it is returned.
-webrtc::DesktopRect ScaleRect(const webrtc::DesktopRect& rect,
- const webrtc::DesktopSize& in_size,
- const webrtc::DesktopSize& out_size);
-
// Copy content of a rectangle in a RGB32 image.
-void CopyRGB32Rect(const uint8* source_buffer,
+void CopyRGB32Rect(const uint8_t* source_buffer,
int source_stride,
const webrtc::DesktopRect& source_buffer_rect,
- uint8* dest_buffer,
+ uint8_t* dest_buffer,
int dest_stride,
const webrtc::DesktopRect& dest_buffer_rect,
const webrtc::DesktopRect& dest_rect);
diff --git a/remoting/base/util_unittest.cc b/remoting/base/util_unittest.cc
index 42237f7..3f489b8 100644
--- a/remoting/base/util_unittest.cc
+++ b/remoting/base/util_unittest.cc
@@ -6,182 +6,10 @@
#include "remoting/base/util.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/libyuv/include/libyuv/convert_from_argb.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
-static const int kWidth = 32 ;
-static const int kHeight = 24 ;
-static const int kBytesPerPixel = 4;
-static const int kYStride = kWidth;
-static const int kUvStride = kWidth / 2;
-static const int kRgbStride = kWidth * kBytesPerPixel;
-static const uint32 kFillColor = 0xffffff;
-
namespace remoting {
-class YuvToRgbTester {
- public:
- YuvToRgbTester() {
- yuv_buffer_size_ = (kYStride + kUvStride) * kHeight;
- yuv_buffer_.reset(new uint8[yuv_buffer_size_]);
- yplane_ = yuv_buffer_.get();
- uplane_ = yplane_ + (kYStride * kHeight);
- vplane_ = uplane_ + (kUvStride * kHeight / 2);
-
- rgb_buffer_size_ = kWidth * kHeight * kBytesPerPixel;
- rgb_buffer_.reset(new uint8[rgb_buffer_size_]);
-
- ResetYuvBuffer();
- ResetRgbBuffer();
- }
-
- ~YuvToRgbTester() {}
-
- void ResetYuvBuffer() {
- memset(yuv_buffer_.get(), 0, yuv_buffer_size_);
- }
-
- void ResetRgbBuffer() {
- memset(rgb_buffer_.get(), 0, rgb_buffer_size_);
- }
-
- void FillRgbBuffer(const webrtc::DesktopRect& rect) {
- uint32* ptr = reinterpret_cast<uint32*>(
- rgb_buffer_.get() + (rect.top() * kRgbStride) +
- (rect.left() * kBytesPerPixel));
- int width = rect.width();
- for (int height = rect.height(); height > 0; --height) {
- std::fill(ptr, ptr + width, kFillColor);
- ptr += kRgbStride / kBytesPerPixel;
- }
- }
-
- // Check the the desination buffer is filled within expected bounds.
- void CheckRgbBuffer(const webrtc::DesktopRect& rect) {
- uint32* ptr = reinterpret_cast<uint32*>(rgb_buffer_.get());
- for (int y = 0; y < kHeight; ++y) {
- if (y < rect.top() || rect.bottom() <= y) {
- // The whole line should be intact.
- EXPECT_EQ((ptrdiff_t)kWidth,
- std::count(ptr, ptr + kWidth, 0u));
- } else {
- // The space before the painted rectangle should be intact.
- EXPECT_EQ((ptrdiff_t)rect.left(),
- std::count(ptr, ptr + rect.left(), 0u));
-
- // All pixels of the target rectangle should be touched.
- EXPECT_EQ(ptr + rect.right(),
- std::find(ptr + rect.left(), ptr + rect.right(), 0u));
-
- // The space after the painted rectangle should be intact.
- EXPECT_EQ((ptrdiff_t)kWidth - rect.right(),
- std::count(ptr + rect.right(), ptr + kWidth, 0u));
- }
- ptr += kRgbStride / kBytesPerPixel;
- }
- }
-
- void RunTest(const webrtc::DesktopSize dest_size,
- const webrtc::DesktopRect& rect) {
- ASSERT_TRUE(
- DoesRectContain(webrtc::DesktopRect::MakeSize(dest_size), rect));
-
- // Reset buffers.
- ResetYuvBuffer();
- ResetRgbBuffer();
- FillRgbBuffer(rect);
-
- // RGB -> YUV
- libyuv::ARGBToI420(rgb_buffer_.get(),
- kRgbStride,
- yplane_,
- kYStride,
- uplane_,
- kUvStride,
- vplane_,
- kUvStride,
- kWidth,
- kHeight);
-
- // Reset RGB buffer and do opposite conversion.
- ResetRgbBuffer();
- ConvertAndScaleYUVToRGB32Rect(yplane_,
- uplane_,
- vplane_,
- kYStride,
- kUvStride,
- webrtc::DesktopSize(kWidth, kHeight),
- webrtc::DesktopRect::MakeWH(kWidth, kHeight),
- rgb_buffer_.get(),
- kRgbStride,
- dest_size,
- webrtc::DesktopRect::MakeSize(dest_size),
- rect);
-
- // Check if it worked out.
- CheckRgbBuffer(rect);
- }
-
- void TestBasicConversion() {
- // Whole buffer.
- RunTest(webrtc::DesktopSize(kWidth, kHeight),
- webrtc::DesktopRect::MakeWH(kWidth, kHeight));
- }
-
- private:
- size_t yuv_buffer_size_;
- scoped_ptr<uint8[]> yuv_buffer_;
- uint8* yplane_;
- uint8* uplane_;
- uint8* vplane_;
-
- size_t rgb_buffer_size_;
- scoped_ptr<uint8[]> rgb_buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(YuvToRgbTester);
-};
-
-TEST(YuvToRgbTest, BasicConversion) {
- YuvToRgbTester tester;
- tester.TestBasicConversion();
-}
-
-TEST(YuvToRgbTest, Clipping) {
- YuvToRgbTester tester;
-
- webrtc::DesktopSize dest_size = webrtc::DesktopSize(kWidth, kHeight);
- webrtc::DesktopRect rect =
- webrtc::DesktopRect::MakeLTRB(0, 0, kWidth - 1, kHeight - 1);
- // TODO(fbarchard): Allow top/left clipping to odd boundary.
- for (int i = 0; i < 16; ++i) {
- webrtc::DesktopRect dest_rect = webrtc::DesktopRect::MakeLTRB(
- rect.left() + ((i & 1) ? 2 : 0),
- rect.top() + ((i & 2) ? 2 : 0),
- rect.right() - ((i & 4) ? 1 : 0),
- rect.bottom() - ((i & 8) ? 1 : 0));
-
- tester.RunTest(dest_size, dest_rect);
- }
-}
-
-TEST(YuvToRgbTest, ClippingAndScaling) {
- YuvToRgbTester tester;
-
- webrtc::DesktopSize dest_size =
- webrtc::DesktopSize(kWidth - 10, kHeight - 10);
- webrtc::DesktopRect rect =
- webrtc::DesktopRect::MakeLTRB(6, 6, kWidth - 11, kHeight - 11);
- for (int i = 0; i < 16; ++i) {
- webrtc::DesktopRect dest_rect = webrtc::DesktopRect::MakeLTRB(
- rect.left() + ((i & 1) ? 2 : 0),
- rect.top() + ((i & 2) ? 2 : 0),
- rect.right() - ((i & 4) ? 1 : 0),
- rect.bottom() - ((i & 8) ? 1 : 0));
-
- tester.RunTest(dest_size, dest_rect);
- }
-}
-
TEST(ReplaceLfByCrLfTest, Basic) {
EXPECT_EQ("ab", ReplaceLfByCrLf("ab"));
EXPECT_EQ("\r\nab", ReplaceLfByCrLf("\nab"));
diff --git a/remoting/client/jni/chromoting_jni_runtime.cc b/remoting/client/jni/chromoting_jni_runtime.cc
index 18884a0..c532e74 100644
--- a/remoting/client/jni/chromoting_jni_runtime.cc
+++ b/remoting/client/jni/chromoting_jni_runtime.cc
@@ -16,7 +16,6 @@
#include "base/synchronization/waitable_event.h"
#include "google_apis/google_api_keys.h"
#include "jni/JniInterface_jni.h"
-#include "media/base/yuv_convert.h"
#include "remoting/base/url_request_context_getter.h"
using base::android::ConvertJavaStringToUTF8;
@@ -198,9 +197,6 @@ ChromotingJniRuntime::ChromotingJniRuntime() {
url_requester_ =
new URLRequestContextGetter(network_task_runner_, network_task_runner_);
-
- // Allows later decoding of video frames.
- media::InitializeCPUSpecificYUVConversions();
}
ChromotingJniRuntime::~ChromotingJniRuntime() {
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index c0ad2d3..efe2588 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -26,7 +26,6 @@
#include "base/values.h"
#include "crypto/random.h"
#include "jingle/glue/thread_wrapper.h"
-#include "media/base/yuv_convert.h"
#include "net/socket/ssl_server_socket.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/dev/url_util_dev.h"
@@ -127,7 +126,6 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
new base::ThreadTaskRunnerHandle(plugin_task_runner_));
thread_wrapper_ =
jingle_glue::JingleThreadWrapper::WrapTaskRunner(plugin_task_runner_);
- media::InitializeCPUSpecificYUVConversions();
// Register a global log handler.
ChromotingInstance::RegisterLogMessageHandler();
diff --git a/remoting/codec/DEPS b/remoting/codec/DEPS
index 1577090..91cf8b1 100644
--- a/remoting/codec/DEPS
+++ b/remoting/codec/DEPS
@@ -1,5 +1,6 @@
include_rules = [
"+remoting/protocol",
+ "+media/base",
"+google/protobuf",
"+third_party/opus",
diff --git a/remoting/codec/video_encoder_vpx_unittest.cc b/remoting/codec/video_encoder_vpx_unittest.cc
index 3914a0d..a847f03 100644
--- a/remoting/codec/video_encoder_vpx_unittest.cc
+++ b/remoting/codec/video_encoder_vpx_unittest.cc
@@ -149,7 +149,7 @@ TEST(VideoEncoderVpxTest, Vp9SizeChangeNoCrash) {
}
// Test that the DPI information is correctly propagated from the
-// media::ScreenCaptureData to the VideoPacket.
+// webrtc::DesktopFrame to the VideoPacket.
TEST(VideoEncoderVpxTest, DpiPropagation) {
webrtc::DesktopSize frame_size(32, 32);
diff --git a/remoting/host/fake_desktop_capturer.h b/remoting/host/fake_desktop_capturer.h
index 7ff8ca5..11a0150 100644
--- a/remoting/host/fake_desktop_capturer.h
+++ b/remoting/host/fake_desktop_capturer.h
@@ -7,7 +7,6 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
-#include "media/base/media_export.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "third_party/webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc
index 65c20c5..aedb4c8 100644
--- a/remoting/host/it2me/it2me_native_messaging_host.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host.cc
@@ -16,7 +16,6 @@
#include "base/strings/stringize_macros.h"
#include "base/threading/thread.h"
#include "base/values.h"
-#include "media/base/media.h"
#include "net/base/net_util.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/service_urls.h"
@@ -50,9 +49,6 @@ It2MeNativeMessagingHost::It2MeNativeMessagingHost(
weak_factory_(this) {
weak_ptr_ = weak_factory_.GetWeakPtr();
- // Ensures that media library and specific CPU features are initialized.
- media::InitializeMediaLibrary();
-
const ServiceUrls* service_urls = ServiceUrls::GetInstance();
const bool xmpp_server_valid =
net::ParseHostAndPort(service_urls->xmpp_server_address(),
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 134e0b9..6e9dcb7 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -23,7 +23,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_listener.h"
-#include "media/base/media.h"
#include "net/base/net_util.h"
#include "net/base/network_change_notifier.h"
#include "net/socket/client_socket_factory.h"
@@ -1626,9 +1625,6 @@ int HostProcessMain() {
// single-threaded.
net::EnableSSLServerSockets();
- // Ensures that media library and specific CPU features are initialized.
- media::InitializeMediaLibrary();
-
// Create the main message loop and start helper threads.
base::MessageLoopForUI message_loop;
scoped_ptr<ChromotingHostContext> context =
diff --git a/remoting/remoting_nacl.gyp b/remoting/remoting_nacl.gyp
index be51588..ab27674 100644
--- a/remoting/remoting_nacl.gyp
+++ b/remoting/remoting_nacl.gyp
@@ -157,7 +157,6 @@
'>(tc_lib_dir_pnacl_newlib)/libicuuc_nacl.a',
'>(tc_lib_dir_pnacl_newlib)/libjingle_nacl.a',
'>(tc_lib_dir_pnacl_newlib)/libjingle_p2p_constants_nacl.a',
- '>(tc_lib_dir_pnacl_newlib)/libmedia_yuv_nacl.a',
'>(tc_lib_dir_pnacl_newlib)/libmodp_b64_nacl.a',
'>(tc_lib_dir_pnacl_newlib)/libboringssl_nacl.a',
'>(tc_lib_dir_pnacl_newlib)/libopus_nacl.a',
@@ -179,7 +178,6 @@
'../base/base_nacl.gyp:base_nacl',
'../crypto/crypto_nacl.gyp:crypto_nacl',
'../jingle/jingle_nacl.gyp:jingle_glue_nacl',
- '../media/media_nacl.gyp:media_yuv_nacl',
'../native_client_sdk/native_client_sdk_untrusted.gyp:nacl_io_untrusted',
'../net/net_nacl.gyp:net_nacl',
'../ppapi/native_client/native_client.gyp:ppapi_lib',
@@ -206,7 +204,6 @@
# Chromium libraries.
'-ljingle_glue_nacl',
- '-lmedia_yuv_nacl',
'-lnet_nacl',
'-lcrypto_nacl',
'-lbase_i18n_nacl',
diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h
index b0957e9..9271570 100644
--- a/remoting/test/test_video_renderer.h
+++ b/remoting/test/test_video_renderer.h
@@ -8,7 +8,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
-#include "media/base/video_frame.h"
#include "remoting/client/video_renderer.h"
#include "remoting/protocol/session_config.h"
#include "remoting/protocol/video_stub.h"
diff --git a/remoting/test/test_video_renderer_unittest.cc b/remoting/test/test_video_renderer_unittest.cc
index ccfffe6..54dc761 100644
--- a/remoting/test/test_video_renderer_unittest.cc
+++ b/remoting/test/test_video_renderer_unittest.cc
@@ -11,7 +11,6 @@
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
#include "base/timer/timer.h"
-#include "media/base/video_frame.h"
#include "remoting/codec/video_encoder.h"
#include "remoting/codec/video_encoder_verbatim.h"
#include "remoting/codec/video_encoder_vpx.h"