Niels Möller | 7008287 | 2018-08-07 11:03:12 +0200 | [diff] [blame] | 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 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 13 | #include "api/media_types.h" |
| 14 | #include "rtc_base/copy_on_write_buffer.h" |
Niels Möller | 7008287 | 2018-08-07 11:03:12 +0200 | [diff] [blame] | 15 | |
| 16 | namespace webrtc { |
| 17 | |
| 18 | class PacketReceiver { |
| 19 | public: |
| 20 | enum DeliveryStatus { |
| 21 | DELIVERY_OK, |
| 22 | DELIVERY_UNKNOWN_SSRC, |
| 23 | DELIVERY_PACKET_ERROR, |
| 24 | }; |
| 25 | |
| 26 | virtual DeliveryStatus DeliverPacket(MediaType media_type, |
| 27 | rtc::CopyOnWriteBuffer packet, |
Niels Möller | f189c48 | 2018-08-17 09:49:20 +0200 | [diff] [blame] | 28 | int64_t packet_time_us) = 0; |
Niels Möller | 7008287 | 2018-08-07 11:03:12 +0200 | [diff] [blame] | 29 | |
| 30 | protected: |
| 31 | virtual ~PacketReceiver() {} |
| 32 | }; |
| 33 | |
| 34 | } // namespace webrtc |
| 35 | |
| 36 | #endif // CALL_PACKET_RECEIVER_H_ |