OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void SendFrame(int w, int h) { | 65 void SendFrame(int w, int h) { |
66 if (!running_) return; | 66 if (!running_) return; |
67 | 67 |
68 rtc::scoped_refptr<webrtc::I420Buffer> buffer = | 68 rtc::scoped_refptr<webrtc::I420Buffer> buffer = |
69 webrtc::I420Buffer::Create(w, h); | 69 webrtc::I420Buffer::Create(w, h); |
70 // Initialize memory to satisfy DrMemory tests. See | 70 // Initialize memory to satisfy DrMemory tests. See |
71 // https://bugs.chromium.org/p/libyuv/issues/detail?id=377 | 71 // https://bugs.chromium.org/p/libyuv/issues/detail?id=377 |
72 buffer->InitializeData(); | 72 buffer->InitializeData(); |
73 if (callback_) { | 73 if (callback_) { |
74 callback_->OnFrame( | 74 callback_->OnFrame( |
75 webrtc::VideoFrame(buffer, 0, 0, webrtc::kVideoRotation_0)); | 75 webrtc::VideoFrame(buffer, 0, 0, webrtc::kVideoRotation_0, |
| 76 webrtc::VideoContentType::kDefault)); |
76 } | 77 } |
77 } | 78 } |
78 | 79 |
79 const webrtc::VideoCaptureCapability& cap() const { | 80 const webrtc::VideoCaptureCapability& cap() const { |
80 return cap_; | 81 return cap_; |
81 } | 82 } |
82 | 83 |
83 private: | 84 private: |
84 FakeWebRtcVcmFactory* factory_; | 85 FakeWebRtcVcmFactory* factory_; |
85 rtc::VideoSinkInterface<webrtc::VideoFrame>* callback_; | 86 rtc::VideoSinkInterface<webrtc::VideoFrame>* callback_; |
86 bool running_; | 87 bool running_; |
87 webrtc::VideoCaptureCapability cap_; | 88 webrtc::VideoCaptureCapability cap_; |
88 }; | 89 }; |
89 | 90 |
90 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ | 91 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVIDEOCAPTUREMODULE_H_ |
OLD | NEW |