新增FFmpeg转码功能
This commit is contained in:
@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
@Controller
|
||||
public class SystemConfigController {
|
||||
@@ -61,5 +63,25 @@ public class SystemConfigController {
|
||||
json.put("data",data);
|
||||
return json;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/set/ffmpeg.do")
|
||||
public JSONObject setFFmpeg(String ffmpeg) throws UnsupportedEncodingException {
|
||||
ffmpeg= URLDecoder.decode(ffmpeg,"UTF-8");
|
||||
configService.setConfig(Config.SYSTEM_VIDEO_FFMPEG,ffmpeg);
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("code",0);
|
||||
json.put("msg","ok");
|
||||
return json;
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping("/system/get/ffmpeg.do")
|
||||
public JSONObject getFFmpeg(){
|
||||
JSONObject json = new JSONObject();
|
||||
JSONObject data=new JSONObject();
|
||||
String reg = configService.getConfig(Config.SYSTEM_VIDEO_FFMPEG);
|
||||
data.put(Config.SYSTEM_VIDEO_FFMPEG, reg);
|
||||
json.put("code",0);
|
||||
json.put("data",data);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user