-
Notifications
You must be signed in to change notification settings - Fork 2
/
avsViewer.h
103 lines (95 loc) · 3.4 KB
/
avsViewer.h
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
93
94
95
96
97
98
99
100
101
102
103
#ifndef AVSVIEWER_H
#define AVSVIEWER_H
#include "ui_viewer.h"
#include "avisynth.h"
#include <QObject>
#include <QImage>
#include <QWidget>
#include <QString>
#include <QPixmap>
#include <QLabel>
#include <QFile>
#include <QLibrary>
class LocalSocketIpcServer;
class LocalSocketIpcClient;
class QResizeEvent;
class avsViewer : public QWidget
{
Q_OBJECT
public:
avsViewer(QWidget *parent, const QString &path, const double &mult, const QString &ipcID, const QString &matrix);
~avsViewer();
private:
Ui::avsViewerClass ui;
int m_frameCount, m_current;
QString m_currentInput, m_version, m_avsModified, m_inputPath;
AVSValue m_res;
double m_mult;
QImage m_currentImage;
bool m_dualView;
int m_desktopWidth, m_desktopHeight;
QString m_ipcID, m_currentScriptContent;
LocalSocketIpcServer* m_ipcServer;
LocalSocketIpcClient* m_ipcClient;
QString m_matrix;
QLabel* m_showLabel;
double m_zoom;
int m_currentFrameWidth;
int m_currentFrameHeight;
int m_fill;
bool m_noAddBorders;
IScriptEnvironment* m_env;
const VideoInfo* m_inf;
QString m_providedInput;
QLibrary m_avsDLL;
bool m_showOnly;
void showFrame(const int &i);
int init(int start = 0);
bool initEnv();
bool setRessource();
bool setVideoInfo();
bool invokeFunction(const QString& name);
QString getColor() const;
bool adjustScript(bool &invokeFFInfo);
void killEnv();
QString fillUp(int number);
void callMethod(const QString& typ, const QString& value, const QString &input);
void cleanUp();
void addBordersForFill(int &width);
void cropForFill(QImage& image, int &width, const int &height);
void refresh();
void changeTo(const QString& input, const QString& value);
void adjustWindowSize(const bool& adjust, const int& width, const int& height);
void adjustLabelSize(const bool& adjust, const int& width, const int& height);
void adjustToVideoInfo(const bool& scrolling, const bool& first, int& width, int& height, bool &changeLabelSize);
void showVideoInfo();
void initIPC();
void sendMessageToSever(const QString& message);
QString getCurrentInput(const QString& script);
unsigned char *getFrameData(const int &i, const int &count);
void outputResType();
void applyResolution(const QString& content, QString &newContent, double mult, const QString& resize);
bool loadAvisynthDLL();
private slots:
void on_frameHorizontalSlider_valueChanged(int value);
void on_nextPushButton_clicked();
void on_previousPushButton_clicked();
void on_frameHorizontalSlider_sliderReleased();
void on_openAvsPushButton_clicked();
void on_infoCheckBox_toggled();
void on_histogramCheckBox_toggled();
void on_saveImagePushButton_clicked();
void on_aspectRatioAdjustmentComboBox_currentTextChanged(const QString &value);
void fromConsoleReader(QString text);
void receivedMessage(const QString& message);
void on_jumpBackwardPushButton_clicked();
void on_jumpForwardPushButton_clicked();
void wheelEvent(QWheelEvent *event);
void resizeEvent(QResizeEvent* event);
void on_jumpToPushButton_clicked();
void on_jumpToStartPushButton_clicked();
void on_jumpToEndPushButton_clicked();
void on_zoomHandlingComboBox_currentTextChanged(const QString& value);
void on_zoomScaleDoubleSpinBox_valueChanged(const double& value);
};
#endif // AVSVIEWER_H