Add filmstrip embed configuration
ClosedPublic

Authored by tcarmichael on May 16 2018, 7:10 AM.

Details

Summary

By default, a filmstrip effect is embedded in the thumbnail that is generated by ffmpegthumbs.

This adds the capability to configure the thumbnailer so as not to embed the filmstrip effect, if so desired.

Test Plan
  • Configure the ffmpegthumbs thumbnailer through the Dolphin Preferences > General > Previews tab
  • Un-tick the default option to embed the filmstrip effect and 'Ok' both preferences windows
  • Enter into a folder or refresh a folder with video files to confirm that video thumbnails no longer have the filmstrip effect embedded

Diff Detail

Repository
R343 FFmpeg Thumbnailers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tcarmichael requested review of this revision.May 16 2018, 7:10 AM
tcarmichael created this revision.
tcarmichael edited the test plan for this revision. (Show Details)May 16 2018, 9:08 AM
cfeck added a subscriber: cfeck.

I am fine with adding some configuration.

Adding reviewers for more feedback.

ngraham accepted this revision as: ngraham.May 26 2018, 1:06 PM

Your next patch for this repo can be a .arcconfig file. :) Is this patch in response to a Bugzilla ticket?

Works as advertised for me. This isn't a setting I would ever use, but it's pretty well hidden away, so I think it's benign enough and could even fit under the "Powerful when needed" umbrella.

Let's get some input from at least one other Dolphin person too.

This revision is now accepted and ready to land.May 26 2018, 1:06 PM

Your next patch for this repo can be a .arcconfig file. :)

I'll try look into that although I'm very new to the workflow for contributing to KDE so it may take me a bit to understand how it all works! This was built from me cloning the anongit repository so I haven't used arc yet.

Is this patch in response to a Bugzilla ticket?

No, this is a personal preference that I was patching in, or more specifically, I was originally patching out the filmstrip generating code (commenting the filmstrip generating line where the settings load/check is now) and building manually, but I thought it might be something others would like to have the option for after seeing some posts of people wondering how to remove the effect.

I felt that the best approach was actually to enable a configuration option and looked at the code for the Gettext thumbnailer and the JPEG Images thumbnailer that both can be configured. I essentially copied the code and rewrote the function names from the JPEG thumbnailer (jpegcreator). I will admit up front that I don't actually know much C++ at all, but I ran through the errors that I got as I put this together and ensured the test compiled as well.

This isn't a setting I would ever use, but it's pretty well hidden away, so I think it's benign enough and could even fit under the "Powerful when needed" umbrella.

It does seem like it's a bit of a niche preference, but it also seemed like it would be worth adding in. I also did specifically want to ensure that I wasn't changing default behavior as well so users will only see a change if they go and disable the default setting to embed the filmstrip effect.

elvisangelaccio added inline comments.
ffmpegthumbnailer.cpp
22

<KLocalizedString>

36

Is this really necessary? Doesn't self() internally call read() ?

66

"in video thubmnails" is redundant, imho

ffmpegthumbnailer.h
35

Please remove spaces after/before ( )

Also, both methods should be marked with override.

Updated to reflect changes requested by @elvisangelaccio

The extra settings->load(); indeed appears unnecessary since it appears to work fine without it.

tcarmichael marked 4 inline comments as done.May 26 2018, 4:07 PM
elvisangelaccio accepted this revision.May 26 2018, 4:14 PM

Please tell us which email address we should use to land this patch on your behalf. Thanks!

The e-mail address should be carmanaught@gmail.com

This revision was automatically updated to reflect the committed changes.