2
0

rembhandler.hpp 941 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * Copyright (c) 2024 Vladimir Voronin
  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_REMB_RESPONDER_H
  9. #define RTC_REMB_RESPONDER_H
  10. #if RTC_ENABLE_MEDIA
  11. #include "mediahandler.hpp"
  12. #include "utils.hpp"
  13. namespace rtc {
  14. /// Responds to REMB messages sent by the receiver.
  15. class RTC_CPP_EXPORT RembHandler final : public MediaHandler {
  16. rtc::synchronized_callback<unsigned int> mOnRemb;
  17. public:
  18. /// Constructs the RembResponder object to notify whenever a bitrate
  19. /// @param onRemb The callback that gets called whenever a bitrate by the receiver
  20. RembHandler(std::function<void(unsigned int)> onRemb);
  21. void incoming(message_vector &messages, const message_callback &send) override;
  22. };
  23. }
  24. #endif // RTC_ENABLE_MEDIA
  25. #endif // RTC_REMB_RESPONDER_H