| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void VideoTrackRenderers::RemoveRenderer(VideoRendererInterface* renderer) { | 47 void VideoTrackRenderers::RemoveRenderer(VideoRendererInterface* renderer) { |
| 48 rtc::CritScope cs(&critical_section_); | 48 rtc::CritScope cs(&critical_section_); |
| 49 renderers_.erase(renderer); | 49 renderers_.erase(renderer); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void VideoTrackRenderers::SetEnabled(bool enable) { | 52 void VideoTrackRenderers::SetEnabled(bool enable) { |
| 53 rtc::CritScope cs(&critical_section_); | 53 rtc::CritScope cs(&critical_section_); |
| 54 enabled_ = enable; | 54 enabled_ = enable; |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool VideoTrackRenderers::SetSize(int width, int height, int reserved) { | |
| 58 return true; | |
| 59 } | |
| 60 | |
| 61 bool VideoTrackRenderers::RenderFrame(const cricket::VideoFrame* frame) { | 57 bool VideoTrackRenderers::RenderFrame(const cricket::VideoFrame* frame) { |
| 62 rtc::CritScope cs(&critical_section_); | 58 rtc::CritScope cs(&critical_section_); |
| 63 if (!enabled_) { | 59 if (!enabled_) { |
| 64 return true; | 60 return true; |
| 65 } | 61 } |
| 66 for (VideoRendererInterface* renderer : renderers_) { | 62 for (VideoRendererInterface* renderer : renderers_) { |
| 67 renderer->RenderFrame(frame); | 63 renderer->RenderFrame(frame); |
| 68 } | 64 } |
| 69 return true; | 65 return true; |
| 70 } | 66 } |
| 71 | 67 |
| 72 } // namespace webrtc | 68 } // namespace webrtc |
| OLD | NEW |