mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
parent
8b6f9a5fc1
commit
ea79836f0f
14 changed files with 543 additions and 7 deletions
|
@ -30,6 +30,12 @@ enum class DisconnectAction
|
|||
Ask
|
||||
};
|
||||
|
||||
enum class Decoder
|
||||
{
|
||||
Ffmpeg,
|
||||
Pi
|
||||
};
|
||||
|
||||
class Settings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -69,6 +75,9 @@ class Settings : public QObject
|
|||
unsigned int GetBitrate() const;
|
||||
void SetBitrate(unsigned int bitrate);
|
||||
|
||||
Decoder GetDecoder() const;
|
||||
void SetDecoder(Decoder decoder);
|
||||
|
||||
HardwareDecodeEngine GetHardwareDecodeEngine() const;
|
||||
void SetHardwareDecodeEngine(HardwareDecodeEngine enabled);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ class SettingsDialog : public QDialog
|
|||
QComboBox *fps_combo_box;
|
||||
QLineEdit *bitrate_edit;
|
||||
QLineEdit *audio_buffer_size_edit;
|
||||
QCheckBox *pi_decoder_check_box;
|
||||
QComboBox *hardware_decode_combo_box;
|
||||
|
||||
QListWidget *registered_hosts_list_widget;
|
||||
|
@ -41,6 +42,7 @@ class SettingsDialog : public QDialog
|
|||
void BitrateEdited();
|
||||
void AudioBufferSizeEdited();
|
||||
void HardwareDecodeEngineSelected();
|
||||
void UpdateHardwareDecodeEngineComboBox();
|
||||
|
||||
void UpdateRegisteredHosts();
|
||||
void UpdateRegisteredHostsButtons();
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
#include <chiaki/session.h>
|
||||
#include <chiaki/opusdecoder.h>
|
||||
|
||||
#if CHIAKI_LIB_ENABLE_PI_DECODER
|
||||
#include <chiaki/pidecoder.h>
|
||||
#endif
|
||||
|
||||
#if CHIAKI_GUI_ENABLE_SETSU
|
||||
#include <setsu.h>
|
||||
#endif
|
||||
|
@ -14,6 +18,7 @@
|
|||
#include "exception.h"
|
||||
#include "sessionlog.h"
|
||||
#include "controllermanager.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QImage>
|
||||
|
@ -35,6 +40,7 @@ struct StreamSessionConnectInfo
|
|||
{
|
||||
Settings *settings;
|
||||
QMap<Qt::Key, int> key_map;
|
||||
Decoder decoder;
|
||||
HardwareDecodeEngine hw_decode_engine;
|
||||
uint32_t log_level_mask;
|
||||
QString log_file;
|
||||
|
@ -70,7 +76,10 @@ class StreamSession : public QObject
|
|||
|
||||
ChiakiControllerState keyboard_state;
|
||||
|
||||
VideoDecoder video_decoder;
|
||||
VideoDecoder *video_decoder;
|
||||
#if CHIAKI_LIB_ENABLE_PI_DECODER
|
||||
ChiakiPiDecoder *pi_decoder;
|
||||
#endif
|
||||
|
||||
unsigned int audio_buffer_size;
|
||||
QAudioOutput *audio_output;
|
||||
|
@ -101,7 +110,10 @@ class StreamSession : public QObject
|
|||
void SetLoginPIN(const QString &pin);
|
||||
|
||||
Controller *GetController() { return controller; }
|
||||
VideoDecoder *GetVideoDecoder() { return &video_decoder; }
|
||||
VideoDecoder *GetVideoDecoder() { return video_decoder; }
|
||||
#if CHIAKI_LIB_ENABLE_PI_DECODER
|
||||
ChiakiPiDecoder *GetPiDecoder() { return pi_decoder; }
|
||||
#endif
|
||||
|
||||
void HandleKeyboardEvent(QKeyEvent *event);
|
||||
void HandleMouseEvent(QMouseEvent *event);
|
||||
|
|
|
@ -25,6 +25,7 @@ class StreamWindow: public QMainWindow
|
|||
AVOpenGLWidget *av_widget;
|
||||
|
||||
void Init();
|
||||
void UpdateVideoTransform();
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
@ -32,6 +33,9 @@ class StreamWindow: public QMainWindow
|
|||
void closeEvent(QCloseEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void moveEvent(QMoveEvent *event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void SessionQuit(ChiakiQuitReason reason, const QString &reason_str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue