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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 LOG(LS_WARNING) << "Failed to deliver RTP packet on re-delivery."; | 1471 LOG(LS_WARNING) << "Failed to deliver RTP packet on re-delivery."; |
1472 return; | 1472 return; |
1473 } | 1473 } |
1474 } | 1474 } |
1475 | 1475 |
1476 void WebRtcVideoChannel2::OnRtcpReceived( | 1476 void WebRtcVideoChannel2::OnRtcpReceived( |
1477 rtc::Buffer* packet, | 1477 rtc::Buffer* packet, |
1478 const rtc::PacketTime& packet_time) { | 1478 const rtc::PacketTime& packet_time) { |
1479 const webrtc::PacketTime webrtc_packet_time(packet_time.timestamp, | 1479 const webrtc::PacketTime webrtc_packet_time(packet_time.timestamp, |
1480 packet_time.not_before); | 1480 packet_time.not_before); |
1481 if (call_->Receiver()->DeliverPacket( | 1481 // TODO(pbos): Check webrtc::PacketReceiver::DELIVERY_OK once we deliver |
1482 webrtc::MediaType::VIDEO, | 1482 // for both audio and video on the same path. Since BundleFilter doesn't |
1483 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), | 1483 // filter RTCP anymore incoming RTCP packets could've been going to audio (so |
1484 webrtc_packet_time) != webrtc::PacketReceiver::DELIVERY_OK) { | 1484 // logging failures spam the log). |
1485 LOG(LS_WARNING) << "Failed to deliver RTCP packet."; | 1485 call_->Receiver()->DeliverPacket( |
1486 } | 1486 webrtc::MediaType::VIDEO, |
| 1487 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), |
| 1488 webrtc_packet_time); |
1487 } | 1489 } |
1488 | 1490 |
1489 void WebRtcVideoChannel2::OnReadyToSend(bool ready) { | 1491 void WebRtcVideoChannel2::OnReadyToSend(bool ready) { |
1490 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); | 1492 LOG(LS_VERBOSE) << "OnReadyToSend: " << (ready ? "Ready." : "Not ready."); |
1491 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); | 1493 call_->SignalNetworkState(ready ? webrtc::kNetworkUp : webrtc::kNetworkDown); |
1492 } | 1494 } |
1493 | 1495 |
1494 bool WebRtcVideoChannel2::MuteStream(uint32_t ssrc, bool mute) { | 1496 bool WebRtcVideoChannel2::MuteStream(uint32_t ssrc, bool mute) { |
1495 LOG(LS_VERBOSE) << "MuteStream: " << ssrc << " -> " | 1497 LOG(LS_VERBOSE) << "MuteStream: " << ssrc << " -> " |
1496 << (mute ? "mute" : "unmute"); | 1498 << (mute ? "mute" : "unmute"); |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2742 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2744 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2743 } | 2745 } |
2744 } | 2746 } |
2745 | 2747 |
2746 return video_codecs; | 2748 return video_codecs; |
2747 } | 2749 } |
2748 | 2750 |
2749 } // namespace cricket | 2751 } // namespace cricket |
2750 | 2752 |
2751 #endif // HAVE_WEBRTC_VIDEO | 2753 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |