OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 |
11 #include "webrtc/media/engine/webrtcvideoframe.h" | 11 #include "webrtc/media/engine/webrtcvideoframe.h" |
12 | 12 |
13 #include "libyuv/convert.h" | 13 #include "libyuv/convert.h" |
14 #include "webrtc/base/logging.h" | 14 #include "webrtc/base/logging.h" |
15 #include "webrtc/media/base/videocapturer.h" | 15 #include "webrtc/media/base/videocapturer.h" |
16 #include "webrtc/media/base/videocommon.h" | 16 #include "webrtc/media/base/videocommon.h" |
17 #include "webrtc/video_frame.h" | 17 #include "webrtc/video_frame.h" |
18 | 18 |
19 using webrtc::kYPlane; | |
20 using webrtc::kUPlane; | |
21 using webrtc::kVPlane; | |
22 | |
23 namespace cricket { | 19 namespace cricket { |
24 | 20 |
25 WebRtcVideoFrame::WebRtcVideoFrame() | 21 WebRtcVideoFrame::WebRtcVideoFrame() |
26 : timestamp_us_(0), rotation_(webrtc::kVideoRotation_0) {} | 22 : timestamp_us_(0), rotation_(webrtc::kVideoRotation_0) {} |
27 | 23 |
28 WebRtcVideoFrame::WebRtcVideoFrame( | 24 WebRtcVideoFrame::WebRtcVideoFrame( |
29 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, | 25 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, |
30 webrtc::VideoRotation rotation, | 26 webrtc::VideoRotation rotation, |
31 int64_t timestamp_us, | 27 int64_t timestamp_us, |
32 uint32_t transport_frame_id) | 28 uint32_t transport_frame_id) |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 timestamp_us_ = timestamp_us; | 153 timestamp_us_ = timestamp_us; |
158 return true; | 154 return true; |
159 } | 155 } |
160 | 156 |
161 void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h) { | 157 void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h) { |
162 video_frame_buffer_ = webrtc::I420Buffer::Create(w, h); | 158 video_frame_buffer_ = webrtc::I420Buffer::Create(w, h); |
163 rotation_ = webrtc::kVideoRotation_0; | 159 rotation_ = webrtc::kVideoRotation_0; |
164 } | 160 } |
165 | 161 |
166 } // namespace cricket | 162 } // namespace cricket |
OLD | NEW |