blob: e2429e75c605b57b7d682fc9028c3b5a7433d333 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
11#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_
12#define WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_
13
philipel5908c712015-12-21 08:23:20 -080014#include <stdio.h>
15#include <string>
16
pbos@webrtc.orga4407322013-07-16 12:32:05 +000017#include "webrtc/common_types.h"
Henrik Kjellanderff761fb2015-11-04 08:31:52 +010018#include "webrtc/modules/include/module_common_types.h"
19#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
Henrik Kjellander2557b862015-11-18 22:00:21 +010020#include "webrtc/modules/video_coding/include/video_coding.h"
21#include "webrtc/modules/video_coding/test/test_util.h"
pbos@webrtc.orga4407322013-07-16 12:32:05 +000022#include "webrtc/typedefs.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000023
wu@webrtc.org822fbd82013-08-15 23:38:54 +000024class RtpDataCallback : public webrtc::NullRtpData {
solenberg@webrtc.org56b5f772013-04-16 10:31:56 +000025 public:
philipel5908c712015-12-21 08:23:20 -080026 explicit RtpDataCallback(webrtc::VideoCodingModule* vcm) : vcm_(vcm) {}
solenberg@webrtc.org56b5f772013-04-16 10:31:56 +000027 virtual ~RtpDataCallback() {}
niklase@google.com470e71d2011-07-07 08:21:25 +000028
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000029 int32_t OnReceivedPayloadData(
pbos@webrtc.org77f6b212013-05-03 12:02:11 +000030 const uint8_t* payload_data,
Peter Boström02083222016-06-14 12:52:54 +020031 size_t payload_size,
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000032 const webrtc::WebRtcRTPHeader* rtp_header) override {
solenberg@webrtc.org56b5f772013-04-16 10:31:56 +000033 return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
34 }
35
36 private:
37 webrtc::VideoCodingModule* vcm_;
niklase@google.com470e71d2011-07-07 08:21:25 +000038};
39
solenberg@webrtc.org56b5f772013-04-16 10:31:56 +000040int RtpPlay(const CmdArgs& args);
niklase@google.com470e71d2011-07-07 08:21:25 +000041
philipel5908c712015-12-21 08:23:20 -080042#endif // WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_