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

Side by Side Diff: webrtc/video_frame.h

Issue 2315663002: Make cricket::VideoFrame inherit webrtc::VideoFrame. (Closed)
Patch Set: 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 #ifndef WEBRTC_VIDEO_FRAME_H_ 11 #ifndef WEBRTC_VIDEO_FRAME_H_
12 #define WEBRTC_VIDEO_FRAME_H_ 12 #define WEBRTC_VIDEO_FRAME_H_
13 13
14 #include "webrtc/base/scoped_ref_ptr.h" 14 #include "webrtc/base/scoped_ref_ptr.h"
15 #include "webrtc/base/timeutils.h" 15 #include "webrtc/base/timeutils.h"
16 #include "webrtc/common_types.h" 16 #include "webrtc/common_types.h"
17 #include "webrtc/common_video/include/video_frame_buffer.h" 17 #include "webrtc/common_video/include/video_frame_buffer.h"
18 #include "webrtc/common_video/rotation.h" 18 #include "webrtc/common_video/rotation.h"
19 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
20 20
21 namespace cricket {
22 class WebRtcVideoFrameTest;
23 } // namespace cricket
24
21 namespace webrtc { 25 namespace webrtc {
22 26
23 // TODO(nisse): This class duplicates cricket::VideoFrame. There's 27 // TODO(nisse): This class duplicates cricket::VideoFrame. There's
24 // ongoing work to merge the classes. See 28 // ongoing work to merge the classes. See
25 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5682. 29 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5682.
26 class VideoFrame { 30 class VideoFrame {
27 public: 31 public:
28 // TODO(nisse): Deprecated. Using the default constructor violates the 32 // TODO(nisse): Deprecated. Using the default constructor violates the
29 // reasonable assumption that video_frame_buffer() returns a valid buffer. 33 // reasonable assumption that video_frame_buffer() returns a valid buffer.
30 VideoFrame(); 34 VideoFrame();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer() 182 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer()
179 const; 183 const;
180 184
181 // Return true if the frame is stored in a texture. 185 // Return true if the frame is stored in a texture.
182 bool is_texture() { 186 bool is_texture() {
183 return video_frame_buffer() && 187 return video_frame_buffer() &&
184 video_frame_buffer()->native_handle() != nullptr; 188 video_frame_buffer()->native_handle() != nullptr;
185 } 189 }
186 190
187 private: 191 private:
192 // Tests mutate |rotation_|, so the base test class is a friend.
193 friend class cricket::WebRtcVideoFrameTest;
pthatcher1 2016/09/07 18:11:39 A reference to a unit test class? That seems terr
nisse-webrtc 2016/09/08 11:07:13 No longer needed, since this cl also deletes those
194
188 // An opaque reference counted handle that stores the pixel data. 195 // An opaque reference counted handle that stores the pixel data.
189 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; 196 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_;
190 uint32_t timestamp_rtp_; 197 uint32_t timestamp_rtp_;
191 int64_t ntp_time_ms_; 198 int64_t ntp_time_ms_;
192 int64_t timestamp_us_; 199 int64_t timestamp_us_;
193 VideoRotation rotation_; 200 VideoRotation rotation_;
194 }; 201 };
195 202
196 203
197 // TODO(pbos): Rename EncodedFrame and reformat this class' members. 204 // TODO(pbos): Rename EncodedFrame and reformat this class' members.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 int qp_ = -1; // Quantizer value. 243 int qp_ = -1; // Quantizer value.
237 244
238 // When an application indicates non-zero values here, it is taken as an 245 // When an application indicates non-zero values here, it is taken as an
239 // indication that all future frames will be constrained with those limits 246 // indication that all future frames will be constrained with those limits
240 // until the application indicates a change again. 247 // until the application indicates a change again.
241 PlayoutDelay playout_delay_ = {-1, -1}; 248 PlayoutDelay playout_delay_ = {-1, -1};
242 }; 249 };
243 250
244 } // namespace webrtc 251 } // namespace webrtc
245 #endif // WEBRTC_VIDEO_FRAME_H_ 252 #endif // WEBRTC_VIDEO_FRAME_H_
OLDNEW
« webrtc/media/base/fakevideocapturer.h ('K') | « webrtc/media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698