Chromium Code Reviews| 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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1468 const webrtc::PacketTime webrtc_packet_time(packet_time.timestamp, | 1471 const webrtc::PacketTime webrtc_packet_time(packet_time.timestamp, |
| 1469 packet_time.not_before); | 1472 packet_time.not_before); |
| 1470 if (call_->Receiver()->DeliverPacket( | 1473 if (call_->Receiver()->DeliverPacket( |
| 1471 webrtc::MediaType::VIDEO, | 1474 webrtc::MediaType::VIDEO, |
| 1472 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), | 1475 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), |
| 1473 webrtc_packet_time) != webrtc::PacketReceiver::DELIVERY_OK) { | 1476 webrtc_packet_time) != webrtc::PacketReceiver::DELIVERY_OK) { |
| 1474 LOG(LS_WARNING) << "Failed to deliver RTCP packet."; | 1477 LOG(LS_WARNING) << "Failed to deliver RTCP packet."; |
| 1475 } | 1478 } |
| 1476 } | 1479 } |
| 1477 | 1480 |
| 1481 void WebRtcVideoChannel2::OnPacketSent(const rtc::SentPacket& packet_sent) { | |
| 1482 webrtc::SentPacket webrtc_packet_sent(packet_sent.transport_sequence_number, | |
| 1483 packet_sent.send_time_ms); | |
| 1484 | |
| 1485 call_->OnSentPacket(webrtc_packet_sent); | |
|
pthatcher1
2015/09/25 23:24:57
Why not just propogate from the TransportChannel t
stefan-webrtc
2015/09/28 12:10:49
Hm, this is probably an artifact of my lack of ove
pthatcher1
2015/09/28 23:58:40
Not your fault, but OnReadyToSend needs to be clea
stefan-webrtc
2015/10/02 13:29:12
Done.
| |
| 1486 } | |
| 1487 | |
| 1478 void WebRtcVideoChannel2::OnReadyToSend(bool ready) { | 1488 void WebRtcVideoChannel2::OnReadyToSend(bool ready) { |
| 1479 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); | 1489 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); |
| 1480 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); | 1490 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); |
| 1481 } | 1491 } |
| 1482 | 1492 |
| 1483 bool WebRtcVideoChannel2::MuteStream(uint32 ssrc, bool mute) { | 1493 bool WebRtcVideoChannel2::MuteStream(uint32 ssrc, bool mute) { |
| 1484 LOG(LS_VERBOSE) << "MuteStream: " << ssrc << " -> " | 1494 LOG(LS_VERBOSE) << "MuteStream: " << ssrc << " -> " |
| 1485 << (mute ? "mute" : "unmute"); | 1495 << (mute ? "mute" : "unmute"); |
| 1486 RTC_DCHECK(ssrc != 0); | 1496 RTC_DCHECK(ssrc != 0); |
| 1487 rtc::CritScope stream_lock(&stream_crit_); | 1497 rtc::CritScope stream_lock(&stream_crit_); |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2737 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2747 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2738 } | 2748 } |
| 2739 } | 2749 } |
| 2740 | 2750 |
| 2741 return video_codecs; | 2751 return video_codecs; |
| 2742 } | 2752 } |
| 2743 | 2753 |
| 2744 } // namespace cricket | 2754 } // namespace cricket |
| 2745 | 2755 |
| 2746 #endif // HAVE_WEBRTC_VIDEO | 2756 #endif // HAVE_WEBRTC_VIDEO |
| OLD | NEW |