vp8rtppacketizer.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * Copyright (c) 2026 Paul-Louis Ageneau
  3. *
  4. * This Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  7. */
  8. #ifndef RTC_VP8_RTP_PACKETIZER_H
  9. #define RTC_VP8_RTP_PACKETIZER_H
  10. #if RTC_ENABLE_MEDIA
  11. #include "rtppacketizer.hpp"
  12. namespace rtc {
  13. /// RTP packetization for VP8
  14. class RTC_CPP_EXPORT VP8RtpPacketizer final : public RtpPacketizer {
  15. public:
  16. inline static const uint32_t ClockRate = VideoClockRate;
  17. [[deprecated("Use ClockRate")]] inline static const uint32_t defaultClockRate = ClockRate;
  18. /// Constructs VP8 payload packetizer with given RTP configuration.
  19. /// @note RTP configuration is used in packetization process which may change some configuration
  20. /// properties such as sequence number.
  21. /// @param rtpConfig RTP configuration
  22. /// @param maxFragmentSize maximum size of one packet payload
  23. VP8RtpPacketizer(shared_ptr<RtpPacketizationConfig> rtpConfig,
  24. size_t maxFragmentSize = DefaultMaxFragmentSize);
  25. private:
  26. std::vector<binary> fragment(binary data) override;
  27. const size_t mMaxFragmentSize;
  28. };
  29. } // namespace rtc
  30. #endif /* RTC_ENABLE_MEDIA */
  31. #endif /* RTC_VP8_RTP_PACKETIZER_H */