h264_sprop_parameter_sets.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2016 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 MODULES_VIDEO_CODING_H264_SPROP_PARAMETER_SETS_H_
  11. #define MODULES_VIDEO_CODING_H264_SPROP_PARAMETER_SETS_H_
  12. #include <cstdint>
  13. #include <string>
  14. #include <vector>
  15. #include "rtc_base/constructor_magic.h"
  16. namespace webrtc {
  17. class H264SpropParameterSets {
  18. public:
  19. H264SpropParameterSets() {}
  20. bool DecodeSprop(const std::string& sprop);
  21. const std::vector<uint8_t>& sps_nalu() { return sps_; }
  22. const std::vector<uint8_t>& pps_nalu() { return pps_; }
  23. private:
  24. std::vector<uint8_t> sps_;
  25. std::vector<uint8_t> pps_;
  26. RTC_DISALLOW_COPY_AND_ASSIGN(H264SpropParameterSets);
  27. };
  28. } // namespace webrtc
  29. #endif // MODULES_VIDEO_CODING_H264_SPROP_PARAMETER_SETS_H_