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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 capturer->SetApplyRotation(!ContainsHeaderExtension( | 1340 capturer->SetApplyRotation(!ContainsHeaderExtension( |
1341 send_rtp_extensions_, kRtpVideoRotationHeaderExtension)); | 1341 send_rtp_extensions_, kRtpVideoRotationHeaderExtension)); |
1342 } | 1342 } |
1343 { | 1343 { |
1344 rtc::CritScope lock(&capturer_crit_); | 1344 rtc::CritScope lock(&capturer_crit_); |
1345 capturers_[ssrc] = capturer; | 1345 capturers_[ssrc] = capturer; |
1346 } | 1346 } |
1347 return true; | 1347 return true; |
1348 } | 1348 } |
1349 | 1349 |
1350 bool WebRtcVideoChannel2::SendIntraFrame() { | |
1351 // TODO(pbos): Implement. | |
1352 LOG(LS_VERBOSE) << "SendIntraFrame()."; | |
1353 return true; | |
1354 } | |
1355 | |
1356 bool WebRtcVideoChannel2::RequestIntraFrame() { | |
1357 // TODO(pbos): Implement. | |
1358 LOG(LS_VERBOSE) << "SendIntraFrame()."; | |
1359 return true; | |
1360 } | |
1361 | |
1362 void WebRtcVideoChannel2::OnPacketReceived( | 1350 void WebRtcVideoChannel2::OnPacketReceived( |
1363 rtc::Buffer* packet, | 1351 rtc::Buffer* packet, |
1364 const rtc::PacketTime& packet_time) { | 1352 const rtc::PacketTime& packet_time) { |
1365 const webrtc::PacketTime webrtc_packet_time(packet_time.timestamp, | 1353 const webrtc::PacketTime webrtc_packet_time(packet_time.timestamp, |
1366 packet_time.not_before); | 1354 packet_time.not_before); |
1367 const webrtc::PacketReceiver::DeliveryStatus delivery_result = | 1355 const webrtc::PacketReceiver::DeliveryStatus delivery_result = |
1368 call_->Receiver()->DeliverPacket( | 1356 call_->Receiver()->DeliverPacket( |
1369 webrtc::MediaType::VIDEO, | 1357 webrtc::MediaType::VIDEO, |
1370 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), | 1358 reinterpret_cast<const uint8_t*>(packet->data()), packet->size(), |
1371 webrtc_packet_time); | 1359 webrtc_packet_time); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 | 1455 |
1468 // Speculative change to increase the outbound socket buffer size. | 1456 // Speculative change to increase the outbound socket buffer size. |
1469 // In b/15152257, we are seeing a significant number of packets discarded | 1457 // In b/15152257, we are seeing a significant number of packets discarded |
1470 // due to lack of socket buffer space, although it's not yet clear what the | 1458 // due to lack of socket buffer space, although it's not yet clear what the |
1471 // ideal value should be. | 1459 // ideal value should be. |
1472 MediaChannel::SetOption(NetworkInterface::ST_RTP, | 1460 MediaChannel::SetOption(NetworkInterface::ST_RTP, |
1473 rtc::Socket::OPT_SNDBUF, | 1461 rtc::Socket::OPT_SNDBUF, |
1474 kVideoRtpBufferSize); | 1462 kVideoRtpBufferSize); |
1475 } | 1463 } |
1476 | 1464 |
1477 void WebRtcVideoChannel2::UpdateAspectRatio(int ratio_w, int ratio_h) { | |
1478 // TODO(pbos): Implement. | |
1479 } | |
1480 | |
1481 void WebRtcVideoChannel2::OnMessage(rtc::Message* msg) { | |
1482 // Ignored. | |
1483 } | |
1484 | |
1485 void WebRtcVideoChannel2::OnLoadUpdate(Load load) { | 1465 void WebRtcVideoChannel2::OnLoadUpdate(Load load) { |
1486 // OnLoadUpdate can not take any locks that are held while creating streams | 1466 // OnLoadUpdate can not take any locks that are held while creating streams |
1487 // etc. Doing so establishes lock-order inversions between the webrtc process | 1467 // etc. Doing so establishes lock-order inversions between the webrtc process |
1488 // thread on stream creation and locks such as stream_crit_ while calling out. | 1468 // thread on stream creation and locks such as stream_crit_ while calling out. |
1489 rtc::CritScope stream_lock(&capturer_crit_); | 1469 rtc::CritScope stream_lock(&capturer_crit_); |
1490 if (!signal_cpu_adaptation_) | 1470 if (!signal_cpu_adaptation_) |
1491 return; | 1471 return; |
1492 // Do not adapt resolution for screen content as this will likely result in | 1472 // Do not adapt resolution for screen content as this will likely result in |
1493 // blurry and unreadable text. | 1473 // blurry and unreadable text. |
1494 for (auto& kv : capturers_) { | 1474 for (auto& kv : capturers_) { |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2585 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2606 } | 2586 } |
2607 } | 2587 } |
2608 | 2588 |
2609 return video_codecs; | 2589 return video_codecs; |
2610 } | 2590 } |
2611 | 2591 |
2612 } // namespace cricket | 2592 } // namespace cricket |
2613 | 2593 |
2614 #endif // HAVE_WEBRTC_VIDEO | 2594 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |