| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 Loading... |
| 84 void SetTimeStamp(int64_t time_stamp_ns) override { | 84 void SetTimeStamp(int64_t time_stamp_ns) override { |
| 85 time_stamp_ns_ = time_stamp_ns; | 85 time_stamp_ns_ = time_stamp_ns; |
| 86 } | 86 } |
| 87 | 87 |
| 88 webrtc::VideoRotation GetVideoRotation() const override { | 88 webrtc::VideoRotation GetVideoRotation() const override { |
| 89 return rotation_; | 89 return rotation_; |
| 90 } | 90 } |
| 91 | 91 |
| 92 VideoFrame* Copy() const override; | 92 VideoFrame* Copy() const override; |
| 93 bool IsExclusive() const override; | 93 bool IsExclusive() const override; |
| 94 bool MakeExclusive() override; | |
| 95 size_t ConvertToRgbBuffer(uint32_t to_fourcc, | 94 size_t ConvertToRgbBuffer(uint32_t to_fourcc, |
| 96 uint8_t* buffer, | 95 uint8_t* buffer, |
| 97 size_t size, | 96 size_t size, |
| 98 int stride_rgb) const override; | 97 int stride_rgb) const override; |
| 99 | 98 |
| 100 const VideoFrame* GetCopyWithRotationApplied() const override; | 99 const VideoFrame* GetCopyWithRotationApplied() const override; |
| 101 | 100 |
| 102 protected: | 101 protected: |
| 103 void SetRotation(webrtc::VideoRotation rotation) override { | 102 void SetRotation(webrtc::VideoRotation rotation) override { |
| 104 rotation_ = rotation; | 103 rotation_ = rotation; |
| 105 } | 104 } |
| 106 | 105 |
| 107 private: | 106 private: |
| 108 VideoFrame* CreateEmptyFrame(int w, int h, | 107 VideoFrame* CreateEmptyFrame(int w, int h, |
| 109 int64_t time_stamp_ns) const override; | 108 int64_t time_stamp_ns) const override; |
| 110 | 109 |
| 111 // An opaque reference counted handle that stores the pixel data. | 110 // An opaque reference counted handle that stores the pixel data. |
| 112 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; | 111 rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_; |
| 113 int64_t time_stamp_ns_; | 112 int64_t time_stamp_ns_; |
| 114 webrtc::VideoRotation rotation_; | 113 webrtc::VideoRotation rotation_; |
| 115 | 114 |
| 116 // This is mutable as the calculation is expensive but once calculated, it | 115 // This is mutable as the calculation is expensive but once calculated, it |
| 117 // remains const. | 116 // remains const. |
| 118 mutable std::unique_ptr<VideoFrame> rotated_frame_; | 117 mutable std::unique_ptr<VideoFrame> rotated_frame_; |
| 119 }; | 118 }; |
| 120 | 119 |
| 121 } // namespace cricket | 120 } // namespace cricket |
| 122 | 121 |
| 123 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 122 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ |
| OLD | NEW |