|
@@ -7,15 +7,20 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.mybatisflex.core.paginate.Page;
|
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
import com.taais.biz.domain.bo.VideoStableStartBo;
|
|
|
+import com.taais.biz.domain.bo.VideoStableStartResultBo;
|
|
|
import com.taais.common.core.core.domain.CommonResult;
|
|
|
import com.taais.common.core.utils.MapstructUtils;
|
|
|
+import com.taais.common.json.utils.JsonUtils;
|
|
|
import com.taais.common.orm.core.page.PageQuery;
|
|
|
import com.taais.common.core.core.page.PageResult;
|
|
|
import com.taais.common.orm.core.service.impl.BaseServiceImpl;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import jakarta.annotation.Resource;
|
|
|
+import lombok.Builder;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.http.client.methods.HttpPost;
|
|
|
+import org.apache.http.entity.StringEntity;
|
|
|
+import org.opencv.video.Video;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -58,8 +63,8 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
(videoStableBo.getName()));
|
|
|
queryWrapper.and(VIDEO_STABLE.STATUS.eq
|
|
|
(videoStableBo.getStatus()));
|
|
|
- queryWrapper.and(VIDEO_STABLE.INPUT_PATH.eq
|
|
|
- (videoStableBo.getInputPath()));
|
|
|
+ queryWrapper.and(VIDEO_STABLE.IN_PATH.eq
|
|
|
+ (videoStableBo.getInPath()));
|
|
|
queryWrapper.and(VIDEO_STABLE.OUT_PATH.eq
|
|
|
(videoStableBo.getOutPath()));
|
|
|
queryWrapper.and(VIDEO_STABLE.START_TIME.eq
|
|
@@ -156,9 +161,28 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
|
|
|
@Override
|
|
|
public CommonResult start(VideoStableStartBo videoStableStartBo) {
|
|
|
+ VideoStable videoStable = new VideoStable();
|
|
|
+ videoStable.setInPath(videoStableStartBo.getIn_path());
|
|
|
+ videoStable.setOutPath(videoStableStartBo.getOut_path());
|
|
|
+ videoStable.setBlock_size(videoStableStartBo.getBlock_size());
|
|
|
+ videoStable.setRadius(videoStable.getRadius());
|
|
|
+ videoStable.setBuffer_size(videoStableStartBo.getBuffer_size());
|
|
|
+ videoStable.setCornerquality(videoStable.getCornerquality());
|
|
|
+ videoStable.setCornerminDistance(videoStable.getCornerminDistance());
|
|
|
+ videoStable.setLklevel(videoStable.getLklevel());
|
|
|
+ videoStable.setLkwinSiz(videoStable.getLkwinSiz());
|
|
|
+
|
|
|
+ save(videoStable);
|
|
|
+ System.out.println(videoStable.getId());
|
|
|
+
|
|
|
log.info("start video_stable_url: {}", video_stable_url);
|
|
|
try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
|
|
|
HttpPost request = new HttpPost(video_stable_url);
|
|
|
+ // 设置请求体
|
|
|
+ System.out.println(JsonUtils.toJsonString(videoStable));
|
|
|
+ StringEntity entity = new StringEntity(JsonUtils.toJsonString(videoStable), "UTF-8");
|
|
|
+ entity.setContentType("application/json");
|
|
|
+ request.setEntity(entity);
|
|
|
try (CloseableHttpResponse response = httpClient.execute(request)) {
|
|
|
String responseBody = EntityUtils.toString(response.getEntity());
|
|
|
System.out.println(responseBody);
|
|
@@ -169,4 +193,9 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
return CommonResult.fail("start video_stable error -> " + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult getResult(VideoStableStartResultBo videoStableStartResultBo) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|