Blame view
VideoPlayer.h
3.22 KB
3f2992b2c V1.0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
#ifndef PLAYER_H #define PLAYER_H #include <QWidget> #include <QMediaPlayer> #include <QLabel> #include <QVideoProbe> #include <QVideoFrame> #include <armadillo> #include "VignetteWidget.h" #include "VideoWidget.h" #include "PlayerControls.h" #include "MovieMonitor.h" #include "Segment.h" class VideoPlayer: public QWidget { Q_OBJECT public: VideoPlayer(int nVignettes = 5, QWidget *parent = 0); ~VideoPlayer(); void reset(); public slots: void setPlayer(const QString &fName, const QSize &resolution); void setPlayerPosition(qint64 position); void positionChanged(qint64 position); void stateChanged(QMediaPlayer::State state); void positionManuallyChanged(qint64 position); void activeHisto(bool dispHisto); void currentShot(QList<qint64> positionList); void showVignette(bool showed); void displaySubtitle(const QString &subtitle); void showSegmentation(bool checked, bool annot); void viewUtteranceTree(bool checked); void setDiarData(const arma::mat &E, const arma::mat &Sigma, const arma::mat &W); void getCurrentPattern(const QList<QPair<int, qreal>> &subFeatures); void getPatternFirstShot(const QList<QPair<int, qreal>> &subFeatures); void getPatternSecondShot(const QList<QPair<int, qreal>> &subFeatures); void viewSpeakers(bool checked); void getShot(Segment *shot); void segmentationRetrieved(); void getSpokenFrame(qint64 position, const QString &text, const QString &speaker); void playSegments(QList<QPair<qint64, qint64>> utterances); void setSpeaker(qint64 start, qint64 end, const QString &speaker, VideoFrame::SpeakerSource source); void resetSpeaker(qint64 prevStart, qint64 prevEnd, qint64 start, qint64 end, bool sub, VideoFrame::SpeakerSource source); void speakersRetrieved(QList<QString> speakers); void playSubtitle(QList<int> utter); void currentSubtitle(int subIdx); signals: void positionUpdated(qint64 position); void showHisto(bool dispHist); void updateVignette(QList<qint64> positionList); void playerPaused(bool pause); void viewSegmentation(bool checked, bool annot); void showUtteranceTree(bool checked); void initDiarData(const arma::mat &E, const arma::mat &Sigma, const arma::mat &W); void grabCurrentPattern(const QList<QPair<int, qreal>> &subFeatures); void grabPatternFirstShot(const QList<QPair<int, qreal>> &subFeatures); void grabPatternSecondShot(const QList<QPair<int, qreal>> &subFeatures); void showSpeakers(bool checked); void grabShot(Segment *shot); void grabSpokenFrame(qint64 position, const QString &text, const QString &speaker); void segmentationGrabbed(); void newSpeaker(qint64 start, qint64 end, const QString &speaker, VideoFrame::SpeakerSource source); void renewSpeaker(qint64 prevStart, qint64 prevEnd, qint64 start, qint64 end, bool resetSub, VideoFrame::SpeakerSource source); void speakersGrabbed(QList<QString> speakers); void playSub(QList<int> utter); void currSubtitle(int subIdx); void releasePos(bool released); private: QMediaPlayer *m_player; QLabel *m_defaultLabel; VignetteWidget *m_vignetteWidget; VideoWidget *m_videoWidget; QLabel *m_subLabel; PlayerControls *m_controls; MovieMonitor *m_movieMonitor; QVideoProbe *m_probe; QList<QPair<qint64, qint64>> m_segments; int m_segIdx; }; #endif |