Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / video_engine / vie_base_impl.h
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_BASE_IMPL_H_
12 #define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
13
14 #include "webrtc/video_engine/include/vie_base.h"
15 #include "webrtc/video_engine/vie_defines.h"
16 #include "webrtc/video_engine/vie_ref_count.h"
17 #include "webrtc/video_engine/vie_shared_data.h"
18
19 namespace webrtc {
20
21 class Config;
22 class Module;
23 class VoiceEngine;
24
25 class ViEBaseImpl
26     : public ViEBase,
27       public ViERefCount {
28  public:
29   virtual int Release();
30
31   // Implements ViEBase.
32   virtual int Init();
33   virtual int SetVoiceEngine(VoiceEngine* voice_engine);
34   virtual int RegisterCpuOveruseObserver(int channel,
35                                          CpuOveruseObserver* observer);
36   virtual int SetCpuOveruseOptions(int channel,
37                                    const CpuOveruseOptions& options);
38   virtual int GetCpuOveruseMetrics(int channel,
39                                    CpuOveruseMetrics* metrics);
40   virtual void RegisterSendSideDelayObserver(int channel,
41       SendSideDelayObserver* observer) OVERRIDE;
42   virtual int CreateChannel(int& video_channel);  // NOLINT
43   virtual int CreateChannel(int& video_channel,  // NOLINT
44                             const Config* config);
45   virtual int CreateChannel(int& video_channel,  // NOLINT
46                             int original_channel);
47   virtual int CreateReceiveChannel(int& video_channel,  // NOLINT
48                                    int original_channel);
49   virtual int DeleteChannel(const int video_channel);
50   virtual int ConnectAudioChannel(const int video_channel,
51                                   const int audio_channel);
52   virtual int DisconnectAudioChannel(const int video_channel);
53   virtual int StartSend(const int video_channel);
54   virtual int StopSend(const int video_channel);
55   virtual int StartReceive(const int video_channel);
56   virtual int StopReceive(const int video_channel);
57   virtual int GetVersion(char version[1024]);
58   virtual int LastError();
59
60  protected:
61   explicit ViEBaseImpl(const Config& config);
62   virtual ~ViEBaseImpl();
63
64   ViESharedData* shared_data() { return &shared_data_; }
65
66  private:
67   int CreateChannel(int& video_channel, int original_channel,  // NOLINT
68                     bool sender);
69
70   // ViEBaseImpl owns ViESharedData used by all interface implementations.
71   ViESharedData shared_data_;
72 };
73
74 }  // namespace webrtc
75
76 #endif  // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_