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

Side by Side Diff: webrtc/media/base/videoframe.h

Issue 2029273004: New static method I420Buffer::SetToBlack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing SetToBlack call. Created 4 years, 6 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
« no previous file with comments | « webrtc/media/base/videobroadcaster_unittest.cc ('k') | webrtc/media/base/videoframe.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 bool interpolate, 84 bool interpolate,
85 bool crop) const; 85 bool crop) const;
86 86
87 // Writes the frame into the target VideoFrame, stretched to the size of that 87 // Writes the frame into the target VideoFrame, stretched to the size of that
88 // frame. The parameter "interpolate" controls whether to interpolate or just 88 // frame. The parameter "interpolate" controls whether to interpolate or just
89 // take the nearest-point. The parameter "crop" controls whether to crop this 89 // take the nearest-point. The parameter "crop" controls whether to crop this
90 // frame to the aspect ratio of the target frame before stretching. 90 // frame to the aspect ratio of the target frame before stretching.
91 virtual void StretchToFrame(VideoFrame *target, bool interpolate, 91 virtual void StretchToFrame(VideoFrame *target, bool interpolate,
92 bool crop) const; 92 bool crop) const;
93 93
94 // Sets the video frame to black.
95 virtual bool SetToBlack();
96
97 // Tests if sample is valid. Returns true if valid. 94 // Tests if sample is valid. Returns true if valid.
98 static bool Validate(uint32_t fourcc, 95 static bool Validate(uint32_t fourcc,
99 int w, 96 int w,
100 int h, 97 int h,
101 const uint8_t* sample, 98 const uint8_t* sample,
102 size_t sample_size); 99 size_t sample_size);
103 100
104 protected: 101 protected:
105 // Writes the frame into the given planes, stretched to the given width and 102 // Writes the frame into the given planes, stretched to the given width and
106 // height. The parameter "interpolate" controls whether to interpolate or just 103 // height. The parameter "interpolate" controls whether to interpolate or just
(...skipping 10 matching lines...) Expand all
117 virtual VideoFrame* CreateEmptyFrame(int w, 114 virtual VideoFrame* CreateEmptyFrame(int w,
118 int h, 115 int h,
119 int64_t timestamp_us) const = 0; 116 int64_t timestamp_us) const = 0;
120 117
121 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; 118 virtual void set_rotation(webrtc::VideoRotation rotation) = 0;
122 }; 119 };
123 120
124 } // namespace cricket 121 } // namespace cricket
125 122
126 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ 123 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/videobroadcaster_unittest.cc ('k') | webrtc/media/base/videoframe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698