|
@@ -36,17 +36,21 @@ class AnimConfigManager(val player: AnimPlayer) {
|
|
|
* 解析配置
|
|
* 解析配置
|
|
|
* @return true 解析成功 false 解析失败
|
|
* @return true 解析成功 false 解析失败
|
|
|
*/
|
|
*/
|
|
|
- fun parseConfig(fileContainer: FileContainer, defaultVideoMode: Int, defaultFps: Int): Int {
|
|
|
|
|
|
|
+ fun parseConfig(fileContainer: FileContainer, enableVersion1: Boolean, defaultVideoMode: Int, defaultFps: Int): Int {
|
|
|
try {
|
|
try {
|
|
|
isParsingConfig = true
|
|
isParsingConfig = true
|
|
|
// 解析vapc
|
|
// 解析vapc
|
|
|
val time = SystemClock.elapsedRealtime()
|
|
val time = SystemClock.elapsedRealtime()
|
|
|
val result = parse(fileContainer, defaultVideoMode, defaultFps)
|
|
val result = parse(fileContainer, defaultVideoMode, defaultFps)
|
|
|
- ALog.i(TAG, "parseConfig cost=${SystemClock.elapsedRealtime() - time}ms")
|
|
|
|
|
|
|
+ ALog.i(TAG, "parseConfig cost=${SystemClock.elapsedRealtime() - time}ms enableVersion1=$enableVersion1 result=$result")
|
|
|
if (!result) {
|
|
if (!result) {
|
|
|
isParsingConfig = false
|
|
isParsingConfig = false
|
|
|
return Constant.REPORT_ERROR_TYPE_PARSE_CONFIG
|
|
return Constant.REPORT_ERROR_TYPE_PARSE_CONFIG
|
|
|
}
|
|
}
|
|
|
|
|
+ if (config?.isDefaultConfig == true && !enableVersion1) {
|
|
|
|
|
+ isParsingConfig = false
|
|
|
|
|
+ return Constant.REPORT_ERROR_TYPE_PARSE_CONFIG
|
|
|
|
|
+ }
|
|
|
// 插件解析配置
|
|
// 插件解析配置
|
|
|
val resultCode = config?.let {
|
|
val resultCode = config?.let {
|
|
|
player.pluginManager.onConfigCreate(it)
|
|
player.pluginManager.onConfigCreate(it)
|