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

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

Issue 1308023004: Add support for negotiating RTCP with reduced size. Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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
« 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
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), 171 : rtcp_mux_(false),
172 rtcp_reduced_size_(false),
172 bandwidth_(kAutoBandwidth), 173 bandwidth_(kAutoBandwidth),
173 crypto_required_(CT_NONE), 174 crypto_required_(CT_NONE),
174 rtp_header_extensions_set_(false), 175 rtp_header_extensions_set_(false),
175 multistream_(false), 176 multistream_(false),
176 conference_mode_(false), 177 conference_mode_(false),
177 partial_(false), 178 partial_(false),
178 buffered_mode_latency_(kBufferedModeDisabled), 179 buffered_mode_latency_(kBufferedModeDisabled),
179 direction_(MD_SENDRECV) { 180 direction_(MD_SENDRECV) {}
180 }
181 181
182 virtual MediaType type() const = 0; 182 virtual MediaType type() const = 0;
183 virtual bool has_codecs() const = 0; 183 virtual bool has_codecs() const = 0;
184 184
185 // |protocol| is the expected media transport protocol, such as RTP/AVPF, 185 // |protocol| is the expected media transport protocol, such as RTP/AVPF,
186 // RTP/SAVPF or SCTP/DTLS. 186 // RTP/SAVPF or SCTP/DTLS.
187 std::string protocol() const { return protocol_; } 187 std::string protocol() const { return protocol_; }
188 void set_protocol(const std::string& protocol) { protocol_ = protocol; } 188 void set_protocol(const std::string& protocol) { protocol_ = protocol; }
189 189
190 MediaContentDirection direction() const { return direction_; } 190 MediaContentDirection direction() const { return direction_; }
191 void set_direction(MediaContentDirection direction) { 191 void set_direction(MediaContentDirection direction) {
192 direction_ = direction; 192 direction_ = direction;
193 } 193 }
194 194
195 bool rtcp_mux() const { return rtcp_mux_; } 195 bool rtcp_mux() const { return rtcp_mux_; }
196 void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; } 196 void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; }
197 197
198 bool rtcp_reduced_size() const { return rtcp_reduced_size_; }
199 void set_rtcp_reduced_size(bool reduced_size) {
200 rtcp_reduced_size_ = reduced_size;
201 }
202
198 int bandwidth() const { return bandwidth_; } 203 int bandwidth() const { return bandwidth_; }
199 void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; } 204 void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; }
200 205
201 const std::vector<CryptoParams>& cryptos() const { return cryptos_; } 206 const std::vector<CryptoParams>& cryptos() const { return cryptos_; }
202 void AddCrypto(const CryptoParams& params) { 207 void AddCrypto(const CryptoParams& params) {
203 cryptos_.push_back(params); 208 cryptos_.push_back(params);
204 } 209 }
205 void set_cryptos(const std::vector<CryptoParams>& cryptos) { 210 void set_cryptos(const std::vector<CryptoParams>& cryptos) {
206 cryptos_ = cryptos; 211 cryptos_ = cryptos;
207 } 212 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 void set_partial(bool partial) { partial_ = partial; } 290 void set_partial(bool partial) { partial_ = partial; }
286 bool partial() const { return partial_; } 291 bool partial() const { return partial_; }
287 292
288 void set_buffered_mode_latency(int latency) { 293 void set_buffered_mode_latency(int latency) {
289 buffered_mode_latency_ = latency; 294 buffered_mode_latency_ = latency;
290 } 295 }
291 int buffered_mode_latency() const { return buffered_mode_latency_; } 296 int buffered_mode_latency() const { return buffered_mode_latency_; }
292 297
293 protected: 298 protected:
294 bool rtcp_mux_; 299 bool rtcp_mux_;
300 bool rtcp_reduced_size_;
295 int bandwidth_; 301 int bandwidth_;
296 std::string protocol_; 302 std::string protocol_;
297 std::vector<CryptoParams> cryptos_; 303 std::vector<CryptoParams> cryptos_;
298 CryptoType crypto_required_; 304 CryptoType crypto_required_;
299 std::vector<RtpHeaderExtension> rtp_header_extensions_; 305 std::vector<RtpHeaderExtension> rtp_header_extensions_;
300 bool rtp_header_extensions_set_; 306 bool rtp_header_extensions_set_;
301 bool multistream_; 307 bool multistream_;
302 StreamParamsVec streams_; 308 StreamParamsVec streams_;
303 bool conference_mode_; 309 bool conference_mode_;
304 bool partial_; 310 bool partial_;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 bool GetMediaTypeFromChannelName( 572 bool GetMediaTypeFromChannelName(
567 const std::string& channel_name, cricket::MediaType* media_type); 573 const std::string& channel_name, cricket::MediaType* media_type);
568 574
569 void GetSupportedAudioCryptoSuites(std::vector<std::string>* crypto_suites); 575 void GetSupportedAudioCryptoSuites(std::vector<std::string>* crypto_suites);
570 void GetSupportedVideoCryptoSuites(std::vector<std::string>* crypto_suites); 576 void GetSupportedVideoCryptoSuites(std::vector<std::string>* crypto_suites);
571 void GetSupportedDataCryptoSuites(std::vector<std::string>* crypto_suites); 577 void GetSupportedDataCryptoSuites(std::vector<std::string>* crypto_suites);
572 void GetSupportedDefaultCryptoSuites(std::vector<std::string>* crypto_suites); 578 void GetSupportedDefaultCryptoSuites(std::vector<std::string>* crypto_suites);
573 } // namespace cricket 579 } // namespace cricket
574 580
575 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ 581 #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