aacrtppacketizer.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) 2020 Filip Klembara (in2core)
  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. #if RTC_ENABLE_MEDIA
  9. #include "aacrtppacketizer.hpp"
  10. #include <cassert>
  11. namespace rtc {
  12. AACRtpPacketizer::AACRtpPacketizer(shared_ptr<RtpPacketizationConfig> rtpConfig)
  13. : RtpPacketizer(rtpConfig), MediaHandlerRootElement() {}
  14. binary_ptr AACRtpPacketizer::packetize(binary_ptr payload, [[maybe_unused]] bool setMark) {
  15. assert(!setMark);
  16. return RtpPacketizer::packetize(payload, false);
  17. }
  18. ChainedOutgoingProduct
  19. AACRtpPacketizer::processOutgoingBinaryMessage(ChainedMessagesProduct messages,
  20. message_ptr control) {
  21. ChainedMessagesProduct packets = make_chained_messages_product();
  22. packets->reserve(messages->size());
  23. for (auto message : *messages) {
  24. packets->push_back(packetize(message, false));
  25. }
  26. return {packets, control};
  27. }
  28. } // namespace rtc
  29. #endif /* RTC_ENABLE_MEDIA */