78 lines
1.7 KiB
C++
78 lines
1.7 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include "media/CameraCapture.h"
|
|
#include "cplaywidget.h"
|
|
#include "media/VideoCoder.h"
|
|
#include "media/RtmpPusher.h"
|
|
#include "components/toast.h"
|
|
#include "utils.h"
|
|
#include "Qss.h"
|
|
#include "media/audiocaptureff.h"
|
|
#include <vector>
|
|
#include <QChart>
|
|
#include <QChartView>
|
|
#include <QLineSeries>
|
|
#include <QPoint>
|
|
#include <QVector>
|
|
#include <QList>
|
|
#include <QMutex>
|
|
#include "media/screen_capture.h"
|
|
#include "utils/screenshotwidget.h"
|
|
|
|
using namespace QtCharts;
|
|
|
|
using namespace std;
|
|
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
#include <QMutex>
|
|
|
|
class MainWindow : public QssMainWindow ,CaptureAudioFfmpeg::CaptureAudioObserver
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
void OnAudioData(const void *frameaddress, uint32_t framelen) ;
|
|
public slots:
|
|
void on_rect_selected(QRect rect);
|
|
|
|
private slots:
|
|
void on_pushButton_clicked();
|
|
void on_pushButton_2_clicked();
|
|
void on_pushButton_3_clicked();
|
|
void DetectDpi();
|
|
void on_pushButton_4_clicked();
|
|
|
|
void on_pushButton_5_clicked();
|
|
|
|
|
|
private:
|
|
QLineSeries* mSeries;
|
|
QVector<QPoint> mPoint1,mPoint2;
|
|
Ui::MainWindow *ui;
|
|
Camera *mCamera;
|
|
QStringList mCameraList;
|
|
bool m_bCameraOpen;
|
|
CPlayWidget *mPlayerWidget;
|
|
VideoCoder *mVideoCoder;
|
|
bool m_bRtmpPushing;
|
|
H264RtmpPuser *mPusher;
|
|
CaptureAudioFfmpeg *mAudioCapture;
|
|
vector<CaptureAudioFfmpeg::MICInfo> mMic;
|
|
QTimer *mTimer;
|
|
QChart *mChart;
|
|
QChartView *mChartView;
|
|
QList<void *>mBufferAudio;
|
|
QMutex mMux; // lock for audio
|
|
ScreenShotWidget *mScreenshot;
|
|
ScreenCapture *mScreenCap;
|
|
bool mCapScreen;
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|