diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-19 22:56:53 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-19 22:56:53 +0000 |
commit | 1ee62bbac06097c162f0fbcb47e28edc714c9a5d (patch) | |
tree | 1fd3677cc23344d33b9776fc8eeb3442e0a4b129 /remoting/host | |
parent | 227b06711ccc640bb61568ee81a452744ece6f94 (diff) | |
download | chromium_src-1ee62bbac06097c162f0fbcb47e28edc714c9a5d.zip chromium_src-1ee62bbac06097c162f0fbcb47e28edc714c9a5d.tar.gz chromium_src-1ee62bbac06097c162f0fbcb47e28edc714c9a5d.tar.bz2 |
Fix up mac capturer
Make it so that it sets the pixel type correctly, and initializes the video buffers properly.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/5159004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/capturer_mac.cc | 2 | ||||
-rw-r--r-- | remoting/host/capturer_mac_unittest.cc | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/remoting/host/capturer_mac.cc b/remoting/host/capturer_mac.cc index 2ed4c65..7b5d942 100644 --- a/remoting/host/capturer_mac.cc +++ b/remoting/host/capturer_mac.cc @@ -25,6 +25,7 @@ CapturerMac::CapturerMac(MessageLoop* message_loop) err = CGDisplayRegisterReconfigurationCallback( CapturerMac::DisplaysReconfiguredCallback, this); DCHECK_EQ(err, kCGErrorSuccess); + ScreenConfigurationChanged(); } CapturerMac::~CapturerMac() { @@ -48,6 +49,7 @@ void CapturerMac::ScreenConfigurationChanged() { width_ = CGDisplayPixelsWide(mainDevice); height_ = CGDisplayPixelsHigh(mainDevice); + pixel_format_ = media::VideoFrame::RGB32; bytes_per_row_ = width_ * sizeof(uint32_t); size_t buffer_size = height() * bytes_per_row_; for (int i = 0; i < kNumBuffers; ++i) { diff --git a/remoting/host/capturer_mac_unittest.cc b/remoting/host/capturer_mac_unittest.cc index f1f0d6c..02db8da 100644 --- a/remoting/host/capturer_mac_unittest.cc +++ b/remoting/host/capturer_mac_unittest.cc @@ -18,7 +18,6 @@ class CapturerMacTest : public testing::Test { protected: virtual void SetUp() { capturer_.reset(new CapturerMac(NULL)); - capturer_->ScreenConfigurationChanged(); rects_.insert(gfx::Rect(0, 0, 10, 10)); } |