|
|
|
@ -139,6 +139,25 @@ public final class VodStateManager implements IThreadStateManager { |
|
|
|
|
loader.notifyWaitLock(true); |
|
|
|
|
} |
|
|
|
|
if (isComplete()) { |
|
|
|
|
handleTaskComplete(); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case STATE_RUNNING: |
|
|
|
|
Bundle b = msg.getData(); |
|
|
|
|
if (b != null) { |
|
|
|
|
long len = b.getLong(IThreadStateManager.DATA_ADD_LEN, 0); |
|
|
|
|
progress += len; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 处理m3u8以完成 |
|
|
|
|
*/ |
|
|
|
|
void handleTaskComplete() { |
|
|
|
|
ALog.d(TAG, String.format( |
|
|
|
|
"startThreadNum = %s, stopNum = %s, cancelNum = %s, failNum = %s, completeNum = %s, flagQueueSize = %s", |
|
|
|
|
startThreadNum, stopNum, cancelNum, failNum, loader.getCompleteNum(), |
|
|
|
@ -162,18 +181,6 @@ public final class VodStateManager implements IThreadStateManager { |
|
|
|
|
} |
|
|
|
|
quitLooper(); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case STATE_RUNNING: |
|
|
|
|
Bundle b = msg.getData(); |
|
|
|
|
if (b != null) { |
|
|
|
|
long len = b.getLong(IThreadStateManager.DATA_ADD_LEN, 0); |
|
|
|
|
progress += len; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
void updateStateCount() { |
|
|
|
|
cancelNum.set(0); |
|
|
|
|