OLD | NEW |
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 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // TODO(nisse): Deprecated. Migrate all users to timestamp_us(). | 91 // TODO(nisse): Deprecated. Migrate all users to timestamp_us(). |
92 int64_t render_time_ms() const; | 92 int64_t render_time_ms() const; |
93 | 93 |
94 // Return the underlying buffer. Never nullptr for a properly | 94 // Return the underlying buffer. Never nullptr for a properly |
95 // initialized VideoFrame. | 95 // initialized VideoFrame. |
96 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() const; | 96 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() const; |
97 | 97 |
98 // TODO(nisse): Deprecated. | 98 // TODO(nisse): Deprecated. |
99 // Return true if the frame is stored in a texture. | 99 // Return true if the frame is stored in a texture. |
100 bool is_texture() const { | 100 bool is_texture() const { |
101 return video_frame_buffer()->native_handle() != nullptr; | 101 return video_frame_buffer()->type() == VideoFrameBuffer::Type::kNative; |
102 } | 102 } |
103 | 103 |
104 private: | 104 private: |
105 // An opaque reference counted handle that stores the pixel data. | 105 // An opaque reference counted handle that stores the pixel data. |
106 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; | 106 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; |
107 uint32_t timestamp_rtp_; | 107 uint32_t timestamp_rtp_; |
108 int64_t ntp_time_ms_; | 108 int64_t ntp_time_ms_; |
109 int64_t timestamp_us_; | 109 int64_t timestamp_us_; |
110 VideoRotation rotation_; | 110 VideoRotation rotation_; |
111 }; | 111 }; |
112 | 112 |
113 } // namespace webrtc | 113 } // namespace webrtc |
114 | 114 |
115 #endif // WEBRTC_API_VIDEO_VIDEO_FRAME_H_ | 115 #endif // WEBRTC_API_VIDEO_VIDEO_FRAME_H_ |
OLD | NEW |