New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -53,16 +53,16 @@ class OBSBasicStats;
|
|||
|
||||
#define DESKTOP_AUDIO_1 Str("DesktopAudioDevice1")
|
||||
#define DESKTOP_AUDIO_2 Str("DesktopAudioDevice2")
|
||||
#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 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"
|
||||
#define SIMPLE_ENCODER_QSV "qsv"
|
||||
#define SIMPLE_ENCODER_NVENC "nvenc"
|
||||
#define SIMPLE_ENCODER_AMD "amd"
|
||||
#define SIMPLE_ENCODER_X264 "x264"
|
||||
#define SIMPLE_ENCODER_X264_LOWCPU "x264_lowcpu"
|
||||
#define SIMPLE_ENCODER_QSV "qsv"
|
||||
#define SIMPLE_ENCODER_NVENC "nvenc"
|
||||
#define SIMPLE_ENCODER_AMD "amd"
|
||||
|
||||
#define PREVIEW_EDGE_SIZE 10
|
||||
|
||||
|
|
@ -89,13 +89,14 @@ struct QuickTransition {
|
|||
|
||||
inline QuickTransition() {}
|
||||
inline QuickTransition(OBSSource source_, int duration_, int id_)
|
||||
: source (source_),
|
||||
duration (duration_),
|
||||
id (id_),
|
||||
renamedSignal (std::make_shared<OBSSignal>(
|
||||
obs_source_get_signal_handler(source),
|
||||
"rename", SourceRenamed, this))
|
||||
{}
|
||||
: source(source_),
|
||||
duration(duration_),
|
||||
id(id_),
|
||||
renamedSignal(std::make_shared<OBSSignal>(
|
||||
obs_source_get_signal_handler(source), "rename",
|
||||
SourceRenamed, this))
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
static void SourceRenamed(void *param, calldata_t *data);
|
||||
|
|
@ -122,21 +123,19 @@ class OBSBasic : public OBSMainWindow {
|
|||
friend class Auth;
|
||||
friend class AutoConfig;
|
||||
friend class AutoConfigStreamPage;
|
||||
friend class RecordButton;
|
||||
friend class ExtraBrowsersModel;
|
||||
friend class ExtraBrowsersDelegate;
|
||||
friend struct OBSStudioAPI;
|
||||
|
||||
enum class MoveDir {
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
};
|
||||
enum class MoveDir { Up, Down, Left, Right };
|
||||
|
||||
enum DropType {
|
||||
DropType_RawText,
|
||||
DropType_Text,
|
||||
DropType_Image,
|
||||
DropType_Media,
|
||||
DropType_Html
|
||||
DropType_Html,
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
@ -144,7 +143,7 @@ private:
|
|||
|
||||
std::shared_ptr<Auth> auth;
|
||||
|
||||
std::vector<VolControl*> volumes;
|
||||
std::vector<VolControl *> volumes;
|
||||
|
||||
std::vector<OBSSignal> signalHandlers;
|
||||
|
||||
|
|
@ -172,7 +171,9 @@ private:
|
|||
QPointer<QDockWidget> statsDock;
|
||||
QPointer<OBSAbout> about;
|
||||
|
||||
QPointer<QTimer> cpuUsageTimer;
|
||||
QPointer<QTimer> cpuUsageTimer;
|
||||
QPointer<QTimer> diskFullTimer;
|
||||
|
||||
os_cpu_usage_info_t *cpuUsageInfo = nullptr;
|
||||
|
||||
OBSService service;
|
||||
|
|
@ -188,48 +189,50 @@ private:
|
|||
gs_vertbuffer_t *boxBottom = nullptr;
|
||||
gs_vertbuffer_t *circle = nullptr;
|
||||
|
||||
bool sceneChanging = false;
|
||||
bool ignoreSelectionUpdate = false;
|
||||
bool sceneChanging = false;
|
||||
bool ignoreSelectionUpdate = false;
|
||||
|
||||
int previewX = 0, previewY = 0;
|
||||
int previewCX = 0, previewCY = 0;
|
||||
float previewScale = 0.0f;
|
||||
int previewX = 0, previewY = 0;
|
||||
int previewCX = 0, previewCY = 0;
|
||||
float previewScale = 0.0f;
|
||||
|
||||
ConfigFile basicConfig;
|
||||
ConfigFile basicConfig;
|
||||
|
||||
std::vector<SavedProjectorInfo*> savedProjectorsArray;
|
||||
std::vector<SavedProjectorInfo *> savedProjectorsArray;
|
||||
QPointer<QWidget> projectors[10];
|
||||
QList<QPointer<QWidget>> windowProjectors;
|
||||
|
||||
QPointer<QWidget> stats;
|
||||
QPointer<QWidget> remux;
|
||||
QPointer<QWidget> extraBrowsers;
|
||||
|
||||
QPointer<QMenu> startStreamMenu;
|
||||
|
||||
QPointer<QPushButton> transitionButton;
|
||||
QPointer<QPushButton> replayBufferButton;
|
||||
QScopedPointer<QPushButton> pause;
|
||||
|
||||
QScopedPointer<QSystemTrayIcon> trayIcon;
|
||||
QPointer<QAction> sysTrayStream;
|
||||
QPointer<QAction> sysTrayRecord;
|
||||
QPointer<QAction> sysTrayReplayBuffer;
|
||||
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<QAction> sysTrayStream;
|
||||
QPointer<QAction> sysTrayRecord;
|
||||
QPointer<QAction> sysTrayReplayBuffer;
|
||||
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;
|
||||
|
|
@ -238,47 +241,47 @@ private:
|
|||
QScopedPointer<QThread> patronJsonThread;
|
||||
std::string patronJson;
|
||||
|
||||
void UpdateMultiviewProjectorMenu();
|
||||
void UpdateMultiviewProjectorMenu();
|
||||
|
||||
void DrawBackdrop(float cx, float cy);
|
||||
void DrawBackdrop(float cx, float cy);
|
||||
|
||||
void SetupEncoders();
|
||||
void SetupEncoders();
|
||||
|
||||
void CreateFirstRunSources();
|
||||
void CreateDefaultScene(bool firstStart);
|
||||
void CreateFirstRunSources();
|
||||
void CreateDefaultScene(bool firstStart);
|
||||
|
||||
void UpdateVolumeControlsDecayRate();
|
||||
void UpdateVolumeControlsPeakMeterType();
|
||||
void ClearVolumeControls();
|
||||
void UpdateVolumeControlsDecayRate();
|
||||
void UpdateVolumeControlsPeakMeterType();
|
||||
void ClearVolumeControls();
|
||||
|
||||
void UploadLog(const char *subdir, const char *file);
|
||||
void UploadLog(const char *subdir, const char *file);
|
||||
|
||||
void Save(const char *file);
|
||||
void Load(const char *file);
|
||||
void Save(const char *file);
|
||||
void Load(const char *file);
|
||||
|
||||
void InitHotkeys();
|
||||
void CreateHotkeys();
|
||||
void ClearHotkeys();
|
||||
void InitHotkeys();
|
||||
void CreateHotkeys();
|
||||
void ClearHotkeys();
|
||||
|
||||
bool InitService();
|
||||
bool InitService();
|
||||
|
||||
bool InitBasicConfigDefaults();
|
||||
void InitBasicConfigDefaults2();
|
||||
bool InitBasicConfig();
|
||||
bool InitBasicConfigDefaults();
|
||||
void InitBasicConfigDefaults2();
|
||||
bool InitBasicConfig();
|
||||
|
||||
void InitOBSCallbacks();
|
||||
void InitOBSCallbacks();
|
||||
|
||||
void InitPrimitives();
|
||||
void InitPrimitives();
|
||||
|
||||
void OnFirstLoad();
|
||||
void OnFirstLoad();
|
||||
|
||||
OBSSceneItem GetSceneItem(QListWidgetItem *item);
|
||||
OBSSceneItem GetCurrentSceneItem();
|
||||
OBSSceneItem GetSceneItem(QListWidgetItem *item);
|
||||
OBSSceneItem GetCurrentSceneItem();
|
||||
|
||||
bool QueryRemoveSource(obs_source_t *source);
|
||||
bool QueryRemoveSource(obs_source_t *source);
|
||||
|
||||
void TimedCheckForUpdates();
|
||||
void CheckForUpdates(bool manualUpdate);
|
||||
void TimedCheckForUpdates();
|
||||
void CheckForUpdates(bool manualUpdate);
|
||||
|
||||
void GetFPSCommon(uint32_t &num, uint32_t &den) const;
|
||||
void GetFPSInteger(uint32_t &num, uint32_t &den) const;
|
||||
|
|
@ -293,8 +296,8 @@ private:
|
|||
void ChangeSceneIndex(bool relative, int idx, int invalidIdx);
|
||||
|
||||
void TempFileOutput(const char *path, int vBitrate, int aBitrate);
|
||||
void TempStreamOutput(const char *url, const char *key,
|
||||
int vBitrate, int aBitrate);
|
||||
void TempStreamOutput(const char *url, const char *key, int vBitrate,
|
||||
int aBitrate);
|
||||
|
||||
void CloseDialogs();
|
||||
void ClearSceneData();
|
||||
|
|
@ -302,7 +305,7 @@ private:
|
|||
void Nudge(int dist, MoveDir dir);
|
||||
|
||||
OBSProjector *OpenProjector(obs_source_t *source, int monitor,
|
||||
QString title, ProjectorType type);
|
||||
QString title, ProjectorType type);
|
||||
|
||||
void GetAudioSourceFilters();
|
||||
void GetAudioSourceProperties();
|
||||
|
|
@ -327,8 +330,8 @@ private:
|
|||
|
||||
int GetTopSelectedSourceItem();
|
||||
|
||||
obs_hotkey_pair_id streamingHotkeys, recordingHotkeys,
|
||||
replayBufHotkeys, togglePreviewHotkeys;
|
||||
obs_hotkey_pair_id streamingHotkeys, recordingHotkeys, pauseHotkeys,
|
||||
replayBufHotkeys, togglePreviewHotkeys;
|
||||
obs_hotkey_id forceStreamingStopHotkey;
|
||||
|
||||
void InitDefaultTransitions();
|
||||
|
|
@ -368,7 +371,7 @@ private:
|
|||
void SetPreviewProgramMode(bool enabled);
|
||||
void ResizeProgram(uint32_t cx, uint32_t cy);
|
||||
void SetCurrentScene(obs_scene_t *scene, bool force = false,
|
||||
bool direct = false);
|
||||
bool direct = false);
|
||||
static void RenderProgram(void *data, uint32_t cx, uint32_t cy);
|
||||
|
||||
std::vector<QuickTransition> quickTransitions;
|
||||
|
|
@ -386,8 +389,8 @@ private:
|
|||
int quickTransitionIdCounter = 1;
|
||||
bool overridingTransition = false;
|
||||
|
||||
int programX = 0, programY = 0;
|
||||
int programCX = 0, programCY = 0;
|
||||
int programX = 0, programY = 0;
|
||||
int programCX = 0, programCY = 0;
|
||||
float programScale = 0.0f;
|
||||
|
||||
int disableOutputsRef = 0;
|
||||
|
|
@ -407,9 +410,9 @@ private:
|
|||
|
||||
void EnumDialogs();
|
||||
|
||||
QList<QDialog*> visDialogs;
|
||||
QList<QDialog*> modalDialogs;
|
||||
QList<QMessageBox*> visMsgBoxes;
|
||||
QList<QDialog *> visDialogs;
|
||||
QList<QDialog *> modalDialogs;
|
||||
QList<QMessageBox *> visMsgBoxes;
|
||||
|
||||
QList<QPoint> visDlgPositions;
|
||||
|
||||
|
|
@ -422,6 +425,19 @@ private:
|
|||
|
||||
bool NoSourcesConfirmation();
|
||||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
QList<QSharedPointer<QDockWidget>> extraBrowserDocks;
|
||||
QList<QSharedPointer<QAction>> extraBrowserDockActions;
|
||||
QStringList extraBrowserDockTargets;
|
||||
|
||||
void ClearExtraBrowserDocks();
|
||||
void LoadExtraBrowserDocks();
|
||||
void SaveExtraBrowserDocks();
|
||||
void ManageExtraBrowserDocks();
|
||||
void AddExtraBrowserDock(const QString &title, const QString &url,
|
||||
bool firstCreate);
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
void DeferSaveBegin();
|
||||
void DeferSaveEnd();
|
||||
|
|
@ -444,6 +460,7 @@ public slots:
|
|||
void RecordStopping();
|
||||
void RecordingStop(int code, QString last_error);
|
||||
|
||||
void ShowReplayBufferPauseWarning();
|
||||
void StartReplayBuffer();
|
||||
void StopReplayBuffer();
|
||||
|
||||
|
|
@ -457,18 +474,21 @@ public slots:
|
|||
|
||||
void SetTransition(OBSSource transition);
|
||||
void TransitionToScene(OBSScene scene, bool force = false,
|
||||
bool direct = false);
|
||||
bool direct = false);
|
||||
void TransitionToScene(OBSSource scene, bool force = false,
|
||||
bool direct = false, bool quickTransition = false);
|
||||
bool direct = false,
|
||||
bool quickTransition = false);
|
||||
void SetCurrentScene(OBSSource scene, bool force = false,
|
||||
bool direct = false);
|
||||
bool direct = false);
|
||||
|
||||
bool AddSceneCollection(
|
||||
bool create_new,
|
||||
const QString &name = QString());
|
||||
bool AddSceneCollection(bool create_new,
|
||||
const QString &name = QString());
|
||||
|
||||
void UpdatePatronJson(const QString &text, const QString &error);
|
||||
|
||||
void PauseRecording();
|
||||
void UnpauseRecording();
|
||||
|
||||
private slots:
|
||||
void AddSceneItem(OBSSceneItem item);
|
||||
void AddScene(OBSSource source);
|
||||
|
|
@ -538,6 +558,8 @@ private slots:
|
|||
void SceneCopyFilters();
|
||||
void ScenePasteFilters();
|
||||
|
||||
void CheckDiskSpaceRemaining();
|
||||
|
||||
private:
|
||||
/* OBS Callbacks */
|
||||
static void SceneReordered(void *data, calldata_t *params);
|
||||
|
|
@ -548,6 +570,8 @@ private:
|
|||
static void SourceRemoved(void *data, calldata_t *params);
|
||||
static void SourceActivated(void *data, calldata_t *params);
|
||||
static void SourceDeactivated(void *data, calldata_t *params);
|
||||
static void SourceAudioActivated(void *data, calldata_t *params);
|
||||
static void SourceAudioDeactivated(void *data, calldata_t *params);
|
||||
static void SourceRenamed(void *data, calldata_t *params);
|
||||
static void RenderMain(void *data, uint32_t cx, uint32_t cy);
|
||||
|
||||
|
|
@ -562,6 +586,11 @@ private:
|
|||
|
||||
void AutoRemux();
|
||||
|
||||
void UpdatePause(bool activate = true);
|
||||
|
||||
bool LowDiskSpace();
|
||||
void DiskSpaceMessage();
|
||||
|
||||
public:
|
||||
OBSSource GetProgramSource();
|
||||
OBSScene GetCurrentScene();
|
||||
|
|
@ -575,7 +604,7 @@ public:
|
|||
}
|
||||
|
||||
obs_service_t *GetService();
|
||||
void SetService(obs_service_t *service);
|
||||
void SetService(obs_service_t *service);
|
||||
|
||||
int GetTransitionDuration();
|
||||
|
||||
|
|
@ -588,29 +617,26 @@ public:
|
|||
bool Active() const;
|
||||
|
||||
void ResetUI();
|
||||
int ResetVideo();
|
||||
int ResetVideo();
|
||||
bool ResetAudio();
|
||||
|
||||
void ResetOutputs();
|
||||
|
||||
void ResetAudioDevice(const char *sourceId, const char *deviceId,
|
||||
const char *deviceDesc, int channel);
|
||||
const char *deviceDesc, int channel);
|
||||
|
||||
void NewProject();
|
||||
void LoadProject();
|
||||
|
||||
inline void GetDisplayRect(int &x, int &y, int &cx, int &cy)
|
||||
{
|
||||
x = previewX;
|
||||
y = previewY;
|
||||
x = previewX;
|
||||
y = previewY;
|
||||
cx = previewCX;
|
||||
cy = previewCY;
|
||||
}
|
||||
|
||||
inline bool SavingDisabled() const
|
||||
{
|
||||
return disableSaving;
|
||||
}
|
||||
inline bool SavingDisabled() const { return disableSaving; }
|
||||
|
||||
inline double GetCPUUsage() const
|
||||
{
|
||||
|
|
@ -620,7 +646,7 @@ public:
|
|||
void SaveService();
|
||||
bool LoadService();
|
||||
|
||||
inline Auth *GetAuth() {return auth.get();}
|
||||
inline Auth *GetAuth() { return auth.get(); }
|
||||
|
||||
inline void EnableOutputs(bool enable)
|
||||
{
|
||||
|
|
@ -635,7 +661,8 @@ public:
|
|||
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);
|
||||
ColorSelect *select,
|
||||
obs_sceneitem_t *item);
|
||||
void CreateSourcePopupMenu(int idx, bool preview);
|
||||
|
||||
void UpdateTitleBar();
|
||||
|
|
@ -691,7 +718,7 @@ private slots:
|
|||
void on_actionHorizontalCenter_triggered();
|
||||
|
||||
void on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
QListWidgetItem *prev);
|
||||
QListWidgetItem *prev);
|
||||
void on_scenes_customContextMenuRequested(const QPoint &pos);
|
||||
void on_actionAddScene_triggered();
|
||||
void on_actionRemoveScene_triggered();
|
||||
|
|
@ -728,8 +755,7 @@ private slots:
|
|||
|
||||
void on_preview_customContextMenuRequested(const QPoint &pos);
|
||||
void on_program_customContextMenuRequested(const QPoint &pos);
|
||||
void on_previewDisabledLabel_customContextMenuRequested(
|
||||
const QPoint &pos);
|
||||
void PreviewDisabledMenu(const QPoint &pos);
|
||||
|
||||
void on_actionNewSceneCollection_triggered();
|
||||
void on_actionDupSceneCollection_triggered();
|
||||
|
|
@ -766,6 +792,8 @@ private slots:
|
|||
void on_resetUI_triggered();
|
||||
void on_lockUI_toggled(bool lock);
|
||||
|
||||
void PauseToggled();
|
||||
|
||||
void logUploadFinished(const QString &text, const QString &error);
|
||||
|
||||
void updateCheckFinished();
|
||||
|
|
@ -779,7 +807,7 @@ private slots:
|
|||
void EditSceneItemName();
|
||||
|
||||
void SceneNameEdited(QWidget *editor,
|
||||
QAbstractItemDelegate::EndEditHint endHint);
|
||||
QAbstractItemDelegate::EndEditHint endHint);
|
||||
|
||||
void OpenSceneFilters();
|
||||
void OpenFilters();
|
||||
|
|
@ -825,8 +853,8 @@ public:
|
|||
|
||||
virtual config_t *Config() const override;
|
||||
|
||||
virtual int GetProfilePath(char *path, size_t size, const char *file)
|
||||
const override;
|
||||
virtual int GetProfilePath(char *path, size_t size,
|
||||
const char *file) const override;
|
||||
|
||||
static void InitBrowserPanelSafeBlock();
|
||||
|
||||
|
|
@ -839,8 +867,8 @@ class SceneRenameDelegate : public QStyledItemDelegate {
|
|||
|
||||
public:
|
||||
SceneRenameDelegate(QObject *parent);
|
||||
virtual void setEditorData(QWidget *editor, const QModelIndex &index)
|
||||
const override;
|
||||
virtual void setEditorData(QWidget *editor,
|
||||
const QModelIndex &index) const override;
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *editor, QEvent *event) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue