Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Unified Diff: remoting/base/decoder_verbatim.cc

Issue 3124005: Move UpdateStreamEncoding value into the BeginUpdateStreamMessage since we... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/decoder.h ('k') | remoting/base/decoder_zlib.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder_verbatim.cc
===================================================================
--- remoting/base/decoder_verbatim.cc (revision 57131)
+++ remoting/base/decoder_verbatim.cc (working copy)
@@ -17,6 +17,7 @@
bytes_per_pixel_(0),
updated_rects_(NULL),
reverse_rows_(true) {
+ encoding_ = EncodingNone;
}
bool DecoderVerbatim::BeginDecode(scoped_refptr<media::VideoFrame> frame,
@@ -27,6 +28,7 @@
DCHECK(!decode_done_.get());
DCHECK(!updated_rects_);
DCHECK_EQ(kWaitingForBeginRect, state_);
+ DCHECK(!started_);
partial_decode_done_.reset(partial_decode_done);
decode_done_.reset(decode_done);
@@ -35,12 +37,15 @@
// TODO(hclam): Check if we can accept the color format of the video frame
// and the codec.
frame_ = frame;
+
+ started_ = true;
return true;
}
bool DecoderVerbatim::PartialDecode(HostMessage* message) {
scoped_ptr<HostMessage> msg_deleter(message);
DCHECK(message->has_update_stream_packet());
+ DCHECK(started_);
bool ret = true;
if (message->update_stream_packet().has_begin_rect())
@@ -54,12 +59,15 @@
void DecoderVerbatim::EndDecode() {
DCHECK_EQ(kWaitingForBeginRect, state_);
+ DCHECK(started_);
+
decode_done_->Run();
partial_decode_done_.reset();
decode_done_.reset();
frame_ = NULL;
updated_rects_ = NULL;
+ started_ = false;
}
bool DecoderVerbatim::HandleBeginRect(HostMessage* message) {
« no previous file with comments | « remoting/base/decoder.h ('k') | remoting/base/decoder_zlib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698