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 | |
59 // Return a copy of frame which has its pending rotation applied. The | 54 // Return a copy of frame which has its pending rotation applied. The |
60 // ownership of the returned frame is held by this frame. | 55 // ownership of the returned frame is held by this frame. |
61 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; | 56 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; |
62 | 57 |
63 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. | 58 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. |
64 // Returns the frame's actual size, regardless of whether it was written or | 59 // Returns the frame's actual size, regardless of whether it was written or |
65 // not (like snprintf). Parameters size and stride_rgb are in units of bytes. | 60 // not (like snprintf). Parameters size and stride_rgb are in units of bytes. |
66 // If there is insufficient space, nothing is written. | 61 // If there is insufficient space, nothing is written. |
67 virtual size_t ConvertToRgbBuffer(uint32_t to_fourcc, | 62 virtual size_t ConvertToRgbBuffer(uint32_t to_fourcc, |
68 uint8_t* buffer, | 63 uint8_t* buffer, |
(...skipping 12 matching lines...) Expand all Loading... |
81 virtual VideoFrame* CreateEmptyFrame(int w, | 76 virtual VideoFrame* CreateEmptyFrame(int w, |
82 int h, | 77 int h, |
83 int64_t timestamp_us) const = 0; | 78 int64_t timestamp_us) const = 0; |
84 | 79 |
85 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; | 80 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; |
86 }; | 81 }; |
87 | 82 |
88 } // namespace cricket | 83 } // namespace cricket |
89 | 84 |
90 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 85 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
OLD | NEW |