digiKam
videodecoder.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2016-04-21
7  * Description : video thumbnails extraction based on ffmpeg
8  *
9  * Copyright (C) 2010 by Dirk Vanden Boer <dirk dot vdb at gmail dot com>
10  * Copyright (C) 2016-2018 by Maik Qualmann <metzpinguin at gmail dot com>
11  * Copyright (C) 2016-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_VIDEO_DECODER_H
26 #define DIGIKAM_VIDEO_DECODER_H
27 
28 // Qt includes
29 
30 #include <QString>
31 
32 // Local includes
33 
34 #include "videothumbwriter.h"
35 
36 namespace Digikam
37 {
38 
40 {
41 public:
42 
43  explicit VideoDecoder(const QString& filename);
44  ~VideoDecoder();
45 
46 public:
47 
48  QString getCodec() const;
49  int getWidth() const;
50  int getHeight() const;
51  int getDuration() const;
52  bool getInitialized() const;
53 
54  void seek(int timeInSeconds);
55  bool decodeVideoFrame() const;
56  void getScaledVideoFrame(int scaledSize,
57  bool maintainAspectRatio,
58  VideoFrame& videoFrame);
59 
60  void initialize(const QString& filename);
61  void destroy();
62 
63 private:
64 
65  // Disable
66  VideoDecoder(const VideoDecoder&) = delete;
67  VideoDecoder& operator=(const VideoDecoder&) = delete;
68 
69 private:
70 
71  class Private;
72  Private* const d;
73 };
74 
75 } // namespace Digikam
76 
77 #endif // DIGIKAM_VIDEO_DECODER_H
Definition: videodecoder_p.h:47
Definition: videodecoder.h:40
~VideoDecoder()
Definition: videodecoder.cpp:41
void destroy()
Definition: videodecoder.cpp:97
int getWidth() const
Definition: videodecoder.cpp:145
VideoDecoder(const QString &filename)
Definition: videodecoder.cpp:35
void seek(int timeInSeconds)
Definition: videodecoder.cpp:175
bool getInitialized() const
Definition: videodecoder.cpp:92
void initialize(const QString &filename)
Definition: videodecoder.cpp:47
bool decodeVideoFrame() const
Definition: videodecoder.cpp:228
void getScaledVideoFrame(int scaledSize, bool maintainAspectRatio, VideoFrame &videoFrame)
Definition: videodecoder.cpp:245
int getHeight() const
Definition: videodecoder.cpp:155
int getDuration() const
Definition: videodecoder.cpp:165
QString getCodec() const
Definition: videodecoder.cpp:133
Definition: videothumbwriter.h:38
Definition: datefolderview.cpp:43