修复ssrc释放失败的问题
parent
e864becace
commit
2d82d1b8ee
|
@ -15,6 +15,7 @@ import org.springframework.stereotype.Component;
|
|||
public class VideoStreamSessionManager {
|
||||
|
||||
private ConcurrentHashMap<String, ClientTransaction> sessionMap = new ConcurrentHashMap<>();
|
||||
private ConcurrentHashMap<String, String> ssrcMap = new ConcurrentHashMap<>();
|
||||
|
||||
public String createPlaySsrc(){
|
||||
return SsrcUtil.getPlaySsrc();
|
||||
|
@ -24,16 +25,18 @@ public class VideoStreamSessionManager {
|
|||
return SsrcUtil.getPlayBackSsrc();
|
||||
}
|
||||
|
||||
public void put(String ssrc,ClientTransaction transaction){
|
||||
sessionMap.put(ssrc, transaction);
|
||||
public void put(String streamId,String ssrc,ClientTransaction transaction){
|
||||
sessionMap.put(streamId, transaction);
|
||||
ssrcMap.put(streamId, ssrc);
|
||||
}
|
||||
|
||||
public ClientTransaction get(String ssrc){
|
||||
return sessionMap.get(ssrc);
|
||||
public ClientTransaction get(String streamId){
|
||||
return sessionMap.get(streamId);
|
||||
}
|
||||
|
||||
public void remove(String ssrc) {
|
||||
sessionMap.remove(ssrc);
|
||||
SsrcUtil.releaseSsrc(ssrc);
|
||||
public void remove(String streamId) {
|
||||
sessionMap.remove(streamId);
|
||||
SsrcUtil.releaseSsrc(ssrcMap.get(streamId));
|
||||
ssrcMap.remove(streamId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
Request request = headerProvider.createInviteRequest(device, channelId, content.toString(), null, "FromInvt" + tm, null, ssrc);
|
||||
|
||||
ClientTransaction transaction = transmitRequest(device, request, errorEvent);
|
||||
streamSession.put(streamId, transaction);
|
||||
streamSession.put(streamId,ssrc, transaction);
|
||||
|
||||
|
||||
|
||||
|
@ -488,7 +488,7 @@ public class SIPCommander implements ISIPCommander {
|
|||
Request request = headerProvider.createPlaybackInviteRequest(device, channelId, content.toString(), null, "fromplybck" + tm, null);
|
||||
|
||||
ClientTransaction transaction = transmitRequest(device, request, errorEvent);
|
||||
streamSession.put(streamId, transaction);
|
||||
streamSession.put(streamId, ssrc, transaction);
|
||||
|
||||
} catch ( SipException | ParseException | InvalidArgumentException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -7,7 +7,7 @@ module.exports = {
|
|||
// to edit target browsers: use "browserslist" field in package.json
|
||||
"autoprefixer": {},
|
||||
'postcss-pxtorem': {
|
||||
rootValue: 24,
|
||||
rootValue: 16,
|
||||
propList: ['font-size'] // 只转化font-size
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue