Refactored ViEBaseImpl.
Only style changes, will follow up with references/ptrs. Review URL: http://webrtc-codereview.appspot.com/290008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1066 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a98124542a
commit
27a82a65ca
File diff suppressed because it is too large
Load Diff
@ -8,92 +8,94 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
#ifndef WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
|
||||||
* vie_base_impl.h
|
#define WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_BASE_IMPL_H_
|
|
||||||
#define WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_BASE_IMPL_H_
|
|
||||||
|
|
||||||
|
#include "vie_base.h"
|
||||||
#include "vie_defines.h"
|
#include "vie_defines.h"
|
||||||
|
|
||||||
#include "vie_ref_count.h"
|
#include "vie_ref_count.h"
|
||||||
#include "vie_shared_data.h"
|
#include "vie_shared_data.h"
|
||||||
#include "vie_base.h"
|
|
||||||
|
|
||||||
// Forward declarations
|
namespace webrtc {
|
||||||
namespace webrtc
|
|
||||||
{
|
|
||||||
|
|
||||||
class VoiceEngine;
|
|
||||||
class Module;
|
class Module;
|
||||||
|
class VoiceEngine;
|
||||||
|
|
||||||
class ViEBaseImpl: public virtual ViESharedData,
|
class ViEBaseImpl
|
||||||
public ViEBase,
|
: public virtual ViESharedData,
|
||||||
public ViERefCount
|
public ViEBase,
|
||||||
{
|
public ViERefCount {
|
||||||
public:
|
public:
|
||||||
virtual int Release();
|
virtual int Release();
|
||||||
|
|
||||||
virtual int Init();
|
// Initializes VideoEngine and must be called before any other API is called.
|
||||||
|
virtual int Init();
|
||||||
|
|
||||||
virtual int SetVoiceEngine(VoiceEngine* ptrVoiceEngine);
|
// Connects ViE to a VoE instance.
|
||||||
|
virtual int SetVoiceEngine(VoiceEngine* voice_engine);
|
||||||
|
|
||||||
// Channel functions
|
// Creates a new ViE channel.
|
||||||
virtual int CreateChannel(int& videoChannel);
|
virtual int CreateChannel(int& video_channel);
|
||||||
|
|
||||||
virtual int CreateChannel(int& videoChannel, int originalChannel);
|
// Creates a new ViE channel that will use the same capture device and encoder
|
||||||
|
// as |original_channel|.
|
||||||
|
virtual int CreateChannel(int& video_channel, int original_channel);
|
||||||
|
|
||||||
virtual int DeleteChannel(const int videoChannel);
|
// Deletes a ViE channel.
|
||||||
|
virtual int DeleteChannel(const int video_channel);
|
||||||
|
|
||||||
virtual int ConnectAudioChannel(const int videoChannel,
|
// Connects a ViE channel with a VoE channel.
|
||||||
const int audioChannel);
|
virtual int ConnectAudioChannel(const int video_channel,
|
||||||
|
const int audio_channel);
|
||||||
|
|
||||||
virtual int DisconnectAudioChannel(const int videoChannel);
|
// Disconnects a video/voice channel pair.
|
||||||
|
virtual int DisconnectAudioChannel(const int video_channel);
|
||||||
|
|
||||||
// Start and stop
|
// Starts sending on video_channel and also starts the encoder.
|
||||||
virtual int StartSend(const int videoChannel);
|
virtual int StartSend(const int video_channel);
|
||||||
|
|
||||||
virtual int StopSend(const int videoChannel);
|
// Stops sending on the specified channel.
|
||||||
|
virtual int StopSend(const int video_channel);
|
||||||
|
|
||||||
virtual int StartReceive(const int videoChannel);
|
// Starts receiving on the channel and also start decoding.
|
||||||
|
virtual int StartReceive(const int video_channel);
|
||||||
|
|
||||||
virtual int StopReceive(const int videoChannel);
|
// Stops receiving on the specified channel.
|
||||||
|
virtual int StopReceive(const int video_channel);
|
||||||
|
|
||||||
// Callbacks
|
// Registers a customer implemented observer.
|
||||||
virtual int RegisterObserver(ViEBaseObserver& observer);
|
virtual int RegisterObserver(ViEBaseObserver& observer);
|
||||||
|
|
||||||
virtual int DeregisterObserver();
|
// Deregisters the observer.
|
||||||
|
virtual int DeregisterObserver();
|
||||||
|
|
||||||
// Info functions
|
// Prints version information into |verson|.
|
||||||
virtual int GetVersion(char version[1024]);
|
virtual int GetVersion(char version[1024]);
|
||||||
|
|
||||||
virtual int LastError();
|
// Returns the error code for the last registered error.
|
||||||
|
virtual int LastError();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ViEBaseImpl();
|
ViEBaseImpl();
|
||||||
virtual ~ViEBaseImpl();
|
virtual ~ViEBaseImpl();
|
||||||
private:
|
|
||||||
|
|
||||||
// Version functions
|
private:
|
||||||
WebRtc_Word32 AddViEVersion(char* str) const;
|
// Version functions.
|
||||||
WebRtc_Word32 AddBuildInfo(char* str) const;
|
WebRtc_Word32 AddViEVersion(char* str) const;
|
||||||
|
WebRtc_Word32 AddBuildInfo(char* str) const;
|
||||||
#ifdef WEBRTC_EXTERNAL_TRANSPORT
|
#ifdef WEBRTC_EXTERNAL_TRANSPORT
|
||||||
WebRtc_Word32 AddExternalTransportBuild(char* str) const;
|
WebRtc_Word32 AddExternalTransportBuild(char* str) const;
|
||||||
#else
|
#else
|
||||||
WebRtc_Word32 AddSocketModuleVersion(char* str) const;
|
WebRtc_Word32 AddSocketModuleVersion(char* str) const;
|
||||||
#endif
|
#endif
|
||||||
WebRtc_Word32 AddModuleVersion(webrtc::Module* module, char* str) const;
|
WebRtc_Word32 AddModuleVersion(webrtc::Module* module, char* str) const;
|
||||||
WebRtc_Word32 AddVCMVersion(char* str) const;
|
WebRtc_Word32 AddVCMVersion(char* str) const;
|
||||||
WebRtc_Word32 AddVideoCaptureVersion(char* str) const;
|
WebRtc_Word32 AddVideoCaptureVersion(char* str) const;
|
||||||
WebRtc_Word32 AddVideoProcessingVersion(char* str) const;
|
WebRtc_Word32 AddVideoProcessingVersion(char* str) const;
|
||||||
WebRtc_Word32 AddRenderVersion(char* str) const;
|
WebRtc_Word32 AddRenderVersion(char* str) const;
|
||||||
#ifdef WEBRTC_SRTP
|
WebRtc_Word32 AddRtpRtcpModuleVersion(char* str) const;
|
||||||
WebRtc_Word32 AddSRTPModuleVersion(char* str) const;
|
|
||||||
#endif
|
|
||||||
WebRtc_Word32 AddRtpRtcpModuleVersion(char* str) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
#endif // #define WEBRTC_VIDEO_ENGINE_MAIN_SOURCE_VIE_BASE_IMPL_H_
|
#endif // WEBRTC_VIDEO_ENGINE_VIE_BASE_IMPL_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user