blob: f05e409d79d136c98c082d509cf906d37d756a06 [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"
19#include "common_types.h" // NOLINT(build/include)
20#include "rtc_base/copyonwritebuffer.h"
21
22namespace webrtc {
23
24class PacketReceiver {
25 public:
26 enum DeliveryStatus {
27 DELIVERY_OK,
28 DELIVERY_UNKNOWN_SSRC,
29 DELIVERY_PACKET_ERROR,
30 };
31
32 virtual DeliveryStatus DeliverPacket(MediaType media_type,
33 rtc::CopyOnWriteBuffer packet,
Niels Möllerf189c482018-08-17 09:49:20 +020034 int64_t packet_time_us) = 0;
Niels Möller70082872018-08-07 11:03:12 +020035
36 protected:
37 virtual ~PacketReceiver() {}
38};
39
40} // namespace webrtc
41
42#endif // CALL_PACKET_RECEIVER_H_