2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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.
11 // ViESender is responsible for sending packets to network.
13 #ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
14 #define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
16 #include "webrtc/common_types.h"
17 #include "webrtc/engine_configurations.h"
18 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
19 #include "webrtc/typedefs.h"
20 #include "webrtc/video_engine/vie_defines.h"
24 class CriticalSectionWrapper;
27 class VideoCodingModule;
29 class ViESender: public Transport {
31 explicit ViESender(const int32_t channel_id);
34 // Registers transport to use for sending RTP and RTCP.
35 int RegisterSendTransport(Transport* transport);
36 int DeregisterSendTransport();
38 // Stores all incoming packets to file.
39 int StartRTPDump(const char file_nameUTF8[1024]);
42 // Implements Transport.
43 virtual int SendPacket(int vie_id, const void* data, int len);
44 virtual int SendRTCPPacket(int vie_id, const void* data, int len);
47 const int32_t channel_id_;
49 scoped_ptr<CriticalSectionWrapper> critsect_;
51 Transport* transport_;
57 #endif // WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_