Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1429753003: Filter overlapping RTP header extensions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: comments addressed. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 18 matching lines...) Expand all
29 #include "talk/media/webrtc/webrtcvideoengine2.h" 29 #include "talk/media/webrtc/webrtcvideoengine2.h"
30 30
31 #include <algorithm> 31 #include <algorithm>
32 #include <set> 32 #include <set>
33 #include <string> 33 #include <string>
34 34
35 #include "talk/media/base/videocapturer.h" 35 #include "talk/media/base/videocapturer.h"
36 #include "talk/media/base/videorenderer.h" 36 #include "talk/media/base/videorenderer.h"
37 #include "talk/media/webrtc/constants.h" 37 #include "talk/media/webrtc/constants.h"
38 #include "talk/media/webrtc/simulcast.h" 38 #include "talk/media/webrtc/simulcast.h"
39 #include "talk/media/webrtc/webrtcmediaengine.h"
39 #include "talk/media/webrtc/webrtcvideoencoderfactory.h" 40 #include "talk/media/webrtc/webrtcvideoencoderfactory.h"
40 #include "talk/media/webrtc/webrtcvideoframe.h" 41 #include "talk/media/webrtc/webrtcvideoframe.h"
41 #include "talk/media/webrtc/webrtcvoiceengine.h" 42 #include "talk/media/webrtc/webrtcvoiceengine.h"
42 #include "webrtc/base/buffer.h" 43 #include "webrtc/base/buffer.h"
43 #include "webrtc/base/logging.h" 44 #include "webrtc/base/logging.h"
44 #include "webrtc/base/stringutils.h" 45 #include "webrtc/base/stringutils.h"
45 #include "webrtc/base/timeutils.h" 46 #include "webrtc/base/timeutils.h"
46 #include "webrtc/base/trace_event.h" 47 #include "webrtc/base/trace_event.h"
47 #include "webrtc/call.h" 48 #include "webrtc/call.h"
48 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" 49 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 1538
1538 bool WebRtcVideoChannel2::SetSendRtpHeaderExtensions( 1539 bool WebRtcVideoChannel2::SetSendRtpHeaderExtensions(
1539 const std::vector<RtpHeaderExtension>& extensions) { 1540 const std::vector<RtpHeaderExtension>& extensions) {
1540 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSendRtpHeaderExtensions"); 1541 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSendRtpHeaderExtensions");
1541 LOG(LS_INFO) << "SetSendRtpHeaderExtensions: " 1542 LOG(LS_INFO) << "SetSendRtpHeaderExtensions: "
1542 << RtpExtensionsToString(extensions); 1543 << RtpExtensionsToString(extensions);
1543 if (!ValidateRtpHeaderExtensionIds(extensions)) 1544 if (!ValidateRtpHeaderExtensionIds(extensions))
1544 return false; 1545 return false;
1545 1546
1546 std::vector<webrtc::RtpExtension> filtered_extensions = 1547 std::vector<webrtc::RtpExtension> filtered_extensions =
1547 FilterRtpExtensions(extensions); 1548 FilterRtpExtensions(FilterRedundantRtpExtensions(
1549 extensions, kBweExtensionPriorities, kBweExtensionPrioritiesLength));
1548 if (!RtpExtensionsHaveChanged(send_rtp_extensions_, filtered_extensions)) { 1550 if (!RtpExtensionsHaveChanged(send_rtp_extensions_, filtered_extensions)) {
1549 LOG(LS_INFO) << "Ignoring call to SetSendRtpHeaderExtensions because " 1551 LOG(LS_INFO) << "Ignoring call to SetSendRtpHeaderExtensions because "
1550 "header extensions haven't changed."; 1552 "header extensions haven't changed.";
1551 return true; 1553 return true;
1552 } 1554 }
1553 1555
1554 send_rtp_extensions_ = filtered_extensions; 1556 send_rtp_extensions_ = filtered_extensions;
1555 1557
1556 const webrtc::RtpExtension* cvo_extension = FindHeaderExtension( 1558 const webrtc::RtpExtension* cvo_extension = FindHeaderExtension(
1557 send_rtp_extensions_, kRtpVideoRotationHeaderExtension); 1559 send_rtp_extensions_, kRtpVideoRotationHeaderExtension);
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2751 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2750 } 2752 }
2751 } 2753 }
2752 2754
2753 return video_codecs; 2755 return video_codecs;
2754 } 2756 }
2755 2757
2756 } // namespace cricket 2758 } // namespace cricket
2757 2759
2758 #endif // HAVE_WEBRTC_VIDEO 2760 #endif // HAVE_WEBRTC_VIDEO
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698