| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains the interface to the cast RTP sender. | 5 // This file contains the interface to the cast RTP sender. |
| 6 | 6 |
| 7 #ifndef MEDIA_CAST_NET_RTP_RTP_SENDER_H_ | 7 #ifndef MEDIA_CAST_NET_RTP_RTP_SENDER_H_ |
| 8 #define MEDIA_CAST_NET_RTP_RTP_SENDER_H_ | 8 #define MEDIA_CAST_NET_RTP_RTP_SENDER_H_ |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| 11 #include <stdint.h> | 11 #include <stdint.h> |
| 12 | 12 |
| 13 #include <map> | 13 #include <map> |
| 14 #include <memory> |
| 14 #include <set> | 15 #include <set> |
| 15 | 16 |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/memory/scoped_ptr.h" | |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "media/cast/cast_environment.h" | 20 #include "media/cast/cast_environment.h" |
| 21 #include "media/cast/net/cast_transport.h" | 21 #include "media/cast/net/cast_transport.h" |
| 22 #include "media/cast/net/cast_transport_defines.h" | 22 #include "media/cast/net/cast_transport_defines.h" |
| 23 #include "media/cast/net/pacing/paced_sender.h" | 23 #include "media/cast/net/pacing/paced_sender.h" |
| 24 #include "media/cast/net/rtp/packet_storage.h" | 24 #include "media/cast/net/rtp/packet_storage.h" |
| 25 #include "media/cast/net/rtp/rtp_packetizer.h" | 25 #include "media/cast/net/rtp/rtp_packetizer.h" |
| 26 | 26 |
| 27 namespace media { | 27 namespace media { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 size_t send_octet_count() const { | 66 size_t send_octet_count() const { |
| 67 return packetizer_ ? packetizer_->send_octet_count() : 0; | 67 return packetizer_ ? packetizer_->send_octet_count() : 0; |
| 68 } | 68 } |
| 69 uint32_t ssrc() const { return config_.ssrc; } | 69 uint32_t ssrc() const { return config_.ssrc; } |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 void UpdateSequenceNumber(Packet* packet); | 72 void UpdateSequenceNumber(Packet* packet); |
| 73 | 73 |
| 74 RtpPacketizerConfig config_; | 74 RtpPacketizerConfig config_; |
| 75 PacketStorage storage_; | 75 PacketStorage storage_; |
| 76 scoped_ptr<RtpPacketizer> packetizer_; | 76 std::unique_ptr<RtpPacketizer> packetizer_; |
| 77 PacedSender* const transport_; | 77 PacedSender* const transport_; |
| 78 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; | 78 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; |
| 79 | 79 |
| 80 // NOTE: Weak pointers must be invalidated before all other member variables. | 80 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 81 base::WeakPtrFactory<RtpSender> weak_factory_; | 81 base::WeakPtrFactory<RtpSender> weak_factory_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(RtpSender); | 83 DISALLOW_COPY_AND_ASSIGN(RtpSender); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace cast | 86 } // namespace cast |
| 87 } // namespace media | 87 } // namespace media |
| 88 | 88 |
| 89 #endif // MEDIA_CAST_NET_RTP_SENDER_RTP_SENDER_H_ | 89 #endif // MEDIA_CAST_NET_RTP_SENDER_RTP_SENDER_H_ |
| OLD | NEW |