Test ffmpeg extractor using mime type helper
ClosedPublic

Authored by astippich on Mar 30 2019, 9:53 AM.

Details

Summary

Use mime type helper to test ffmpeg extractor and add
new mime type

CCBUG: 399650

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich created this revision.Mar 30 2019, 9:53 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptMar 30 2019, 9:53 AM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
astippich requested review of this revision.Mar 30 2019, 9:53 AM
astippich added inline comments.Mar 30 2019, 10:01 AM
src/extractors/ffmpegextractor.cpp
64 ↗(On Diff #55059)

This is quite specific to the codec. ExtractorCollection should handle this case I think (mime type of file is more specific than in the mime type list), but I added it nevertheless.

bruns added inline comments.Mar 30 2019, 3:48 PM
autotests/ffmpegextractortest.cpp
27

remove comment

src/extractors/ffmpegextractor.cpp
64 ↗(On Diff #55059)

I am somewhat undecided on this one:

The ffmpeg extractor leaves the handling of different types completely to libav (contrary to e.g. taglib, where each type is handled explicitly). So just defaulting to video/ogg already covers theora, and many more.

I think it is better to test this in e.g. the extractorcollectiontest, and remove the QVERIFY for the mimetypes().contains().

astippich updated this revision to Diff 55301.Apr 2 2019, 7:15 PM
  • add friend and use member function
bruns accepted this revision.Apr 2 2019, 10:26 PM
This revision is now accepted and ready to land.Apr 2 2019, 10:26 PM
This revision was automatically updated to reflect the committed changes.