OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 public: | 62 public: |
63 MediaPacket(); | 63 MediaPacket(); |
64 MediaPacket(int flow_id, | 64 MediaPacket(int flow_id, |
65 int64_t send_time_us, | 65 int64_t send_time_us, |
66 size_t payload_size, | 66 size_t payload_size, |
67 uint16_t sequence_number); | 67 uint16_t sequence_number); |
68 MediaPacket(int flow_id, | 68 MediaPacket(int flow_id, |
69 int64_t send_time_us, | 69 int64_t send_time_us, |
70 size_t payload_size, | 70 size_t payload_size, |
71 const RTPHeader& header); | 71 const RTPHeader& header); |
72 MediaPacket(int64_t send_time_us, uint32_t sequence_number); | 72 MediaPacket(int64_t send_time_us, uint16_t sequence_number); |
73 | 73 |
74 virtual ~MediaPacket() {} | 74 virtual ~MediaPacket() {} |
75 | 75 |
76 int64_t GetAbsSendTimeInMs() const { | 76 int64_t GetAbsSendTimeInMs() const { |
77 int64_t timestamp = header_.extension.absoluteSendTime | 77 int64_t timestamp = header_.extension.absoluteSendTime |
78 << kAbsSendTimeInterArrivalUpshift; | 78 << kAbsSendTimeInterArrivalUpshift; |
79 return 1000.0 * timestamp / static_cast<double>(1 << kInterArrivalShift); | 79 return 1000.0 * timestamp / static_cast<double>(1 << kInterArrivalShift); |
80 } | 80 } |
81 void SetAbsSendTimeMs(int64_t abs_send_time_ms); | 81 void SetAbsSendTimeMs(int64_t abs_send_time_ms); |
82 const RTPHeader& header() const { return header_; } | 82 const RTPHeader& header() const { return header_; } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 }; | 193 }; |
194 | 194 |
195 typedef std::list<Packet*> Packets; | 195 typedef std::list<Packet*> Packets; |
196 typedef std::list<Packet*>::iterator PacketsIt; | 196 typedef std::list<Packet*>::iterator PacketsIt; |
197 typedef std::list<Packet*>::const_iterator PacketsConstIt; | 197 typedef std::list<Packet*>::const_iterator PacketsConstIt; |
198 | 198 |
199 } // namespace bwe | 199 } // namespace bwe |
200 } // namespace testing | 200 } // namespace testing |
201 } // namespace webrtc | 201 } // namespace webrtc |
202 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ | 202 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ |
OLD | NEW |