OLD | NEW |
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 Loading... |
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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 } | 1537 } |
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 = FilterRtpExtensions( |
1547 FilterRtpExtensions(extensions); | 1548 FilterOverlappingRtpExtensions(extensions, kBweExtensionPriorities)); |
1548 if (!RtpExtensionsHaveChanged(send_rtp_extensions_, filtered_extensions)) { | 1549 if (!RtpExtensionsHaveChanged(send_rtp_extensions_, filtered_extensions)) { |
1549 LOG(LS_INFO) << "Ignoring call to SetSendRtpHeaderExtensions because " | 1550 LOG(LS_INFO) << "Ignoring call to SetSendRtpHeaderExtensions because " |
1550 "header extensions haven't changed."; | 1551 "header extensions haven't changed."; |
1551 return true; | 1552 return true; |
1552 } | 1553 } |
1553 | 1554 |
1554 send_rtp_extensions_ = filtered_extensions; | 1555 send_rtp_extensions_ = filtered_extensions; |
1555 | 1556 |
1556 const webrtc::RtpExtension* cvo_extension = FindHeaderExtension( | 1557 const webrtc::RtpExtension* cvo_extension = FindHeaderExtension( |
1557 send_rtp_extensions_, kRtpVideoRotationHeaderExtension); | 1558 send_rtp_extensions_, kRtpVideoRotationHeaderExtension); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2749 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2750 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2750 } | 2751 } |
2751 } | 2752 } |
2752 | 2753 |
2753 return video_codecs; | 2754 return video_codecs; |
2754 } | 2755 } |
2755 | 2756 |
2756 } // namespace cricket | 2757 } // namespace cricket |
2757 | 2758 |
2758 #endif // HAVE_WEBRTC_VIDEO | 2759 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |