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

Unified Diff: remoting/base/decoder_row_based.h

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 10 years, 1 month 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_row_based.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder_row_based.h
diff --git a/remoting/base/decoder_row_based.h b/remoting/base/decoder_row_based.h
index 2deb897dd1bdc5a4ff97e8af1f290651437f5ab7..da05c05c086be44b0e4548ee9a50be2c39dd80a8 100644
--- a/remoting/base/decoder_row_based.h
+++ b/remoting/base/decoder_row_based.h
@@ -19,12 +19,12 @@ class DecoderRowBased : public Decoder {
static DecoderRowBased* CreateVerbatimDecoder();
// Decoder implementation.
- virtual void Reset();
virtual bool IsReadyForData();
- virtual void Initialize(scoped_refptr<media::VideoFrame> frame,
- const gfx::Rect& clip, int bytes_per_src_pixel);
- virtual void DecodeBytes(const std::string& encoded_bytes);
- virtual VideoPacketFormat::Encoding Encoding() { return encoding_; }
+ virtual void Initialize(scoped_refptr<media::VideoFrame> frame);
+ virtual DecodeResult DecodePacket(const VideoPacket* packet);
+ virtual void GetUpdatedRects(UpdatedRects* rects);
+ virtual void Reset();
+ virtual VideoPacketFormat::Encoding Encoding();
// TODO(hclam): Should make this into the Decoder interface.
// TODO(ajwong): Before putting into the interface, we should decide if the
@@ -32,15 +32,20 @@ class DecoderRowBased : public Decoder {
void set_reverse_rows(bool reverse) { reverse_rows_ = reverse; }
private:
- DecoderRowBased(Decompressor* decompressor,
- VideoPacketFormat::Encoding encoding);
-
enum State {
kUninitialized,
kReady,
+ kProcessing,
+ kDone,
kError,
};
+ DecoderRowBased(Decompressor* decompressor,
+ VideoPacketFormat::Encoding encoding);
+
+ // Helper method. Called from DecodePacket to updated state of the decoder.
+ void UpdateStateForPacket(const VideoPacket* packet);
+
// The internal state of the decoder.
State state_;
@@ -56,9 +61,6 @@ class DecoderRowBased : public Decoder {
// The encoding of the incoming stream.
VideoPacketFormat::Encoding encoding_;
- // Number of bytes per pixel from source stream.
- int bytes_per_src_pixel_;
-
// The position in the row that we are updating.
int row_pos_;
« no previous file with comments | « remoting/base/decoder.h ('k') | remoting/base/decoder_row_based.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698