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

Side by Side Diff: media/cast/cast_config.h

Issue 62843002: Cast: Added support for AES-CTR crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 7 years, 1 month 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
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 #ifndef MEDIA_CAST_CAST_CONFIG_H_ 5 #ifndef MEDIA_CAST_CAST_CONFIG_H_
6 #define MEDIA_CAST_CAST_CONFIG_H_ 6 #define MEDIA_CAST_CAST_CONFIG_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 int rtp_history_ms; // The time RTP packets are stored for retransmissions. 47 int rtp_history_ms; // The time RTP packets are stored for retransmissions.
48 int rtp_max_delay_ms; 48 int rtp_max_delay_ms;
49 int rtp_payload_type; 49 int rtp_payload_type;
50 50
51 bool use_external_encoder; 51 bool use_external_encoder;
52 int frequency; 52 int frequency;
53 int channels; 53 int channels;
54 int bitrate; 54 int bitrate;
55 AudioCodec codec; 55 AudioCodec codec;
56
57 std::string aes_key; // Binary strings of size kAesKeySize.
58 std::string aes_iv_mask; // Binary strings of size kAesKeySize.
56 }; 59 };
57 60
58 struct VideoSenderConfig { 61 struct VideoSenderConfig {
59 VideoSenderConfig(); 62 VideoSenderConfig();
60 63
61 uint32 sender_ssrc; 64 uint32 sender_ssrc;
62 uint32 incoming_feedback_ssrc; 65 uint32 incoming_feedback_ssrc;
63 66
64 int rtcp_interval; 67 int rtcp_interval;
65 std::string rtcp_c_name; 68 std::string rtcp_c_name;
(...skipping 10 matching lines...) Expand all
76 float congestion_control_back_off; 79 float congestion_control_back_off;
77 int max_bitrate; 80 int max_bitrate;
78 int min_bitrate; 81 int min_bitrate;
79 int start_bitrate; 82 int start_bitrate;
80 int max_qp; 83 int max_qp;
81 int min_qp; 84 int min_qp;
82 int max_frame_rate; 85 int max_frame_rate;
83 int max_number_of_video_buffers_used; // Max value depend on codec. 86 int max_number_of_video_buffers_used; // Max value depend on codec.
84 VideoCodec codec; 87 VideoCodec codec;
85 int number_of_cores; 88 int number_of_cores;
89
90 std::string aes_key; // Binary strings of size kAesKeySize.
91 std::string aes_iv_mask; // Binary strings of size kAesKeySize.
86 }; 92 };
87 93
88 struct AudioReceiverConfig { 94 struct AudioReceiverConfig {
89 AudioReceiverConfig(); 95 AudioReceiverConfig();
90 96
91 uint32 feedback_ssrc; 97 uint32 feedback_ssrc;
92 uint32 incoming_ssrc; 98 uint32 incoming_ssrc;
93 99
94 int rtcp_interval; 100 int rtcp_interval;
95 std::string rtcp_c_name; 101 std::string rtcp_c_name;
96 RtcpMode rtcp_mode; 102 RtcpMode rtcp_mode;
97 103
98 // The time the receiver is prepared to wait for retransmissions. 104 // The time the receiver is prepared to wait for retransmissions.
99 int rtp_max_delay_ms; 105 int rtp_max_delay_ms;
100 int rtp_payload_type; 106 int rtp_payload_type;
101 107
102 bool use_external_decoder; 108 bool use_external_decoder;
103 int frequency; 109 int frequency;
104 int channels; 110 int channels;
105 AudioCodec codec; 111 AudioCodec codec;
112
113 std::string aes_key; // Binary strings of size kAesKeySize.
114 std::string aes_iv_mask; // Binary strings of size kAesKeySize.
106 }; 115 };
107 116
108 struct VideoReceiverConfig { 117 struct VideoReceiverConfig {
109 VideoReceiverConfig(); 118 VideoReceiverConfig();
110 119
111 uint32 feedback_ssrc; 120 uint32 feedback_ssrc;
112 uint32 incoming_ssrc; 121 uint32 incoming_ssrc;
113 122
114 int rtcp_interval; 123 int rtcp_interval;
115 std::string rtcp_c_name; 124 std::string rtcp_c_name;
116 RtcpMode rtcp_mode; 125 RtcpMode rtcp_mode;
117 126
118 // The time the receiver is prepared to wait for retransmissions. 127 // The time the receiver is prepared to wait for retransmissions.
119 int rtp_max_delay_ms; 128 int rtp_max_delay_ms;
120 int rtp_payload_type; 129 int rtp_payload_type;
121 130
122 bool use_external_decoder; 131 bool use_external_decoder;
123 int max_frame_rate; 132 int max_frame_rate;
124 133
125 // Some HW decoders can not run faster than the frame rate, preventing it 134 // Some HW decoders can not run faster than the frame rate, preventing it
126 // from catching up after a glitch. 135 // from catching up after a glitch.
127 bool decoder_faster_than_max_frame_rate; 136 bool decoder_faster_than_max_frame_rate;
128 VideoCodec codec; 137 VideoCodec codec;
138
139 std::string aes_key; // Binary strings of size kAesKeySize.
140 std::string aes_iv_mask; // Binary strings of size kAesKeySize.
129 }; 141 };
130 142
131 struct I420VideoPlane { 143 struct I420VideoPlane {
132 int stride; 144 int stride;
133 int length; 145 int length;
134 uint8* data; 146 uint8* data;
135 }; 147 };
136 148
137 struct I420VideoFrame { 149 struct I420VideoFrame {
138 int width; 150 int width;
139 int height; 151 int height;
140 I420VideoPlane y_plane; 152 I420VideoPlane y_plane;
141 I420VideoPlane u_plane; 153 I420VideoPlane u_plane;
142 I420VideoPlane v_plane; 154 I420VideoPlane v_plane;
143 }; 155 };
144 156
145 struct EncodedVideoFrame { 157 struct EncodedVideoFrame {
146 EncodedVideoFrame(); 158 EncodedVideoFrame();
147 ~EncodedVideoFrame(); 159 ~EncodedVideoFrame();
148 160
149 VideoCodec codec; 161 VideoCodec codec;
150 bool key_frame; 162 bool key_frame;
151 uint8 frame_id; 163 uint8 frame_id;
152 uint8 last_referenced_frame_id; 164 uint8 last_referenced_frame_id;
153 std::vector<uint8> data; 165 std::string data;
154 }; 166 };
155 167
156 struct PcmAudioFrame { 168 struct PcmAudioFrame {
157 PcmAudioFrame(); 169 PcmAudioFrame();
158 ~PcmAudioFrame(); 170 ~PcmAudioFrame();
159 171
160 int channels; // Samples in interleaved stereo format. L0, R0, L1 ,R1 ,... 172 int channels; // Samples in interleaved stereo format. L0, R0, L1 ,R1 ,...
161 int frequency; 173 int frequency;
162 std::vector<int16> samples; 174 std::vector<int16> samples;
163 }; 175 };
164 176
165 struct EncodedAudioFrame { 177 struct EncodedAudioFrame {
166 EncodedAudioFrame(); 178 EncodedAudioFrame();
167 ~EncodedAudioFrame(); 179 ~EncodedAudioFrame();
168 180
169 AudioCodec codec; 181 AudioCodec codec;
170 uint8 frame_id; // Needed to release the frame. Not used send side. 182 uint8 frame_id; // Needed to release the frame. Not used send side.
171 int samples; // Needed send side to advance the RTP timestamp. 183 int samples; // Needed send side to advance the RTP timestamp.
172 // Not used receive side. 184 // Not used receive side.
173 std::vector<uint8> data; 185 std::string data;
174 }; 186 };
175 187
176 typedef std::vector<uint8> Packet; 188 typedef std::vector<uint8> Packet;
177 typedef std::vector<Packet> PacketList; 189 typedef std::vector<Packet> PacketList;
178 190
179 class PacketSender { 191 class PacketSender {
180 public: 192 public:
181 // All packets to be sent to the network will be delivered via these 193 // All packets to be sent to the network will be delivered via these
182 // functions. 194 // functions.
183 virtual bool SendPackets(const PacketList& packets) = 0; 195 virtual bool SendPackets(const PacketList& packets) = 0;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 virtual int NumberOfSkippedFrames() const = 0; 234 virtual int NumberOfSkippedFrames() const = 0;
223 235
224 protected: 236 protected:
225 virtual ~VideoEncoderController() {} 237 virtual ~VideoEncoderController() {}
226 }; 238 };
227 239
228 } // namespace cast 240 } // namespace cast
229 } // namespace media 241 } // namespace media
230 242
231 #endif // MEDIA_CAST_CAST_CONFIG_H_ 243 #endif // MEDIA_CAST_CAST_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698