Reworks default tools, moves some files
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.github.gtache.autosubtitle.archive.ffmpeg;
|
||||
|
||||
import com.github.gtache.autosubtitle.archive.Archiver;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.github.gtache.autosubtitle.archive.ffmpeg;
|
||||
|
||||
import com.github.gtache.autosubtitle.archive.Archiver;
|
||||
import org.tukaani.xz.XZInputStream;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.tukaani.xz.XZInputStream;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -15,10 +15,12 @@ import com.github.gtache.autosubtitle.subtitle.SubtitleCollection;
|
||||
import com.github.gtache.autosubtitle.subtitle.converter.FormatException;
|
||||
import com.github.gtache.autosubtitle.subtitle.converter.SubtitleConverter;
|
||||
import com.github.gtache.autosubtitle.subtitle.converter.SubtitleConverterProvider;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.github.gtache.autosubtitle.modules.setup.ffmpeg.FFprobeSystemPath;
|
||||
import com.github.gtache.autosubtitle.process.ProcessRunner;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.github.gtache.autosubtitle.modules.ffmpeg;
|
||||
|
||||
import com.github.gtache.autosubtitle.ToolType;
|
||||
import com.github.gtache.autosubtitle.VideoConverter;
|
||||
import com.github.gtache.autosubtitle.VideoLoader;
|
||||
import com.github.gtache.autosubtitle.ffmpeg.FFmpegVideoConverter;
|
||||
import com.github.gtache.autosubtitle.ffmpeg.FFprobeVideoLoader;
|
||||
import com.github.gtache.autosubtitle.modules.impl.ToolTypeKey;
|
||||
import com.github.gtache.autosubtitle.modules.setup.ffmpeg.FFmpegSetupModule;
|
||||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.IntoMap;
|
||||
import dagger.multibindings.StringKey;
|
||||
|
||||
@@ -25,14 +28,22 @@ public abstract class FFmpegModule {
|
||||
@StringKey("ffmpeg")
|
||||
abstract VideoConverter bindsVideoConverter(final FFmpegVideoConverter converter);
|
||||
|
||||
@Binds
|
||||
abstract VideoConverter bindsDefaultVideoConverter(final FFmpegVideoConverter converter);
|
||||
@Provides
|
||||
@IntoMap
|
||||
@ToolTypeKey(ToolType.VIDEO_CONVERTER)
|
||||
static String bindsDefaultVideoConverter() {
|
||||
return "ffmpeg";
|
||||
}
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@StringKey("ffprobe")
|
||||
abstract VideoLoader bindsVideoLoader(final FFprobeVideoLoader loader);
|
||||
|
||||
@Binds
|
||||
abstract VideoLoader bindsDefaultVideoLoader(final FFprobeVideoLoader loader);
|
||||
@Provides
|
||||
@IntoMap
|
||||
@ToolTypeKey(ToolType.VIDEO_LOADER)
|
||||
static String bindsDefaultVideoLoader() {
|
||||
return "ffprobe";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.github.gtache.autosubtitle.modules.impl.ExecutableExtension;
|
||||
import com.github.gtache.autosubtitle.modules.setup.impl.CacheRoot;
|
||||
import com.github.gtache.autosubtitle.modules.setup.impl.ToolsRoot;
|
||||
import com.github.gtache.autosubtitle.modules.setup.impl.VideoConverterSetup;
|
||||
import com.github.gtache.autosubtitle.modules.setup.impl.VideoLoaderSetup;
|
||||
import com.github.gtache.autosubtitle.setup.SetupManager;
|
||||
import com.github.gtache.autosubtitle.setup.ffmpeg.FFmpegSetupConfiguration;
|
||||
import com.github.gtache.autosubtitle.setup.ffmpeg.FFmpegSetupManager;
|
||||
@@ -52,8 +53,10 @@ public abstract class FFmpegSetupModule {
|
||||
abstract SetupManager bindsFFmpegSetupManager(final FFmpegSetupManager manager);
|
||||
|
||||
@Binds
|
||||
@VideoConverterSetup
|
||||
abstract SetupManager bindsDefaultSetupManager(final FFmpegSetupManager manager);
|
||||
@VideoLoaderSetup
|
||||
@IntoMap
|
||||
@StringKey("ffprobe")
|
||||
abstract SetupManager bindsFFprobeSetupManager(final FFmpegSetupManager manager);
|
||||
|
||||
@Provides
|
||||
static FFmpegSetupConfiguration providesFFmpegSetupConfiguration(@FFBundledRoot final Path root, @FFmpegBundledPath final Path bundledPath, @FFmpegSystemPath final Path systemPath,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.github.gtache.autosubtitle.modules.setup.ffmpeg;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.github.gtache.autosubtitle.setup.impl.AbstractSetupManager;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.http.HttpClient;
|
||||
import java.nio.file.Files;
|
||||
|
||||
Reference in New Issue
Block a user