Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MEDIA_BASE_VIDEO_RENDERER_SINK_H_ | 5 #ifndef MEDIA_BASE_VIDEO_RENDERER_SINK_H_ |
| 6 #define MEDIA_BASE_VIDEO_RENDERER_SINK_H_ | 6 #define MEDIA_BASE_VIDEO_RENDERER_SINK_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 // |callback| must be ready to receive callbacks before calling Start(). | 46 // |callback| must be ready to receive callbacks before calling Start(). |
| 47 virtual void Start(RenderCallback* callback) = 0; | 47 virtual void Start(RenderCallback* callback) = 0; |
| 48 | 48 |
| 49 // Stops video rendering, waits for any outstanding calls to the |callback| | 49 // Stops video rendering, waits for any outstanding calls to the |callback| |
| 50 // given to Start() to complete before returning. No new calls to |callback| | 50 // given to Start() to complete before returning. No new calls to |callback| |
| 51 // will be issued after this method returns. May be used as a means of power | 51 // will be issued after this method returns. May be used as a means of power |
| 52 // conservation by the sink implementation, so clients should call this | 52 // conservation by the sink implementation, so clients should call this |
| 53 // liberally if no new frames are expected. | 53 // liberally if no new frames are expected. |
| 54 virtual void Stop() = 0; | 54 virtual void Stop() = 0; |
| 55 | 55 |
| 56 // Instead of using a callback driven rendering path, allow clients to paint | 56 // Instead of using a callback driven rendering path, allow clients to paint a |
| 57 // frames as they see fit without regard for the compositor. | 57 // single frame as they see fit without regard for the compositor; this is |
| 58 // TODO(dalecurtis): This should be nuked once experiments show the new path | 58 // useful for painting poster images or hole frames without having to issue a |
| 59 // is amazing and the old path is not! http://crbug.com/439548 | 59 // Start() -> Render() -> Stop(). |
|
xhwang
2016/05/19 22:47:28
nit: Can we call both PSF and Start/Render/Stop?
DaleCurtis
2016/05/20 18:18:39
Yes, I've updated the docs.
| |
| 60 virtual void PaintFrameUsingOldRenderingPath( | 60 virtual void PaintSingleFrame(const scoped_refptr<VideoFrame>& frame) = 0; |
| 61 const scoped_refptr<VideoFrame>& frame) = 0; | |
| 62 | |
| 63 // TODO(dalecurtis): We may need OnSizeChanged() and OnOpacityChanged() | |
| 64 // methods on this interface if background rendering is handled inside of | |
| 65 // the media layer instead of by VideoFrameCompositor. | |
| 66 | 61 |
| 67 virtual ~VideoRendererSink() {} | 62 virtual ~VideoRendererSink() {} |
| 68 }; | 63 }; |
| 69 | 64 |
| 70 } // namespace media | 65 } // namespace media |
| 71 | 66 |
| 72 #endif // MEDIA_BASE_VIDEO_RENDERER_SINK_H_ | 67 #endif // MEDIA_BASE_VIDEO_RENDERER_SINK_H_ |
| OLD | NEW |