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_vp8.h

Issue 4255001: Revert 64672 - Cleanups in the video encoding decoding code. Reenable VP8.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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_row_based.cc ('k') | remoting/base/decoder_vp8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder_vp8.h
===================================================================
--- remoting/base/decoder_vp8.h (revision 64676)
+++ remoting/base/decoder_vp8.h (working copy)
@@ -14,34 +14,37 @@
class DecoderVp8 : public Decoder {
public:
DecoderVp8();
- virtual ~DecoderVp8();
+ ~DecoderVp8();
// Decoder implementations.
- virtual void Initialize(scoped_refptr<media::VideoFrame> frame,
- const gfx::Rect& clip, int bytes_per_src_pixel);
+ virtual bool BeginDecode(scoped_refptr<media::VideoFrame> frame,
+ UpdatedRects* update_rects,
+ Task* partial_decode_done,
+ Task* decode_done);
+ virtual bool PartialDecode(ChromotingHostMessage* message);
+ virtual void EndDecode();
- virtual void Reset();
-
- // Feeds more data into the decoder.
- virtual void DecodeBytes(const std::string& encoded_bytes);
-
- // Returns true if decoder is ready to accept data via ProcessRectangleData.
- virtual bool IsReadyForData();
-
- virtual VideoPacketFormat::Encoding Encoding();
-
private:
- enum State {
- kUninitialized,
- kReady,
- kError,
- };
+ bool HandleBeginRect(ChromotingHostMessage* message);
+ bool HandleRectData(ChromotingHostMessage* message);
+ bool HandleEndRect(ChromotingHostMessage* message);
// The internal state of the decoder.
State state_;
+ // Keeps track of the updating rect.
+ int rect_x_;
+ int rect_y_;
+ int rect_width_;
+ int rect_height_;
+
+ // Tasks to call when decode is done.
+ scoped_ptr<Task> partial_decode_done_;
+ scoped_ptr<Task> decode_done_;
+
// The video frame to write to.
scoped_refptr<media::VideoFrame> frame_;
+ UpdatedRects* updated_rects_;
vpx_codec_ctx_t* codec_;
« no previous file with comments | « remoting/base/decoder_row_based.cc ('k') | remoting/base/decoder_vp8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698