summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 01:49:50 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 01:49:50 +0000
commitd656b8af5feef13c5d8550e27261f945c563f676 (patch)
tree01df3b09e3eaf93e546d4cd41c8440b1f359d190 /remoting
parentd04ab078962e964ef666236a67459265a2ceef15 (diff)
downloadchromium_src-d656b8af5feef13c5d8550e27261f945c563f676.zip
chromium_src-d656b8af5feef13c5d8550e27261f945c563f676.tar.gz
chromium_src-d656b8af5feef13c5d8550e27261f945c563f676.tar.bz2
[chromoting] Use zlib as the default encoder and decoder
Use EncoderZlib / DecoderZlib as default encoder and decoder. BUG=50246 Review URL: http://codereview.chromium.org/3034035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/decoder_zlib.cc13
-rw-r--r--remoting/client/plugin/pepper_view.cc4
-rw-r--r--remoting/host/simple_host_process.cc4
-rw-r--r--remoting/remoting.gyp1
4 files changed, 12 insertions, 10 deletions
diff --git a/remoting/base/decoder_zlib.cc b/remoting/base/decoder_zlib.cc
index 59f9852..3e23f95 100644
--- a/remoting/base/decoder_zlib.cc
+++ b/remoting/base/decoder_zlib.cc
@@ -22,15 +22,18 @@ DecoderZlib::DecoderZlib()
}
bool DecoderZlib::BeginDecode(scoped_refptr<media::VideoFrame> frame,
- UpdatedRects* updated_rects,
- Task* partial_decode_done,
- Task* decode_done) {
+ UpdatedRects* updated_rects,
+ Task* partial_decode_done,
+ Task* decode_done) {
DCHECK(!partial_decode_done_.get());
DCHECK(!decode_done_.get());
DCHECK(!updated_rects_);
DCHECK_EQ(kWaitingForBeginRect, state_);
- CHECK(static_cast<PixelFormat>(frame->format()) == PixelFormatRgb32)
- << "Only RGB32 is supported";
+
+ if (static_cast<PixelFormat>(frame->format()) != PixelFormatRgb32) {
+ LOG(INFO) << "DecoderZlib only supports RGB32.";
+ return false;
+ }
partial_decode_done_.reset(partial_decode_done);
decode_done_.reset(decode_done);
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index 5b96226..c2f3538 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -5,7 +5,7 @@
#include "remoting/client/plugin/pepper_view.h"
#include "base/message_loop.h"
-#include "remoting/base/decoder_verbatim.h"
+#include "remoting/base/decoder_zlib.h"
#include "remoting/client/plugin/chromoting_plugin.h"
#include "remoting/client/plugin/pepper_util.h"
#include "third_party/ppapi/cpp/device_context_2d.h"
@@ -150,7 +150,7 @@ void PepperView::HandleBeginUpdateStream(HostMessage* msg) {
// TODO(hclam): Use the information from the message to create the decoder.
// We lazily construct the decoder.
if (!decoder_.get()) {
- decoder_.reset(new DecoderVerbatim());
+ decoder_.reset(new DecoderZlib());
}
if (!frame_) {
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index 1c89fa3..7f0b6bd 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -26,7 +26,7 @@
#include "base/nss_util.h"
#include "base/scoped_nsautorelease_pool.h"
#include "base/thread.h"
-#include "remoting/base/encoder_verbatim.h"
+#include "remoting/base/encoder_zlib.h"
#include "remoting/host/capturer_fake.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/chromoting_host_context.h"
@@ -84,7 +84,7 @@ int main(int argc, char** argv) {
capturer.reset(new remoting::CapturerMac());
executor.reset(new remoting::EventExecutorMac());
#endif
- encoder.reset(new remoting::EncoderVerbatim());
+ encoder.reset(new remoting::EncoderZlib());
// Check the argument to see if we should use a fake capturer and encoder.
bool fake = cmd_line->HasSwitch(kFakeSwitchName);
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index a0f3ea1..10dccf7 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -74,7 +74,6 @@
'chromoting_client',
'chromoting_jingle_glue',
'../third_party/ppapi/ppapi.gyp:ppapi_cpp_objects',
- '../third_party/zlib/zlib.gyp:zlib',
],
'sources': [
'client/plugin/chromoting_plugin.cc',