andersc | 063f0c0 | 2017-09-11 11:50:51 -0700 | [diff] [blame] | 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_ |
| 12 | #define API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_ |
andersc | 063f0c0 | 2017-09-11 11:50:51 -0700 | [diff] [blame] | 13 | |
| 14 | #include <map> |
| 15 | #include <string> |
| 16 | |
| 17 | namespace webrtc { |
| 18 | |
| 19 | // SDP specification for a single video codec. |
| 20 | // NOTE: This class is still under development and may change without notice. |
| 21 | struct SdpVideoFormat { |
| 22 | using Parameters = std::map<std::string, std::string>; |
| 23 | |
Niels Möller | be682d4 | 2018-03-27 08:31:45 +0200 | [diff] [blame] | 24 | explicit SdpVideoFormat(const std::string& name); |
| 25 | SdpVideoFormat(const std::string& name, const Parameters& parameters); |
| 26 | SdpVideoFormat(const SdpVideoFormat&); |
| 27 | SdpVideoFormat(SdpVideoFormat&&); |
Niels Möller | c5d4461 | 2018-03-28 09:02:09 +0200 | [diff] [blame^] | 28 | SdpVideoFormat& operator=(const SdpVideoFormat&); |
| 29 | SdpVideoFormat& operator=(SdpVideoFormat&&); |
andersc | 063f0c0 | 2017-09-11 11:50:51 -0700 | [diff] [blame] | 30 | |
Niels Möller | be682d4 | 2018-03-27 08:31:45 +0200 | [diff] [blame] | 31 | ~SdpVideoFormat(); |
andersc | 063f0c0 | 2017-09-11 11:50:51 -0700 | [diff] [blame] | 32 | |
Niels Möller | be682d4 | 2018-03-27 08:31:45 +0200 | [diff] [blame] | 33 | friend bool operator==(const SdpVideoFormat& a, const SdpVideoFormat& b); |
andersc | 063f0c0 | 2017-09-11 11:50:51 -0700 | [diff] [blame] | 34 | friend bool operator!=(const SdpVideoFormat& a, const SdpVideoFormat& b) { |
| 35 | return !(a == b); |
| 36 | } |
| 37 | |
| 38 | std::string name; |
| 39 | Parameters parameters; |
| 40 | }; |
| 41 | |
| 42 | } // namespace webrtc |
| 43 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 44 | #endif // API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_ |