blob: a4aeb90779e94c1bb9ef4d4a015970eb3a95f2fe (
plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
/* Stream Widget
Copyright (C) 2003 Jasem Mutlaq (mutlaqja@ikarustech.com)
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
2004-03-16: A class to handle video streaming.
*/
#ifndef STREAMWG_H
#define STREAMWG_H
#include <tqpixmap.h>
#include <kpixmapio.h>
#include "streamformui.h"
#include "tqframe.h"
class TQImage;
class TQSocketNotifier;
class VideoWG;
class INDIStdDevice;
class TQPainter;
class TQVBoxLayout;
class StreamWG : public streamForm
{
Q_OBJECT
TQ_OBJECT
public:
StreamWG(INDIStdDevice *inStdDev, TQWidget * tqparent =0, const char * name =0);
~StreamWG();
friend class VideoWG;
friend class INDIStdDevice;
void setColorFrame(bool color);
void setSize(int wd, int ht);
void enableStream(bool enable);
bool processStream;
int streamWidth, streamHeight;
VideoWG *streamFrame;
bool colorFrame;
private:
INDIStdDevice *stdDev;
TQPixmap playPix, pausePix, capturePix;
TQVBoxLayout *videoFrameLayout;
protected:
void closeEvent ( TQCloseEvent * e );
void resizeEvent(TQResizeEvent *ev);
public slots:
void playPressed();
void captureImage();
};
class VideoWG : public TQFrame
{
Q_OBJECT
TQ_OBJECT
public:
VideoWG(TQWidget * tqparent =0, const char * name =0);
~VideoWG();
friend class StreamWG;
void newFrame(unsigned char *buffer, int buffSiz, int w, int h);
private:
int totalBaseCount;
TQRgb *grayTable;
TQImage *streamImage;
TQPixmap qPix;
KPixmapIO kPixIO;
protected:
void paintEvent(TQPaintEvent *ev);
};
#endif
|