2012-12-27 06:48:17 +04:00
|
|
|
#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"
|
|
|
|
{
|
2021-05-08 19:58:11 +03:00
|
|
|
#include <libavformat/avformat.h>
|
|
|
|
#include <libavcodec/avcodec.h>
|
2012-12-27 06:48:17 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
class OurInterface : public QObject
|
|
|
|
{
|
2021-05-08 19:58:11 +03:00
|
|
|
Q_OBJECT
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
public:
|
|
|
|
explicit OurInterface(QObject *parent = 0);
|
2013-12-19 11:33:28 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
/* public methods */
|
|
|
|
int oneTimeInit();
|
|
|
|
void oneTimeDeinit();
|
|
|
|
int initRemoteClient();
|
|
|
|
void deInitRemoteClient();
|
|
|
|
int sendGeometry(QRect rect);
|
|
|
|
void setFilename(QString filename);
|
|
|
|
void playMedia();
|
|
|
|
//PlayVideo *getPlayVideoInstance();
|
|
|
|
DemuxMedia *getDemuxMediaInstance();
|
|
|
|
void setVcrOp(int op);
|
|
|
|
int setVolume(int volume);
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
public slots:
|
|
|
|
void onGeometryChanged(int x, int y, int width, int height);
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
signals:
|
|
|
|
void on_ErrorMsg(QString title, QString msg);
|
|
|
|
void onMediaDurationInSeconds(int duration);
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
private:
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
/* private stuff */
|
2013-11-11 13:52:14 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
QQueue<MediaPacket *> videoQueue;
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
DemuxMedia *demuxMedia;
|
|
|
|
QThread *demuxMediaThread;
|
|
|
|
//PlayVideo *playVideo;
|
|
|
|
QString filename;
|
|
|
|
void *channel;
|
|
|
|
int stream_id;
|
|
|
|
QRect savedGeometry;
|
2012-12-27 06:48:17 +04:00
|
|
|
|
2021-05-08 19:58:11 +03:00
|
|
|
/* private methods */
|
|
|
|
int openVirtualChannel();
|
|
|
|
int closeVirtualChannel();
|
|
|
|
int sendMetadataFile();
|
|
|
|
int sendVideoFormat();
|
|
|
|
int sendAudioFormat();
|
2012-12-27 06:48:17 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INTERFACE_H
|