sftp 下载实现
使用零拷贝技术优化合并分块的功能
This commit is contained in:
@@ -20,6 +20,7 @@ import com.arialyy.aria.core.ThreadRecord;
|
||||
import com.arialyy.aria.core.common.RecordHandler;
|
||||
import com.arialyy.aria.core.loader.IRecordHandler;
|
||||
import com.arialyy.aria.core.wrapper.AbsTaskWrapper;
|
||||
import com.arialyy.aria.core.wrapper.ITaskWrapper;
|
||||
import com.arialyy.aria.m3u8.M3U8TaskOption;
|
||||
import com.arialyy.aria.util.RecordUtil;
|
||||
import java.util.ArrayList;
|
||||
@@ -74,7 +75,7 @@ final class LiveRecordHandler extends RecordHandler {
|
||||
tr.taskKey = taskRecord.filePath;
|
||||
tr.isComplete = false;
|
||||
tr.tsUrl = tsUrl;
|
||||
tr.threadType = getEntity().getTaskType();
|
||||
tr.threadType = taskRecord.taskType;
|
||||
tr.threadId = threadId;
|
||||
tr.startLocation = 0;
|
||||
taskRecord.threadRecords.add(tr);
|
||||
@@ -88,7 +89,7 @@ final class LiveRecordHandler extends RecordHandler {
|
||||
record.threadRecords = new ArrayList<>();
|
||||
record.threadNum = threadNum;
|
||||
record.isBlock = true;
|
||||
record.taskType = getEntity().getTaskType();
|
||||
record.taskType = ITaskWrapper.M3U8_LIVE;
|
||||
record.bandWidth = mOption.getBandWidth();
|
||||
return record;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ final class VodRecordHandler extends RecordHandler {
|
||||
tr.threadId = threadId;
|
||||
tr.isComplete = false;
|
||||
tr.startLocation = 0;
|
||||
tr.threadType = getEntity().getTaskType();
|
||||
tr.threadType = record.taskType;
|
||||
tr.tsUrl = mOption.getUrls().get(threadId);
|
||||
return tr;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ final class VodRecordHandler extends RecordHandler {
|
||||
record.threadRecords = new ArrayList<>();
|
||||
record.threadNum = threadNum;
|
||||
record.isBlock = true;
|
||||
record.taskType = getEntity().getTaskType();
|
||||
record.taskType = ITaskWrapper.M3U8_VOD;
|
||||
record.bandWidth = mOption.getBandWidth();
|
||||
return record;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user