packet_receiver.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2018 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 CALL_PACKET_RECEIVER_H_
  11. #define CALL_PACKET_RECEIVER_H_
  12. #include <algorithm>
  13. #include <memory>
  14. #include <string>
  15. #include <vector>
  16. #include "api/media_types.h"
  17. #include "rtc_base/copy_on_write_buffer.h"
  18. namespace webrtc {
  19. class PacketReceiver {
  20. public:
  21. enum DeliveryStatus {
  22. DELIVERY_OK,
  23. DELIVERY_UNKNOWN_SSRC,
  24. DELIVERY_PACKET_ERROR,
  25. };
  26. virtual DeliveryStatus DeliverPacket(MediaType media_type,
  27. rtc::CopyOnWriteBuffer packet,
  28. int64_t packet_time_us) = 0;
  29. protected:
  30. virtual ~PacketReceiver() {}
  31. };
  32. } // namespace webrtc
  33. #endif // CALL_PACKET_RECEIVER_H_