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 // System monotonic clock, same timebase as rtc::TimeMicros(). | 44 // System monotonic clock, same timebase as rtc::TimeMicros(). |
45 virtual int64_t timestamp_us() const = 0; | 45 virtual int64_t timestamp_us() const = 0; |
46 virtual void set_timestamp_us(int64_t time_us) = 0; | 46 virtual void set_timestamp_us(int64_t time_us) = 0; |
47 | 47 |
48 // Deprecated methods, for backwards compatibility. | 48 // Deprecated methods, for backwards compatibility. |
49 // TODO(nisse): Delete when usage in Chrome and other applications | 49 // TODO(nisse): Delete when usage in Chrome and other applications |
50 // have been replaced. | 50 // have been replaced. |
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) { | |
55 set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); | |
56 } | |
57 | 54 |
58 // Indicates the rotation angle in degrees. | 55 // Indicates the rotation angle in degrees. |
59 virtual webrtc::VideoRotation rotation() const = 0; | 56 virtual webrtc::VideoRotation rotation() const = 0; |
60 | 57 |
61 // Make a shallow copy of the frame. The frame buffer itself is not copied. | 58 // 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 | 59 // Both the current and new VideoFrame will share a single reference-counted |
63 // frame buffer. | 60 // frame buffer. |
64 | 61 |
65 // TODO(nisse): Deprecated, to be deleted in the cricket::VideoFrame and | 62 // TODO(nisse): Deprecated, to be deleted in the cricket::VideoFrame and |
66 // webrtc::VideoFrame merge. To make a copy, use the cricket::WebRtcVideoFrame | 63 // webrtc::VideoFrame merge. To make a copy, use the cricket::WebRtcVideoFrame |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 static bool Validate(uint32_t fourcc, | 95 static bool Validate(uint32_t fourcc, |
99 int w, | 96 int w, |
100 int h, | 97 int h, |
101 const uint8_t* sample, | 98 const uint8_t* sample, |
102 size_t sample_size); | 99 size_t sample_size); |
103 }; | 100 }; |
104 | 101 |
105 } // namespace cricket | 102 } // namespace cricket |
106 | 103 |
107 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 104 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
OLD | NEW |