| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer() | 86 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& video_frame_buffer() |
| 87 const override; | 87 const override; |
| 88 | 88 |
| 89 uint32_t transport_frame_id() const override; | 89 uint32_t transport_frame_id() const override; |
| 90 | 90 |
| 91 int64_t timestamp_us() const override; | 91 int64_t timestamp_us() const override; |
| 92 void set_timestamp_us(int64_t time_us) override; | 92 void set_timestamp_us(int64_t time_us) override; |
| 93 | 93 |
| 94 webrtc::VideoRotation rotation() const override; | 94 webrtc::VideoRotation rotation() const override; |
| 95 | 95 |
| 96 const VideoFrame* GetCopyWithRotationApplied() const override; | |
| 97 | |
| 98 protected: | 96 protected: |
| 99 // Creates a frame from a raw sample with FourCC |format| and size |w| x |h|. | 97 // Creates a frame from a raw sample with FourCC |format| and size |w| x |h|. |
| 100 // |h| can be negative indicating a vertically flipped image. | 98 // |h| can be negative indicating a vertically flipped image. |
| 101 // |dw| is destination width; can be less than |w| if cropping is desired. | 99 // |dw| is destination width; can be less than |w| if cropping is desired. |
| 102 // |dh| is destination height, like |dw|, but must be a positive number. | 100 // |dh| is destination height, like |dw|, but must be a positive number. |
| 103 // Returns whether the function succeeded or failed. | 101 // Returns whether the function succeeded or failed. |
| 104 bool Reset(uint32_t format, | 102 bool Reset(uint32_t format, |
| 105 int w, | 103 int w, |
| 106 int h, | 104 int h, |
| 107 int dw, | 105 int dw, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 123 webrtc::VideoRotation rotation_; | 121 webrtc::VideoRotation rotation_; |
| 124 | 122 |
| 125 // This is mutable as the calculation is expensive but once calculated, it | 123 // This is mutable as the calculation is expensive but once calculated, it |
| 126 // remains const. | 124 // remains const. |
| 127 mutable std::unique_ptr<VideoFrame> rotated_frame_; | 125 mutable std::unique_ptr<VideoFrame> rotated_frame_; |
| 128 }; | 126 }; |
| 129 | 127 |
| 130 } // namespace cricket | 128 } // namespace cricket |
| 131 | 129 |
| 132 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 130 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ |
| OLD | NEW |