* re-work finished mission database * re-work DownloadMission and bump it Serializable version * keep the classic Java IO API * SAF Tree API support on Android Lollipop or higher * add wrapper for SAF stream opening * implement Closeable in SharpStream to replace the dispose() method * do required changes for this API: ** remove any file creation logic from DownloadInitializer ** make PostProcessing Serializable and reduce the number of iterations ** update all strings.xml files ** storage helpers: StoredDirectoryHelper & StoredFileHelper ** best effort to handle any kind of SAF errors/exceptions
27 lines
617 B
Java
27 lines
617 B
Java
package us.shandian.giga.postprocessing;
|
|
|
|
import org.schabi.newpipe.streams.Mp4FromDashWriter;
|
|
import org.schabi.newpipe.streams.io.SharpStream;
|
|
|
|
import java.io.IOException;
|
|
|
|
/**
|
|
* @author kapodamy
|
|
*/
|
|
class Mp4FromDashMuxer extends Postprocessing {
|
|
|
|
Mp4FromDashMuxer() {
|
|
super(2 * 1024 * 1024/* 2 MiB */, true);
|
|
}
|
|
|
|
@Override
|
|
int process(SharpStream out, SharpStream... sources) throws IOException {
|
|
Mp4FromDashWriter muxer = new Mp4FromDashWriter(sources);
|
|
muxer.parseSources();
|
|
muxer.selectTracks(0, 0);
|
|
muxer.build(out);
|
|
|
|
return OK_RESULT;
|
|
}
|
|
|
|
}
|