修复 拉流代理的ffmpeg模式
This commit is contained in:
@@ -104,7 +104,8 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||
param.isEnable_hls(), param.isEnable_mp4(), param.getRtp_type());
|
||||
}else if ("ffmpeg".equals(param.getType())) {
|
||||
result = zlmresTfulUtils.addFFmpegSource(param.getSrc_url(), param.getDst_url(),
|
||||
param.getTimeout_ms() + "");
|
||||
param.getTimeout_ms() + "", param.isEnable_hls(), param.isEnable_mp4(),
|
||||
param.getFfmpeg_cmd_key());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -165,4 +166,22 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getFFmpegCMDs() {
|
||||
JSONObject result = new JSONObject();
|
||||
JSONObject mediaServerConfigResuly = zlmresTfulUtils.getMediaServerConfig();
|
||||
if (mediaServerConfigResuly != null && mediaServerConfigResuly.getInteger("code") == 0
|
||||
&& mediaServerConfigResuly.getJSONArray("data").size() > 0){
|
||||
JSONObject mediaServerConfig = mediaServerConfigResuly.getJSONArray("data").getJSONObject(0);
|
||||
|
||||
for (String key : mediaServerConfig.keySet()) {
|
||||
if (key.startsWith("ffmpeg.cmd")){
|
||||
result.put(key, mediaServerConfig.getString(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user