File indexing completed on 2025-01-05 03:57:27
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2014-09-22 0007 * Description : Slideshow video viewer based on QtAVPlayer 0008 * 0009 * SPDX-FileCopyrightText: 2014-2024 Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_SLIDE_VIDEO_H 0016 #define DIGIKAM_SLIDE_VIDEO_H 0017 0018 // Qt includes 0019 0020 #include <QWidget> 0021 #include <QEvent> 0022 #include <QUrl> 0023 0024 // QtAVPlayer includes 0025 0026 #include "qavplayer.h" 0027 0028 // Local includes 0029 0030 #include "dinfointerface.h" 0031 #include "digikam_export.h" 0032 #include "dvideowidget.h" 0033 0034 namespace Digikam 0035 { 0036 0037 class DIGIKAM_EXPORT SlideVideo : public QWidget 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 0043 explicit SlideVideo(QWidget* const parent); 0044 ~SlideVideo() override; 0045 0046 void setInfoInterface(DInfoInterface* const iface); 0047 void setCurrentUrl(const QUrl& url); 0048 void showIndicator(bool); 0049 void pause(bool); 0050 void stop(); 0051 0052 Q_SIGNALS: 0053 0054 void signalVideoLoaded(bool); 0055 void signalVideoFinished(); 0056 0057 void signalVideoPosition(qint64); 0058 void signalVideoDuration(qint64); 0059 0060 private Q_SLOTS: 0061 0062 void slotPlayerStateChanged(QAVPlayer::State newState); 0063 void slotMediaStatusChanged(QAVPlayer::MediaStatus newStatus); 0064 void slotHandlePlayerError(QAVPlayer::Error err, const QString&); 0065 0066 void slotPositionChanged(qint64 position); 0067 void slotDurationChanged(qint64 duration); 0068 void slotVolumeChanged(int volume); 0069 void slotPosition(int position); 0070 0071 private: 0072 0073 class Private; 0074 Private* const d; 0075 }; 0076 0077 } // namespace Digikam 0078 0079 #endif // DIGIKAM_SLIDE_VIDEO_H