diff options
Diffstat (limited to 'talk/session/media/mediasession.h')
-rw-r--r-- | talk/session/media/mediasession.h | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/talk/session/media/mediasession.h b/talk/session/media/mediasession.h index e92628e711..1540274665 100644 --- a/talk/session/media/mediasession.h +++ b/talk/session/media/mediasession.h @@ -134,6 +134,10 @@ struct MediaSessionOptions { bool HasSendMediaStream(MediaType type) const; + // TODO(deadbeef): Put all the audio/video/data-specific options into a map + // structure (content name -> options). + // MediaSessionDescriptionFactory assumes there will never be more than one + // audio/video/data content, but this will change with unified plan. bool recv_audio; bool recv_video; DataChannelType data_channel_type; @@ -144,7 +148,9 @@ struct MediaSessionOptions { // bps. -1 == auto. int video_bandwidth; int data_bandwidth; - TransportOptions transport_options; + TransportOptions audio_transport_options; + TransportOptions video_transport_options; + TransportOptions data_transport_options; struct Stream { Stream(MediaType type, @@ -167,17 +173,7 @@ struct MediaSessionOptions { // "content" (as used in XEP-0166) descriptions for voice and video. class MediaContentDescription : public ContentDescription { public: - MediaContentDescription() - : rtcp_mux_(false), - bandwidth_(kAutoBandwidth), - crypto_required_(CT_NONE), - rtp_header_extensions_set_(false), - multistream_(false), - conference_mode_(false), - partial_(false), - buffered_mode_latency_(kBufferedModeDisabled), - direction_(MD_SENDRECV) { - } + MediaContentDescription() {} virtual MediaType type() const = 0; virtual bool has_codecs() const = 0; @@ -195,6 +191,11 @@ class MediaContentDescription : public ContentDescription { bool rtcp_mux() const { return rtcp_mux_; } void set_rtcp_mux(bool mux) { rtcp_mux_ = mux; } + bool rtcp_reduced_size() const { return rtcp_reduced_size_; } + void set_rtcp_reduced_size(bool reduced_size) { + rtcp_reduced_size_ = reduced_size; + } + int bandwidth() const { return bandwidth_; } void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; } @@ -291,19 +292,20 @@ class MediaContentDescription : public ContentDescription { int buffered_mode_latency() const { return buffered_mode_latency_; } protected: - bool rtcp_mux_; - int bandwidth_; + bool rtcp_mux_ = false; + bool rtcp_reduced_size_ = false; + int bandwidth_ = kAutoBandwidth; std::string protocol_; std::vector<CryptoParams> cryptos_; - CryptoType crypto_required_; + CryptoType crypto_required_ = CT_NONE; std::vector<RtpHeaderExtension> rtp_header_extensions_; - bool rtp_header_extensions_set_; - bool multistream_; + bool rtp_header_extensions_set_ = false; + bool multistream_ = false; StreamParamsVec streams_; - bool conference_mode_; - bool partial_; - int buffered_mode_latency_; - MediaContentDirection direction_; + bool conference_mode_ = false; + bool partial_ = false; + int buffered_mode_latency_ = kBufferedModeDisabled; + MediaContentDirection direction_ = MD_SENDRECV; }; template <class C> @@ -547,10 +549,19 @@ const VideoContentDescription* GetFirstVideoContentDescription( const DataContentDescription* GetFirstDataContentDescription( const SessionDescription* sdesc); -void GetSupportedAudioCryptoSuites(std::vector<std::string>* crypto_suites); -void GetSupportedVideoCryptoSuites(std::vector<std::string>* crypto_suites); -void GetSupportedDataCryptoSuites(std::vector<std::string>* crypto_suites); -void GetDefaultSrtpCryptoSuiteNames(std::vector<std::string>* crypto_suites); +void GetSupportedAudioCryptoSuites(std::vector<int>* crypto_suites); +void GetSupportedVideoCryptoSuites(std::vector<int>* crypto_suites); +void GetSupportedDataCryptoSuites(std::vector<int>* crypto_suites); +void GetDefaultSrtpCryptoSuites(std::vector<int>* crypto_suites); +void GetSupportedAudioCryptoSuiteNames( + std::vector<std::string>* crypto_suite_names); +void GetSupportedVideoCryptoSuiteNames( + std::vector<std::string>* crypto_suite_names); +void GetSupportedDataCryptoSuiteNames( + std::vector<std::string>* crypto_suite_names); +void GetDefaultSrtpCryptoSuiteNames( + std::vector<std::string>* crypto_suite_names); + } // namespace cricket #endif // TALK_SESSION_MEDIA_MEDIASESSION_H_ |