1/*
2 *  Copyright (c) 2011 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_FRAWEWORK_BENCHMARK_H_
12#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAWEWORK_BENCHMARK_H_
13
14#include "webrtc/modules/video_coding/codecs/test_framework/normal_async_test.h"
15
16class VideoSource;
17
18class Benchmark : public NormalAsyncTest
19{
20public:
21    Benchmark();
22    virtual void Perform();
23
24protected:
25    Benchmark(std::string name, std::string description);
26    Benchmark(std::string name, std::string description, std::string resultsFileName, std::string codecName);
27    virtual webrtc::VideoEncoder* GetNewEncoder() = 0;
28    virtual webrtc::VideoDecoder* GetNewDecoder() = 0;
29    virtual void PerformNormalTest();
30    virtual void CodecSpecific_InitBitrate();
31    static const char* GetMagicStr() { return "#!benchmark1.0"; }
32
33    const VideoSource* _target;
34    std::string        _resultsFileName;
35    std::ofstream      _results;
36    std::string        _codecName;
37};
38
39#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAWEWORK_BENCHMARK_H_
40