Files
platform-external-webrtc/webrtc/video_engine/internal/video_call.h
pbos@webrtc.org 74fa4893f9 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
2013-08-23 09:19:30 +00:00

89 lines
2.8 KiB
C++

/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_VIDEO_ENGINE_VIDEO_CALL_IMPL_H_
#define WEBRTC_VIDEO_ENGINE_VIDEO_CALL_IMPL_H_
#include <map>
#include <vector>
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/video_engine/internal/video_receive_stream.h"
#include "webrtc/video_engine/internal/video_send_stream.h"
#include "webrtc/video_engine/new_include/video_call.h"
namespace webrtc {
class VideoEngine;
class ViERTP_RTCP;
class ViECodec;
namespace internal {
// TODO(pbos): Split out the packet receiver, should be sharable between
// VideoEngine and VoiceEngine.
class VideoCall : public webrtc::VideoCall, public PacketReceiver {
public:
VideoCall(webrtc::VideoEngine* video_engine,
const VideoCall::Config& config);
virtual ~VideoCall();
virtual PacketReceiver* Receiver() OVERRIDE;
virtual std::vector<VideoCodec> GetVideoCodecs() OVERRIDE;
virtual VideoSendStream::Config GetDefaultSendConfig() OVERRIDE;
virtual VideoSendStream* CreateSendStream(
const VideoSendStream::Config& config) OVERRIDE;
virtual SendStreamState* DestroySendStream(
webrtc::VideoSendStream* send_stream) OVERRIDE;
virtual VideoReceiveStream::Config GetDefaultReceiveConfig() OVERRIDE;
virtual VideoReceiveStream* CreateReceiveStream(
const VideoReceiveStream::Config& config) OVERRIDE;
virtual void DestroyReceiveStream(webrtc::VideoReceiveStream* receive_stream)
OVERRIDE;
virtual uint32_t SendBitrateEstimate() OVERRIDE;
virtual uint32_t ReceiveBitrateEstimate() OVERRIDE;
virtual bool DeliverPacket(const uint8_t* packet, size_t length) OVERRIDE;
private:
bool DeliverRtcp(const uint8_t* packet, size_t length);
bool DeliverRtp(const RTPHeader& header,
const uint8_t* packet,
size_t length);
VideoCall::Config config_;
std::map<uint32_t, VideoReceiveStream*> receive_ssrcs_;
scoped_ptr<RWLockWrapper> receive_lock_;
std::map<uint32_t, VideoSendStream*> send_ssrcs_;
scoped_ptr<RWLockWrapper> send_lock_;
scoped_ptr<RtpHeaderParser> rtp_header_parser_;
webrtc::VideoEngine* video_engine_;
ViERTP_RTCP* rtp_rtcp_;
ViECodec* codec_;
DISALLOW_COPY_AND_ASSIGN(VideoCall);
};
} // namespace internal
} // namespace webrtc
#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_CALL_H_