File: ourinterface.h

package info (click to toggle)
xrdp 0.10.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,700 kB
  • sloc: ansic: 104,062; sh: 5,506; asm: 4,742; cpp: 2,555; makefile: 1,369
file content (77 lines) | stat: -rw-r--r-- 1,747 bytes parent folder | download | duplicates (6)
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 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();
        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);

    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 *> 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