summaryrefslogtreecommitdiffstats
path: root/core/subsurfacestartup.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-10 15:04:35 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-28 15:31:25 -0700
commitfce42d4858d33e10b7a1c48d75838f1901b6b123 (patch)
tree3be7516c1e306e4fb8cce9cd1f3e357e3a5575df /core/subsurfacestartup.c
parent51066e5478d76824c5da53f37184e0e0d1f3e4af (diff)
downloadsubsurface-fce42d4858d33e10b7a1c48d75838f1901b6b123.tar.gz
Dive media: Extract thumbnails from videos with ffmpeg
Extract thumbnails using ffmpeg. Behavior is controlled by three new preferences fields: - extract_video_thumbnails (bool): if true, thumbnails are calculated. - extract_video_thumbnail_position (int 0..100): position in video where thumbnail is fetched. - ffmpeg_executable (string): path of ffmpeg executable. If ffmpeg refuses to start, extract_video_thumbnails is set to false to avoid unnecessary churn. Video thumbnails are marked by an overlay. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurfacestartup.c')
-rw-r--r--core/subsurfacestartup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c
index d5c44d267..2bb905217 100644
--- a/core/subsurfacestartup.c
+++ b/core/subsurfacestartup.c
@@ -100,6 +100,8 @@ struct preferences default_prefs = {
.cloud_timeout = 5,
#endif
.auto_recalculate_thumbnails = true,
+ .extract_video_thumbnails = true,
+ .extract_video_thumbnails_position = 20, // The first fifth seems like a reasonable place
};
int run_survey;
@@ -287,6 +289,7 @@ void setup_system_prefs(void)
subsurface_OS_pref_setup();
default_prefs.divelist_font = strdup(system_divelist_default_font);
default_prefs.font_size = system_divelist_default_font_size;
+ default_prefs.ffmpeg_executable = strdup("ffmpeg");
#if !defined(SUBSURFACE_MOBILE)
default_prefs.default_filename = copy_string(system_default_filename());
@@ -331,6 +334,7 @@ void copy_prefs(struct preferences *src, struct preferences *dest)
dest->facebook.access_token = copy_string(src->facebook.access_token);
dest->facebook.user_id = copy_string(src->facebook.user_id);
dest->facebook.album_id = copy_string(src->facebook.album_id);
+ dest->ffmpeg_executable = copy_string(src->ffmpeg_executable);
}
/*