blob: a9eec444d4a847a1a28b8338c4717c20fbb9af7f [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
mflodman@webrtc.org9ec883e2012-03-05 17:12:41 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
mflodman@webrtc.orge06ca3c2012-06-29 13:20:14 +000011#ifndef WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
12#define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
mflodman@webrtc.org9ba151b2012-06-21 10:02:13 +000014#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"
niklase@google.com470e71d2011-07-07 08:21:25 +000018
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000019namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000020
niklase@google.com470e71d2011-07-07 08:21:25 +000021class Module;
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000022class VoiceEngine;
niklase@google.com470e71d2011-07-07 08:21:25 +000023
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000024class ViEBaseImpl
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000025 : public ViEBase,
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000026 public ViERefCount {
27 public:
28 virtual int Release();
niklase@google.com470e71d2011-07-07 08:21:25 +000029
mflodman@webrtc.org9ec883e2012-03-05 17:12:41 +000030 // Implements ViEBase.
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000031 virtual int Init();
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000032 virtual int SetVoiceEngine(VoiceEngine* voice_engine);
mflodman@webrtc.org9ba151b2012-06-21 10:02:13 +000033 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);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000038 virtual int DeleteChannel(const int video_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000039 virtual int ConnectAudioChannel(const int video_channel,
40 const int audio_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000041 virtual int DisconnectAudioChannel(const int video_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000042 virtual int StartSend(const int video_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000043 virtual int StopSend(const int video_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000044 virtual int StartReceive(const int video_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000045 virtual int StopReceive(const int video_channel);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000046 virtual int GetVersion(char version[1024]);
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000047 virtual int LastError();
niklase@google.com470e71d2011-07-07 08:21:25 +000048
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000049 protected:
50 ViEBaseImpl();
51 virtual ~ViEBaseImpl();
niklase@google.com470e71d2011-07-07 08:21:25 +000052
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000053 ViESharedData* shared_data() { return &shared_data_; }
54
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000055 private:
56 // Version functions.
pbos@webrtc.orgb238d122013-04-09 13:41:51 +000057 int32_t AddViEVersion(char* str) const;
58 int32_t AddBuildInfo(char* str) const;
59 int32_t AddExternalTransportBuild(char* str) const;
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000060
mflodman@webrtc.org9ba151b2012-06-21 10:02:13 +000061 int CreateChannel(int& video_channel, int original_channel, // NOLINT
62 bool sender);
mflodman@webrtc.org9ec883e2012-03-05 17:12:41 +000063
mflodman@webrtc.orgb11424b2012-01-25 13:42:03 +000064 // ViEBaseImpl owns ViESharedData used by all interface implementations.
65 ViESharedData shared_data_;
niklase@google.com470e71d2011-07-07 08:21:25 +000066};
67
mflodman@webrtc.org27a82a62011-11-30 18:04:26 +000068} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000069
mflodman@webrtc.orge06ca3c2012-06-29 13:20:14 +000070#endif // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_