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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1369 return; | 1369 return; |
1370 case webrtc::PacketReceiver::DELIVERY_UNKNOWN_SSRC: | 1370 case webrtc::PacketReceiver::DELIVERY_UNKNOWN_SSRC: |
1371 break; | 1371 break; |
1372 } | 1372 } |
1373 | 1373 |
1374 uint32 ssrc = 0; | 1374 uint32 ssrc = 0; |
1375 if (!GetRtpSsrc(packet->data(), packet->size(), &ssrc)) { | 1375 if (!GetRtpSsrc(packet->data(), packet->size(), &ssrc)) { |
1376 return; | 1376 return; |
1377 } | 1377 } |
1378 | 1378 |
1379 // TODO(pbos): Ignore unsignalled packets that don't use the video payload | 1379 int payload_type = 0; |
1380 // (prevent creating default receivers for RTX configured as if it would | 1380 if (!GetRtpPayloadType(packet->data(), packet->size(), &payload_type)) { |
1381 // receive media payloads on those SSRCs). | 1381 return; |
1382 } | |
1383 | |
1384 // See if this payload_type is registered as RTX. If it is, and it wasn't | |
1385 // handled above by DeliverPacket, that means it's the associated RTX stream | |
1386 // of some other ignored or implicitly created unsignalled stream. In either | |
1387 // case, we can't tell which it belongs to (RTX packets don't contain | |
1388 // information about associated payload types or ssrcs), so just drop it. | |
1389 for (auto& codec : recv_codecs_) { | |
1390 if (payload_type == codec.rtx_payload_type) { | |
1391 return; | |
1392 } | |
1393 } | |
pthatcher1
2015/07/08 22:30:46
You probably want to ignore RTX, RED RTX, and FEC,
noahric
2015/07/08 22:33:26
Do they come on different ssrcs? If not, I'd think
| |
1394 | |
1382 switch (unsignalled_ssrc_handler_->OnUnsignalledSsrc(this, ssrc)) { | 1395 switch (unsignalled_ssrc_handler_->OnUnsignalledSsrc(this, ssrc)) { |
1383 case UnsignalledSsrcHandler::kDropPacket: | 1396 case UnsignalledSsrcHandler::kDropPacket: |
1384 return; | 1397 return; |
1385 case UnsignalledSsrcHandler::kDeliverPacket: | 1398 case UnsignalledSsrcHandler::kDeliverPacket: |
1386 break; | 1399 break; |
1387 } | 1400 } |
1388 | 1401 |
1389 if (call_->Receiver()->DeliverPacket(webrtc::MediaType::VIDEO, | 1402 if (call_->Receiver()->DeliverPacket(webrtc::MediaType::VIDEO, |
1390 reinterpret_cast<const uint8_t*>(packet->data()), packet->size()) != | 1403 reinterpret_cast<const uint8_t*>(packet->data()), packet->size()) != |
1391 webrtc::PacketReceiver::DELIVERY_OK) { | 1404 webrtc::PacketReceiver::DELIVERY_OK) { |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2580 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2593 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2581 } | 2594 } |
2582 } | 2595 } |
2583 | 2596 |
2584 return video_codecs; | 2597 return video_codecs; |
2585 } | 2598 } |
2586 | 2599 |
2587 } // namespace cricket | 2600 } // namespace cricket |
2588 | 2601 |
2589 #endif // HAVE_WEBRTC_VIDEO | 2602 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |