blob: 02a01550def65234a89417668d784c555cc6b03c [file] [log] [blame]
Niels Möller70082872018-08-07 11:03:12 +02001/*
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
13#include <algorithm>
14#include <memory>
15#include <string>
16#include <vector>
17
18#include "api/mediatypes.h"
Niels Möller70082872018-08-07 11:03:12 +020019#include "rtc_base/copyonwritebuffer.h"
20
21namespace webrtc {
22
23class PacketReceiver {
24 public:
25 enum DeliveryStatus {
26 DELIVERY_OK,
27 DELIVERY_UNKNOWN_SSRC,
28 DELIVERY_PACKET_ERROR,
29 };
30
31 virtual DeliveryStatus DeliverPacket(MediaType media_type,
32 rtc::CopyOnWriteBuffer packet,
Niels Möllerf189c482018-08-17 09:49:20 +020033 int64_t packet_time_us) = 0;
Niels Möller70082872018-08-07 11:03:12 +020034
35 protected:
36 virtual ~PacketReceiver() {}
37};
38
39} // namespace webrtc
40
41#endif // CALL_PACKET_RECEIVER_H_