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

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

Issue 2287233002: Delete cricket::VideoFrame::ConvertToRgbBuffer. (Closed)
Patch Set: Replace calls to ConvertFromI420 with more specific libyuv conversion. Created 4 years, 3 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) 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual webrtc::VideoRotation rotation() const = 0; 56 virtual webrtc::VideoRotation rotation() const = 0;
57 57
58 // Return a copy of frame which has its pending rotation applied. The 58 // Return a copy of frame which has its pending rotation applied. The
59 // ownership of the returned frame is held by this frame. 59 // ownership of the returned frame is held by this frame.
60 60
61 // TODO(nisse): Deprecated. Should be moved or deleted in the 61 // TODO(nisse): Deprecated. Should be moved or deleted in the
62 // cricket::VideoFrame and webrtc::VideoFrame merge, possibly with a helper 62 // cricket::VideoFrame and webrtc::VideoFrame merge, possibly with a helper
63 // method on VideoFrameBuffer. 63 // method on VideoFrameBuffer.
64 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; 64 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0;
65 65
66 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR.
67 // Returns the frame's actual size, regardless of whether it was written or
68 // not (like snprintf). Parameters size and stride_rgb are in units of bytes.
69 // If there is insufficient space, nothing is written.
70
71 // TODO(nisse): Deprecated. Should be moved or deleted in the
72 // cricket::VideoFrame and webrtc::VideoFrame merge. Use
73 // libyuv::ConvertFromI420 directly instead.
74 virtual size_t ConvertToRgbBuffer(uint32_t to_fourcc,
75 uint8_t* buffer,
76 size_t size,
77 int stride_rgb) const;
78
79 // Tests if sample is valid. Returns true if valid. 66 // Tests if sample is valid. Returns true if valid.
80 67
81 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and 68 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and
82 // webrtc::VideoFrame merge. Validation of sample_size possibly moved to 69 // webrtc::VideoFrame merge. Validation of sample_size possibly moved to
83 // libyuv::ConvertToI420. As an initial step, demote this method to protected 70 // libyuv::ConvertToI420. As an initial step, demote this method to protected
84 // status. Used only by WebRtcVideoFrame::Reset. 71 // status. Used only by WebRtcVideoFrame::Reset.
85 static bool Validate(uint32_t fourcc, 72 static bool Validate(uint32_t fourcc,
86 int w, 73 int w,
87 int h, 74 int h,
88 const uint8_t* sample, 75 const uint8_t* sample,
89 size_t sample_size); 76 size_t sample_size);
90 }; 77 };
91 78
92 } // namespace cricket 79 } // namespace cricket
93 80
94 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ 81 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698