File indexing completed on 2024-05-12 15:55:27

0001 // SPDX-FileCopyrightText: 2012 Jesper K. Pedersen <blackie@kde.org>
0002 // SPDX-License-Identifier: CC-BY-SA-4.0
0003 //krazy:skip
0004 /**
0005   \page videothumbnails Video thumbnail related classes
0006 
0007   <h2>Extracting Video Length</h2>
0008   The class which does the actual extraction is \ref ImageManager::VideoLengthExtractor.
0009   It is given a filename and emits the signal
0010   \ref ImageManager::VideoLengthExtractor::lengthFound "lengthFound(int length)"
0011 
0012   The class \ref BackgroundJobs::ReadVideoLengthJob is a \ref BackgroundTaskManager::JobInterface "background job",
0013   which uses \ref ImageManager::VideoLengthExtractor. The job saves the length into the database.
0014 
0015 
0016   <h2>Extracing Thumbnails</h2>
0017   The class ImageManager::ExtractOneVideoFrame is the class which does the actual extraction by calling ffmpeg.
0018   Its main interface is the method \ref ImageManager::ExtractOneVideoFrame::extract "extract(filename,offset,receiver,slot)".
0019   The callback is done using the slot provided. The offset is seconds from the beginning of the video.
0020 
0021   \ref BackgroundJobs::ExtractOneThumbnailJob is a \ref BackgroundTaskManager::JobInterface "background job" for extracting a single
0022   thumbnail. It is given the video file and the offset as parameters (this time in the range 0 to 9).
0023   The result is stored in the .videoThumbnails directory.
0024 
0025   \ref BackgroundJobs::HandleVideoThumbnailRequestJob is a \ref BackgroundTaskManager::JobInterface "background job" for extracting a thumbnail
0026   for the thumbnail viewer. It's interface uses \ref ImageManager::ImageRequest "ImageRequest's",
0027   and under the hood it uses ImageManager::ExtractOneVideoFrame.
0028 
0029 
0030   <h2>High level classes</h2>
0031   \ref ThumbnailView::VideoThumbnailCycler is the class which makes the thumbnail cycle in the thumbnail viewer.
0032   To extract the 10 thumbnails from the videos it uses \ref ImageManager::VideoThumbnails. The main purpose of
0033   ImageManager::VideoThumbnails is to bridge between ThumbnailView::VideoThumbnailCycler and the backend for extracting
0034   the actual thumbnails. \ref ImageManager::VideoThumbnails caches the 10 found thumbnails.
0035 
0036 
0037   \ref BackgroundJobs::SearchForVideosWithoutLengthInfo and BackgroundJobs::SearchForVideosWithoutVideoThumbnailsJob are
0038   \ref BackgroundTaskManager::JobInterface "background jobs", which are started at start up of KPhotoAlbum. Their purpose
0039   is to check if there are video files for which the length is yet unknown, or for which there are no thumbnails for cycling.
0040   This could happen if the user had found the images on disk, but quit the application before it got a chance to extract
0041   the said informatioin.
0042 */
0043 // vi:expandtab:tabstop=4 shiftwidth=4: