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

Side by Side Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2088753002: Delete deprecated VideoFrameBuffer methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « no previous file | webrtc/common_video/video_frame_buffer.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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 20 matching lines...) Expand all
31 31
32 // Interface of a simple frame buffer containing pixel data. This interface does 32 // Interface of a simple frame buffer containing pixel data. This interface does
33 // not contain any frame metadata such as rotation, timestamp, pixel_width, etc. 33 // not contain any frame metadata such as rotation, timestamp, pixel_width, etc.
34 class VideoFrameBuffer : public rtc::RefCountInterface { 34 class VideoFrameBuffer : public rtc::RefCountInterface {
35 public: 35 public:
36 // The resolution of the frame in pixels. For formats where some planes are 36 // The resolution of the frame in pixels. For formats where some planes are
37 // subsampled, this is the highest-resolution plane. 37 // subsampled, this is the highest-resolution plane.
38 virtual int width() const = 0; 38 virtual int width() const = 0;
39 virtual int height() const = 0; 39 virtual int height() const = 0;
40 40
41 // TODO(nisse): For the transition, we use default implementations
42 // of the stride and data methods where the new methods calls the
43 // old method, and the old method calls the new methods. Subclasses
44 // must override either the new methods or the old method, to break
45 // infinite recursion. And similarly for the strides. When
46 // applications, in particular Chrome, are updated, delete the old
47 // method and delete the default implementation of the new methods.
48
49 // Returns pointer to the pixel data for a given plane. The memory is owned by 41 // Returns pointer to the pixel data for a given plane. The memory is owned by
50 // the VideoFrameBuffer object and must not be freed by the caller. 42 // the VideoFrameBuffer object and must not be freed by the caller.
51 virtual const uint8_t* DataY() const; 43 virtual const uint8_t* DataY() const = 0;
52 virtual const uint8_t* DataU() const; 44 virtual const uint8_t* DataU() const = 0;
53 virtual const uint8_t* DataV() const; 45 virtual const uint8_t* DataV() const = 0;
54 // Deprecated method.
55 // TODO(nisse): Delete after all users are updated.
56 virtual const uint8_t* data(PlaneType type) const;
57 46
58 // TODO(nisse): Move MutableData methods to the I420Buffer subclass. 47 // TODO(nisse): Move MutableData methods to the I420Buffer subclass.
59 // Non-const data access. 48 // Non-const data access.
60 virtual uint8_t* MutableDataY(); 49 virtual uint8_t* MutableDataY();
61 virtual uint8_t* MutableDataU(); 50 virtual uint8_t* MutableDataU();
62 virtual uint8_t* MutableDataV(); 51 virtual uint8_t* MutableDataV();
63 // Deprecated method. TODO(nisse): Delete after all users are updated.
64 virtual uint8_t* MutableData(PlaneType type);
65 52
66 // Returns the number of bytes between successive rows for a given plane. 53 // Returns the number of bytes between successive rows for a given plane.
67 virtual int StrideY() const; 54 virtual int StrideY() const = 0;
68 virtual int StrideU() const; 55 virtual int StrideU() const = 0;
69 virtual int StrideV() const; 56 virtual int StrideV() const = 0;
70 // Deprecated method. TODO(nisse): Delete after all users are updated.
71 virtual int stride(PlaneType type) const;
72 57
73 // Return the handle of the underlying video frame. This is used when the 58 // Return the handle of the underlying video frame. This is used when the
74 // frame is backed by a texture. 59 // frame is backed by a texture.
75 virtual void* native_handle() const = 0; 60 virtual void* native_handle() const = 0;
76 61
77 // Returns a new memory-backed frame buffer converted from this buffer's 62 // Returns a new memory-backed frame buffer converted from this buffer's
78 // native handle. 63 // native handle.
79 virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0; 64 virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0;
80 65
81 protected: 66 protected:
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const uint8_t* const v_plane_; 203 const uint8_t* const v_plane_;
219 const int y_stride_; 204 const int y_stride_;
220 const int u_stride_; 205 const int u_stride_;
221 const int v_stride_; 206 const int v_stride_;
222 rtc::Callback0<void> no_longer_used_cb_; 207 rtc::Callback0<void> no_longer_used_cb_;
223 }; 208 };
224 209
225 } // namespace webrtc 210 } // namespace webrtc
226 211
227 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_ 212 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698