Reformatted rtp_sender: made lint clean.
TESTED=rtp_rtcp_unittests BUG= Review URL: https://webrtc-codereview.appspot.com/1062004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3412 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -123,11 +123,10 @@ ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
|
|||||||
simulcast_(false),
|
simulcast_(false),
|
||||||
key_frame_req_method_(kKeyFrameReqFirRtp),
|
key_frame_req_method_(kKeyFrameReqFirRtp),
|
||||||
remote_bitrate_(configuration.remote_bitrate_estimator),
|
remote_bitrate_(configuration.remote_bitrate_estimator),
|
||||||
rtt_observer_(configuration.rtt_observer)
|
|
||||||
#ifdef MATLAB
|
#ifdef MATLAB
|
||||||
, plot1_(NULL)
|
, plot1_(NULL),
|
||||||
#endif
|
#endif
|
||||||
{
|
rtt_observer_(configuration.rtt_observer) {
|
||||||
RTPReceiverStrategy* rtp_receiver_strategy;
|
RTPReceiverStrategy* rtp_receiver_strategy;
|
||||||
if (configuration.audio) {
|
if (configuration.audio) {
|
||||||
// If audio, we need to be able to handle telephone events too, so stash
|
// If audio, we need to be able to handle telephone events too, so stash
|
||||||
@ -1645,7 +1644,7 @@ bool ModuleRtpRtcpImpl::SendTelephoneEventActive(
|
|||||||
id_,
|
id_,
|
||||||
"SendTelephoneEventActive()");
|
"SendTelephoneEventActive()");
|
||||||
|
|
||||||
return rtp_sender_.SendTelephoneEventActive(telephone_event);
|
return rtp_sender_.SendTelephoneEventActive(&telephone_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set audio packet size, used to determine when it's time to send a DTMF
|
// Set audio packet size, used to determine when it's time to send a DTMF
|
||||||
@ -1689,7 +1688,7 @@ WebRtc_Word32 ModuleRtpRtcpImpl::GetRTPAudioLevelIndicationStatus(
|
|||||||
kTraceRtpRtcp,
|
kTraceRtpRtcp,
|
||||||
id_,
|
id_,
|
||||||
"GetRTPAudioLevelIndicationStatus()");
|
"GetRTPAudioLevelIndicationStatus()");
|
||||||
return rtp_sender_.AudioLevelIndicationStatus(enable, id);
|
return rtp_sender_.AudioLevelIndicationStatus(&enable, &id);
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32 ModuleRtpRtcpImpl::SetAudioLevel(
|
WebRtc_Word32 ModuleRtpRtcpImpl::SetAudioLevel(
|
||||||
@ -1719,7 +1718,7 @@ WebRtc_Word32 ModuleRtpRtcpImpl::SendREDPayloadType(
|
|||||||
WebRtc_Word8& payload_type) const {
|
WebRtc_Word8& payload_type) const {
|
||||||
WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SendREDPayloadType()");
|
WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SendREDPayloadType()");
|
||||||
|
|
||||||
return rtp_sender_.RED(payload_type);
|
return rtp_sender_.RED(&payload_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
RtpVideoCodecTypes ModuleRtpRtcpImpl::ReceivedVideoCodec() const {
|
RtpVideoCodecTypes ModuleRtpRtcpImpl::ReceivedVideoCodec() const {
|
||||||
@ -1882,9 +1881,9 @@ WebRtc_Word32 ModuleRtpRtcpImpl::GenericFECStatus(
|
|||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WebRtc_Word32 ret_val = rtp_sender_.GenericFECStatus(enable,
|
WebRtc_Word32 ret_val = rtp_sender_.GenericFECStatus(&enable,
|
||||||
payload_type_red,
|
&payload_type_red,
|
||||||
payload_type_fec);
|
&payload_type_fec);
|
||||||
if (child_enabled) {
|
if (child_enabled) {
|
||||||
// Returns true if enabled for any child module.
|
// Returns true if enabled for any child module.
|
||||||
enable = child_enabled;
|
enable = child_enabled;
|
||||||
@ -2083,5 +2082,4 @@ int64_t ModuleRtpRtcpImpl::RtcpReportInterval() {
|
|||||||
else
|
else
|
||||||
return RTCP_INTERVAL_VIDEO_MS;
|
return RTCP_INTERVAL_VIDEO_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Namespace webrtc
|
} // Namespace webrtc
|
||||||
|
@ -515,11 +515,11 @@ class ModuleRtpRtcpImpl : public RtpRtcp {
|
|||||||
|
|
||||||
RemoteBitrateEstimator* remote_bitrate_;
|
RemoteBitrateEstimator* remote_bitrate_;
|
||||||
|
|
||||||
RtcpRttObserver* rtt_observer_;
|
|
||||||
|
|
||||||
#ifdef MATLAB
|
#ifdef MATLAB
|
||||||
MatlabPlot* plot1_;
|
MatlabPlot* plot1_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RtcpRttObserver* rtt_observer_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -23,9 +23,10 @@
|
|||||||
#include "webrtc/modules/rtp_rtcp/source/ssrc_database.h"
|
#include "webrtc/modules/rtp_rtcp/source/ssrc_database.h"
|
||||||
#include "webrtc/modules/rtp_rtcp/source/video_codec_information.h"
|
#include "webrtc/modules/rtp_rtcp/source/video_codec_information.h"
|
||||||
|
|
||||||
#define MAX_INIT_RTP_SEQ_NUMBER 32767 // 2^15 -1
|
#define MAX_INIT_RTP_SEQ_NUMBER 32767 // 2^15 -1.
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
class CriticalSectionWrapper;
|
class CriticalSectionWrapper;
|
||||||
class PacedSender;
|
class PacedSender;
|
||||||
class RTPPacketHistory;
|
class RTPPacketHistory;
|
||||||
@ -40,36 +41,30 @@ class RTPSenderInterface {
|
|||||||
virtual WebRtc_UWord32 SSRC() const = 0;
|
virtual WebRtc_UWord32 SSRC() const = 0;
|
||||||
virtual WebRtc_UWord32 Timestamp() const = 0;
|
virtual WebRtc_UWord32 Timestamp() const = 0;
|
||||||
|
|
||||||
virtual WebRtc_Word32 BuildRTPheader(WebRtc_UWord8* dataBuffer,
|
virtual WebRtc_Word32 BuildRTPheader(
|
||||||
const WebRtc_Word8 payloadType,
|
WebRtc_UWord8 *data_buffer, const WebRtc_Word8 payload_type,
|
||||||
const bool markerBit,
|
const bool marker_bit, const WebRtc_UWord32 capture_time_stamp,
|
||||||
const WebRtc_UWord32 captureTimeStamp,
|
const bool time_stamp_provided = true,
|
||||||
const bool timeStampProvided = true,
|
const bool inc_sequence_number = true) = 0;
|
||||||
const bool incSequenceNumber = true) = 0;
|
|
||||||
|
|
||||||
virtual WebRtc_UWord16 RTPHeaderLength() const = 0;
|
virtual WebRtc_UWord16 RTPHeaderLength() const = 0;
|
||||||
virtual WebRtc_UWord16 IncrementSequenceNumber() = 0;
|
virtual WebRtc_UWord16 IncrementSequenceNumber() = 0;
|
||||||
virtual WebRtc_UWord16 SequenceNumber() const = 0;
|
virtual WebRtc_UWord16 SequenceNumber() const = 0;
|
||||||
virtual WebRtc_UWord16 MaxPayloadLength() const = 0;
|
virtual WebRtc_UWord16 MaxPayloadLength() const = 0;
|
||||||
virtual WebRtc_UWord16 MaxDataPayloadLength() const = 0;
|
virtual WebRtc_UWord16 MaxDataPayloadLength() const = 0;
|
||||||
virtual WebRtc_UWord16 PacketOverHead() const = 0;
|
virtual WebRtc_UWord16 PacketOverHead() const = 0;
|
||||||
virtual WebRtc_UWord16 ActualSendBitrateKbit() const = 0;
|
virtual WebRtc_UWord16 ActualSendBitrateKbit() const = 0;
|
||||||
|
|
||||||
virtual WebRtc_Word32 SendToNetwork(uint8_t* data_buffer,
|
virtual WebRtc_Word32 SendToNetwork(
|
||||||
int payload_length,
|
uint8_t *data_buffer, int payload_length, int rtp_header_length,
|
||||||
int rtp_header_length,
|
int64_t capture_time_ms, StorageType storage) = 0;
|
||||||
int64_t capture_time_ms,
|
|
||||||
StorageType storage) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RTPSender : public Bitrate, public RTPSenderInterface {
|
class RTPSender : public Bitrate, public RTPSenderInterface {
|
||||||
public:
|
public:
|
||||||
RTPSender(const WebRtc_Word32 id,
|
RTPSender(const WebRtc_Word32 id, const bool audio, Clock *clock,
|
||||||
const bool audio,
|
Transport *transport, RtpAudioFeedback *audio_feedback,
|
||||||
Clock* clock,
|
PacedSender *paced_sender);
|
||||||
Transport* transport,
|
|
||||||
RtpAudioFeedback* audio_feedback,
|
|
||||||
PacedSender* paced_sender);
|
|
||||||
virtual ~RTPSender();
|
virtual ~RTPSender();
|
||||||
|
|
||||||
void ProcessBitrate();
|
void ProcessBitrate();
|
||||||
@ -82,16 +77,14 @@ class RTPSender : public Bitrate, public RTPSenderInterface {
|
|||||||
|
|
||||||
void SetTargetSendBitrate(const WebRtc_UWord32 bits);
|
void SetTargetSendBitrate(const WebRtc_UWord32 bits);
|
||||||
|
|
||||||
WebRtc_UWord16 MaxDataPayloadLength() const; // with RTP and FEC headers
|
WebRtc_UWord16 MaxDataPayloadLength() const; // with RTP and FEC headers.
|
||||||
|
|
||||||
WebRtc_Word32 RegisterPayload(
|
WebRtc_Word32 RegisterPayload(
|
||||||
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
||||||
const WebRtc_Word8 payloadType,
|
const WebRtc_Word8 payload_type, const WebRtc_UWord32 frequency,
|
||||||
const WebRtc_UWord32 frequency,
|
const WebRtc_UWord8 channels, const WebRtc_UWord32 rate);
|
||||||
const WebRtc_UWord8 channels,
|
|
||||||
const WebRtc_UWord32 rate);
|
|
||||||
|
|
||||||
WebRtc_Word32 DeRegisterSendPayload(const WebRtc_Word8 payloadType);
|
WebRtc_Word32 DeRegisterSendPayload(const WebRtc_Word8 payload_type);
|
||||||
|
|
||||||
WebRtc_Word8 SendPayloadType() const;
|
WebRtc_Word8 SendPayloadType() const;
|
||||||
|
|
||||||
@ -102,10 +95,10 @@ class RTPSender : public Bitrate, public RTPSenderInterface {
|
|||||||
void SetSendingMediaStatus(const bool enabled);
|
void SetSendingMediaStatus(const bool enabled);
|
||||||
bool SendingMedia() const;
|
bool SendingMedia() const;
|
||||||
|
|
||||||
// number of sent RTP packets
|
// Number of sent RTP packets.
|
||||||
WebRtc_UWord32 Packets() const;
|
WebRtc_UWord32 Packets() const;
|
||||||
|
|
||||||
// number of sent RTP bytes
|
// Number of sent RTP bytes.
|
||||||
WebRtc_UWord32 Bytes() const;
|
WebRtc_UWord32 Bytes() const;
|
||||||
|
|
||||||
void ResetDataCounters();
|
void ResetDataCounters();
|
||||||
@ -119,35 +112,30 @@ class RTPSender : public Bitrate, public RTPSenderInterface {
|
|||||||
WebRtc_UWord16 SequenceNumber() const;
|
WebRtc_UWord16 SequenceNumber() const;
|
||||||
void SetSequenceNumber(WebRtc_UWord16 seq);
|
void SetSequenceNumber(WebRtc_UWord16 seq);
|
||||||
|
|
||||||
WebRtc_Word32 CSRCs(WebRtc_UWord32 arrOfCSRC[kRtpCsrcSize]) const;
|
WebRtc_Word32 CSRCs(WebRtc_UWord32 arr_of_csrc[kRtpCsrcSize]) const;
|
||||||
|
|
||||||
void SetCSRCStatus(const bool include);
|
void SetCSRCStatus(const bool include);
|
||||||
|
|
||||||
void SetCSRCs(const WebRtc_UWord32 arrOfCSRC[kRtpCsrcSize],
|
void SetCSRCs(const WebRtc_UWord32 arr_of_csrc[kRtpCsrcSize],
|
||||||
const WebRtc_UWord8 arrLength);
|
const WebRtc_UWord8 arr_length);
|
||||||
|
|
||||||
WebRtc_Word32 SetMaxPayloadLength(const WebRtc_UWord16 length,
|
WebRtc_Word32 SetMaxPayloadLength(const WebRtc_UWord16 length,
|
||||||
const WebRtc_UWord16 packetOverHead);
|
const WebRtc_UWord16 packet_over_head);
|
||||||
|
|
||||||
WebRtc_Word32 SendOutgoingData(const FrameType frameType,
|
WebRtc_Word32 SendOutgoingData(
|
||||||
const WebRtc_Word8 payloadType,
|
const FrameType frame_type, const WebRtc_Word8 payload_type,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord32 time_stamp, int64_t capture_time_ms,
|
||||||
int64_t capture_time_ms,
|
const WebRtc_UWord8 *payload_data, const WebRtc_UWord32 payload_size,
|
||||||
const WebRtc_UWord8* payloadData,
|
const RTPFragmentationHeader *fragmentation,
|
||||||
const WebRtc_UWord32 payloadSize,
|
VideoCodecInformation *codec_info = NULL,
|
||||||
const RTPFragmentationHeader* fragmentation,
|
const RTPVideoTypeHeader * rtp_type_hdr = NULL);
|
||||||
VideoCodecInformation* codecInfo = NULL,
|
|
||||||
const RTPVideoTypeHeader* rtpTypeHdr = NULL);
|
|
||||||
|
|
||||||
WebRtc_Word32 SendPadData(WebRtc_Word8 payload_type,
|
WebRtc_Word32 SendPadData(WebRtc_Word8 payload_type,
|
||||||
WebRtc_UWord32 capture_timestamp,
|
WebRtc_UWord32 capture_timestamp,
|
||||||
int64_t capture_time_ms,
|
int64_t capture_time_ms, WebRtc_Word32 bytes);
|
||||||
WebRtc_Word32 bytes);
|
// RTP header extension
|
||||||
/*
|
|
||||||
* RTP header extension
|
|
||||||
*/
|
|
||||||
WebRtc_Word32 SetTransmissionTimeOffset(
|
WebRtc_Word32 SetTransmissionTimeOffset(
|
||||||
const WebRtc_Word32 transmissionTimeOffset);
|
const WebRtc_Word32 transmission_time_offset);
|
||||||
|
|
||||||
WebRtc_Word32 RegisterRtpHeaderExtension(const RTPExtensionType type,
|
WebRtc_Word32 RegisterRtpHeaderExtension(const RTPExtensionType type,
|
||||||
const WebRtc_UWord8 id);
|
const WebRtc_UWord8 id);
|
||||||
@ -156,109 +144,97 @@ class RTPSender : public Bitrate, public RTPSenderInterface {
|
|||||||
|
|
||||||
WebRtc_UWord16 RtpHeaderExtensionTotalLength() const;
|
WebRtc_UWord16 RtpHeaderExtensionTotalLength() const;
|
||||||
|
|
||||||
WebRtc_UWord16 BuildRTPHeaderExtension(WebRtc_UWord8* dataBuffer) const;
|
WebRtc_UWord16 BuildRTPHeaderExtension(WebRtc_UWord8 *data_buffer) const;
|
||||||
|
|
||||||
WebRtc_UWord8 BuildTransmissionTimeOffsetExtension(
|
WebRtc_UWord8 BuildTransmissionTimeOffsetExtension(
|
||||||
WebRtc_UWord8* dataBuffer) const;
|
WebRtc_UWord8 *data_buffer) const;
|
||||||
|
|
||||||
bool UpdateTransmissionTimeOffset(WebRtc_UWord8* rtp_packet,
|
bool UpdateTransmissionTimeOffset(WebRtc_UWord8 *rtp_packet,
|
||||||
const WebRtc_UWord16 rtp_packet_length,
|
const WebRtc_UWord16 rtp_packet_length,
|
||||||
const WebRtcRTPHeader& rtp_header,
|
const WebRtcRTPHeader &rtp_header,
|
||||||
const WebRtc_Word64 time_diff_ms) const;
|
const WebRtc_Word64 time_diff_ms) const;
|
||||||
|
|
||||||
void TimeToSendPacket(uint16_t sequence_number, int64_t capture_time_ms);
|
void TimeToSendPacket(uint16_t sequence_number, int64_t capture_time_ms);
|
||||||
|
|
||||||
/*
|
// NACK.
|
||||||
* NACK
|
|
||||||
*/
|
|
||||||
int SelectiveRetransmissions() const;
|
int SelectiveRetransmissions() const;
|
||||||
int SetSelectiveRetransmissions(uint8_t settings);
|
int SetSelectiveRetransmissions(uint8_t settings);
|
||||||
void OnReceivedNACK(const WebRtc_UWord16 nackSequenceNumbersLength,
|
void OnReceivedNACK(const WebRtc_UWord16 nack_sequence_numbers_length,
|
||||||
const WebRtc_UWord16* nackSequenceNumbers,
|
const WebRtc_UWord16 *nack_sequence_numbers,
|
||||||
const WebRtc_UWord16 avgRTT);
|
const WebRtc_UWord16 avg_rtt);
|
||||||
|
|
||||||
void SetStorePacketsStatus(const bool enable,
|
void SetStorePacketsStatus(const bool enable,
|
||||||
const WebRtc_UWord16 numberToStore);
|
const WebRtc_UWord16 number_to_store);
|
||||||
|
|
||||||
bool StorePackets() const;
|
bool StorePackets() const;
|
||||||
|
|
||||||
WebRtc_Word32 ReSendPacket(WebRtc_UWord16 packet_id,
|
WebRtc_Word32 ReSendPacket(WebRtc_UWord16 packet_id,
|
||||||
WebRtc_UWord32 min_resend_time = 0);
|
WebRtc_UWord32 min_resend_time = 0);
|
||||||
|
|
||||||
WebRtc_Word32 ReSendToNetwork(const WebRtc_UWord8* packet,
|
WebRtc_Word32 ReSendToNetwork(const WebRtc_UWord8 *packet,
|
||||||
const WebRtc_UWord32 size);
|
const WebRtc_UWord32 size);
|
||||||
|
|
||||||
bool ProcessNACKBitRate(const WebRtc_UWord32 now);
|
bool ProcessNACKBitRate(const WebRtc_UWord32 now);
|
||||||
|
|
||||||
/*
|
// RTX.
|
||||||
* RTX
|
void SetRTXStatus(const bool enable, const bool set_ssrc,
|
||||||
*/
|
|
||||||
void SetRTXStatus(const bool enable,
|
|
||||||
const bool setSSRC,
|
|
||||||
const WebRtc_UWord32 SSRC);
|
const WebRtc_UWord32 SSRC);
|
||||||
|
|
||||||
void RTXStatus(bool* enable, WebRtc_UWord32* SSRC) const;
|
void RTXStatus(bool *enable, WebRtc_UWord32 *SSRC) const;
|
||||||
|
|
||||||
/*
|
// Functions wrapping RTPSenderInterface.
|
||||||
* Functions wrapping RTPSenderInterface
|
virtual WebRtc_Word32 BuildRTPheader(
|
||||||
*/
|
WebRtc_UWord8 *data_buffer, const WebRtc_Word8 payload_type,
|
||||||
virtual WebRtc_Word32 BuildRTPheader(WebRtc_UWord8* dataBuffer,
|
const bool marker_bit, const WebRtc_UWord32 capture_time_stamp,
|
||||||
const WebRtc_Word8 payloadType,
|
const bool time_stamp_provided = true,
|
||||||
const bool markerBit,
|
const bool inc_sequence_number = true);
|
||||||
const WebRtc_UWord32 captureTimeStamp,
|
|
||||||
const bool timeStampProvided = true,
|
|
||||||
const bool incSequenceNumber = true);
|
|
||||||
|
|
||||||
virtual WebRtc_UWord16 RTPHeaderLength() const ;
|
virtual WebRtc_UWord16 RTPHeaderLength() const;
|
||||||
virtual WebRtc_UWord16 IncrementSequenceNumber();
|
virtual WebRtc_UWord16 IncrementSequenceNumber();
|
||||||
virtual WebRtc_UWord16 MaxPayloadLength() const;
|
virtual WebRtc_UWord16 MaxPayloadLength() const;
|
||||||
virtual WebRtc_UWord16 PacketOverHead() const;
|
virtual WebRtc_UWord16 PacketOverHead() const;
|
||||||
|
|
||||||
// current timestamp
|
// Current timestamp.
|
||||||
virtual WebRtc_UWord32 Timestamp() const;
|
virtual WebRtc_UWord32 Timestamp() const;
|
||||||
virtual WebRtc_UWord32 SSRC() const;
|
virtual WebRtc_UWord32 SSRC() const;
|
||||||
|
|
||||||
virtual WebRtc_Word32 SendToNetwork(uint8_t* data_buffer,
|
virtual WebRtc_Word32 SendToNetwork(
|
||||||
int payload_length,
|
uint8_t *data_buffer, int payload_length, int rtp_header_length,
|
||||||
int rtp_header_length,
|
int64_t capture_time_ms, StorageType storage);
|
||||||
int64_t capture_time_ms,
|
|
||||||
StorageType storage);
|
// Audio.
|
||||||
/*
|
|
||||||
* Audio
|
// Send a DTMF tone using RFC 2833 (4733).
|
||||||
*/
|
|
||||||
// Send a DTMF tone using RFC 2833 (4733)
|
|
||||||
WebRtc_Word32 SendTelephoneEvent(const WebRtc_UWord8 key,
|
WebRtc_Word32 SendTelephoneEvent(const WebRtc_UWord8 key,
|
||||||
const WebRtc_UWord16 time_ms,
|
const WebRtc_UWord16 time_ms,
|
||||||
const WebRtc_UWord8 level);
|
const WebRtc_UWord8 level);
|
||||||
|
|
||||||
bool SendTelephoneEventActive(WebRtc_Word8& telephoneEvent) const;
|
bool SendTelephoneEventActive(WebRtc_Word8 *telephone_event) const;
|
||||||
|
|
||||||
// Set audio packet size, used to determine when it's time to send a DTMF
|
// Set audio packet size, used to determine when it's time to send a DTMF
|
||||||
// packet in silence (CNG)
|
// packet in silence (CNG).
|
||||||
WebRtc_Word32 SetAudioPacketSize(const WebRtc_UWord16 packetSizeSamples);
|
WebRtc_Word32 SetAudioPacketSize(const WebRtc_UWord16 packet_size_samples);
|
||||||
|
|
||||||
// Set status and ID for header-extension-for-audio-level-indication.
|
// Set status and ID for header-extension-for-audio-level-indication.
|
||||||
WebRtc_Word32 SetAudioLevelIndicationStatus(const bool enable,
|
WebRtc_Word32 SetAudioLevelIndicationStatus(const bool enable,
|
||||||
const WebRtc_UWord8 ID);
|
const WebRtc_UWord8 ID);
|
||||||
|
|
||||||
// Get status and ID for header-extension-for-audio-level-indication.
|
// Get status and ID for header-extension-for-audio-level-indication.
|
||||||
WebRtc_Word32 AudioLevelIndicationStatus(bool& enable,
|
WebRtc_Word32 AudioLevelIndicationStatus(bool *enable,
|
||||||
WebRtc_UWord8& ID) const;
|
WebRtc_UWord8 *id) const;
|
||||||
|
|
||||||
// Store the audio level in dBov for
|
// Store the audio level in d_bov for
|
||||||
// header-extension-for-audio-level-indication.
|
// header-extension-for-audio-level-indication.
|
||||||
WebRtc_Word32 SetAudioLevel(const WebRtc_UWord8 level_dBov);
|
WebRtc_Word32 SetAudioLevel(const WebRtc_UWord8 level_d_bov);
|
||||||
|
|
||||||
// Set payload type for Redundant Audio Data RFC 2198
|
// Set payload type for Redundant Audio Data RFC 2198.
|
||||||
WebRtc_Word32 SetRED(const WebRtc_Word8 payloadType);
|
WebRtc_Word32 SetRED(const WebRtc_Word8 payload_type);
|
||||||
|
|
||||||
// Get payload type for Redundant Audio Data RFC 2198
|
// Get payload type for Redundant Audio Data RFC 2198.
|
||||||
WebRtc_Word32 RED(WebRtc_Word8& payloadType) const;
|
WebRtc_Word32 RED(WebRtc_Word8 *payload_type) const;
|
||||||
|
|
||||||
/*
|
// Video.
|
||||||
* Video
|
VideoCodecInformation *CodecInformationVideo();
|
||||||
*/
|
|
||||||
VideoCodecInformation* CodecInformationVideo();
|
|
||||||
|
|
||||||
RtpVideoCodecTypes VideoCodecType() const;
|
RtpVideoCodecTypes VideoCodecType() const;
|
||||||
|
|
||||||
@ -266,81 +242,78 @@ class RTPSender : public Bitrate, public RTPSenderInterface {
|
|||||||
|
|
||||||
WebRtc_Word32 SendRTPIntraRequest();
|
WebRtc_Word32 SendRTPIntraRequest();
|
||||||
|
|
||||||
// FEC
|
// FEC.
|
||||||
WebRtc_Word32 SetGenericFECStatus(const bool enable,
|
WebRtc_Word32 SetGenericFECStatus(const bool enable,
|
||||||
const WebRtc_UWord8 payloadTypeRED,
|
const WebRtc_UWord8 payload_type_red,
|
||||||
const WebRtc_UWord8 payloadTypeFEC);
|
const WebRtc_UWord8 payload_type_fec);
|
||||||
|
|
||||||
WebRtc_Word32 GenericFECStatus(bool& enable,
|
WebRtc_Word32 GenericFECStatus(bool *enable, WebRtc_UWord8 *payload_type_red,
|
||||||
WebRtc_UWord8& payloadTypeRED,
|
WebRtc_UWord8 *payload_type_fec) const;
|
||||||
WebRtc_UWord8& payloadTypeFEC) const;
|
|
||||||
|
|
||||||
WebRtc_Word32 SetFecParameters(
|
WebRtc_Word32 SetFecParameters(const FecProtectionParams *delta_params,
|
||||||
const FecProtectionParams* delta_params,
|
const FecProtectionParams *key_params);
|
||||||
const FecProtectionParams* key_params);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
WebRtc_Word32 CheckPayloadType(const WebRtc_Word8 payloadType,
|
WebRtc_Word32 CheckPayloadType(const WebRtc_Word8 payload_type,
|
||||||
RtpVideoCodecTypes& videoType);
|
RtpVideoCodecTypes *video_type);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void UpdateNACKBitRate(const WebRtc_UWord32 bytes,
|
void UpdateNACKBitRate(const WebRtc_UWord32 bytes, const WebRtc_UWord32 now);
|
||||||
const WebRtc_UWord32 now);
|
|
||||||
|
|
||||||
WebRtc_Word32 SendPaddingAccordingToBitrate(
|
WebRtc_Word32 SendPaddingAccordingToBitrate(WebRtc_Word8 payload_type,
|
||||||
WebRtc_Word8 payload_type,
|
WebRtc_UWord32 capture_timestamp,
|
||||||
WebRtc_UWord32 capture_timestamp,
|
int64_t capture_time_ms);
|
||||||
int64_t capture_time_ms);
|
|
||||||
|
|
||||||
WebRtc_Word32 _id;
|
WebRtc_Word32 id_;
|
||||||
const bool _audioConfigured;
|
const bool audio_configured_;
|
||||||
RTPSenderAudio* _audio;
|
RTPSenderAudio *audio_;
|
||||||
RTPSenderVideo* _video;
|
RTPSenderVideo *video_;
|
||||||
|
|
||||||
PacedSender* paced_sender_;
|
PacedSender *paced_sender_;
|
||||||
CriticalSectionWrapper* _sendCritsect;
|
CriticalSectionWrapper *send_critsect_;
|
||||||
|
|
||||||
Transport* _transport;
|
Transport *transport_;
|
||||||
bool _sendingMedia;
|
bool sending_media_;
|
||||||
|
|
||||||
WebRtc_UWord16 _maxPayloadLength;
|
WebRtc_UWord16 max_payload_length_;
|
||||||
WebRtc_UWord16 _targetSendBitrate;
|
WebRtc_UWord16 target_send_bitrate_;
|
||||||
WebRtc_UWord16 _packetOverHead;
|
WebRtc_UWord16 packet_over_head_;
|
||||||
|
|
||||||
WebRtc_Word8 _payloadType;
|
WebRtc_Word8 payload_type_;
|
||||||
std::map<WebRtc_Word8, ModuleRTPUtility::Payload*> _payloadTypeMap;
|
std::map<WebRtc_Word8, ModuleRTPUtility::Payload *> payload_type_map_;
|
||||||
|
|
||||||
RtpHeaderExtensionMap _rtpHeaderExtensionMap;
|
RtpHeaderExtensionMap rtp_header_extension_map_;
|
||||||
WebRtc_Word32 _transmissionTimeOffset;
|
WebRtc_Word32 transmission_time_offset_;
|
||||||
|
|
||||||
// NACK
|
// NACK
|
||||||
WebRtc_UWord32 _nackByteCountTimes[NACK_BYTECOUNT_SIZE];
|
WebRtc_UWord32 nack_byte_count_times_[NACK_BYTECOUNT_SIZE];
|
||||||
WebRtc_Word32 _nackByteCount[NACK_BYTECOUNT_SIZE];
|
WebRtc_Word32 nack_byte_count_[NACK_BYTECOUNT_SIZE];
|
||||||
Bitrate _nackBitrate;
|
Bitrate nack_bitrate_;
|
||||||
|
|
||||||
RTPPacketHistory* _packetHistory;
|
RTPPacketHistory *packet_history_;
|
||||||
|
|
||||||
// Statistics
|
// Statistics
|
||||||
WebRtc_UWord32 _packetsSent;
|
WebRtc_UWord32 packets_sent_;
|
||||||
WebRtc_UWord32 _payloadBytesSent;
|
WebRtc_UWord32 payload_bytes_sent_;
|
||||||
|
|
||||||
// RTP variables
|
// RTP variables
|
||||||
bool _startTimeStampForced;
|
bool start_time_stamp_forced_;
|
||||||
WebRtc_UWord32 _startTimeStamp;
|
WebRtc_UWord32 start_time_stamp_;
|
||||||
SSRCDatabase& _ssrcDB;
|
SSRCDatabase &ssrc_db_;
|
||||||
WebRtc_UWord32 _remoteSSRC;
|
WebRtc_UWord32 remote_ssrc_;
|
||||||
bool _sequenceNumberForced;
|
bool sequence_number_forced_;
|
||||||
WebRtc_UWord16 _sequenceNumber;
|
WebRtc_UWord16 sequence_number_;
|
||||||
WebRtc_UWord16 _sequenceNumberRTX;
|
WebRtc_UWord16 sequence_number_rtx_;
|
||||||
bool _ssrcForced;
|
bool ssrc_forced_;
|
||||||
WebRtc_UWord32 _ssrc;
|
WebRtc_UWord32 ssrc_;
|
||||||
WebRtc_UWord32 _timeStamp;
|
WebRtc_UWord32 time_stamp_;
|
||||||
WebRtc_UWord8 _CSRCs;
|
WebRtc_UWord8 csrcs_;
|
||||||
WebRtc_UWord32 _CSRC[kRtpCsrcSize];
|
WebRtc_UWord32 csrc_[kRtpCsrcSize];
|
||||||
bool _includeCSRCs;
|
bool include_csrcs_;
|
||||||
bool _RTX;
|
bool rtx_;
|
||||||
WebRtc_UWord32 _ssrcRTX;
|
WebRtc_UWord32 ssrc_rtx_;
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
|
||||||
|
|
||||||
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
|
||||||
|
Reference in New Issue
Block a user