niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
pwestin@webrtc.org | 2853dde | 2012-05-11 11:08:54 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
| 11 | #ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_ |
| 13 | |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 14 | #include <stdio.h> |
| 15 | #include <string> |
| 16 | |
pbos@webrtc.org | a440732 | 2013-07-16 12:32:05 +0000 | [diff] [blame] | 17 | #include "webrtc/common_types.h" |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 18 | #include "webrtc/modules/include/module_common_types.h" |
| 19 | #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
Henrik Kjellander | 2557b86 | 2015-11-18 22:00:21 +0100 | [diff] [blame] | 20 | #include "webrtc/modules/video_coding/include/video_coding.h" |
| 21 | #include "webrtc/modules/video_coding/test/test_util.h" |
pbos@webrtc.org | a440732 | 2013-07-16 12:32:05 +0000 | [diff] [blame] | 22 | #include "webrtc/typedefs.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 23 | |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 24 | class RtpDataCallback : public webrtc::NullRtpData { |
solenberg@webrtc.org | 56b5f77 | 2013-04-16 10:31:56 +0000 | [diff] [blame] | 25 | public: |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 26 | explicit RtpDataCallback(webrtc::VideoCodingModule* vcm) : vcm_(vcm) {} |
solenberg@webrtc.org | 56b5f77 | 2013-04-16 10:31:56 +0000 | [diff] [blame] | 27 | virtual ~RtpDataCallback() {} |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 28 | |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 29 | int32_t OnReceivedPayloadData( |
pbos@webrtc.org | 77f6b21 | 2013-05-03 12:02:11 +0000 | [diff] [blame] | 30 | const uint8_t* payload_data, |
Peter Boström | 0208322 | 2016-06-14 12:52:54 +0200 | [diff] [blame] | 31 | size_t payload_size, |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 32 | const webrtc::WebRtcRTPHeader* rtp_header) override { |
solenberg@webrtc.org | 56b5f77 | 2013-04-16 10:31:56 +0000 | [diff] [blame] | 33 | return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header); |
| 34 | } |
| 35 | |
| 36 | private: |
| 37 | webrtc::VideoCodingModule* vcm_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
solenberg@webrtc.org | 56b5f77 | 2013-04-16 10:31:56 +0000 | [diff] [blame] | 40 | int RtpPlay(const CmdArgs& args); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 42 | #endif // WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_ |