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 27 matching lines...) Expand all Loading... |
38 virtual const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& | 38 virtual const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& |
39 video_frame_buffer() const = 0; | 39 video_frame_buffer() const = 0; |
40 | 40 |
41 // Frame ID. Normally RTP timestamp when the frame was received using RTP. | 41 // Frame ID. Normally RTP timestamp when the frame was received using RTP. |
42 virtual uint32_t transport_frame_id() const = 0; | 42 virtual uint32_t transport_frame_id() const = 0; |
43 | 43 |
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. | |
49 // TODO(nisse): Delete when usage in Chrome and other applications | |
50 // have been replaced. | |
51 virtual int64_t GetTimeStamp() const { | |
52 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); | |
53 } | |
54 | |
55 // Indicates the rotation angle in degrees. | 48 // Indicates the rotation angle in degrees. |
56 virtual webrtc::VideoRotation rotation() const = 0; | 49 virtual webrtc::VideoRotation rotation() const = 0; |
57 | 50 |
58 // Tests if sample is valid. Returns true if valid. | 51 // Tests if sample is valid. Returns true if valid. |
59 | 52 |
60 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and | 53 // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and |
61 // webrtc::VideoFrame merge. Validation of sample_size possibly moved to | 54 // webrtc::VideoFrame merge. Validation of sample_size possibly moved to |
62 // libyuv::ConvertToI420. As an initial step, demote this method to protected | 55 // libyuv::ConvertToI420. As an initial step, demote this method to protected |
63 // status. Used only by WebRtcVideoFrame::Reset. | 56 // status. Used only by WebRtcVideoFrame::Reset. |
64 static bool Validate(uint32_t fourcc, | 57 static bool Validate(uint32_t fourcc, |
65 int w, | 58 int w, |
66 int h, | 59 int h, |
67 const uint8_t* sample, | 60 const uint8_t* sample, |
68 size_t sample_size); | 61 size_t sample_size); |
69 }; | 62 }; |
70 | 63 |
71 } // namespace cricket | 64 } // namespace cricket |
72 | 65 |
73 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 66 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
OLD | NEW |