summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc')
-rw-r--r--chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
index 7b36f7cced8..5d8ae166565 100644
--- a/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
+++ b/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc
@@ -14,12 +14,13 @@
#include <stdlib.h>
#include <string.h>
+#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/producer_fec.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/trace.h"
+#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/system_wrappers/interface/trace_event.h"
namespace webrtc {
@@ -30,11 +31,9 @@ struct RtpPacket {
ForwardErrorCorrection::Packet* pkt;
};
-RTPSenderVideo::RTPSenderVideo(const int32_t id,
- Clock* clock,
+RTPSenderVideo::RTPSenderVideo(Clock* clock,
RTPSenderInterface* rtpSender)
- : _id(id),
- _rtpSender(*rtpSender),
+ : _rtpSender(*rtpSender),
_sendVideoCritsect(CriticalSectionWrapper::CreateCriticalSection()),
_videoType(kRtpVideoGeneric),
_videoCodecInformation(NULL),
@@ -42,7 +41,7 @@ RTPSenderVideo::RTPSenderVideo(const int32_t id,
_retransmissionSettings(kRetransmitBaseLayer),
// Generic FEC
- _fec(id),
+ _fec(),
_fecEnabled(false),
_payloadTypeRED(-1),
_payloadTypeFEC(-1),
@@ -253,8 +252,13 @@ RTPSenderVideo::FECPacketOverhead() const
{
if (_fecEnabled)
{
- return ForwardErrorCorrection::PacketOverhead() +
- REDForFECHeaderLength;
+ // Overhead is FEC headers plus RED for FEC header plus anything in RTP
+ // header beyond the 12 bytes base header (CSRC list, extensions...)
+ // This reason for the header extensions to be included here is that
+ // from an FEC viewpoint, they are part of the payload to be protected.
+ // (The base RTP header is already protected by the FEC header.)
+ return ForwardErrorCorrection::PacketOverhead() + REDForFECHeaderLength +
+ (_rtpSender.RTPHeaderLength() - kRtpHeaderSize);
}
return 0;
}
@@ -323,8 +327,6 @@ RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType,
{
return retVal;
}
- WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, _id, "%s(timestamp:%u)",
- __FUNCTION__, captureTimeStamp);
return 0;
}
@@ -470,9 +472,9 @@ RTPSenderVideo::SendVP8(const FrameType frameType,
rtpHeaderLength, captureTimeStamp,
capture_time_ms, storage, protect))
{
- WEBRTC_TRACE(kTraceError, kTraceRtpRtcp, _id,
- "RTPSenderVideo::SendVP8 failed to send packet number"
- " %d", _rtpSender.SequenceNumber());
+ LOG(LS_WARNING)
+ << "RTPSenderVideo::SendVP8 failed to send packet number "
+ << _rtpSender.SequenceNumber();
}
}
TRACE_EVENT_ASYNC_END1("webrtc", "Video", capture_time_ms,