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_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_INTERFACES_H_ 12 #define WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_INTERFACES_H_ 13 14 #include <string> 15 16 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/common_types.h" 18 #include "webrtc/video_engine/include/vie_base.h" 19 #include "webrtc/video_engine/include/vie_capture.h" 20 #include "webrtc/video_engine/include/vie_codec.h" 21 #include "webrtc/video_engine/include/vie_image_process.h" 22 #include "webrtc/video_engine/include/vie_network.h" 23 #include "webrtc/video_engine/include/vie_render.h" 24 #include "webrtc/video_engine/include/vie_rtp_rtcp.h" 25 #include "webrtc/video_engine/vie_defines.h" 26 27 // This class deals with all the tedium of setting up video engine interfaces. 28 // It does its work in constructor and destructor, so keeping it in scope is 29 // enough. It also sets up tracing. 30 class TbInterfaces 31 { 32 public: 33 // Sets up all interfaces and creates a trace file 34 TbInterfaces(const std::string& test_name); 35 ~TbInterfaces(void); 36 37 webrtc::VideoEngine* video_engine; 38 webrtc::ViEBase* base; 39 webrtc::ViECapture* capture; 40 webrtc::ViERender* render; 41 webrtc::ViERTP_RTCP* rtp_rtcp; 42 webrtc::ViECodec* codec; 43 webrtc::ViENetwork* network; 44 webrtc::ViEImageProcess* image_process; 45 46 int LastError() { 47 return base->LastError(); 48 } 49 50 private: 51 DISALLOW_COPY_AND_ASSIGN(TbInterfaces); 52 }; 53 54 #endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_TB_INTERFACES_H_ 55