Remove newapi:: namespace for typenames without overlap.
Typing newapi:: everywhere is very verbose, and doesn't add any real value. The new API is still separated from other code by being in separate directories, such as internal/ or new_include. BUG= R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2075004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4601 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -24,19 +24,17 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
namespace newapi {
|
||||
VideoCall* VideoCall::Create(const newapi::VideoCall::Config& config) {
|
||||
VideoCall* VideoCall::Create(const VideoCall::Config& config) {
|
||||
webrtc::VideoEngine* video_engine = webrtc::VideoEngine::Create();
|
||||
assert(video_engine != NULL);
|
||||
|
||||
return new internal::VideoCall(video_engine, config);
|
||||
}
|
||||
} // namespace newapi
|
||||
|
||||
namespace internal {
|
||||
|
||||
VideoCall::VideoCall(webrtc::VideoEngine* video_engine,
|
||||
const newapi::VideoCall::Config& config)
|
||||
const VideoCall::Config& config)
|
||||
: config_(config),
|
||||
receive_lock_(RWLockWrapper::CreateRWLock()),
|
||||
send_lock_(RWLockWrapper::CreateRWLock()),
|
||||
@ -58,7 +56,7 @@ VideoCall::~VideoCall() {
|
||||
webrtc::VideoEngine::Delete(video_engine_);
|
||||
}
|
||||
|
||||
newapi::PacketReceiver* VideoCall::Receiver() { return this; }
|
||||
PacketReceiver* VideoCall::Receiver() { return this; }
|
||||
|
||||
std::vector<VideoCodec> VideoCall::GetVideoCodecs() {
|
||||
std::vector<VideoCodec> codecs;
|
||||
@ -78,8 +76,8 @@ VideoSendStream::Config VideoCall::GetDefaultSendConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
newapi::VideoSendStream* VideoCall::CreateSendStream(
|
||||
const newapi::VideoSendStream::Config& config) {
|
||||
VideoSendStream* VideoCall::CreateSendStream(
|
||||
const VideoSendStream::Config& config) {
|
||||
assert(config.rtp.ssrcs.size() > 0);
|
||||
assert(config.codec.numberOfSimulcastStreams == 0 ||
|
||||
config.codec.numberOfSimulcastStreams == config.rtp.ssrcs.size());
|
||||
@ -95,8 +93,8 @@ newapi::VideoSendStream* VideoCall::CreateSendStream(
|
||||
return send_stream;
|
||||
}
|
||||
|
||||
newapi::SendStreamState* VideoCall::DestroySendStream(
|
||||
newapi::VideoSendStream* send_stream) {
|
||||
SendStreamState* VideoCall::DestroySendStream(
|
||||
webrtc::VideoSendStream* send_stream) {
|
||||
if (send_stream == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -108,11 +106,11 @@ newapi::SendStreamState* VideoCall::DestroySendStream(
|
||||
}
|
||||
|
||||
VideoReceiveStream::Config VideoCall::GetDefaultReceiveConfig() {
|
||||
return newapi::VideoReceiveStream::Config();
|
||||
return VideoReceiveStream::Config();
|
||||
}
|
||||
|
||||
newapi::VideoReceiveStream* VideoCall::CreateReceiveStream(
|
||||
const newapi::VideoReceiveStream::Config& config) {
|
||||
VideoReceiveStream* VideoCall::CreateReceiveStream(
|
||||
const VideoReceiveStream::Config& config) {
|
||||
VideoReceiveStream* receive_stream =
|
||||
new VideoReceiveStream(video_engine_, config, config_.send_transport);
|
||||
|
||||
@ -123,7 +121,7 @@ newapi::VideoReceiveStream* VideoCall::CreateReceiveStream(
|
||||
}
|
||||
|
||||
void VideoCall::DestroyReceiveStream(
|
||||
newapi::VideoReceiveStream* receive_stream) {
|
||||
webrtc::VideoReceiveStream* receive_stream) {
|
||||
if (receive_stream == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -30,29 +30,29 @@ namespace internal {
|
||||
|
||||
// TODO(pbos): Split out the packet receiver, should be sharable between
|
||||
// VideoEngine and VoiceEngine.
|
||||
class VideoCall : public newapi::VideoCall, public newapi::PacketReceiver {
|
||||
class VideoCall : public webrtc::VideoCall, public PacketReceiver {
|
||||
public:
|
||||
VideoCall(webrtc::VideoEngine* video_engine,
|
||||
const newapi::VideoCall::Config& config);
|
||||
const VideoCall::Config& config);
|
||||
virtual ~VideoCall();
|
||||
|
||||
virtual newapi::PacketReceiver* Receiver() OVERRIDE;
|
||||
virtual PacketReceiver* Receiver() OVERRIDE;
|
||||
virtual std::vector<VideoCodec> GetVideoCodecs() OVERRIDE;
|
||||
|
||||
virtual newapi::VideoSendStream::Config GetDefaultSendConfig() OVERRIDE;
|
||||
virtual VideoSendStream::Config GetDefaultSendConfig() OVERRIDE;
|
||||
|
||||
virtual newapi::VideoSendStream* CreateSendStream(
|
||||
const newapi::VideoSendStream::Config& config) OVERRIDE;
|
||||
virtual VideoSendStream* CreateSendStream(
|
||||
const VideoSendStream::Config& config) OVERRIDE;
|
||||
|
||||
virtual newapi::SendStreamState* DestroySendStream(
|
||||
newapi::VideoSendStream* send_stream) OVERRIDE;
|
||||
virtual SendStreamState* DestroySendStream(
|
||||
webrtc::VideoSendStream* send_stream) OVERRIDE;
|
||||
|
||||
virtual newapi::VideoReceiveStream::Config GetDefaultReceiveConfig() OVERRIDE;
|
||||
virtual VideoReceiveStream::Config GetDefaultReceiveConfig() OVERRIDE;
|
||||
|
||||
virtual newapi::VideoReceiveStream* CreateReceiveStream(
|
||||
const newapi::VideoReceiveStream::Config& config) OVERRIDE;
|
||||
virtual VideoReceiveStream* CreateReceiveStream(
|
||||
const VideoReceiveStream::Config& config) OVERRIDE;
|
||||
|
||||
virtual void DestroyReceiveStream(newapi::VideoReceiveStream* receive_stream)
|
||||
virtual void DestroyReceiveStream(webrtc::VideoReceiveStream* receive_stream)
|
||||
OVERRIDE;
|
||||
|
||||
virtual uint32_t SendBitrateEstimate() OVERRIDE;
|
||||
@ -66,7 +66,7 @@ class VideoCall : public newapi::VideoCall, public newapi::PacketReceiver {
|
||||
const uint8_t* packet,
|
||||
size_t length);
|
||||
|
||||
newapi::VideoCall::Config config_;
|
||||
VideoCall::Config config_;
|
||||
|
||||
std::map<uint32_t, VideoReceiveStream*> receive_ssrcs_;
|
||||
scoped_ptr<RWLockWrapper> receive_lock_;
|
||||
|
||||
@ -28,7 +28,7 @@ namespace internal {
|
||||
|
||||
VideoReceiveStream::VideoReceiveStream(
|
||||
webrtc::VideoEngine* video_engine,
|
||||
const newapi::VideoReceiveStream::Config& config,
|
||||
const VideoReceiveStream::Config& config,
|
||||
newapi::Transport* transport)
|
||||
: transport_(transport), config_(config), channel_(-1) {
|
||||
video_engine_base_ = ViEBase::GetInterface(video_engine);
|
||||
|
||||
@ -29,12 +29,12 @@ class ViERTP_RTCP;
|
||||
|
||||
namespace internal {
|
||||
|
||||
class VideoReceiveStream : public newapi::VideoReceiveStream,
|
||||
class VideoReceiveStream : public webrtc::VideoReceiveStream,
|
||||
public webrtc::ExternalRenderer,
|
||||
public webrtc::Transport {
|
||||
public:
|
||||
VideoReceiveStream(webrtc::VideoEngine* video_engine,
|
||||
const newapi::VideoReceiveStream::Config& config,
|
||||
const VideoReceiveStream::Config& config,
|
||||
newapi::Transport* transport);
|
||||
virtual ~VideoReceiveStream();
|
||||
|
||||
@ -61,7 +61,7 @@ class VideoReceiveStream : public newapi::VideoReceiveStream,
|
||||
|
||||
private:
|
||||
newapi::Transport* transport_;
|
||||
newapi::VideoReceiveStream::Config config_;
|
||||
VideoReceiveStream::Config config_;
|
||||
Clock* clock_;
|
||||
|
||||
ViEBase* video_engine_base_;
|
||||
|
||||
@ -79,7 +79,7 @@ class ResolutionAdaptor : public webrtc::CpuOveruseObserver {
|
||||
VideoSendStream::VideoSendStream(newapi::Transport* transport,
|
||||
bool overuse_detection,
|
||||
webrtc::VideoEngine* video_engine,
|
||||
const newapi::VideoSendStream::Config& config)
|
||||
const VideoSendStream::Config& config)
|
||||
: transport_(transport), config_(config), external_codec_(NULL) {
|
||||
|
||||
if (config_.codec.numberOfSimulcastStreams > 0) {
|
||||
@ -198,7 +198,7 @@ void VideoSendStream::PutFrame(const I420VideoFrame& frame,
|
||||
}
|
||||
}
|
||||
|
||||
newapi::VideoSendStreamInput* VideoSendStream::Input() { return this; }
|
||||
VideoSendStreamInput* VideoSendStream::Input() { return this; }
|
||||
|
||||
void VideoSendStream::StartSend() {
|
||||
if (video_engine_base_->StartSend(channel_) != 0)
|
||||
|
||||
@ -32,21 +32,21 @@ namespace internal {
|
||||
|
||||
class ResolutionAdaptor;
|
||||
|
||||
class VideoSendStream : public newapi::VideoSendStream,
|
||||
public newapi::VideoSendStreamInput,
|
||||
class VideoSendStream : public webrtc::VideoSendStream,
|
||||
public VideoSendStreamInput,
|
||||
public webrtc::Transport {
|
||||
public:
|
||||
VideoSendStream(newapi::Transport* transport,
|
||||
bool overuse_detection,
|
||||
webrtc::VideoEngine* video_engine,
|
||||
const newapi::VideoSendStream::Config& config);
|
||||
const VideoSendStream::Config& config);
|
||||
|
||||
virtual ~VideoSendStream();
|
||||
|
||||
virtual void PutFrame(const I420VideoFrame& frame,
|
||||
uint32_t time_since_capture_ms) OVERRIDE;
|
||||
|
||||
virtual newapi::VideoSendStreamInput* Input() OVERRIDE;
|
||||
virtual VideoSendStreamInput* Input() OVERRIDE;
|
||||
|
||||
virtual void StartSend() OVERRIDE;
|
||||
|
||||
@ -69,7 +69,7 @@ class VideoSendStream : public newapi::VideoSendStream,
|
||||
|
||||
private:
|
||||
newapi::Transport* transport_;
|
||||
newapi::VideoSendStream::Config config_;
|
||||
VideoSendStream::Config config_;
|
||||
|
||||
ViEBase* video_engine_base_;
|
||||
ViECapture* capture_;
|
||||
|
||||
Reference in New Issue
Block a user