Blame view
MovieMonitor.h
2.81 KB
3f2992b2c
|
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 |
#ifndef MOVIEMONITOR_H #define MOVIEMONITOR_H #include <QWidget> #include <QVideoFrame> #include <QScrollArea> #include <QSlider> #include <opencv2/core/core.hpp> #include <armadillo> #include "HistoMonitor.h" #include "SegmentMonitor.h" #include "SpeakersMonitor.h" #include "SpkDiarMonitor.h" class MovieMonitor: public QWidget { Q_OBJECT public: MovieMonitor(QWidget *parent = 0); public slots: void processFrame(QVideoFrame frame); void showHisto(bool dispHist); void viewSegmentation(bool checked, bool annot); void viewSpeakers(bool checked); void viewUtteranceTree(bool checked); void setDiarData(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 getShot(Segment *shot); void segmentationRetrieved(); void getSpokenFrame(qint64 position, const QString &text, const QString &speaker); void positionChanged(qint64 position); void playSegments(QList<QPair<qint64, qint64>> utterances); void durationChanged(qint64 duration); 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 speakersGrabbed(QList<QString> speakers); void playSub(QList<int> utter); void currSubtitle(int subIdx); void releasePos(bool released); signals: void processMat(const cv::Mat &bgrMat); void grabShot(Segment *shot); void shotsGrabbed(); void grabSpokenFrame(qint64 position, const QString &text, const QString &speaker); void segmentationGrabbed(); void updatePosition(qint64 position); void playbackSegments(QList<QPair<qint64, qint64>> utterances); void updateDuration(qint64 duration); 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 speakersRetrieved(QList<QString> speakers); void initDiarData(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 playSubtitle(QList<int> utter); void currentSubtitle(int subIdx); void releasePosition(bool released); private: HistoMonitor *m_histoMonitor; SegmentMonitor *m_segmentMonitor; SpeakersMonitor *m_speakersMonitor; SpkDiarMonitor *m_spkDiarMonitor; QScrollArea *m_scrollArea; QSlider *m_segmentSlider; }; #endif |