Bug 797671: Import Webrtc.org code from stable branch 3.12 (rev 2820) rs=jesup
[gecko.git] / media / webrtc / trunk / src / video_engine / vie_base_impl.h
blob3d914ec39faf93be4a9e672023170daf573ac4d3
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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 */
11 #ifndef WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
12 #define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
14 #include "video_engine/include/vie_base.h"
15 #include "video_engine/vie_defines.h"
16 #include "video_engine/vie_ref_count.h"
17 #include "video_engine/vie_shared_data.h"
19 namespace webrtc {
21 class Module;
22 class VoiceEngine;
24 class ViEBaseImpl
25 : public ViEBase,
26 public ViERefCount {
27 public:
28 virtual int Release();
30 // Implements ViEBase.
31 virtual int Init();
32 virtual int SetVoiceEngine(VoiceEngine* voice_engine);
33 virtual int CreateChannel(int& video_channel); // NOLINT
34 virtual int CreateChannel(int& video_channel, // NOLINT
35 int original_channel);
36 virtual int CreateReceiveChannel(int& video_channel, // NOLINT
37 int original_channel);
38 virtual int DeleteChannel(const int video_channel);
39 virtual int ConnectAudioChannel(const int video_channel,
40 const int audio_channel);
41 virtual int DisconnectAudioChannel(const int video_channel);
42 virtual int StartSend(const int video_channel);
43 virtual int StopSend(const int video_channel);
44 virtual int StartReceive(const int video_channel);
45 virtual int StopReceive(const int video_channel);
46 virtual int RegisterObserver(ViEBaseObserver& observer); // NOLINT
47 virtual int DeregisterObserver();
48 virtual int GetVersion(char version[1024]);
49 virtual int LastError();
51 protected:
52 ViEBaseImpl();
53 virtual ~ViEBaseImpl();
55 ViESharedData* shared_data() { return &shared_data_; }
57 private:
58 // Version functions.
59 WebRtc_Word32 AddViEVersion(char* str) const;
60 WebRtc_Word32 AddBuildInfo(char* str) const;
61 WebRtc_Word32 AddExternalTransportBuild(char* str) const;
63 int CreateChannel(int& video_channel, int original_channel, // NOLINT
64 bool sender);
66 // ViEBaseImpl owns ViESharedData used by all interface implementations.
67 ViESharedData shared_data_;
70 } // namespace webrtc
72 #endif // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_