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

Side by Side Diff: talk/session/media/mediasession.h

Issue 1418123003: Adding reduced size RTCP configuration down to the video stream level. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing patch conflicts Created 5 years 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
« no previous file with comments | « talk/session/media/channel.cc ('k') | talk/session/media/mediasession.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 int num_sim_layers; 160 int num_sim_layers;
161 }; 161 };
162 162
163 typedef std::vector<Stream> Streams; 163 typedef std::vector<Stream> Streams;
164 Streams streams; 164 Streams streams;
165 }; 165 };
166 166
167 // "content" (as used in XEP-0166) descriptions for voice and video. 167 // "content" (as used in XEP-0166) descriptions for voice and video.
168 class MediaContentDescription : public ContentDescription { 168 class MediaContentDescription : public ContentDescription {
169 public: 169 public:
170 MediaContentDescription() 170 MediaContentDescription() {}
171 : rtcp_mux_(false),
172 bandwidth_(kAutoBandwidth),
173 crypto_required_(CT_NONE),
174 rtp_header_extensions_set_(false),
175 multistream_(false),
176 conference_mode_(false),
177 partial_(false),
178 buffered_mode_latency_(kBufferedModeDisabled),
179 direction_(MD_SENDRECV) {
180 }
181 171
182 virtual MediaType type() const = 0; 172 virtual MediaType type() const = 0;
183 virtual bool has_codecs() const = 0; 173 virtual bool has_codecs() const = 0;
184 174
185 // |protocol| is the expected media transport protocol, such as RTP/AVPF, 175 // |protocol| is the expected media transport protocol, such as RTP/AVPF,
186 // RTP/SAVPF or SCTP/DTLS. 176 // RTP/SAVPF or SCTP/DTLS.
187 std::string protocol() const { return protocol_; } 177 std::string protocol() const { return protocol_; }
188 void set_protocol(const std::string& protocol) { protocol_ = protocol; } 178 void set_protocol(const std::string& protocol) { protocol_ = protocol; }
189 179
190 MediaContentDirection direction() const { return direction_; } 180 MediaContentDirection direction() const { return direction_; }
191 void set_direction(MediaContentDirection direction) { 181 void set_direction(MediaContentDirection direction) {
192 direction_ = direction; 182 direction_ = direction;
193 } 183 }
194 184
195 bool rtcp_mux() const { return rtcp_mux_; } 185 bool rtcp_mux() const { return rtcp_mux_; }
196 void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; } 186 void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; }
197 187
188 bool rtcp_reduced_size() const { return rtcp_reduced_size_; }
189 void set_rtcp_reduced_size(bool reduced_size) {
190 rtcp_reduced_size_ = reduced_size;
191 }
192
198 int bandwidth() const { return bandwidth_; } 193 int bandwidth() const { return bandwidth_; }
199 void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; } 194 void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; }
200 195
201 const std::vector<CryptoParams>& cryptos() const { return cryptos_; } 196 const std::vector<CryptoParams>& cryptos() const { return cryptos_; }
202 void AddCrypto(const CryptoParams& params) { 197 void AddCrypto(const CryptoParams& params) {
203 cryptos_.push_back(params); 198 cryptos_.push_back(params);
204 } 199 }
205 void set_cryptos(const std::vector<CryptoParams>& cryptos) { 200 void set_cryptos(const std::vector<CryptoParams>& cryptos) {
206 cryptos_ = cryptos; 201 cryptos_ = cryptos;
207 } 202 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 279
285 void set_partial(bool partial) { partial_ = partial; } 280 void set_partial(bool partial) { partial_ = partial; }
286 bool partial() const { return partial_; } 281 bool partial() const { return partial_; }
287 282
288 void set_buffered_mode_latency(int latency) { 283 void set_buffered_mode_latency(int latency) {
289 buffered_mode_latency_ = latency; 284 buffered_mode_latency_ = latency;
290 } 285 }
291 int buffered_mode_latency() const { return buffered_mode_latency_; } 286 int buffered_mode_latency() const { return buffered_mode_latency_; }
292 287
293 protected: 288 protected:
294 bool rtcp_mux_; 289 bool rtcp_mux_ = false;
295 int bandwidth_; 290 bool rtcp_reduced_size_ = false;
291 int bandwidth_ = kAutoBandwidth;
296 std::string protocol_; 292 std::string protocol_;
297 std::vector<CryptoParams> cryptos_; 293 std::vector<CryptoParams> cryptos_;
298 CryptoType crypto_required_; 294 CryptoType crypto_required_ = CT_NONE;
299 std::vector<RtpHeaderExtension> rtp_header_extensions_; 295 std::vector<RtpHeaderExtension> rtp_header_extensions_;
300 bool rtp_header_extensions_set_; 296 bool rtp_header_extensions_set_ = false;
301 bool multistream_; 297 bool multistream_ = false;
302 StreamParamsVec streams_; 298 StreamParamsVec streams_;
303 bool conference_mode_; 299 bool conference_mode_ = false;
304 bool partial_; 300 bool partial_ = false;
305 int buffered_mode_latency_; 301 int buffered_mode_latency_ = kBufferedModeDisabled;
306 MediaContentDirection direction_; 302 MediaContentDirection direction_ = MD_SENDRECV;
307 }; 303 };
308 304
309 template <class C> 305 template <class C>
310 class MediaContentDescriptionImpl : public MediaContentDescription { 306 class MediaContentDescriptionImpl : public MediaContentDescription {
311 public: 307 public:
312 struct PreferenceSort { 308 struct PreferenceSort {
313 bool operator()(C a, C b) { return a.preference > b.preference; } 309 bool operator()(C a, C b) { return a.preference > b.preference; }
314 }; 310 };
315 311
316 const std::vector<C>& codecs() const { return codecs_; } 312 const std::vector<C>& codecs() const { return codecs_; }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 void GetSupportedVideoCryptoSuiteNames( 552 void GetSupportedVideoCryptoSuiteNames(
557 std::vector<std::string>* crypto_suite_names); 553 std::vector<std::string>* crypto_suite_names);
558 void GetSupportedDataCryptoSuiteNames( 554 void GetSupportedDataCryptoSuiteNames(
559 std::vector<std::string>* crypto_suite_names); 555 std::vector<std::string>* crypto_suite_names);
560 void GetDefaultSrtpCryptoSuiteNames( 556 void GetDefaultSrtpCryptoSuiteNames(
561 std::vector<std::string>* crypto_suite_names); 557 std::vector<std::string>* crypto_suite_names);
562 558
563 } // namespace cricket 559 } // namespace cricket
564 560
565 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ 561 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_
OLDNEW
« no previous file with comments | « talk/session/media/channel.cc ('k') | talk/session/media/mediasession.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698