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 21 matching lines...) Expand all Loading... | |
32 #include <string> | 32 #include <string> |
33 #endif | 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 { |
nisse-webrtc
2016/01/11 08:30:52
Except for the RenderFrame return value, and the p
tommi
2016/01/11 10:17:42
keep the webrtc:: one. It's a part of the public i
| |
43 public: | 43 public: |
44 virtual ~VideoRenderer() {} | 44 virtual ~VideoRenderer() {} |
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 | |
47 // rendered. webrtc::ExternalRenderer's FrameSizeChange will invoke this when | |
48 // it's called or later when a VideoRenderer is attached. | |
49 virtual bool SetSize(int width, int height, int reserved) = 0; | |
50 // Called when a new frame is available for display. | 45 // Called when a new frame is available for display. |
51 virtual bool RenderFrame(const VideoFrame *frame) = 0; | 46 virtual bool RenderFrame(const VideoFrame *frame) = 0; |
52 | 47 |
53 #if !defined(NDEBUG) | 48 #if !defined(NDEBUG) |
54 // Allow renderer dumping out rendered frames. | 49 // Allow renderer dumping out rendered frames. |
55 virtual bool SetDumpPath(const std::string &path) { return true; } | 50 virtual bool SetDumpPath(const std::string &path) { return true; } |
56 #endif | 51 #endif |
57 }; | 52 }; |
58 | 53 |
59 } // namespace cricket | 54 } // namespace cricket |
60 | 55 |
61 #endif // TALK_MEDIA_BASE_VIDEORENDERER_H_ | 56 #endif // TALK_MEDIA_BASE_VIDEORENDERER_H_ |
OLD | NEW |