h265rtpdepacketizer.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * Copyright (c) 2020 Staz Modrzynski
  3. * Copyright (c) 2020-2024 Paul-Louis Ageneau
  4. * Copyright (c) 2024 Robert Edmonds
  5. *
  6. * This Source Code Form is subject to the terms of the Mozilla Public
  7. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  9. */
  10. #ifndef RTC_H265_RTP_DEPACKETIZER_H
  11. #define RTC_H265_RTP_DEPACKETIZER_H
  12. #if RTC_ENABLE_MEDIA
  13. #include "common.hpp"
  14. #include "h265nalunit.hpp"
  15. #include "message.hpp"
  16. #include "rtp.hpp"
  17. #include "rtpdepacketizer.hpp"
  18. #include <set>
  19. namespace rtc {
  20. /// RTP depacketization for H265
  21. class RTC_CPP_EXPORT H265RtpDepacketizer final : public VideoRtpDepacketizer {
  22. public:
  23. using Separator = NalUnit::Separator;
  24. H265RtpDepacketizer(Separator separator = Separator::StartSequence);
  25. ~H265RtpDepacketizer();
  26. private:
  27. message_ptr reassemble(message_buffer &buffer);
  28. void addSeparator(binary &frame);
  29. const NalUnit::Separator mSeparator;
  30. };
  31. } // namespace rtc
  32. #endif // RTC_ENABLE_MEDIA
  33. #endif // RTC_H265_RTP_DEPACKETIZER_H