This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
D/StrictMode(27758): StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
D/StrictMode(27758): at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1877)
D/StrictMode(27758): at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:286)
D/StrictMode(27758): at java.io.FileInputStream.finalize(FileInputStream.java:493)
D/StrictMode(27758): at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
D/StrictMode(27758): at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
D/StrictMode(27758): at java.lang.Daemons$Daemon.run(Daemons.java:137)
D/StrictMode(27758): at java.lang.Thread.run(Thread.java:919)
D/StrictMode(27758): Caused by: java.lang.Throwable: Explicit termination method 'close' not called
D/StrictMode(27758): at dalvik.system.CloseGuard.open(CloseGuard.java:237)
D/StrictMode(27758): at java.io.FileInputStream.<init>(FileInputStream.java:174)
D/StrictMode(27758): at java.io.FileInputStream.<init>(FileInputStream.java:115)
D/StrictMode(27758): at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin.setDataSource(VideoThumbnailPlugin.java:264)
D/StrictMode(27758): at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin.createVideoThumbnail(VideoThumbnailPlugin.java:215)
D/StrictMode(27758): at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin.buildThumbnailData(VideoThumbnailPlugin.java:123)
D/StrictMode(27758): at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin.access$100(VideoThumbnailPlugin.java:32)
D/StrictMode(27758): at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin$1.run(VideoThumbnailPlugin.java:83)
D/StrictMode(27758): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
D/StrictMode(27758): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
D/StrictMode(27758): ... 1 more
To reproduce, enable strict mode by putting this code in MainActivity and generate a thumbnail.
if (BuildConfig.DEBUG) {
StrictMode.setVmPolicy(new VmPolicy.Builder()
.detectLeakedClosableObjects()
.penaltyLog()
.build());
}
There is a resource leak at VideoThumbnailPlugin.java:264
To reproduce, enable strict mode by putting this code in MainActivity and generate a thumbnail.