sdp_video_format.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #ifndef API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_
  11. #define API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_
  12. #include <map>
  13. #include <string>
  14. #include "rtc_base/system/rtc_export.h"
  15. namespace webrtc {
  16. // SDP specification for a single video codec.
  17. // NOTE: This class is still under development and may change without notice.
  18. struct RTC_EXPORT SdpVideoFormat {
  19. using Parameters = std::map<std::string, std::string>;
  20. explicit SdpVideoFormat(const std::string& name);
  21. SdpVideoFormat(const std::string& name, const Parameters& parameters);
  22. SdpVideoFormat(const SdpVideoFormat&);
  23. SdpVideoFormat(SdpVideoFormat&&);
  24. SdpVideoFormat& operator=(const SdpVideoFormat&);
  25. SdpVideoFormat& operator=(SdpVideoFormat&&);
  26. ~SdpVideoFormat();
  27. std::string ToString() const;
  28. friend RTC_EXPORT bool operator==(const SdpVideoFormat& a,
  29. const SdpVideoFormat& b);
  30. friend RTC_EXPORT bool operator!=(const SdpVideoFormat& a,
  31. const SdpVideoFormat& b) {
  32. return !(a == b);
  33. }
  34. std::string name;
  35. Parameters parameters;
  36. };
  37. } // namespace webrtc
  38. #endif // API_VIDEO_CODECS_SDP_VIDEO_FORMAT_H_