| 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 |
| 11 // Types and classes used in media session descriptions. | 11 // Types and classes used in media session descriptions. |
| 12 | 12 |
| 13 #ifndef TALK_SESSION_MEDIA_MEDIASESSION_H_ | 13 #ifndef TALK_SESSION_MEDIA_MEDIASESSION_H_ |
| 14 #define TALK_SESSION_MEDIA_MEDIASESSION_H_ | 14 #define TALK_SESSION_MEDIA_MEDIASESSION_H_ |
| 15 | 15 |
| 16 #include <algorithm> | 16 #include <algorithm> |
| 17 #include <map> |
| 17 #include <string> | 18 #include <string> |
| 18 #include <vector> | 19 #include <vector> |
| 19 | 20 |
| 20 #include "webrtc/base/scoped_ptr.h" | 21 #include "webrtc/base/scoped_ptr.h" |
| 21 #include "webrtc/media/base/codec.h" | 22 #include "webrtc/media/base/codec.h" |
| 22 #include "webrtc/media/base/constants.h" | 23 #include "webrtc/media/base/constants.h" |
| 23 #include "webrtc/media/base/cryptoparams.h" | 24 #include "webrtc/media/base/cryptoparams.h" |
| 24 #include "webrtc/media/base/mediachannel.h" | 25 #include "webrtc/media/base/mediachannel.h" |
| 25 #include "webrtc/media/base/mediaengine.h" // For DataChannelType | 26 #include "webrtc/media/base/mediaengine.h" // For DataChannelType |
| 26 #include "webrtc/media/base/streamparams.h" | 27 #include "webrtc/media/base/streamparams.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool recv_audio; | 125 bool recv_audio; |
| 125 bool recv_video; | 126 bool recv_video; |
| 126 DataChannelType data_channel_type; | 127 DataChannelType data_channel_type; |
| 127 bool is_muc; | 128 bool is_muc; |
| 128 bool vad_enabled; | 129 bool vad_enabled; |
| 129 bool rtcp_mux_enabled; | 130 bool rtcp_mux_enabled; |
| 130 bool bundle_enabled; | 131 bool bundle_enabled; |
| 131 // bps. -1 == auto. | 132 // bps. -1 == auto. |
| 132 int video_bandwidth; | 133 int video_bandwidth; |
| 133 int data_bandwidth; | 134 int data_bandwidth; |
| 134 TransportOptions audio_transport_options; | 135 // content name ("mid") => options. |
| 135 TransportOptions video_transport_options; | 136 std::map<std::string, TransportOptions> transport_options; |
| 136 TransportOptions data_transport_options; | |
| 137 | 137 |
| 138 struct Stream { | 138 struct Stream { |
| 139 Stream(MediaType type, | 139 Stream(MediaType type, |
| 140 const std::string& id, | 140 const std::string& id, |
| 141 const std::string& sync_label, | 141 const std::string& sync_label, |
| 142 int num_sim_layers) | 142 int num_sim_layers) |
| 143 : type(type), id(id), sync_label(sync_label), | 143 : type(type), id(id), sync_label(sync_label), |
| 144 num_sim_layers(num_sim_layers) { | 144 num_sim_layers(num_sim_layers) { |
| 145 } | 145 } |
| 146 MediaType type; | 146 MediaType type; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 bool add_legacy_; | 512 bool add_legacy_; |
| 513 std::string lang_; | 513 std::string lang_; |
| 514 const TransportDescriptionFactory* transport_desc_factory_; | 514 const TransportDescriptionFactory* transport_desc_factory_; |
| 515 }; | 515 }; |
| 516 | 516 |
| 517 // Convenience functions. | 517 // Convenience functions. |
| 518 bool IsMediaContent(const ContentInfo* content); | 518 bool IsMediaContent(const ContentInfo* content); |
| 519 bool IsAudioContent(const ContentInfo* content); | 519 bool IsAudioContent(const ContentInfo* content); |
| 520 bool IsVideoContent(const ContentInfo* content); | 520 bool IsVideoContent(const ContentInfo* content); |
| 521 bool IsDataContent(const ContentInfo* content); | 521 bool IsDataContent(const ContentInfo* content); |
| 522 const ContentInfo* GetFirstMediaContent(const ContentInfos& contents, |
| 523 MediaType media_type); |
| 522 const ContentInfo* GetFirstAudioContent(const ContentInfos& contents); | 524 const ContentInfo* GetFirstAudioContent(const ContentInfos& contents); |
| 523 const ContentInfo* GetFirstVideoContent(const ContentInfos& contents); | 525 const ContentInfo* GetFirstVideoContent(const ContentInfos& contents); |
| 524 const ContentInfo* GetFirstDataContent(const ContentInfos& contents); | 526 const ContentInfo* GetFirstDataContent(const ContentInfos& contents); |
| 525 const ContentInfo* GetFirstAudioContent(const SessionDescription* sdesc); | 527 const ContentInfo* GetFirstAudioContent(const SessionDescription* sdesc); |
| 526 const ContentInfo* GetFirstVideoContent(const SessionDescription* sdesc); | 528 const ContentInfo* GetFirstVideoContent(const SessionDescription* sdesc); |
| 527 const ContentInfo* GetFirstDataContent(const SessionDescription* sdesc); | 529 const ContentInfo* GetFirstDataContent(const SessionDescription* sdesc); |
| 528 const AudioContentDescription* GetFirstAudioContentDescription( | 530 const AudioContentDescription* GetFirstAudioContentDescription( |
| 529 const SessionDescription* sdesc); | 531 const SessionDescription* sdesc); |
| 530 const VideoContentDescription* GetFirstVideoContentDescription( | 532 const VideoContentDescription* GetFirstVideoContentDescription( |
| 531 const SessionDescription* sdesc); | 533 const SessionDescription* sdesc); |
| 532 const DataContentDescription* GetFirstDataContentDescription( | 534 const DataContentDescription* GetFirstDataContentDescription( |
| 533 const SessionDescription* sdesc); | 535 const SessionDescription* sdesc); |
| 534 | 536 |
| 535 void GetSupportedAudioCryptoSuites(std::vector<int>* crypto_suites); | 537 void GetSupportedAudioCryptoSuites(std::vector<int>* crypto_suites); |
| 536 void GetSupportedVideoCryptoSuites(std::vector<int>* crypto_suites); | 538 void GetSupportedVideoCryptoSuites(std::vector<int>* crypto_suites); |
| 537 void GetSupportedDataCryptoSuites(std::vector<int>* crypto_suites); | 539 void GetSupportedDataCryptoSuites(std::vector<int>* crypto_suites); |
| 538 void GetDefaultSrtpCryptoSuites(std::vector<int>* crypto_suites); | 540 void GetDefaultSrtpCryptoSuites(std::vector<int>* crypto_suites); |
| 539 void GetSupportedAudioCryptoSuiteNames( | 541 void GetSupportedAudioCryptoSuiteNames( |
| 540 std::vector<std::string>* crypto_suite_names); | 542 std::vector<std::string>* crypto_suite_names); |
| 541 void GetSupportedVideoCryptoSuiteNames( | 543 void GetSupportedVideoCryptoSuiteNames( |
| 542 std::vector<std::string>* crypto_suite_names); | 544 std::vector<std::string>* crypto_suite_names); |
| 543 void GetSupportedDataCryptoSuiteNames( | 545 void GetSupportedDataCryptoSuiteNames( |
| 544 std::vector<std::string>* crypto_suite_names); | 546 std::vector<std::string>* crypto_suite_names); |
| 545 void GetDefaultSrtpCryptoSuiteNames( | 547 void GetDefaultSrtpCryptoSuiteNames( |
| 546 std::vector<std::string>* crypto_suite_names); | 548 std::vector<std::string>* crypto_suite_names); |
| 547 | 549 |
| 548 } // namespace cricket | 550 } // namespace cricket |
| 549 | 551 |
| 550 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ | 552 #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ |
| OLD | NEW |