| 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 #ifndef MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ | 5 #ifndef MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ |
| 6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ | 6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/threading/non_thread_safe.h" | 11 #include "base/threading/non_thread_safe.h" |
| 12 #include "base/time/tick_clock.h" | 12 #include "base/time/tick_clock.h" |
| 13 #include "media/cast/transport/cast_transport_config.h" | 13 #include "media/cast/transport/cast_transport_config.h" |
| 14 #include "media/cast/transport/rtp_sender/rtp_sender.h" | 14 #include "media/cast/transport/rtp_sender/rtp_sender.h" |
| 15 #include "media/cast/transport/utility/transport_encryption_handler.h" | 15 #include "media/cast/transport/utility/transport_encryption_handler.h" |
| 16 | 16 |
| 17 namespace media { | 17 namespace media { |
| 18 class VideoFrame; | 18 class VideoFrame; |
| 19 | 19 |
| 20 namespace cast { | 20 namespace cast { |
| 21 class LoggingImpl; | |
| 22 | 21 |
| 23 namespace transport { | 22 namespace transport { |
| 24 class PacedSender; | 23 class PacedSender; |
| 25 | 24 |
| 26 // Not thread safe. Only called from the main cast transport thread. | 25 // Not thread safe. Only called from the main cast transport thread. |
| 27 // This class owns all objects related to sending coded video, objects that | 26 // This class owns all objects related to sending coded video, objects that |
| 28 // encrypt, create RTP packets and send to network. | 27 // encrypt, create RTP packets and send to network. |
| 29 class TransportVideoSender : public base::NonThreadSafe { | 28 class TransportVideoSender : public base::NonThreadSafe { |
| 30 public: | 29 public: |
| 31 TransportVideoSender( | 30 TransportVideoSender( |
| 32 const CastTransportVideoConfig& config, | 31 const CastTransportVideoConfig& config, |
| 33 base::TickClock* clock, | 32 base::TickClock* clock, |
| 34 LoggingImpl* logging, | |
| 35 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 33 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
| 36 PacedSender* const paced_packet_sender); | 34 PacedSender* const paced_packet_sender); |
| 37 | 35 |
| 38 virtual ~TransportVideoSender(); | 36 virtual ~TransportVideoSender(); |
| 39 | 37 |
| 40 // Handles the encoded video frames to be processed. | 38 // Handles the encoded video frames to be processed. |
| 41 // Frames will be encrypted, packetized and transmitted to the network. | 39 // Frames will be encrypted, packetized and transmitted to the network. |
| 42 void InsertCodedVideoFrame(const EncodedVideoFrame* coded_frame, | 40 void InsertCodedVideoFrame(const EncodedVideoFrame* coded_frame, |
| 43 const base::TimeTicks& capture_time); | 41 const base::TimeTicks& capture_time); |
| 44 | 42 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 64 bool initialized_; | 62 bool initialized_; |
| 65 | 63 |
| 66 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender); | 64 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender); |
| 67 }; | 65 }; |
| 68 | 66 |
| 69 } // namespace transport | 67 } // namespace transport |
| 70 } // namespace cast | 68 } // namespace cast |
| 71 } // namespace media | 69 } // namespace media |
| 72 | 70 |
| 73 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ | 71 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ |
| OLD | NEW |