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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual int64_t GetTimeStamp() const { | 51 virtual int64_t GetTimeStamp() const { |
52 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); | 52 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); |
53 } | 53 } |
54 virtual void SetTimeStamp(int64_t time_ns) { | 54 virtual void SetTimeStamp(int64_t time_ns) { |
55 set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); | 55 set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); |
56 } | 56 } |
57 | 57 |
58 // Indicates the rotation angle in degrees. | 58 // Indicates the rotation angle in degrees. |
59 virtual webrtc::VideoRotation rotation() const = 0; | 59 virtual webrtc::VideoRotation rotation() const = 0; |
60 | 60 |
61 // Make a shallow copy of the frame. The frame buffer itself is not copied. | |
62 // Both the current and new VideoFrame will share a single reference-counted | |
63 // frame buffer. | |
64 | |
65 // TODO(nisse): Deprecated, to be deleted in the cricket::VideoFrame and | |
66 // webrtc::VideoFrame merge. To make a copy, use the cricket::WebRtcVideoFrame | |
67 // constructor passing video_frame_buffer(), rotation() and timestamp_us() as | |
68 // arguments. | |
69 virtual VideoFrame *Copy() const = 0; | |
70 | |
71 // Return a copy of frame which has its pending rotation applied. The | 61 // Return a copy of frame which has its pending rotation applied. The |
72 // ownership of the returned frame is held by this frame. | 62 // ownership of the returned frame is held by this frame. |
73 | 63 |
74 // TODO(nisse): Deprecated. Should be moved or deleted in the | 64 // TODO(nisse): Deprecated. Should be moved or deleted in the |
75 // cricket::VideoFrame and webrtc::VideoFrame merge, possibly with a helper | 65 // cricket::VideoFrame and webrtc::VideoFrame merge, possibly with a helper |
76 // method on VideoFrameBuffer. | 66 // method on VideoFrameBuffer. |
77 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; | 67 virtual const VideoFrame* GetCopyWithRotationApplied() const = 0; |
78 | 68 |
79 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. | 69 // Converts the I420 data to RGB of a certain type such as ARGB and ABGR. |
80 // Returns the frame's actual size, regardless of whether it was written or | 70 // Returns the frame's actual size, regardless of whether it was written or |
(...skipping 17 matching lines...) Expand all Loading... |
98 static bool Validate(uint32_t fourcc, | 88 static bool Validate(uint32_t fourcc, |
99 int w, | 89 int w, |
100 int h, | 90 int h, |
101 const uint8_t* sample, | 91 const uint8_t* sample, |
102 size_t sample_size); | 92 size_t sample_size); |
103 }; | 93 }; |
104 | 94 |
105 } // namespace cricket | 95 } // namespace cricket |
106 | 96 |
107 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 97 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
OLD | NEW |