summaryrefslogtreecommitdiffstats
path: root/vrplayer/ourinterface.h
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <lk@maya-vm-64.(none)>2012-12-26 18:48:17 -0800
committerLaxmikant Rashinkar <lk@maya-vm-64.(none)>2012-12-26 18:48:17 -0800
commitcae2adb75e2b339017746436c63f7d2b8c35fb63 (patch)
tree7fa8fc022ef3a52f069332642dc0e9c428c9c94c /vrplayer/ourinterface.h
parentd1fc67102a273a8e0b170d0c613cf0d611cfa7f8 (diff)
downloadxrdp-proprietary-cae2adb75e2b339017746436c63f7d2b8c35fb63.tar.gz
xrdp-proprietary-cae2adb75e2b339017746436c63f7d2b8c35fb63.zip
o developer checkin
o modified vrplayer to use threads
Diffstat (limited to 'vrplayer/ourinterface.h')
-rw-r--r--vrplayer/ourinterface.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/vrplayer/ourinterface.h b/vrplayer/ourinterface.h
new file mode 100644
index 00000000..ea402048
--- /dev/null
+++ b/vrplayer/ourinterface.h
@@ -0,0 +1,75 @@
+#ifndef OURINTERFACE_H
+#define OURINTERFACE_H
+
+#ifdef __cplusplus
+#define __STDC_CONSTANT_MACROS
+#ifdef _STDINT_H
+#undef _STDINT_H
+#endif
+#include <stdint.h>
+#endif
+
+#include <QObject>
+#include <QRect>
+#include <QDebug> // LK_TODO
+
+#include "xrdpvr.h"
+#include "xrdpapi.h"
+#include "demuxmedia.h"
+#include "playvideo.h"
+
+/* ffmpeg related stuff */
+extern "C"
+{
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+}
+
+class OurInterface : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit OurInterface(QObject *parent = 0);
+
+ /* public methods */
+ int oneTimeInit();
+ void oneTimeDeinit();
+ void initRemoteClient();
+ void deInitRemoteClient();
+ int sendGeometry(QRect rect);
+ void setFilename(QString filename);
+ void playMedia();
+ PlayVideo *getPlayVideoInstance();
+ void setVcrOp(int op);
+
+public slots:
+ void onGeometryChanged(int x, int y, int width, int height);
+
+signals:
+ void on_ErrorMsg(QString title, QString msg);
+ void onMediaDurationInSeconds(int duration);
+
+private:
+
+ /* private stuff */
+ QQueue<MediaPacket *> audioQueue;
+ QQueue<MediaPacket *> videoQueue;
+
+ DemuxMedia *demuxMedia;
+ QThread *demuxMediaThread;
+ PlayVideo *playVideo;
+ QString filename;
+ void *channel;
+ int stream_id;
+ QRect savedGeometry;
+
+ /* private methods */
+ int openVirtualChannel();
+ int closeVirtualChannel();
+ int sendMetadataFile();
+ int sendVideoFormat();
+ int sendAudioFormat();
+};
+
+#endif // INTERFACE_H