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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 video_codecs_ = GetSupportedCodecs(); | 550 video_codecs_ = GetSupportedCodecs(); |
551 rtp_header_extensions_.push_back( | 551 rtp_header_extensions_.push_back( |
552 RtpHeaderExtension(kRtpTimestampOffsetHeaderExtension, | 552 RtpHeaderExtension(kRtpTimestampOffsetHeaderExtension, |
553 kRtpTimestampOffsetHeaderExtensionDefaultId)); | 553 kRtpTimestampOffsetHeaderExtensionDefaultId)); |
554 rtp_header_extensions_.push_back( | 554 rtp_header_extensions_.push_back( |
555 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, | 555 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, |
556 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); | 556 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); |
557 rtp_header_extensions_.push_back( | 557 rtp_header_extensions_.push_back( |
558 RtpHeaderExtension(kRtpVideoRotationHeaderExtension, | 558 RtpHeaderExtension(kRtpVideoRotationHeaderExtension, |
559 kRtpVideoRotationHeaderExtensionDefaultId)); | 559 kRtpVideoRotationHeaderExtensionDefaultId)); |
| 560 if (webrtc::field_trial::FindFullName("WebRTC-SendSideBwe") == "Enabled") { |
| 561 rtp_header_extensions_.push_back(RtpHeaderExtension( |
| 562 kRtpTransportSequenceNumberHeaderExtension, |
| 563 kRtpTransportSequenceNumberHeaderExtensionDefaultId)); |
| 564 } |
560 } | 565 } |
561 | 566 |
562 WebRtcVideoEngine2::~WebRtcVideoEngine2() { | 567 WebRtcVideoEngine2::~WebRtcVideoEngine2() { |
563 LOG(LS_INFO) << "WebRtcVideoEngine2::~WebRtcVideoEngine2"; | 568 LOG(LS_INFO) << "WebRtcVideoEngine2::~WebRtcVideoEngine2"; |
564 } | 569 } |
565 | 570 |
566 void WebRtcVideoEngine2::Init() { | 571 void WebRtcVideoEngine2::Init() { |
567 LOG(LS_INFO) << "WebRtcVideoEngine2::Init"; | 572 LOG(LS_INFO) << "WebRtcVideoEngine2::Init"; |
568 initialized_ = true; | 573 initialized_ = true; |
569 } | 574 } |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1644 load == kOveruse ? CoordinatedVideoAdapter::DOWNGRADE | 1649 load == kOveruse ? CoordinatedVideoAdapter::DOWNGRADE |
1645 : CoordinatedVideoAdapter::UPGRADE); | 1650 : CoordinatedVideoAdapter::UPGRADE); |
1646 } | 1651 } |
1647 } | 1652 } |
1648 } | 1653 } |
1649 | 1654 |
1650 bool WebRtcVideoChannel2::SendRtp(const uint8_t* data, | 1655 bool WebRtcVideoChannel2::SendRtp(const uint8_t* data, |
1651 size_t len, | 1656 size_t len, |
1652 const webrtc::PacketOptions& options) { | 1657 const webrtc::PacketOptions& options) { |
1653 rtc::Buffer packet(data, len, kMaxRtpPacketLen); | 1658 rtc::Buffer packet(data, len, kMaxRtpPacketLen); |
1654 return MediaChannel::SendPacket(&packet); | 1659 rtc::PacketOptions rtc_options; |
| 1660 rtc_options.packet_id = options.packet_id; |
| 1661 return MediaChannel::SendPacket(&packet, rtc_options); |
1655 } | 1662 } |
1656 | 1663 |
1657 bool WebRtcVideoChannel2::SendRtcp(const uint8_t* data, size_t len) { | 1664 bool WebRtcVideoChannel2::SendRtcp(const uint8_t* data, size_t len) { |
1658 rtc::Buffer packet(data, len, kMaxRtpPacketLen); | 1665 rtc::Buffer packet(data, len, kMaxRtpPacketLen); |
1659 return MediaChannel::SendRtcp(&packet); | 1666 return MediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
1660 } | 1667 } |
1661 | 1668 |
1662 void WebRtcVideoChannel2::StartAllSendStreams() { | 1669 void WebRtcVideoChannel2::StartAllSendStreams() { |
1663 rtc::CritScope stream_lock(&stream_crit_); | 1670 rtc::CritScope stream_lock(&stream_crit_); |
1664 for (std::map<uint32_t, WebRtcVideoSendStream*>::iterator it = | 1671 for (std::map<uint32_t, WebRtcVideoSendStream*>::iterator it = |
1665 send_streams_.begin(); | 1672 send_streams_.begin(); |
1666 it != send_streams_.end(); ++it) { | 1673 it != send_streams_.end(); ++it) { |
1667 it->second->Start(); | 1674 it->second->Start(); |
1668 } | 1675 } |
1669 } | 1676 } |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2732 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2726 } | 2733 } |
2727 } | 2734 } |
2728 | 2735 |
2729 return video_codecs; | 2736 return video_codecs; |
2730 } | 2737 } |
2731 | 2738 |
2732 } // namespace cricket | 2739 } // namespace cricket |
2733 | 2740 |
2734 #endif // HAVE_WEBRTC_VIDEO | 2741 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |