/* * Copyright (c) 2012 Yoann Blein * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include #include #include namespace Swift { class JingleRTPDescription : public JingleDescription { public: typedef boost::shared_ptr ref; enum MediaType { Audio, Video, Unknown, }; public: JingleRTPDescription(MediaType mediaType = Unknown, std::string bandwidthType = "", std::string bandwidthValue = "", boost::uint32_t ssrc = 0) : mediaType(mediaType), bandwidthType(bandwidthType), bandwidthValue(bandwidthValue), ssrc(ssrc) {} void setMediaType(MediaType mediaType) { this->mediaType = mediaType; } MediaType getMediaType() const { return mediaType; } void setBandwidth(const std::string& type, const std::string& value) { bandwidthType = type; bandwidthValue = value; } void getBandwidth(std::string &type, std::string& value) const { type = bandwidthType; value = bandwidthValue; } void setSSRC(boost::uint32_t ssrc) { this->ssrc = ssrc; } boost::uint32_t getSSRC() const { return ssrc; } void addPayloadType(const RTPPayloadType& offer) { payloadTypes.push_back(offer); } const std::vector& getPayloadTypes() const { return payloadTypes; } private: MediaType mediaType; std::string bandwidthType; std::string bandwidthValue; boost::uint32_t ssrc; std::vector payloadTypes; }; }