| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #pragma once
- #include <QCheckBox>
- #include <QLayout>
- #include <QListWidget>
- #include <QPushButton>
- #include <QTime>
- #include <QTimer>
- #include <QWidget>
- #include "audio_widget.h"
- #include "recorder/audio_recorder.h"
- #include "recorder/video_recorder.h"
- #include "ui/opengl_video_widget.h"
- #include "ui/settings_page.h"
- class AvRecorder : public QWidget
- {
- Q_OBJECT
- public:
- AvRecorder(QWidget* parent = nullptr);
- ~AvRecorder();
- private:
- AudioRecorder m_audioRecorder;
- VideoRecorder m_videoRecorder;
- AvMuxer _avMuxer;
- // VideoRender _videoRender;
- OpenGLVideoWidget* glWidget;
- AudioWidget* _microphoneWidget = nullptr;
- AudioWidget* _speakerWidget = nullptr;
- QPushButton* _recordBtn = nullptr;
- QPushButton* _liveBtn = nullptr;
- QPushButton* _settingsBtn = nullptr;
- QCheckBox* _isDrawCursorBox = nullptr;
- Timer _videoRenderTimer;
- QTimer _otherTimer;
- QListWidget* _captureListWidget = nullptr;
- QPushButton* _updateListBtn = nullptr;
- bool _isRecord = false;
- bool _isLive = false;
- void _InitUi();
- QComboBox* _captureMethodBox = nullptr;
- QLabel* _captureStatusLabel = nullptr;
- QLabel* _captureTimeLabel = nullptr;
- QLabel* _fpsLabel = nullptr;
- QLabel* _videoEncodeLabel = nullptr;
- QLabel* _videolossRate = nullptr;
- SettingsPage::Param _settingsParam;
- QVBoxLayout* _InitListUi();
- QVBoxLayout* _InitAudioUi();
- QVBoxLayout* _InitOtherUi();
- QTime _recordTime;
- bool _isLocked = false;
- void _InitStatusBarUi();
- void _UpdateCaptureList();
- void _StartCapture(VideoCapturer::Method method);
- void _StopCapture();
- void _StartPreview();
- void _DealCapture();
- void _StopPreview();
- bool _StartStream(std::string_view path, std::string_view format);
- void _StopStream();
- void _InitConnect();
- };
|