forked from j62/ctbrec
Add updates of lastSegmentDownload to MergedFfmpegHlsDownload
This commit is contained in:
parent
f92cdf46b6
commit
f9d777b039
|
@ -69,7 +69,7 @@ public abstract class AbstractHlsDownload extends AbstractDownload {
|
||||||
private Instant beforeLastPlaylistRequest= Instant.EPOCH;
|
private Instant beforeLastPlaylistRequest= Instant.EPOCH;
|
||||||
private int consecutivePlaylistTimeouts = 0;
|
private int consecutivePlaylistTimeouts = 0;
|
||||||
private int consecutivePlaylistErrors = 0;
|
private int consecutivePlaylistErrors = 0;
|
||||||
private Instant lastSegmentDownload = Instant.MIN;
|
protected Instant lastSegmentDownload = Instant.MIN;
|
||||||
private final List<Instant> segmentErrorTimestamps = new LinkedList<>();
|
private final List<Instant> segmentErrorTimestamps = new LinkedList<>();
|
||||||
private int selectedResolution = UNKNOWN;
|
private int selectedResolution = UNKNOWN;
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class MergedFfmpegHlsDownload extends AbstractHlsDownload {
|
||||||
SegmentDownload segmentDownload = future.get();
|
SegmentDownload segmentDownload = future.get();
|
||||||
ByteArrayOutputStream downloadData = (ByteArrayOutputStream) segmentDownload.getOutputStream();
|
ByteArrayOutputStream downloadData = (ByteArrayOutputStream) segmentDownload.getOutputStream();
|
||||||
downloadData.writeTo(ffmpegStdIn);
|
downloadData.writeTo(ffmpegStdIn);
|
||||||
|
lastSegmentDownload = Instant.now();
|
||||||
} else {
|
} else {
|
||||||
// first download in queue not finished, let's continue with other stuff
|
// first download in queue not finished, let's continue with other stuff
|
||||||
break;
|
break;
|
||||||
|
@ -213,7 +214,7 @@ public class MergedFfmpegHlsDownload extends AbstractHlsDownload {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected OutputStream getSegmentOutputStream(Segment segment) throws IOException {
|
protected OutputStream getSegmentOutputStream(Segment segment) {
|
||||||
return new ByteArrayOutputStream();
|
return new ByteArrayOutputStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue