| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 virtual int flow_id() const { return flow_id_; } | 36 virtual int flow_id() const { return flow_id_; } |
| 37 virtual void set_send_time_us(int64_t send_time_us); | 37 virtual void set_send_time_us(int64_t send_time_us); |
| 38 virtual int64_t send_time_us() const { return send_time_us_; } | 38 virtual int64_t send_time_us() const { return send_time_us_; } |
| 39 virtual int64_t sender_timestamp_us() const { return sender_timestamp_us_; } | 39 virtual int64_t sender_timestamp_us() const { return sender_timestamp_us_; } |
| 40 virtual size_t payload_size() const { return payload_size_; } | 40 virtual size_t payload_size() const { return payload_size_; } |
| 41 virtual Packet::Type GetPacketType() const = 0; | 41 virtual Packet::Type GetPacketType() const = 0; |
| 42 virtual void set_sender_timestamp_us(int64_t sender_timestamp_us) { | 42 virtual void set_sender_timestamp_us(int64_t sender_timestamp_us) { |
| 43 sender_timestamp_us_ = sender_timestamp_us; | 43 sender_timestamp_us_ = sender_timestamp_us; |
| 44 } | 44 } |
| 45 virtual void set_paced(bool paced) { paced_ = paced; } | |
| 46 virtual bool paced() const { return paced_; } | |
| 47 virtual int64_t creation_time_ms() const { | 45 virtual int64_t creation_time_ms() const { |
| 48 return (creation_time_us_ + 500) / 1000; | 46 return (creation_time_us_ + 500) / 1000; |
| 49 } | 47 } |
| 50 virtual int64_t sender_timestamp_ms() const { | 48 virtual int64_t sender_timestamp_ms() const { |
| 51 return (sender_timestamp_us_ + 500) / 1000; | 49 return (sender_timestamp_us_ + 500) / 1000; |
| 52 } | 50 } |
| 53 virtual int64_t send_time_ms() const { return (send_time_us_ + 500) / 1000; } | 51 virtual int64_t send_time_ms() const { return (send_time_us_ + 500) / 1000; } |
| 54 | 52 |
| 55 protected: | 53 protected: |
| 56 int flow_id_; | 54 int flow_id_; |
| 57 int64_t creation_time_us_; // Time when the packet was created. | 55 int64_t creation_time_us_; // Time when the packet was created. |
| 58 int64_t send_time_us_; // Time the packet left last processor touching it. | 56 int64_t send_time_us_; // Time the packet left last processor touching it. |
| 59 int64_t sender_timestamp_us_; // Time the packet left the Sender. | 57 int64_t sender_timestamp_us_; // Time the packet left the Sender. |
| 60 size_t payload_size_; // Size of the (non-existent, simulated) payload. | 58 size_t payload_size_; // Size of the (non-existent, simulated) payload. |
| 61 bool paced_; // True if sent through paced sender. | |
| 62 }; | 59 }; |
| 63 | 60 |
| 64 class MediaPacket : public Packet { | 61 class MediaPacket : public Packet { |
| 65 public: | 62 public: |
| 66 MediaPacket(); | 63 MediaPacket(); |
| 67 MediaPacket(int flow_id, | 64 MediaPacket(int flow_id, |
| 68 int64_t send_time_us, | 65 int64_t send_time_us, |
| 69 size_t payload_size, | 66 size_t payload_size, |
| 70 uint16_t sequence_number); | 67 uint16_t sequence_number); |
| 71 MediaPacket(int flow_id, | 68 MediaPacket(int flow_id, |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 }; | 193 }; |
| 197 | 194 |
| 198 typedef std::list<Packet*> Packets; | 195 typedef std::list<Packet*> Packets; |
| 199 typedef std::list<Packet*>::iterator PacketsIt; | 196 typedef std::list<Packet*>::iterator PacketsIt; |
| 200 typedef std::list<Packet*>::const_iterator PacketsConstIt; | 197 typedef std::list<Packet*>::const_iterator PacketsConstIt; |
| 201 | 198 |
| 202 } // namespace bwe | 199 } // namespace bwe |
| 203 } // namespace testing | 200 } // namespace testing |
| 204 } // namespace webrtc | 201 } // namespace webrtc |
| 205 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ | 202 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_H_ |
| OLD | NEW |