mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-01 17:41:34 +00:00
58 lines
1.6 KiB
C++
58 lines
1.6 KiB
C++
/*
|
|
* 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 sending packets to network.
|
|
|
|
#ifndef WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
|
|
#define WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
|
|
|
|
#include "webrtc/base/scoped_ptr.h"
|
|
#include "webrtc/common_types.h"
|
|
#include "webrtc/engine_configurations.h"
|
|
#include "webrtc/typedefs.h"
|
|
#include "webrtc/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 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.
|
|
int SendPacket(int vie_id, const void* data, size_t len) override;
|
|
int SendRTCPPacket(int vie_id, const void* data, size_t len) override;
|
|
|
|
private:
|
|
const int32_t channel_id_;
|
|
|
|
rtc::scoped_ptr<CriticalSectionWrapper> critsect_;
|
|
|
|
Transport* transport_;
|
|
RtpDump* rtp_dump_;
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // WEBRTC_VIDEO_ENGINE_VIE_SENDER_H_
|