Fixed RTSP input, added support for non-standard "PCM" RTP profile, improving IP cam compatibility.
This commit is contained in:
parent
8bf548bfa5
commit
aae6101c3d
2 changed files with 11 additions and 2 deletions
|
@ -479,7 +479,7 @@ namespace SDP{
|
|||
thisTrack->codec = "PCM";
|
||||
thisTrack->size = 20;
|
||||
}
|
||||
if (trCodec == "L24"){
|
||||
if (trCodec == "L24"|| trCodec == "PCM"){
|
||||
thisTrack->codec = "PCM";
|
||||
thisTrack->size = 24;
|
||||
}
|
||||
|
|
|
@ -314,6 +314,7 @@ namespace Mist{
|
|||
for (std::map<uint32_t, SDP::Track>::iterator it = sdpState.tracks.begin();
|
||||
it != sdpState.tracks.end(); ++it){
|
||||
Socket::UDPConnection &s = it->second.data;
|
||||
it->second.sorter.setCallback(it->first, insertRTP);
|
||||
while (s.Receive()){
|
||||
r = true;
|
||||
// if (s.getDestPort() != it->second.sPortA){
|
||||
|
@ -321,7 +322,15 @@ namespace Mist{
|
|||
// continue;
|
||||
//}
|
||||
tcpCon.addDown(s.data_len);
|
||||
it->second.sorter.addPacket(s.data, s.data_len);
|
||||
RTP::Packet pack(s.data, s.data_len);
|
||||
if (!it->second.theirSSRC){
|
||||
it->second.theirSSRC = pack.getSSRC();
|
||||
}
|
||||
it->second.sorter.addPacket(pack);
|
||||
}
|
||||
if (Util::epoch() / 5 != it->second.rtcpSent){
|
||||
it->second.rtcpSent = Util::epoch() / 5;
|
||||
it->second.pack.sendRTCP_RR(connectedAt, it->second, it->first, myMeta, sendUDP);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
|
|
Loading…
Add table
Reference in a new issue