blob: 69de83ef9d5c41b6bf2dfd502436c4c9cf5b539c [file] [log] [blame]
pbos@webrtc.orgdc8c8832013-05-16 12:08:03 +00001/*
2 * Copyright (c) 2013 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 WEBRTC_VIDEO_ENGINE_TEST_COMMON_DIRECT_TRANSPORT_H_
11#define WEBRTC_VIDEO_ENGINE_TEST_COMMON_DIRECT_TRANSPORT_H_
12
13#include "webrtc/video_engine/new_include/common.h"
14
15namespace webrtc {
16namespace test {
17
18class DirectTransport : public newapi::Transport {
19 public:
20 explicit DirectTransport(newapi::PacketReceiver* receiver)
21 : receiver_(receiver) {}
22
23 void SetReceiver(newapi::PacketReceiver* receiver) { receiver_ = receiver; }
24
25 bool SendRTP(const void* data, size_t length) OVERRIDE {
26 return receiver_->DeliverPacket(data, length);
27 }
28
29 bool SendRTCP(const void* data, size_t length) OVERRIDE {
30 return SendRTP(data, length);
31 }
32
33 private:
34 newapi::PacketReceiver* receiver_;
35};
36} // test
37} // webrtc
38
39#endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_DIRECT_TRANSPORT_H_