diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-01 23:02:41 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-01 23:02:41 +0000 |
commit | f2333df090cf3f00846d2ce3ffe41119718d3cc8 (patch) | |
tree | f0c381736c9e123e33a3289a06689028268be1bf /remoting/host/session_manager_unittest.cc | |
parent | c64eb4096d30f3018ccd75d076fb90304f0143b7 (diff) | |
download | chromium_src-f2333df090cf3f00846d2ce3ffe41119718d3cc8.zip chromium_src-f2333df090cf3f00846d2ce3ffe41119718d3cc8.tar.gz chromium_src-f2333df090cf3f00846d2ce3ffe41119718d3cc8.tar.bz2 |
Revert 64672 - Cleanups in the video encoding decoding code. Reenable VP8.
1. Moved video-related protobuf messages from event.proto to video.proto. Removed those that we don't need anymore
2. Fixed naming for enums and some types.
3. Reenabled VP8.
4. Proper RGB-YUV converter for VP8 encoder.
5. Changed the capturer_fake to show more meaningful picture.
BUG=57374
TEST=unittests
Review URL: http://codereview.chromium.org/4136010
TBR=sergeyu@chromium.org
Review URL: http://codereview.chromium.org/4255001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64677 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/session_manager_unittest.cc')
-rw-r--r-- | remoting/host/session_manager_unittest.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/remoting/host/session_manager_unittest.cc b/remoting/host/session_manager_unittest.cc index f3870e2..9aa34d8 100644 --- a/remoting/host/session_manager_unittest.cc +++ b/remoting/host/session_manager_unittest.cc @@ -19,9 +19,8 @@ namespace remoting { static const int kWidth = 640; static const int kHeight = 480; -static const PixelFormat kFormat = PIXEL_FORMAT_RGB32; -static const VideoPacketFormat::Encoding kEncoding = - VideoPacketFormat::ENCODING_VERBATIM; +static const PixelFormat kFormat = PixelFormatRgb32; +static const UpdateStreamEncoding kEncoding = EncodingNone; class SessionManagerTest : public testing::Test { public: @@ -65,7 +64,10 @@ ACTION_P2(RunCallback, rects, data) { } ACTION_P(FinishEncode, msg) { - arg2->Run(msg); + Encoder::EncodingState state = (Encoder::EncodingStarting | + Encoder::EncodingInProgress | + Encoder::EncodingEnded); + arg2->Run(msg, state); delete arg2; } @@ -96,12 +98,14 @@ TEST_F(SessionManagerTest, DISABLED_OneRecordCycle) { .WillOnce(RunCallback(update_rects, data)); // Expect the encoder be called. - VideoPacket* packet = new VideoPacket(); + ChromotingHostMessage* msg = new ChromotingHostMessage(); EXPECT_CALL(*encoder_, Encode(data, false, NotNull())) - .WillOnce(FinishEncode(packet)); + .WillOnce(FinishEncode(msg)); // Expect the client be notified. - EXPECT_CALL(*client_, SendVideoPacket(_)); + EXPECT_CALL(*client_, SendBeginUpdateStreamMessage()); + EXPECT_CALL(*client_, SendUpdateStreamPacketMessage(_)); + EXPECT_CALL(*client_, SendEndUpdateStreamMessage()); EXPECT_CALL(*client_, GetPendingUpdateStreamMessages()) .Times(AtLeast(0)) .WillRepeatedly(Return(0)); |