New upstream version 23.2.1+dfsg1
This commit is contained in:
parent
cdc9a9fc87
commit
b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions
|
|
@ -19,7 +19,9 @@
|
|||
|
||||
#include <QBuffer>
|
||||
#include <QAction>
|
||||
#include <QWidgetAction>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <obs.hpp>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
|
@ -30,6 +32,8 @@
|
|||
#include "window-basic-adv-audio.hpp"
|
||||
#include "window-basic-filters.hpp"
|
||||
#include "window-projector.hpp"
|
||||
#include "window-basic-about.hpp"
|
||||
#include "auth-base.hpp"
|
||||
|
||||
#include <obs-frontend-internal.hpp>
|
||||
|
||||
|
|
@ -52,6 +56,7 @@ class OBSBasicStats;
|
|||
#define AUX_AUDIO_1 Str("AuxAudioDevice1")
|
||||
#define AUX_AUDIO_2 Str("AuxAudioDevice2")
|
||||
#define AUX_AUDIO_3 Str("AuxAudioDevice3")
|
||||
#define AUX_AUDIO_4 Str("AuxAudioDevice4")
|
||||
|
||||
#define SIMPLE_ENCODER_X264 "x264"
|
||||
#define SIMPLE_ENCODER_X264_LOWCPU "x264_lowcpu"
|
||||
|
|
@ -97,13 +102,26 @@ private:
|
|||
std::shared_ptr<OBSSignal> renamedSignal;
|
||||
};
|
||||
|
||||
class ColorSelect : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ColorSelect(QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ColorSelect> ui;
|
||||
};
|
||||
|
||||
class OBSBasic : public OBSMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
friend class OBSAbout;
|
||||
friend class OBSBasicPreview;
|
||||
friend class OBSBasicStatusBar;
|
||||
friend class OBSBasicSourceSelect;
|
||||
friend class OBSBasicSettings;
|
||||
friend class Auth;
|
||||
friend class AutoConfig;
|
||||
friend class AutoConfigStreamPage;
|
||||
friend struct OBSStudioAPI;
|
||||
|
||||
enum class MoveDir {
|
||||
|
|
@ -124,10 +142,14 @@ class OBSBasic : public OBSMainWindow {
|
|||
private:
|
||||
obs_frontend_callbacks *api = nullptr;
|
||||
|
||||
std::shared_ptr<Auth> auth;
|
||||
|
||||
std::vector<VolControl*> volumes;
|
||||
|
||||
std::vector<OBSSignal> signalHandlers;
|
||||
|
||||
QList<QPointer<QDockWidget>> extraDocks;
|
||||
|
||||
bool loaded = false;
|
||||
long disableSaving = 1;
|
||||
bool projectChanged = false;
|
||||
|
|
@ -135,7 +157,7 @@ private:
|
|||
bool fullscreenInterface = false;
|
||||
|
||||
const char *copyString;
|
||||
const char *copyFiltersString;
|
||||
const char *copyFiltersString = nullptr;
|
||||
bool copyVisible = true;
|
||||
|
||||
QScopedPointer<QThread> updateCheckThread;
|
||||
|
|
@ -147,6 +169,8 @@ private:
|
|||
QPointer<OBSBasicTransform> transformWindow;
|
||||
QPointer<OBSBasicAdvAudio> advAudioWindow;
|
||||
QPointer<OBSBasicFilters> filters;
|
||||
QPointer<QDockWidget> statsDock;
|
||||
QPointer<OBSAbout> about;
|
||||
|
||||
QPointer<QTimer> cpuUsageTimer;
|
||||
os_cpu_usage_info_t *cpuUsageInfo = nullptr;
|
||||
|
|
@ -182,6 +206,7 @@ private:
|
|||
|
||||
QPointer<QMenu> startStreamMenu;
|
||||
|
||||
QPointer<QPushButton> transitionButton;
|
||||
QPointer<QPushButton> replayBufferButton;
|
||||
|
||||
QScopedPointer<QSystemTrayIcon> trayIcon;
|
||||
|
|
@ -191,8 +216,28 @@ private:
|
|||
QPointer<QAction> showHide;
|
||||
QPointer<QAction> exit;
|
||||
QPointer<QMenu> trayMenu;
|
||||
QPointer<QMenu> previewProjector;
|
||||
QPointer<QMenu> studioProgramProjector;
|
||||
QPointer<QMenu> multiviewProjectorMenu;
|
||||
QPointer<QMenu> previewProjectorSource;
|
||||
QPointer<QMenu> previewProjectorMain;
|
||||
QPointer<QMenu> sceneProjectorMenu;
|
||||
QPointer<QMenu> sourceProjector;
|
||||
QPointer<QMenu> scaleFilteringMenu;
|
||||
QPointer<QMenu> colorMenu;
|
||||
QPointer<QWidgetAction> colorWidgetAction;
|
||||
QPointer<ColorSelect> colorSelect;
|
||||
QPointer<QMenu> deinterlaceMenu;
|
||||
QPointer<QMenu> perSceneTransitionMenu;
|
||||
QPointer<QObject> shortcutFilter;
|
||||
|
||||
QPointer<QWidget> programWidget;
|
||||
QPointer<QVBoxLayout> programLayout;
|
||||
QPointer<QLabel> programLabel;
|
||||
|
||||
QScopedPointer<QThread> patronJsonThread;
|
||||
std::string patronJson;
|
||||
|
||||
QPointer<QMenu> multiviewProjectorMenu;
|
||||
void UpdateMultiviewProjectorMenu();
|
||||
|
||||
void DrawBackdrop(float cx, float cy);
|
||||
|
|
@ -218,6 +263,7 @@ private:
|
|||
bool InitService();
|
||||
|
||||
bool InitBasicConfigDefaults();
|
||||
void InitBasicConfigDefaults2();
|
||||
bool InitBasicConfig();
|
||||
|
||||
void InitOBSCallbacks();
|
||||
|
|
@ -271,7 +317,7 @@ private:
|
|||
void LoadProfile();
|
||||
void ResetProfileData();
|
||||
bool AddProfile(bool create_new, const char *title, const char *text,
|
||||
const char *init_text = nullptr);
|
||||
const char *init_text = nullptr, bool rename = false);
|
||||
void DeleteProfile(const char *profile_name, const char *profile_dir);
|
||||
void RefreshProfiles();
|
||||
void ChangeProfile();
|
||||
|
|
@ -282,7 +328,7 @@ private:
|
|||
int GetTopSelectedSourceItem();
|
||||
|
||||
obs_hotkey_pair_id streamingHotkeys, recordingHotkeys,
|
||||
replayBufHotkeys;
|
||||
replayBufHotkeys, togglePreviewHotkeys;
|
||||
obs_hotkey_id forceStreamingStopHotkey;
|
||||
|
||||
void InitDefaultTransitions();
|
||||
|
|
@ -304,6 +350,8 @@ private:
|
|||
obs_data_array_t *SaveQuickTransitions();
|
||||
void ClearQuickTransitionWidgets();
|
||||
void RefreshQuickTransitions();
|
||||
void DisableQuickTransitionWidgets();
|
||||
void EnableQuickTransitionWidgets();
|
||||
void CreateDefaultQuickTransitions();
|
||||
|
||||
QMenu *CreatePerSceneTransitionMenu();
|
||||
|
|
@ -394,7 +442,7 @@ public slots:
|
|||
|
||||
void RecordingStart();
|
||||
void RecordStopping();
|
||||
void RecordingStop(int code);
|
||||
void RecordingStop(int code, QString last_error);
|
||||
|
||||
void StartReplayBuffer();
|
||||
void StopReplayBuffer();
|
||||
|
|
@ -419,6 +467,8 @@ public slots:
|
|||
bool create_new,
|
||||
const QString &name = QString());
|
||||
|
||||
void UpdatePatronJson(const QString &text, const QString &error);
|
||||
|
||||
private slots:
|
||||
void AddSceneItem(OBSSceneItem item);
|
||||
void AddScene(OBSSource source);
|
||||
|
|
@ -477,6 +527,17 @@ private slots:
|
|||
|
||||
SourceTreeItem *GetItemWidgetFromSceneItem(obs_sceneitem_t *sceneItem);
|
||||
|
||||
void on_actionShowAbout_triggered();
|
||||
|
||||
void AudioMixerCopyFilters();
|
||||
void AudioMixerPasteFilters();
|
||||
|
||||
void EnablePreview();
|
||||
void DisablePreview();
|
||||
|
||||
void SceneCopyFilters();
|
||||
void ScenePasteFilters();
|
||||
|
||||
private:
|
||||
/* OBS Callbacks */
|
||||
static void SceneReordered(void *data, calldata_t *params);
|
||||
|
|
@ -499,6 +560,8 @@ private:
|
|||
|
||||
static void HotkeyTriggered(void *data, obs_hotkey_id id, bool pressed);
|
||||
|
||||
void AutoRemux();
|
||||
|
||||
public:
|
||||
OBSSource GetProgramSource();
|
||||
OBSScene GetCurrentScene();
|
||||
|
|
@ -514,6 +577,8 @@ public:
|
|||
obs_service_t *GetService();
|
||||
void SetService(obs_service_t *service);
|
||||
|
||||
int GetTransitionDuration();
|
||||
|
||||
inline bool IsPreviewProgramMode() const
|
||||
{
|
||||
return os_atomic_load_bool(&previewProgramMode);
|
||||
|
|
@ -555,6 +620,8 @@ public:
|
|||
void SaveService();
|
||||
bool LoadService();
|
||||
|
||||
inline Auth *GetAuth() {return auth.get();}
|
||||
|
||||
inline void EnableOutputs(bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
|
|
@ -565,9 +632,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
QMenu *AddDeinterlacingMenu(obs_source_t *source);
|
||||
QMenu *AddScaleFilteringMenu(obs_sceneitem_t *item);
|
||||
QMenu *AddBackgroundColorMenu(obs_sceneitem_t *item);
|
||||
QMenu *AddDeinterlacingMenu(QMenu *menu, obs_source_t *source);
|
||||
QMenu *AddScaleFilteringMenu(QMenu *menu, obs_sceneitem_t *item);
|
||||
QMenu *AddBackgroundColorMenu(QMenu *menu, QWidgetAction *widgetAction,
|
||||
ColorSelect *select, obs_sceneitem_t *item);
|
||||
void CreateSourcePopupMenu(int idx, bool preview);
|
||||
|
||||
void UpdateTitleBar();
|
||||
|
|
@ -582,6 +650,10 @@ public:
|
|||
void CreatePropertiesWindow(obs_source_t *source);
|
||||
void CreateFiltersWindow(obs_source_t *source);
|
||||
|
||||
QAction *AddDockWidget(QDockWidget *dock);
|
||||
|
||||
static OBSBasic *Get();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
virtual void changeEvent(QEvent *event) override;
|
||||
|
|
@ -615,6 +687,8 @@ private slots:
|
|||
void on_actionFitToScreen_triggered();
|
||||
void on_actionStretchToScreen_triggered();
|
||||
void on_actionCenterToScreen_triggered();
|
||||
void on_actionVerticalCenter_triggered();
|
||||
void on_actionHorizontalCenter_triggered();
|
||||
|
||||
void on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
QListWidgetItem *prev);
|
||||
|
|
@ -730,13 +804,19 @@ private slots:
|
|||
void OpenMultiviewWindow();
|
||||
void OpenSceneWindow();
|
||||
|
||||
void DeferredLoad(const QString &file, int requeueCount);
|
||||
void DeferredSysTrayLoad(int requeueCount);
|
||||
|
||||
void StackedMixerAreaContextMenuRequested();
|
||||
|
||||
void ResizeOutputSizeOfSource();
|
||||
|
||||
public slots:
|
||||
void on_actionResetTransform_triggered();
|
||||
|
||||
bool StreamingActive();
|
||||
bool RecordingActive();
|
||||
bool ReplayBufferActive();
|
||||
|
||||
public:
|
||||
explicit OBSBasic(QWidget *parent = 0);
|
||||
virtual ~OBSBasic();
|
||||
|
|
@ -748,15 +828,20 @@ public:
|
|||
virtual int GetProfilePath(char *path, size_t size, const char *file)
|
||||
const override;
|
||||
|
||||
static void InitBrowserPanelSafeBlock();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::OBSBasic> ui;
|
||||
};
|
||||
|
||||
class ColorSelect : public QWidget {
|
||||
class SceneRenameDelegate : public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ColorSelect(QWidget *parent = 0);
|
||||
SceneRenameDelegate(QObject *parent);
|
||||
virtual void setEditorData(QWidget *editor, const QModelIndex &index)
|
||||
const override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ColorSelect> ui;
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *editor, QEvent *event) override;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue