Home | History | Annotate | Download | only in test_framework
      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_CODECS_TEST_FRAMEWORK_NORMAL_TEST_H_
     12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAMEWORK_NORMAL_TEST_H_
     13 
     14 #include "webrtc/modules/video_coding/codecs/test_framework/test.h"
     15 
     16 class NormalTest : public CodecTest
     17 {
     18 public:
     19     NormalTest();
     20     NormalTest(std::string name, std::string description, unsigned int testNo);
     21     NormalTest(std::string name, std::string description, uint32_t bitRate, unsigned int testNo);
     22     virtual ~NormalTest() {};
     23     virtual void Perform();
     24 
     25 protected:
     26     virtual void Setup();
     27     virtual void Teardown();
     28     virtual bool Encode();
     29     virtual int Decode(int lossValue = 0);
     30     virtual void CodecSpecific_InitBitrate()=0;
     31     virtual int DoPacketLoss() {return 0;};
     32 
     33     FILE*                   _sourceFile;
     34     FILE*                   _decodedFile;
     35     FILE*                   _encodedFile;
     36     double                  _totalEncodeTime;
     37     double                  _totalDecodeTime;
     38     unsigned int            _framecnt;
     39     bool                    _requestKeyFrame;
     40     unsigned int            _testNo;
     41     int                     _lengthEncFrame;
     42     bool                    _appendNext;
     43 };
     44 
     45 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAMEWORK_NORMAL_TEST_H_
     46