diff options
author | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2012-10-22 18:19:23 +0000 |
---|---|---|
committer | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2012-10-22 18:19:23 +0000 |
commit | b015cbede88899f67a53fbbe581b02ce8e327949 (patch) | |
tree | 530a64a3cfdbbabacab974c183326517d49e761e /video_engine/vie_sender.h | |
download | webrtc-b015cbede88899f67a53fbbe581b02ce8e327949.tar.gz |
Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/915006
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/vie_sender.h')
-rw-r--r-- | video_engine/vie_sender.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/video_engine/vie_sender.h b/video_engine/vie_sender.h new file mode 100644 index 00000000..c9a1ef8f --- /dev/null +++ b/video_engine/vie_sender.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2012 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. + */ + +// ViESender is responsible for encrypting, if enabled, packets and send to +// network. + +#ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ +#define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ + +#include "common_types.h" // NOLINT +#include "engine_configurations.h" // NOLINT +#include "system_wrappers/interface/scoped_ptr.h" +#include "typedefs.h" // NOLINT +#include "video_engine/vie_defines.h" + +namespace webrtc { + +class CriticalSectionWrapper; +class RtpDump; +class Transport; +class VideoCodingModule; + +class ViESender: public Transport { + public: + explicit ViESender(const int32_t channel_id); + ~ViESender(); + + // Registers an encryption class to use before sending packets. + int RegisterExternalEncryption(Encryption* encryption); + int DeregisterExternalEncryption(); + + // Registers transport to use for sending RTP and RTCP. + int RegisterSendTransport(Transport* transport); + int DeregisterSendTransport(); + + // Stores all incoming packets to file. + int StartRTPDump(const char file_nameUTF8[1024]); + int StopRTPDump(); + + // Implements Transport. + virtual int SendPacket(int vie_id, const void* data, int len); + virtual int SendRTCPPacket(int vie_id, const void* data, int len); + + private: + const int32_t channel_id_; + + scoped_ptr<CriticalSectionWrapper> critsect_; + + Encryption* external_encryption_; + WebRtc_UWord8* encryption_buffer_; + Transport* transport_; + RtpDump* rtp_dump_; +}; + +} // namespace webrtc + +#endif // WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_ |