| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef TALK_MEDIA_BASE_VIDEORENDERER_H_ | 28 #ifndef TALK_MEDIA_BASE_VIDEORENDERER_H_ |
| 29 #define TALK_MEDIA_BASE_VIDEORENDERER_H_ | 29 #define TALK_MEDIA_BASE_VIDEORENDERER_H_ |
| 30 | 30 |
| 31 #ifdef _DEBUG | 31 #if !defined(NDEBUG) |
| 32 #include <string> | 32 #include <string> |
| 33 #endif // _DEBUG | 33 #endif |
| 34 | 34 |
| 35 #include "webrtc/base/sigslot.h" | 35 #include "webrtc/base/sigslot.h" |
| 36 | 36 |
| 37 namespace cricket { | 37 namespace cricket { |
| 38 | 38 |
| 39 class VideoFrame; | 39 class VideoFrame; |
| 40 | 40 |
| 41 // Abstract interface for rendering VideoFrames. | 41 // Abstract interface for rendering VideoFrames. |
| 42 class VideoRenderer { | 42 class VideoRenderer { |
| 43 public: | 43 public: |
| 44 virtual ~VideoRenderer() {} | 44 virtual ~VideoRenderer() {} |
| 45 // Called when the video has changed size. This is also used as an | 45 // Called when the video has changed size. This is also used as an |
| 46 // initialization method to set the UI size before any video frame | 46 // initialization method to set the UI size before any video frame |
| 47 // rendered. webrtc::ExternalRenderer's FrameSizeChange will invoke this when | 47 // rendered. webrtc::ExternalRenderer's FrameSizeChange will invoke this when |
| 48 // it's called or later when a VideoRenderer is attached. | 48 // it's called or later when a VideoRenderer is attached. |
| 49 virtual bool SetSize(int width, int height, int reserved) = 0; | 49 virtual bool SetSize(int width, int height, int reserved) = 0; |
| 50 // Called when a new frame is available for display. | 50 // Called when a new frame is available for display. |
| 51 virtual bool RenderFrame(const VideoFrame *frame) = 0; | 51 virtual bool RenderFrame(const VideoFrame *frame) = 0; |
| 52 | 52 |
| 53 #ifdef _DEBUG | 53 #if !defined(NDEBUG) |
| 54 // Allow renderer dumping out rendered frames. | 54 // Allow renderer dumping out rendered frames. |
| 55 virtual bool SetDumpPath(const std::string &path) { return true; } | 55 virtual bool SetDumpPath(const std::string &path) { return true; } |
| 56 #endif // _DEBUG | 56 #endif |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace cricket | 59 } // namespace cricket |
| 60 | 60 |
| 61 #endif // TALK_MEDIA_BASE_VIDEORENDERER_H_ | 61 #endif // TALK_MEDIA_BASE_VIDEORENDERER_H_ |
| OLD | NEW |