Chromium Code Reviews| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 | 45 |
| 46 std::string MediaTypeToString(MediaType type); | 46 std::string MediaTypeToString(MediaType type); |
| 47 | 47 |
| 48 enum MediaContentDirection { | 48 enum MediaContentDirection { |
| 49 MD_INACTIVE, | 49 MD_INACTIVE, |
| 50 MD_SENDONLY, | 50 MD_SENDONLY, |
| 51 MD_RECVONLY, | 51 MD_RECVONLY, |
| 52 MD_SENDRECV | 52 MD_SENDRECV |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 std::string MediaContentDirectionToString(MediaContentDirection direction); | |
| 56 | |
| 55 enum CryptoType { | 57 enum CryptoType { |
| 56 CT_NONE, | 58 CT_NONE, |
| 57 CT_SDES, | 59 CT_SDES, |
| 58 CT_DTLS | 60 CT_DTLS |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 // RTC4585 RTP/AVPF | 63 // RTC4585 RTP/AVPF |
| 62 extern const char kMediaProtocolAvpf[]; | 64 extern const char kMediaProtocolAvpf[]; |
| 63 // RFC5124 RTP/SAVPF | 65 // RFC5124 RTP/SAVPF |
| 64 extern const char kMediaProtocolSavpf[]; | 66 extern const char kMediaProtocolSavpf[]; |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 // Default ctor; use methods below to set configuration. | 390 // Default ctor; use methods below to set configuration. |
| 389 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory, | 391 // The TransportDescriptionFactory is not owned by MediaSessionDescFactory, |
| 390 // so it must be kept alive by the user of this class. | 392 // so it must be kept alive by the user of this class. |
| 391 explicit MediaSessionDescriptionFactory( | 393 explicit MediaSessionDescriptionFactory( |
| 392 const TransportDescriptionFactory* factory); | 394 const TransportDescriptionFactory* factory); |
| 393 // This helper automatically sets up the factory to get its configuration | 395 // This helper automatically sets up the factory to get its configuration |
| 394 // from the specified ChannelManager. | 396 // from the specified ChannelManager. |
| 395 MediaSessionDescriptionFactory(ChannelManager* cmanager, | 397 MediaSessionDescriptionFactory(ChannelManager* cmanager, |
| 396 const TransportDescriptionFactory* factory); | 398 const TransportDescriptionFactory* factory); |
| 397 | 399 |
| 398 const AudioCodecs& audio_codecs() const { return audio_codecs_; } | 400 const AudioCodecs& audio_codecs() const; |
|
pthatcher1
2016/05/31 21:52:36
I'd prefer audio_sendrecv_codecs()
ossu
2016/06/02 13:28:02
Sure! I've addressed it in the second CL.
| |
| 399 void set_audio_codecs(const AudioCodecs& codecs) { audio_codecs_ = codecs; } | 401 const AudioCodecs& audio_send_codecs() const; |
| 402 const AudioCodecs& audio_recv_codecs() const; | |
| 403 void set_audio_codecs(const AudioCodecs& send_and_recv_codecs); | |
| 404 void set_audio_codecs(const AudioCodecs& send_codecs, | |
| 405 const AudioCodecs& recv_codecs); | |
|
pthatcher1
2016/05/31 21:52:36
This should probably both be SetAudioCodecs.
Also
ossu
2016/06/02 13:28:02
I've kept it while we're redoing the rest of the c
| |
| 400 void set_audio_rtp_header_extensions(const RtpHeaderExtensions& extensions) { | 406 void set_audio_rtp_header_extensions(const RtpHeaderExtensions& extensions) { |
| 401 audio_rtp_extensions_ = extensions; | 407 audio_rtp_extensions_ = extensions; |
| 402 } | 408 } |
| 403 const RtpHeaderExtensions& audio_rtp_header_extensions() const { | 409 const RtpHeaderExtensions& audio_rtp_header_extensions() const { |
| 404 return audio_rtp_extensions_; | 410 return audio_rtp_extensions_; |
| 405 } | 411 } |
| 406 const VideoCodecs& video_codecs() const { return video_codecs_; } | 412 const VideoCodecs& video_codecs() const { return video_codecs_; } |
| 407 void set_video_codecs(const VideoCodecs& codecs) { video_codecs_ = codecs; } | 413 void set_video_codecs(const VideoCodecs& codecs) { video_codecs_ = codecs; } |
| 408 void set_video_rtp_header_extensions(const RtpHeaderExtensions& extensions) { | 414 void set_video_rtp_header_extensions(const RtpHeaderExtensions& extensions) { |
| 409 video_rtp_extensions_ = extensions; | 415 video_rtp_extensions_ = extensions; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 424 SessionDescription* CreateOffer( | 430 SessionDescription* CreateOffer( |
| 425 const MediaSessionOptions& options, | 431 const MediaSessionOptions& options, |
| 426 const SessionDescription* current_description) const; | 432 const SessionDescription* current_description) const; |
| 427 SessionDescription* CreateAnswer( | 433 SessionDescription* CreateAnswer( |
| 428 const SessionDescription* offer, | 434 const SessionDescription* offer, |
| 429 const MediaSessionOptions& options, | 435 const MediaSessionOptions& options, |
| 430 const SessionDescription* current_description) const; | 436 const SessionDescription* current_description) const; |
| 431 | 437 |
| 432 private: | 438 private: |
| 433 void GetCodecsToOffer(const SessionDescription* current_description, | 439 void GetCodecsToOffer(const SessionDescription* current_description, |
| 440 const AudioCodecs& supported_audio_codecs, | |
| 441 const VideoCodecs& supported_video_codecs, | |
| 442 const DataCodecs& supported_data_codecs, | |
| 434 AudioCodecs* audio_codecs, | 443 AudioCodecs* audio_codecs, |
| 435 VideoCodecs* video_codecs, | 444 VideoCodecs* video_codecs, |
| 436 DataCodecs* data_codecs) const; | 445 DataCodecs* data_codecs) const; |
| 437 void GetRtpHdrExtsToOffer(const SessionDescription* current_description, | 446 void GetRtpHdrExtsToOffer(const SessionDescription* current_description, |
| 438 RtpHeaderExtensions* audio_extensions, | 447 RtpHeaderExtensions* audio_extensions, |
| 439 RtpHeaderExtensions* video_extensions) const; | 448 RtpHeaderExtensions* video_extensions) const; |
| 440 bool AddTransportOffer( | 449 bool AddTransportOffer( |
| 441 const std::string& content_name, | 450 const std::string& content_name, |
| 442 const TransportOptions& transport_options, | 451 const TransportOptions& transport_options, |
| 443 const SessionDescription* current_desc, | 452 const SessionDescription* current_desc, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 495 StreamParamsVec* current_streams, | 504 StreamParamsVec* current_streams, |
| 496 SessionDescription* answer) const; | 505 SessionDescription* answer) const; |
| 497 | 506 |
| 498 bool AddDataContentForAnswer( | 507 bool AddDataContentForAnswer( |
| 499 const SessionDescription* offer, | 508 const SessionDescription* offer, |
| 500 const MediaSessionOptions& options, | 509 const MediaSessionOptions& options, |
| 501 const SessionDescription* current_description, | 510 const SessionDescription* current_description, |
| 502 StreamParamsVec* current_streams, | 511 StreamParamsVec* current_streams, |
| 503 SessionDescription* answer) const; | 512 SessionDescription* answer) const; |
| 504 | 513 |
| 505 AudioCodecs audio_codecs_; | 514 AudioCodecs audio_send_codecs_; |
| 515 AudioCodecs audio_recv_codecs_; | |
| 516 AudioCodecs audio_sendrecv_codecs_; | |
| 506 RtpHeaderExtensions audio_rtp_extensions_; | 517 RtpHeaderExtensions audio_rtp_extensions_; |
| 507 VideoCodecs video_codecs_; | 518 VideoCodecs video_codecs_; |
| 508 RtpHeaderExtensions video_rtp_extensions_; | 519 RtpHeaderExtensions video_rtp_extensions_; |
| 509 DataCodecs data_codecs_; | 520 DataCodecs data_codecs_; |
| 510 SecurePolicy secure_; | 521 SecurePolicy secure_; |
| 511 bool add_legacy_; | 522 bool add_legacy_; |
| 512 std::string lang_; | 523 std::string lang_; |
| 513 const TransportDescriptionFactory* transport_desc_factory_; | 524 const TransportDescriptionFactory* transport_desc_factory_; |
| 514 }; | 525 }; |
| 515 | 526 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 542 void GetSupportedVideoCryptoSuiteNames( | 553 void GetSupportedVideoCryptoSuiteNames( |
| 543 std::vector<std::string>* crypto_suite_names); | 554 std::vector<std::string>* crypto_suite_names); |
| 544 void GetSupportedDataCryptoSuiteNames( | 555 void GetSupportedDataCryptoSuiteNames( |
| 545 std::vector<std::string>* crypto_suite_names); | 556 std::vector<std::string>* crypto_suite_names); |
| 546 void GetDefaultSrtpCryptoSuiteNames( | 557 void GetDefaultSrtpCryptoSuiteNames( |
| 547 std::vector<std::string>* crypto_suite_names); | 558 std::vector<std::string>* crypto_suite_names); |
| 548 | 559 |
| 549 } // namespace cricket | 560 } // namespace cricket |
| 550 | 561 |
| 551 #endif // WEBRTC_PC_MEDIASESSION_H_ | 562 #endif // WEBRTC_PC_MEDIASESSION_H_ |
| OLD | NEW |