| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_ | 5 #ifndef REMOTING_CLIENT_FRAME_CONSUMER_H_ |
| 6 #define REMOTING_CLIENT_FRAME_CONSUMER_H_ | 6 #define REMOTING_CLIENT_FRAME_CONSUMER_H_ |
| 7 | 7 |
| 8 #include "remoting/base/decoder.h" // For UpdatedRects | 8 #include "remoting/base/decoder.h" // For UpdatedRects |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 | 11 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 33 // All frames retrieved via the AllocateFrame call must be released by a | 33 // All frames retrieved via the AllocateFrame call must be released by a |
| 34 // corresponding call ReleaseFrame(scoped_refptr<VideoFrame>* frame_out. | 34 // corresponding call ReleaseFrame(scoped_refptr<VideoFrame>* frame_out. |
| 35 virtual void AllocateFrame(media::VideoFrame::Format format, | 35 virtual void AllocateFrame(media::VideoFrame::Format format, |
| 36 const SkISize& size, | 36 const SkISize& size, |
| 37 scoped_refptr<media::VideoFrame>* frame_out, | 37 scoped_refptr<media::VideoFrame>* frame_out, |
| 38 const base::Closure& done) = 0; | 38 const base::Closure& done) = 0; |
| 39 | 39 |
| 40 virtual void ReleaseFrame(media::VideoFrame* frame) = 0; | 40 virtual void ReleaseFrame(media::VideoFrame* frame) = 0; |
| 41 | 41 |
| 42 // OnPartialFrameOutput() is called every time at least one rectangle of | 42 // OnPartialFrameOutput() is called every time at least one rectangle of |
| 43 // output is produced. The |frame| is guaranteed to have valid data for all | 43 // output is produced. The |frame| is guaranteed to have valid data for every |
| 44 // of |region|. | 44 // region included in the |rects| list. |
| 45 // | 45 // |
| 46 // Both |frame| and |region| are guaranteed to be valid until the |done| | 46 // Both |frame| and |rects| are guaranteed to be valid until the |done| |
| 47 // callback is invoked. | 47 // callback is invoked. |
| 48 virtual void OnPartialFrameOutput(media::VideoFrame* frame, | 48 virtual void OnPartialFrameOutput(media::VideoFrame* frame, |
| 49 SkRegion* region, | 49 RectVector* rects, |
| 50 const base::Closure& done) = 0; | 50 const base::Closure& done) = 0; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); | 53 DISALLOW_COPY_AND_ASSIGN(FrameConsumer); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 } // namespace remoting | 56 } // namespace remoting |
| 57 | 57 |
| 58 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_ | 58 #endif // REMOTING_CLIENT_FRAME_CONSUMER_H_ |
| OLD | NEW |