#include "base/time/tick_clock.h"
#include "media/cast/transport/cast_transport_config.h"
#include "media/cast/transport/rtp_sender/rtp_sender.h"
-
-namespace crypto {
-class Encryptor;
-class SymmetricKey;
-}
+#include "media/cast/transport/utility/transport_encryption_handler.h"
namespace media {
class VideoFrame;
// encrypt, create RTP packets and send to network.
class TransportVideoSender : public base::NonThreadSafe {
public:
- TransportVideoSender(const CastTransportConfig& config,
- base::TickClock* clock,
- PacedSender* const paced_packet_sender);
+ TransportVideoSender(
+ const CastTransportConfig& config,
+ base::TickClock* clock,
+ const scoped_refptr<base::TaskRunner>& transport_task_runner,
+ PacedSender* const paced_packet_sender);
virtual ~TransportVideoSender();
void InsertCodedVideoFrame(const EncodedVideoFrame* coded_frame,
const base::TimeTicks& capture_time);
- // Retrieves video RTP statistics.
- void GetStatistics(const base::TimeTicks& now, RtcpSenderInfo* sender_info);
-
// Retransmision request.
void ResendPackets(
const MissingFramesAndPacketsMap& missing_frames_and_packets);
bool initialized() const { return initialized_; }
+ // Subscribe callback to get RTP Audio stats.
+ void SubscribeVideoRtpStatsCallback(
+ const CastTransportRtpStatistics& callback);
+
private:
// Caller must allocate the destination |encrypted_video_frame| the data
// member will be resized to hold the encrypted size.
EncodedVideoFrame* encrypted_video_frame);
const base::TimeDelta rtp_max_delay_;
-
+ TransportEncryptionHandler encryptor_;
RtpSender rtp_sender_;
- scoped_ptr<crypto::SymmetricKey> key_;
- scoped_ptr<crypto::Encryptor> encryptor_;
- std::string iv_mask_;
-
bool initialized_;
DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender);