|
|
@@ -32,10 +32,7 @@ import org.springframework.util.CollectionUtils; |
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
|
|
|
import javax.transaction.xa.XAException; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.Future; |
|
|
|
import java.util.concurrent.atomic.AtomicInteger; |
|
|
|
|
|
|
@@ -221,11 +218,44 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
|
|
|
|
|
Integer voiceFrom = photoSpeakVideo.getVoiceFrom(); |
|
|
|
String voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl(); |
|
|
|
// param.setSubtitle_params(photoSpeakVideo.getSubtitleEnabled()==1?photoSpeakVideo.getSubtitleParams(): null); |
|
|
|
// if (photoSpeakVideo.getSubtitleEnabled()==1){ |
|
|
|
// //开启字幕 查询字幕列表 |
|
|
|
// // param.setSubtitle_params(photoSpeakVideo.getSubtitleParams()); |
|
|
|
// } |
|
|
|
|
|
|
|
if (photoSpeakVideo.getSubtitleEnabled()==1){ |
|
|
|
// 开启字幕 查询字幕列表 |
|
|
|
Map subtitle = new HashMap(); |
|
|
|
Map params = new HashMap(); |
|
|
|
|
|
|
|
String getSubtitleParams = photoSpeakVideo.getSubtitleParams(); |
|
|
|
String[] getparams = getSubtitleParams.split(","); |
|
|
|
Map map = new HashMap(); |
|
|
|
for (String s : getparams) { |
|
|
|
String[] kv = s.split(":"); |
|
|
|
map.put(kv[0],kv[1]); |
|
|
|
} |
|
|
|
params.put("Fontname",(map.get("Fontname")==null?"宋体":map.get("Fontname"))); |
|
|
|
params.put("Fontsize",(map.get("Fontsize")==null? 25:map.get("Fontsize"))); |
|
|
|
params.put("PrimaryColour",(map.get("PrimaryColour")==null?"&Hffffff":map.get("PrimaryColour"))); |
|
|
|
params.put("SecondaryColour",(map.get("SecondaryColour")==null?"BBGGRR":map.get("SecondaryColour"))); |
|
|
|
params.put("OutlineColour",(map.get("OutlineColour")==null?"BBGGRR":map.get("OutlineColour"))); |
|
|
|
params.put("BackColour",(map.get("BackColour")==null?"&H0000ff":map.get("BackColour"))); |
|
|
|
params.put("Bold",(map.get("Bold")==null? -1:map.get("Bold"))); |
|
|
|
params.put("Italic",(map.get("Italic")==null? 0:map.get("Italic"))); |
|
|
|
params.put("Underline",(map.get("Underline")==null? 0:map.get("Underline"))); |
|
|
|
params.put("Strikeout",(map.get("Strikeout")==null? 0:map.get("Strikeout"))); |
|
|
|
params.put("ScaleX",(map.get("ScaleX")==null? 100:map.get("ScaleX"))); |
|
|
|
params.put("ScaleY",(map.get("ScaleY")==null? 100:map.get("ScaleY"))); |
|
|
|
params.put("Spacing",(map.get("Spacing")==null? 0:map.get("Spacing"))); |
|
|
|
params.put("Angle",(map.get("Angle")==null? 15:map.get("Angle"))); |
|
|
|
params.put("BorderStyle",(map.get("BorderStyle")==null?"1":map.get("BorderStyle"))); |
|
|
|
params.put("Outline",(map.get("Outline")==null? 20:map.get("Outline"))); |
|
|
|
params.put("Shadow",(map.get("Shadow")==null? 12:map.get("Shadow"))); |
|
|
|
params.put("Alignment",(map.get("Alignment")==null? 1:map.get("Alignment"))); |
|
|
|
params.put("MarginL",(map.get("MarginL")==null? 100:map.get("MarginL"))); |
|
|
|
params.put("MarginR",(map.get("MarginR")==null? 100:map.get("MarginR"))); |
|
|
|
params.put("MarginV",(map.get("MarginV")==null? 100:map.get("MarginV"))); |
|
|
|
subtitle.put("enabled",1); |
|
|
|
subtitle.put("params",params); |
|
|
|
param.setSubtitle_params(subtitle); |
|
|
|
} |
|
|
|
|
|
|
|
if (EnumVoiceFrom.FROM_MOULD.getCode().equals(voiceFrom)) { |
|
|
|
param.setGen_txt(photoSpeakVideo.getPaperwork().replaceAll(str, "[*]")); |
|
|
|