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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
554 video_codecs_ = GetSupportedCodecs(); | 554 video_codecs_ = GetSupportedCodecs(); |
555 rtp_header_extensions_.push_back( | 555 rtp_header_extensions_.push_back( |
556 RtpHeaderExtension(kRtpTimestampOffsetHeaderExtension, | 556 RtpHeaderExtension(kRtpTimestampOffsetHeaderExtension, |
557 kRtpTimestampOffsetHeaderExtensionDefaultId)); | 557 kRtpTimestampOffsetHeaderExtensionDefaultId)); |
558 rtp_header_extensions_.push_back( | 558 rtp_header_extensions_.push_back( |
559 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, | 559 RtpHeaderExtension(kRtpAbsoluteSenderTimeHeaderExtension, |
560 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); | 560 kRtpAbsoluteSenderTimeHeaderExtensionDefaultId)); |
561 rtp_header_extensions_.push_back( | 561 rtp_header_extensions_.push_back( |
562 RtpHeaderExtension(kRtpVideoRotationHeaderExtension, | 562 RtpHeaderExtension(kRtpVideoRotationHeaderExtension, |
563 kRtpVideoRotationHeaderExtensionDefaultId)); | 563 kRtpVideoRotationHeaderExtensionDefaultId)); |
564 rtp_header_extensions_.push_back( | |
565 RtpHeaderExtension(kRtpTransportSequenceNumberHeaderExtension, | |
566 kRtpTransportSequenceNumberHeaderExtensionDefaultId)); | |
564 } | 567 } |
565 | 568 |
566 WebRtcVideoEngine2::~WebRtcVideoEngine2() { | 569 WebRtcVideoEngine2::~WebRtcVideoEngine2() { |
567 LOG(LS_INFO) << "WebRtcVideoEngine2::~WebRtcVideoEngine2"; | 570 LOG(LS_INFO) << "WebRtcVideoEngine2::~WebRtcVideoEngine2"; |
568 } | 571 } |
569 | 572 |
570 void WebRtcVideoEngine2::Init() { | 573 void WebRtcVideoEngine2::Init() { |
571 LOG(LS_INFO) << "WebRtcVideoEngine2::Init"; | 574 LOG(LS_INFO) << "WebRtcVideoEngine2::Init"; |
572 initialized_ = true; | 575 initialized_ = true; |
573 } | 576 } |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1653 && kv.second->video_adapter() != nullptr) { | 1656 && kv.second->video_adapter() != nullptr) { |
1654 kv.second->video_adapter()->OnCpuResolutionRequest( | 1657 kv.second->video_adapter()->OnCpuResolutionRequest( |
1655 load == kOveruse ? CoordinatedVideoAdapter::DOWNGRADE | 1658 load == kOveruse ? CoordinatedVideoAdapter::DOWNGRADE |
1656 : CoordinatedVideoAdapter::UPGRADE); | 1659 : CoordinatedVideoAdapter::UPGRADE); |
1657 } | 1660 } |
1658 } | 1661 } |
1659 } | 1662 } |
1660 | 1663 |
1661 bool WebRtcVideoChannel2::SendRtp(const uint8_t* data, | 1664 bool WebRtcVideoChannel2::SendRtp(const uint8_t* data, |
1662 size_t len, | 1665 size_t len, |
1663 const webrtc::PacketOptions& options) { | 1666 const webrtc::PacketOptions& options) { |
pthatcher1
2015/10/05 18:30:13
Would it be possible to have one PacketOptions str
pthatcher1
2015/10/07 16:44:37
?
stefan-webrtc
2015/10/07 16:55:24
I'd be happy to follow-up with a CL which does thi
| |
1664 rtc::Buffer packet(data, len, kMaxRtpPacketLen); | 1667 rtc::Buffer packet(data, len, kMaxRtpPacketLen); |
1665 return MediaChannel::SendPacket(&packet); | 1668 rtc::PacketOptions rtc_options; |
1669 rtc_options.packet_id = options.packet_id; | |
1670 return MediaChannel::SendPacket(&packet, rtc_options); | |
1666 } | 1671 } |
1667 | 1672 |
1668 bool WebRtcVideoChannel2::SendRtcp(const uint8_t* data, size_t len) { | 1673 bool WebRtcVideoChannel2::SendRtcp(const uint8_t* data, size_t len) { |
1669 rtc::Buffer packet(data, len, kMaxRtpPacketLen); | 1674 rtc::Buffer packet(data, len, kMaxRtpPacketLen); |
1670 return MediaChannel::SendRtcp(&packet); | 1675 return MediaChannel::SendRtcp(&packet, rtc::PacketOptions()); |
1671 } | 1676 } |
1672 | 1677 |
1673 void WebRtcVideoChannel2::StartAllSendStreams() { | 1678 void WebRtcVideoChannel2::StartAllSendStreams() { |
1674 rtc::CritScope stream_lock(&stream_crit_); | 1679 rtc::CritScope stream_lock(&stream_crit_); |
1675 for (std::map<uint32, WebRtcVideoSendStream*>::iterator it = | 1680 for (std::map<uint32, WebRtcVideoSendStream*>::iterator it = |
1676 send_streams_.begin(); | 1681 send_streams_.begin(); |
1677 it != send_streams_.end(); | 1682 it != send_streams_.end(); |
1678 ++it) { | 1683 ++it) { |
1679 it->second->Start(); | 1684 it->second->Start(); |
1680 } | 1685 } |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2738 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2743 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2739 } | 2744 } |
2740 } | 2745 } |
2741 | 2746 |
2742 return video_codecs; | 2747 return video_codecs; |
2743 } | 2748 } |
2744 | 2749 |
2745 } // namespace cricket | 2750 } // namespace cricket |
2746 | 2751 |
2747 #endif // HAVE_WEBRTC_VIDEO | 2752 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |