|
@@ -364,20 +364,6 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
materialParameter.setHeight(height);
|
|
|
|
|
|
|
|
|
- Thread thread = new Thread() {
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
- try {
|
|
|
- log.info("开始抽帧");
|
|
|
- materialCutFrameService.getCutFrame(url, materialInfo.getCode(), secondDuration, height, width);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
- thread.start();
|
|
|
-
|
|
|
-
|
|
|
fis = new FileInputStream(file);
|
|
|
FileChannel fc = fis.getChannel();
|
|
|
BigDecimal fileSize = new BigDecimal(fc.size());
|
|
@@ -391,8 +377,19 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
int insert = materialParameterMapper.insert(materialParameter);
|
|
|
if (insert > 0) {
|
|
|
log.info("素材基本信息入库完成,用时:{} s", (System.currentTimeMillis() - l) / 1000);
|
|
|
-
|
|
|
}
|
|
|
+ Thread thread = new Thread() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ try {
|
|
|
+ log.info("开始抽帧");
|
|
|
+ materialCutFrameService.getCutFrame(url, materialInfo.getCode(), secondDuration, height, width);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ thread.start();
|
|
|
} catch (FileNotFoundException e) {
|
|
|
e.printStackTrace();
|
|
|
} catch (IOException e) {
|