Remove default RTP module functionality for setting CSRC.
ViECapturer is always calling DeliverFrame with an empty CSRC vector, so this is basically a dead path already. I added a DCHECK in ViEEncoder to verify this is true. BUG=769 TEST=Manually verified in Chromium. R=pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/39059004 Cr-Commit-Position: refs/heads/master@{#8335} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8335 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a6e8cebbd5
commit
a98e796615
@ -381,21 +381,7 @@ void ModuleRtpRtcpImpl::SetSSRC(const uint32_t ssrc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ModuleRtpRtcpImpl::SetCsrcs(const std::vector<uint32_t>& csrcs) {
|
void ModuleRtpRtcpImpl::SetCsrcs(const std::vector<uint32_t>& csrcs) {
|
||||||
if (IsDefaultModule()) {
|
assert(!IsDefaultModule());
|
||||||
// For default we need to update all child modules too.
|
|
||||||
CriticalSectionScoped lock(critical_section_module_ptrs_.get());
|
|
||||||
|
|
||||||
std::vector<ModuleRtpRtcpImpl*>::iterator it = child_modules_.begin();
|
|
||||||
while (it != child_modules_.end()) {
|
|
||||||
RtpRtcp* module = *it;
|
|
||||||
if (module) {
|
|
||||||
module->SetCsrcs(csrcs);
|
|
||||||
}
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
rtcp_sender_.SetCsrcs(csrcs);
|
rtcp_sender_.SetCsrcs(csrcs);
|
||||||
rtp_sender_.SetCsrcs(csrcs);
|
rtp_sender_.SetCsrcs(csrcs);
|
||||||
}
|
}
|
||||||
|
@ -518,6 +518,7 @@ void ViEEncoder::DeliverFrame(int id,
|
|||||||
I420VideoFrame* video_frame,
|
I420VideoFrame* video_frame,
|
||||||
const std::vector<uint32_t>& csrcs) {
|
const std::vector<uint32_t>& csrcs) {
|
||||||
DCHECK(send_payload_router_ != NULL);
|
DCHECK(send_payload_router_ != NULL);
|
||||||
|
DCHECK(csrcs.empty());
|
||||||
if (!default_rtp_rtcp_->SendingMedia() || !send_payload_router_->active()) {
|
if (!default_rtp_rtcp_->SendingMedia() || !send_payload_router_->active()) {
|
||||||
// We've paused or we have no channels attached, don't waste resources on
|
// We've paused or we have no channels attached, don't waste resources on
|
||||||
// encoding.
|
// encoding.
|
||||||
@ -543,19 +544,6 @@ void ViEEncoder::DeliverFrame(int id,
|
|||||||
"Encode");
|
"Encode");
|
||||||
video_frame->set_timestamp(time_stamp);
|
video_frame->set_timestamp(time_stamp);
|
||||||
|
|
||||||
// Make sure the CSRC list is correct.
|
|
||||||
if (csrcs.size() > 0) {
|
|
||||||
std::vector<uint32_t> temp_csrcs(csrcs.size());
|
|
||||||
for (size_t i = 0; i < csrcs.size(); i++) {
|
|
||||||
if (csrcs[i] == 1) {
|
|
||||||
temp_csrcs[i] = default_rtp_rtcp_->SSRC();
|
|
||||||
} else {
|
|
||||||
temp_csrcs[i] = csrcs[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default_rtp_rtcp_->SetCsrcs(temp_csrcs);
|
|
||||||
}
|
|
||||||
|
|
||||||
I420VideoFrame* decimated_frame = NULL;
|
I420VideoFrame* decimated_frame = NULL;
|
||||||
// TODO(wuchengli): support texture frames.
|
// TODO(wuchengli): support texture frames.
|
||||||
if (video_frame->native_handle() == NULL) {
|
if (video_frame->native_handle() == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user