优化倍速播放参数

This commit is contained in:
648540858
2021-11-24 15:10:10 +08:00
parent 20082441ef
commit 08c45876df
3 changed files with 10 additions and 5 deletions

View File

@@ -140,7 +140,7 @@ public interface ISIPCommander {
/**
* 回放倍速播放
*/
void playSpeedCmd(Device device, StreamInfo streamInfo, String speed);
void playSpeedCmd(Device device, StreamInfo streamInfo, Double speed);
/**
* 语音广播

View File

@@ -1630,12 +1630,12 @@ public class SIPCommander implements ISIPCommander {
* 回放倍速播放
*/
@Override
public void playSpeedCmd(Device device, StreamInfo streamInfo, String speed) {
public void playSpeedCmd(Device device, StreamInfo streamInfo, Double speed) {
try {
StringBuffer content = new StringBuffer(200);
content.append("PLAY RTSP/1.0\r\n");
content.append("CSeq: " + InfoCseqCache.CSEQCACHE.get(streamInfo.getStreamId()) + "\r\n");
content.append("Scale: " + speed + ".000000\r\n");
content.append("Scale: " + String.format("%.1f",speed) + "\r\n");
Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString());
logger.info(request.toString());
ClientTransaction clientTransaction = null;