blob: 1eecc06c76c800d3829deb49590910a99d32b954 [file] [log] [blame]
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +00001/*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
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.
9 */
10
solenberg@webrtc.orgddbd31e2014-02-11 15:27:49 +000011// ViESender is responsible for sending packets to network.
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +000012
13#ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
14#define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
15
pbos@webrtc.orgf2e6fb32013-05-17 13:44:48 +000016#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"
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +000021
22namespace webrtc {
23
24class CriticalSectionWrapper;
25class RtpDump;
26class Transport;
27class VideoCodingModule;
28
29class ViESender: public Transport {
30 public:
31 explicit ViESender(const int32_t channel_id);
32 ~ViESender();
33
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +000034 // Registers transport to use for sending RTP and RTCP.
35 int RegisterSendTransport(Transport* transport);
36 int DeregisterSendTransport();
37
38 // Stores all incoming packets to file.
39 int StartRTPDump(const char file_nameUTF8[1024]);
40 int StopRTPDump();
41
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);
45
46 private:
47 const int32_t channel_id_;
48
49 scoped_ptr<CriticalSectionWrapper> critsect_;
50
andrew@webrtc.orga7b57da2012-10-22 18:19:23 +000051 Transport* transport_;
52 RtpDump* rtp_dump_;
53};
54
55} // namespace webrtc
56
57#endif // WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_