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

Side by Side Diff: webrtc/pc/mediasession.h

Issue 2690943011: Use the same draft version in SDP data channel answers as used in the offer. (Closed)
Patch Set: No actual changes from Patch Set 1 (learning the tools). Created 3 years, 10 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 | « no previous file | webrtc/pc/mediasession.cc » ('j') | webrtc/pc/mediasession.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 class VideoContentDescription : public MediaContentDescriptionImpl<VideoCodec> { 394 class VideoContentDescription : public MediaContentDescriptionImpl<VideoCodec> {
395 public: 395 public:
396 virtual ContentDescription* Copy() const { 396 virtual ContentDescription* Copy() const {
397 return new VideoContentDescription(*this); 397 return new VideoContentDescription(*this);
398 } 398 }
399 virtual MediaType type() const { return MEDIA_TYPE_VIDEO; } 399 virtual MediaType type() const { return MEDIA_TYPE_VIDEO; }
400 }; 400 };
401 401
402 class DataContentDescription : public MediaContentDescriptionImpl<DataCodec> { 402 class DataContentDescription : public MediaContentDescriptionImpl<DataCodec> {
403 public: 403 public:
404 DataContentDescription() : use_sctpmap_(true) {}
Taylor Brandstetter 2017/02/17 02:10:56 nit: We generally prefer providing default values
Zach Stein 2017/02/17 21:29:17 Done.
405
404 virtual ContentDescription* Copy() const { 406 virtual ContentDescription* Copy() const {
405 return new DataContentDescription(*this); 407 return new DataContentDescription(*this);
406 } 408 }
407 virtual MediaType type() const { return MEDIA_TYPE_DATA; } 409 virtual MediaType type() const { return MEDIA_TYPE_DATA; }
410
411 // Maybe it belongs in MediaContentDescription instead
Taylor Brandstetter 2017/02/17 02:10:56 I think it makes sense here, since it's the only p
Zach Stein 2017/02/17 21:29:17 I was thinking about moving it to MediaContentDesc
412 bool use_sctpmap() const { return use_sctpmap_; }
413 void set_use_sctpmap(bool enable) { use_sctpmap_ = enable; }
414
415 private:
416 bool use_sctpmap_;
408 }; 417 };
409 418
410 // Creates media session descriptions according to the supplied codecs and 419 // Creates media session descriptions according to the supplied codecs and
411 // other fields, as well as the supplied per-call options. 420 // other fields, as well as the supplied per-call options.
412 // When creating answers, performs the appropriate negotiation 421 // When creating answers, performs the appropriate negotiation
413 // of the various fields to determine the proper result. 422 // of the various fields to determine the proper result.
414 class MediaSessionDescriptionFactory { 423 class MediaSessionDescriptionFactory {
415 public: 424 public:
416 // Default ctor; use methods below to set configuration. 425 // Default ctor; use methods below to set configuration.
417 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory, 426 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // Decides if a StreamParams shall be added to the audio and video media 458 // Decides if a StreamParams shall be added to the audio and video media
450 // content in SessionDescription when CreateOffer and CreateAnswer is called 459 // content in SessionDescription when CreateOffer and CreateAnswer is called
451 // even if |options| don't include a Stream. This is needed to support legacy 460 // even if |options| don't include a Stream. This is needed to support legacy
452 // applications. |add_legacy_| is true per default. 461 // applications. |add_legacy_| is true per default.
453 void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; } 462 void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; }
454 463
455 SessionDescription* CreateOffer( 464 SessionDescription* CreateOffer(
456 const MediaSessionOptions& options, 465 const MediaSessionOptions& options,
457 const SessionDescription* current_description) const; 466 const SessionDescription* current_description) const;
458 SessionDescription* CreateAnswer( 467 SessionDescription* CreateAnswer(
459 const SessionDescription* offer, 468 const SessionDescription* offer,
460 const MediaSessionOptions& options, 469 const MediaSessionOptions& options,
461 const SessionDescription* current_description) const; 470 const SessionDescription* current_description) const;
462 471
463 private: 472 private:
464 const AudioCodecs& GetAudioCodecsForOffer( 473 const AudioCodecs& GetAudioCodecsForOffer(
465 const RtpTransceiverDirection& direction) const; 474 const RtpTransceiverDirection& direction) const;
466 const AudioCodecs& GetAudioCodecsForAnswer( 475 const AudioCodecs& GetAudioCodecsForAnswer(
467 const RtpTransceiverDirection& offer, 476 const RtpTransceiverDirection& offer,
468 const RtpTransceiverDirection& answer) const; 477 const RtpTransceiverDirection& answer) const;
469 void GetCodecsToOffer(const SessionDescription* current_description, 478 void GetCodecsToOffer(const SessionDescription* current_description,
470 const AudioCodecs& supported_audio_codecs, 479 const AudioCodecs& supported_audio_codecs,
471 const VideoCodecs& supported_video_codecs, 480 const VideoCodecs& supported_video_codecs,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, 611 void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
603 std::vector<std::string>* crypto_suite_names); 612 std::vector<std::string>* crypto_suite_names);
604 void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, 613 void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
605 std::vector<std::string>* crypto_suite_names); 614 std::vector<std::string>* crypto_suite_names);
606 void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, 615 void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
607 std::vector<std::string>* crypto_suite_names); 616 std::vector<std::string>* crypto_suite_names);
608 617
609 } // namespace cricket 618 } // namespace cricket
610 619
611 #endif // WEBRTC_PC_MEDIASESSION_H_ 620 #endif // WEBRTC_PC_MEDIASESSION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/pc/mediasession.cc » ('j') | webrtc/pc/mediasession.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698