Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1100)

Side by Side Diff: media/cast/transport/cast_transport_sender.h

Issue 314593002: [Cast] Cleanup: Remove TransportXXXXXSender, an unnecessary layer of indirection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move encryption into CastTransportSenderImpl so it happens in the browser process. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 is the main interface for the cast transport sender. The cast sender 5 // This is the main interface for the cast transport sender. It accepts encoded
6 // handles the cast pipeline from encoded frames (both audio and video), to 6 // frames (both audio and video), encrypts their encoded data, packetizes them
7 // encryption, packetization and transport. 7 // and feeds them into a transport (e.g., UDP).
8 8
9 // Construction of the Cast Sender and the Cast Transport Sender should be done 9 // Construction of the Cast Sender and the Cast Transport Sender should be done
10 // in the following order: 10 // in the following order:
11 // 1. Create CastTransportSender. 11 // 1. Create CastTransportSender.
12 // 2. Create CastSender (accepts CastTransportSender as an input). 12 // 2. Create CastSender (accepts CastTransportSender as an input).
13 // 3. Call CastTransportSender::SetPacketReceiver to ensure that the packets 13 // 3. Call CastTransportSender::SetPacketReceiver to ensure that the packets
14 // received by the CastTransportSender will be sent to the CastSender. 14 // received by the CastTransportSender will be sent to the CastSender.
15 // Steps 3 can be done interchangeably. 15 // Steps 3 can be done interchangeably.
16 16
17 // Destruction: The CastTransportSender is assumed to be valid as long as the 17 // Destruction: The CastTransportSender is assumed to be valid as long as the
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual void InitializeVideo(const CastTransportVideoConfig& config) = 0; 70 virtual void InitializeVideo(const CastTransportVideoConfig& config) = 0;
71 71
72 // Sets the Cast packet receiver. Should be called after creation on the 72 // Sets the Cast packet receiver. Should be called after creation on the
73 // Cast sender. Packets won't be received until this function is called. 73 // Cast sender. Packets won't be received until this function is called.
74 virtual void SetPacketReceiver( 74 virtual void SetPacketReceiver(
75 const PacketReceiverCallback& packet_receiver) = 0; 75 const PacketReceiverCallback& packet_receiver) = 0;
76 76
77 // The following two functions handle the encoded media frames (audio and 77 // The following two functions handle the encoded media frames (audio and
78 // video) to be processed. 78 // video) to be processed.
79 // Frames will be encrypted, packetized and transmitted to the network. 79 // Frames will be encrypted, packetized and transmitted to the network.
80 virtual void InsertCodedAudioFrame(const EncodedFrame& audio_frame) = 0; 80 virtual void InsertCodedAudioFrame(const EncodedFrame& audio_frame) = 0;
hubbe 2014/06/03 22:42:22 How about replacing these two functions with Inser
miu 2014/06/03 23:32:55 Good idea, but I'd like to reserve this for a late
81 virtual void InsertCodedVideoFrame(const EncodedFrame& video_frame) = 0; 81 virtual void InsertCodedVideoFrame(const EncodedFrame& video_frame) = 0;
82 82
83 // Builds an RTCP packet and sends it to the network. 83 // Builds an RTCP packet and sends it to the network.
84 // |ntp_seconds|, |ntp_fraction| and |rtp_timestamp| are used in the 84 // |ntp_seconds|, |ntp_fraction| and |rtp_timestamp| are used in the
85 // RTCP Sender Report. 85 // RTCP Sender Report.
86 virtual void SendRtcpFromRtpSender(uint32 packet_type_flags, 86 virtual void SendRtcpFromRtpSender(uint32 packet_type_flags,
87 uint32 ntp_seconds, 87 uint32 ntp_seconds,
88 uint32 ntp_fraction, 88 uint32 ntp_fraction,
89 uint32 rtp_timestamp, 89 uint32 rtp_timestamp,
90 const RtcpDlrrReportBlock& dlrr, 90 const RtcpDlrrReportBlock& dlrr,
91 uint32 sending_ssrc, 91 uint32 sending_ssrc,
92 const std::string& c_name) = 0; 92 const std::string& c_name) = 0;
93 93
94 // Retransmission request. 94 // Retransmission request.
95 virtual void ResendPackets( 95 virtual void ResendPackets(
96 bool is_audio, 96 bool is_audio,
97 const MissingFramesAndPacketsMap& missing_packets) = 0; 97 const MissingFramesAndPacketsMap& missing_packets) = 0;
98 }; 98 };
99 99
100 } // namespace transport 100 } // namespace transport
101 } // namespace cast 101 } // namespace cast
102 } // namespace media 102 } // namespace media
103 103
104 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_ 104 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/transport/cast_transport_config.cc ('k') | media/cast/transport/cast_transport_sender_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698