| OLD | NEW |
| 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 Loading... |
| 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() {} |
| 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 bool use_sctpmap() const { return use_sctpmap_; } |
| 412 void set_use_sctpmap(bool enable) { use_sctpmap_ = enable; } |
| 413 |
| 414 private: |
| 415 bool use_sctpmap_ = true; |
| 408 }; | 416 }; |
| 409 | 417 |
| 410 // Creates media session descriptions according to the supplied codecs and | 418 // Creates media session descriptions according to the supplied codecs and |
| 411 // other fields, as well as the supplied per-call options. | 419 // other fields, as well as the supplied per-call options. |
| 412 // When creating answers, performs the appropriate negotiation | 420 // When creating answers, performs the appropriate negotiation |
| 413 // of the various fields to determine the proper result. | 421 // of the various fields to determine the proper result. |
| 414 class MediaSessionDescriptionFactory { | 422 class MediaSessionDescriptionFactory { |
| 415 public: | 423 public: |
| 416 // Default ctor; use methods below to set configuration. | 424 // Default ctor; use methods below to set configuration. |
| 417 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory, | 425 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 // Decides if a StreamParams shall be added to the audio and video media | 457 // Decides if a StreamParams shall be added to the audio and video media |
| 450 // content in SessionDescription when CreateOffer and CreateAnswer is called | 458 // content in SessionDescription when CreateOffer and CreateAnswer is called |
| 451 // even if |options| don't include a Stream. This is needed to support legacy | 459 // even if |options| don't include a Stream. This is needed to support legacy |
| 452 // applications. |add_legacy_| is true per default. | 460 // applications. |add_legacy_| is true per default. |
| 453 void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; } | 461 void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; } |
| 454 | 462 |
| 455 SessionDescription* CreateOffer( | 463 SessionDescription* CreateOffer( |
| 456 const MediaSessionOptions& options, | 464 const MediaSessionOptions& options, |
| 457 const SessionDescription* current_description) const; | 465 const SessionDescription* current_description) const; |
| 458 SessionDescription* CreateAnswer( | 466 SessionDescription* CreateAnswer( |
| 459 const SessionDescription* offer, | 467 const SessionDescription* offer, |
| 460 const MediaSessionOptions& options, | 468 const MediaSessionOptions& options, |
| 461 const SessionDescription* current_description) const; | 469 const SessionDescription* current_description) const; |
| 462 | 470 |
| 463 private: | 471 private: |
| 464 const AudioCodecs& GetAudioCodecsForOffer( | 472 const AudioCodecs& GetAudioCodecsForOffer( |
| 465 const RtpTransceiverDirection& direction) const; | 473 const RtpTransceiverDirection& direction) const; |
| 466 const AudioCodecs& GetAudioCodecsForAnswer( | 474 const AudioCodecs& GetAudioCodecsForAnswer( |
| 467 const RtpTransceiverDirection& offer, | 475 const RtpTransceiverDirection& offer, |
| 468 const RtpTransceiverDirection& answer) const; | 476 const RtpTransceiverDirection& answer) const; |
| 469 void GetCodecsToOffer(const SessionDescription* current_description, | 477 void GetCodecsToOffer(const SessionDescription* current_description, |
| 470 const AudioCodecs& supported_audio_codecs, | 478 const AudioCodecs& supported_audio_codecs, |
| 471 const VideoCodecs& supported_video_codecs, | 479 const VideoCodecs& supported_video_codecs, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, | 610 void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, |
| 603 std::vector<std::string>* crypto_suite_names); | 611 std::vector<std::string>* crypto_suite_names); |
| 604 void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, | 612 void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, |
| 605 std::vector<std::string>* crypto_suite_names); | 613 std::vector<std::string>* crypto_suite_names); |
| 606 void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, | 614 void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, |
| 607 std::vector<std::string>* crypto_suite_names); | 615 std::vector<std::string>* crypto_suite_names); |
| 608 | 616 |
| 609 } // namespace cricket | 617 } // namespace cricket |
| 610 | 618 |
| 611 #endif // WEBRTC_PC_MEDIASESSION_H_ | 619 #endif // WEBRTC_PC_MEDIASESSION_H_ |
| OLD | NEW |