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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 class FrameInputWrapper : public cricket::VideoRenderer { | 297 class FrameInputWrapper : public cricket::VideoRenderer { |
298 public: | 298 public: |
299 explicit FrameInputWrapper(cricket::VideoCapturer* capturer) | 299 explicit FrameInputWrapper(cricket::VideoCapturer* capturer) |
300 : capturer_(capturer) { | 300 : capturer_(capturer) { |
301 ASSERT(capturer_ != NULL); | 301 ASSERT(capturer_ != NULL); |
302 } | 302 } |
303 | 303 |
304 virtual ~FrameInputWrapper() {} | 304 virtual ~FrameInputWrapper() {} |
305 | 305 |
306 // VideoRenderer implementation. | 306 // VideoRenderer implementation. |
307 bool SetSize(int width, int height, int reserved) override { return true; } | |
308 | |
309 bool RenderFrame(const cricket::VideoFrame* frame) override { | 307 bool RenderFrame(const cricket::VideoFrame* frame) override { |
310 if (!capturer_->IsRunning()) { | 308 if (!capturer_->IsRunning()) { |
311 return true; | 309 return true; |
312 } | 310 } |
313 | 311 |
314 // This signal will be made on media engine render thread. The clients | 312 // This signal will be made on media engine render thread. The clients |
315 // of this signal should have no assumptions on what thread this signal | 313 // of this signal should have no assumptions on what thread this signal |
316 // come from. | 314 // come from. |
317 capturer_->SignalVideoFrame(capturer_, frame); | 315 capturer_->SignalVideoFrame(capturer_, frame); |
318 return true; | 316 return true; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 void VideoSource::SetState(SourceState new_state) { | 464 void VideoSource::SetState(SourceState new_state) { |
467 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. | 465 // TODO(hbos): Temporarily disabled VERIFY due to webrtc:4776. |
468 // if (VERIFY(state_ != new_state)) { | 466 // if (VERIFY(state_ != new_state)) { |
469 if (state_ != new_state) { | 467 if (state_ != new_state) { |
470 state_ = new_state; | 468 state_ = new_state; |
471 FireOnChanged(); | 469 FireOnChanged(); |
472 } | 470 } |
473 } | 471 } |
474 | 472 |
475 } // namespace webrtc | 473 } // namespace webrtc |
OLD | NEW |