diff options
author | Laxmikant Rashinkar <lk@maya-vm-64.(none)> | 2012-12-26 18:48:17 -0800 |
---|---|---|
committer | Laxmikant Rashinkar <lk@maya-vm-64.(none)> | 2012-12-26 18:48:17 -0800 |
commit | cae2adb75e2b339017746436c63f7d2b8c35fb63 (patch) | |
tree | 7fa8fc022ef3a52f069332642dc0e9c428c9c94c /vrplayer/mainwindow.h | |
parent | d1fc67102a273a8e0b170d0c613cf0d611cfa7f8 (diff) | |
download | xrdp-proprietary-cae2adb75e2b339017746436c63f7d2b8c35fb63.tar.gz xrdp-proprietary-cae2adb75e2b339017746436c63f7d2b8c35fb63.zip |
o developer checkin
o modified vrplayer to use threads
Diffstat (limited to 'vrplayer/mainwindow.h')
-rw-r--r-- | vrplayer/mainwindow.h | 73 |
1 files changed, 56 insertions, 17 deletions
diff --git a/vrplayer/mainwindow.h b/vrplayer/mainwindow.h index ed392ea2..ceddb683 100644 --- a/vrplayer/mainwindow.h +++ b/vrplayer/mainwindow.h @@ -1,6 +1,14 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#ifdef __cplusplus +#define __STDC_CONSTANT_MACROS +#ifdef _STDINT_H +#undef _STDINT_H +#endif +#include <stdint.h> +#endif + #include <QMainWindow> #include <QFileDialog> #include <QDebug> @@ -14,12 +22,32 @@ #include <QVBoxLayout> #include <QPushButton> #include <QSlider> +#include <QTimer> +#include <QPixmap> +#include <QPainter> +#include "xrdpapi.h" +#include "xrdpvr.h" #include "decoder.h" -#include "decoderthread.h" +#include "ourinterface.h" +#include "playvideo.h" + +/* ffmpeg related stuff */ +extern "C" +{ + #include <libavformat/avformat.h> + #include <libavcodec/avcodec.h> +} -namespace Ui { -class MainWindow; +#define VCR_PLAY 1 +#define VCR_PAUSE 2 +#define VCR_STOP 3 +#define VCR_REWIND 4 +#define VCR_POWER_OFF 5 + +namespace Ui +{ + class MainWindow; } class MainWindow : public QMainWindow @@ -30,20 +58,23 @@ public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); +signals: + void onGeometryChanged(int x, int y, int widht, int height); + +public slots: + void onSliderValueChanged(int value); + private slots: void on_actionOpen_Media_File_triggered(); void on_actionExit_triggered(); - void on_actionPlay_Media_triggered(); - void on_decoderError(QString title, QString msg); - void on_btnPlayClicked(bool flag); - void on_mediaDurationInSeconds(int duration); - void on_elapsedTime(int secs); - void on_sliderActionTriggered(int value); - void on_sliderValueChanged(int value); -signals: - void on_geometryChanged(int x, int y, int widht, int height); - void on_mediaSeek(int value); + void onBtnPlayClicked(bool flag); + void onBtnRewindClicked(bool flag); + void onBtnStopClicked(bool flag); + + void onMediaDurationInSeconds(int duration); + void onElapsedTime(int secs); + void onSliderActionTriggered(int value); protected: void resizeEvent(QResizeEvent *e); @@ -54,10 +85,6 @@ protected: private: Ui::MainWindow *ui; - QString filename; - Decoder *decoder; - DecoderThread *decoderThread; - /* for UI */ QLabel *lblCurrentPos; QLabel *lblDuration; @@ -73,10 +100,22 @@ private: QWidget *window; bool acceptSliderMove; + /* private stuff */ + OurInterface *interface; + PlayVideo *playVideo; + QString filename; + bool oneTimeInitSuccess; + bool remoteClientInited; + void *channel; + int stream_id; + int64_t elapsedTime; /* elapsed time in usecs since play started */ + int vcrFlag; + /* private methods */ void setupUI(); void openMediaFile(); void getVdoGeometry(QRect *rect); + void clearDisplay(); }; #endif // MAINWINDOW_H |