Home | History | Annotate | Download | only in test
      1 /*
      2  *  Copyright (c) 2012 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 
     11 #ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_
     12 #define WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_
     13 
     14 #include "webrtc/common_types.h"
     15 #include "webrtc/modules/interface/module_common_types.h"
     16 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
     17 #include "webrtc/modules/video_coding/main/interface/video_coding.h"
     18 #include "webrtc/modules/video_coding/main/test/test_util.h"
     19 #include "webrtc/modules/video_coding/main/test/video_source.h"
     20 #include "webrtc/typedefs.h"
     21 
     22 #include <stdio.h>
     23 #include <string>
     24 
     25 class RtpDataCallback : public webrtc::NullRtpData {
     26  public:
     27   RtpDataCallback(webrtc::VideoCodingModule* vcm) : vcm_(vcm) {}
     28   virtual ~RtpDataCallback() {}
     29 
     30   virtual int32_t OnReceivedPayloadData(
     31       const uint8_t* payload_data,
     32       const uint16_t payload_size,
     33       const webrtc::WebRtcRTPHeader* rtp_header) OVERRIDE {
     34     return vcm_->IncomingPacket(payload_data, payload_size, *rtp_header);
     35   }
     36 
     37  private:
     38   webrtc::VideoCodingModule* vcm_;
     39 };
     40 
     41 int RtpPlay(const CmdArgs& args);
     42 int RtpPlayMT(const CmdArgs& args);
     43 int ReceiverTimingTests(CmdArgs& args);
     44 int JitterBufferTest(CmdArgs& args);
     45 int DecodeFromStorageTest(const CmdArgs& args);
     46 
     47 // Thread functions:
     48 bool ProcessingThread(void* obj);
     49 bool RtpReaderThread(void* obj);
     50 bool DecodeThread(void* obj);
     51 bool NackThread(void* obj);
     52 
     53 #endif // WEBRTC_MODULES_VIDEO_CODING_TEST_RECEIVER_TESTS_H_
     54