| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef VIDEOPLAYER_H
- #define VIDEOPLAYER_H
- #include "DeviceWatcher/DeviceWatcher.h"
- #include <QObject>
- #include <QProcess>
- #include <QScopedPointer>
- class VideoPlayerPrivate;
- class VideoPlayer : public QObject
- {
- Q_OBJECT
- #ifdef g_VideoPlayer
- #undef g_VideoPlayer
- #endif
- #define g_VideoPlayer (VideoPlayer::instance())
- public:
- inline static VideoPlayer* instance() {
- static VideoPlayer* videoPlayer(new VideoPlayer(qApp));
- return videoPlayer;
- }
- void videoPlayerRequestFileNames(const int type);
- void videoPlayerSetPlayModeToggle();
- void videoPlayerSetPlayMode(const int mode);
- void videoPlayerSetPlayStatusToggle();
- void videoPlayerSetPlayStatus(const int status);
- void videoPlayerPlayListViewIndex(const int type, const int index, const int x, const int y, const int width, const int height, const int millesimal);
- void videoPlayerPlayPreviousListViewIndex();
- void videoPlayerPlayNextListViewIndex();
- void videoPlayerSeekToMillesimal(const int millesimal);
- void videoPlayerExit();
- void videoPlayerVisible(const bool flag);
- void playVideoIndex(const DeviceWatcherType type, const int index, const int x, const int y, const int width, const int height, const int millesimal);
- void videoPlayerSetGeometry(int x,int y,int width,int height);
- void videoPlayerDeleteListItem(int index);//ADD 在USB视频编辑模式下删除视频文件 需要Service对应删除list内的元素
- void startDeleteVideoListItem();//ADD
- void writeCmdToMplayer(char* cmd);
- pthread_t getVideoPthreadValue();
- signals:
- void onVideoPlayerPlayMode(const int mode);
- void onVideoPlayerShowStatus(const int status);
- void onVideoPlayerPlayStatus(const int type, const int status);
- void onVideoPlayerFileNames(const int type, const QString &xml);
- //void onVideoPlayerFilePath(const int type, const QString& path);
- void onVideoPlayerInformation(const int type, const int index, const QString &fileName, const int endTime);
- void onVideoPlayerElapsedInformation(const int elapsedTime, const int elapsedMillesimal);
- void onVideoPlayerVisible(const bool flag);
- void onSliderTouchEnable(const bool flag); //dll add 20190805
- void onVideoPlayerExit();
- protected slots:
- void onDeviceWatcherStatus(const int type, const int status);
- void onVideoFilePath(const QString &path, const int type);
- void onTimeout();
- private:
- explicit VideoPlayer(QObject* parent = NULL);
- ~VideoPlayer();
- VideoPlayerPrivate* const d_ptr;
- Q_DECLARE_PRIVATE(VideoPlayer)
- };
- #endif // VIDEOPLAYER_H
|