| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 virtual int64_t GetTimeStamp() const { | 44 virtual int64_t GetTimeStamp() const { |
| 45 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); | 45 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); |
| 46 } | 46 } |
| 47 virtual void SetTimeStamp(int64_t time_ns) { | 47 virtual void SetTimeStamp(int64_t time_ns) { |
| 48 set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); | 48 set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); |
| 49 } | 49 } |
| 50 | 50 |
| 51 // Indicates the rotation angle in degrees. | 51 // Indicates the rotation angle in degrees. |
| 52 virtual webrtc::VideoRotation rotation() const = 0; | 52 virtual webrtc::VideoRotation rotation() const = 0; |
| 53 | 53 |
| 54 // Make a shallow copy of the frame. The frame buffer itself is not copied. |
| 55 // Both the current and new VideoFrame will share a single reference-counted |
| 56 // frame buffer. |
| 57 virtual VideoFrame *Copy() const = 0; |
| 58 |
| 54 // Return a copy of frame which has its pending rotation applied. The | 59 // Return a copy of frame which has its pending rotation applied. The |
| 55 // ownership of the returned frame is held by this frame. | 60 // ownership of the returned frame is held by this frame. |
| 56 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; | 61 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; |
| 57 | 62 |
| 58 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. | 63 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. |
| 59 // Returns the frame's actual size, regardless of whether it was written or | 64 // Returns the frame's actual size, regardless of whether it was written or |
| 60 // not (like snprintf). Parameters size and stride_rgb are in units of bytes. | 65 // not (like snprintf). Parameters size and stride_rgb are in units of bytes. |
| 61 // If there is insufficient space, nothing is written. | 66 // If there is insufficient space, nothing is written. |
| 62 virtual size_t ConvertToRgbBuffer(uint32_t to_fourcc, | 67 virtual size_t ConvertToRgbBuffer(uint32_t to_fourcc, |
| 63 uint8_t* buffer, | 68 uint8_t* buffer, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 76 virtual VideoFrame* CreateEmptyFrame(int w, | 81 virtual VideoFrame* CreateEmptyFrame(int w, |
| 77 int h, | 82 int h, |
| 78 int64_t timestamp_us) const = 0; | 83 int64_t timestamp_us) const = 0; |
| 79 | 84 |
| 80 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; | 85 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; |
| 81 }; | 86 }; |
| 82 | 87 |
| 83 } // namespace cricket | 88 } // namespace cricket |
| 84 | 89 |
| 85 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 90 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
| OLD | NEW |