Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: webrtc/media/engine/webrtcvideoframe.cc

Issue 2262443003: Delete VideoFrameFactory, CapturedFrame, and related code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 int dh, 59 int dh,
60 uint8_t* sample, 60 uint8_t* sample,
61 size_t sample_size, 61 size_t sample_size,
62 int64_t time_stamp_ns, 62 int64_t time_stamp_ns,
63 webrtc::VideoRotation rotation) { 63 webrtc::VideoRotation rotation) {
64 return Reset(format, w, h, dw, dh, sample, sample_size, 64 return Reset(format, w, h, dw, dh, sample, sample_size,
65 time_stamp_ns / rtc::kNumNanosecsPerMicrosec, rotation, 65 time_stamp_ns / rtc::kNumNanosecsPerMicrosec, rotation,
66 true /*apply_rotation*/); 66 true /*apply_rotation*/);
67 } 67 }
68 68
69 bool WebRtcVideoFrame::Init(const CapturedFrame* frame, int dw, int dh,
70 bool apply_rotation) {
71 return Reset(frame->fourcc, frame->width, frame->height, dw, dh,
72 static_cast<uint8_t*>(frame->data), frame->data_size,
73 frame->time_stamp / rtc::kNumNanosecsPerMicrosec,
74 frame->rotation, apply_rotation);
75 }
76
77 int WebRtcVideoFrame::width() const { 69 int WebRtcVideoFrame::width() const {
78 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; 70 return video_frame_buffer_ ? video_frame_buffer_->width() : 0;
79 } 71 }
80 72
81 int WebRtcVideoFrame::height() const { 73 int WebRtcVideoFrame::height() const {
82 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; 74 return video_frame_buffer_ ? video_frame_buffer_->height() : 0;
83 } 75 }
84 76
85 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& 77 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>&
86 WebRtcVideoFrame::video_frame_buffer() const { 78 WebRtcVideoFrame::video_frame_buffer() const {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 static_cast<libyuv::RotationMode>(rotation())); 214 static_cast<libyuv::RotationMode>(rotation()));
223 if (ret == 0) { 215 if (ret == 0) {
224 rotated_frame_.reset(new WebRtcVideoFrame( 216 rotated_frame_.reset(new WebRtcVideoFrame(
225 buffer, webrtc::kVideoRotation_0, timestamp_us_, transport_frame_id_)); 217 buffer, webrtc::kVideoRotation_0, timestamp_us_, transport_frame_id_));
226 } 218 }
227 219
228 return rotated_frame_.get(); 220 return rotated_frame_.get();
229 } 221 }
230 222
231 } // namespace cricket 223 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698