Home | History | Annotate | Download | only in video_engine
      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_VIE_IMPL_H_
     12 #define WEBRTC_VIDEO_ENGINE_VIE_IMPL_H_
     13 
     14 #include "webrtc/common.h"
     15 #include "webrtc/engine_configurations.h"
     16 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
     17 #include "webrtc/video_engine/vie_defines.h"
     18 
     19 #include "webrtc/video_engine/vie_base_impl.h"
     20 
     21 #ifdef WEBRTC_VIDEO_ENGINE_CAPTURE_API
     22 #include "webrtc/video_engine/vie_capture_impl.h"
     23 #endif
     24 #ifdef WEBRTC_VIDEO_ENGINE_CODEC_API
     25 #include "webrtc/video_engine/vie_codec_impl.h"
     26 #endif
     27 #ifdef WEBRTC_VIDEO_ENGINE_FILE_API
     28 #include "webrtc/video_engine/vie_file_impl.h"
     29 #endif
     30 #ifdef WEBRTC_VIDEO_ENGINE_IMAGE_PROCESS_API
     31 #include "webrtc/video_engine/vie_image_process_impl.h"
     32 #endif
     33 #include "webrtc/video_engine/vie_network_impl.h"
     34 #ifdef WEBRTC_VIDEO_ENGINE_RENDER_API
     35 #include "webrtc/video_engine/vie_render_impl.h"
     36 #endif
     37 #ifdef WEBRTC_VIDEO_ENGINE_RTP_RTCP_API
     38 #include "webrtc/video_engine/vie_rtp_rtcp_impl.h"
     39 #endif
     40 #ifdef WEBRTC_VIDEO_ENGINE_EXTERNAL_CODEC_API
     41 #include "webrtc/video_engine/vie_external_codec_impl.h"
     42 #endif
     43 
     44 namespace webrtc {
     45 
     46 class VideoEngineImpl
     47     : public ViEBaseImpl,
     48 #ifdef WEBRTC_VIDEO_ENGINE_CODEC_API
     49       public ViECodecImpl,
     50 #endif
     51 #ifdef WEBRTC_VIDEO_ENGINE_CAPTURE_API
     52       public ViECaptureImpl,
     53 #endif
     54 #ifdef WEBRTC_VIDEO_ENGINE_FILE_API
     55       public ViEFileImpl,
     56 #endif
     57 #ifdef WEBRTC_VIDEO_ENGINE_IMAGE_PROCESS_API
     58       public ViEImageProcessImpl,
     59 #endif
     60       public ViENetworkImpl,
     61 #ifdef WEBRTC_VIDEO_ENGINE_RENDER_API
     62       public ViERenderImpl,
     63 #endif
     64 #ifdef WEBRTC_VIDEO_ENGINE_RTP_RTCP_API
     65       public ViERTP_RTCPImpl,
     66 #endif
     67 #ifdef WEBRTC_VIDEO_ENGINE_EXTERNAL_CODEC_API
     68       public ViEExternalCodecImpl,
     69 #endif
     70       public VideoEngine
     71 {  // NOLINT
     72  public:
     73   VideoEngineImpl(const Config* config, bool owns_config)
     74       : ViEBaseImpl(*config),
     75 #ifdef WEBRTC_VIDEO_ENGINE_CODEC_API
     76         ViECodecImpl(ViEBaseImpl::shared_data()),
     77 #endif
     78 #ifdef WEBRTC_VIDEO_ENGINE_CAPTURE_API
     79         ViECaptureImpl(ViEBaseImpl::shared_data()),
     80 #endif
     81 #ifdef WEBRTC_VIDEO_ENGINE_FILE_API
     82         ViEFileImpl(ViEBaseImpl::shared_data()),
     83 #endif
     84 #ifdef WEBRTC_VIDEO_ENGINE_IMAGE_PROCESS_API
     85         ViEImageProcessImpl(ViEBaseImpl::shared_data()),
     86 #endif
     87         ViENetworkImpl(ViEBaseImpl::shared_data()),
     88 #ifdef WEBRTC_VIDEO_ENGINE_RENDER_API
     89         ViERenderImpl(ViEBaseImpl::shared_data()),
     90 #endif
     91 #ifdef WEBRTC_VIDEO_ENGINE_RTP_RTCP_API
     92         ViERTP_RTCPImpl(ViEBaseImpl::shared_data()),
     93 #endif
     94 #ifdef WEBRTC_VIDEO_ENGINE_EXTERNAL_CODEC_API
     95         ViEExternalCodecImpl(ViEBaseImpl::shared_data()),
     96 #endif
     97         own_config_(owns_config ? config : NULL)
     98   {}
     99   virtual ~VideoEngineImpl() {}
    100 
    101  private:
    102   // Placeholder for the case where this owns the config.
    103   scoped_ptr<const Config> own_config_;
    104 };
    105 
    106 }  // namespace webrtc
    107 
    108 #endif  // WEBRTC_VIDEO_ENGINE_VIE_IMPL_H_
    109