1 /* 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_ 12 #define API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_ 13 14 #include <map> 15 #include <string> 16 17 #include "rtc_base/system/rtc_export.h" 18 19 namespace webrtc { 20 21 // SDP specification for a single video codec. 22 // NOTE: This class is still under development and may change without notice. 23 struct RTC_EXPORT SdpVideoFormat { 24 using Parameters = std::map<std::string, std::string>; 25 26 explicit SdpVideoFormat(const std::string& name); 27 SdpVideoFormat(const std::string& name, const Parameters& parameters); 28 SdpVideoFormat(const SdpVideoFormat&); 29 SdpVideoFormat(SdpVideoFormat&&); 30 SdpVideoFormat& operator=(const SdpVideoFormat&); 31 SdpVideoFormat& operator=(SdpVideoFormat&&); 32 33 ~SdpVideoFormat(); 34 35 std::string ToString() const; 36 37 friend RTC_EXPORT bool operator==(const SdpVideoFormat& a, 38 const SdpVideoFormat& b); 39 friend RTC_EXPORT bool operator!=(const SdpVideoFormat& a, 40 const SdpVideoFormat& b) { 41 return !(a == b); 42 } 43 44 std::string name; 45 Parameters parameters; 46 }; 47 48 } // namespace webrtc 49 50 #endif // API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_ 51