New upstream version 25.0.3+dfsg1
This commit is contained in:
parent
04fe0efc67
commit
8b2e5f2130
569 changed files with 62491 additions and 5875 deletions
|
|
@ -86,12 +86,15 @@ struct QuickTransition {
|
|||
obs_hotkey_id hotkey = OBS_INVALID_HOTKEY_ID;
|
||||
int duration = 0;
|
||||
int id = 0;
|
||||
bool fadeToBlack = false;
|
||||
|
||||
inline QuickTransition() {}
|
||||
inline QuickTransition(OBSSource source_, int duration_, int id_)
|
||||
inline QuickTransition(OBSSource source_, int duration_, int id_,
|
||||
bool fadeToBlack_ = false)
|
||||
: source(source_),
|
||||
duration(duration_),
|
||||
id(id_),
|
||||
fadeToBlack(fadeToBlack_),
|
||||
renamedSignal(std::make_shared<OBSSignal>(
|
||||
obs_source_get_signal_handler(source), "rename",
|
||||
SourceRenamed, this))
|
||||
|
|
@ -114,6 +117,36 @@ private:
|
|||
|
||||
class OBSBasic : public OBSMainWindow {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QIcon imageIcon READ GetImageIcon WRITE SetImageIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon colorIcon READ GetColorIcon WRITE SetColorIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon slideshowIcon READ GetSlideshowIcon WRITE
|
||||
SetSlideshowIcon DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon audioInputIcon READ GetAudioInputIcon WRITE
|
||||
SetAudioInputIcon DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon audioOutputIcon READ GetAudioOutputIcon WRITE
|
||||
SetAudioOutputIcon DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon desktopCapIcon READ GetDesktopCapIcon WRITE
|
||||
SetDesktopCapIcon DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon windowCapIcon READ GetWindowCapIcon WRITE
|
||||
SetWindowCapIcon DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon gameCapIcon READ GetGameCapIcon WRITE SetGameCapIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon cameraIcon READ GetCameraIcon WRITE SetCameraIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon textIcon READ GetTextIcon WRITE SetTextIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon mediaIcon READ GetMediaIcon WRITE SetMediaIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon browserIcon READ GetBrowserIcon WRITE SetBrowserIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon groupIcon READ GetGroupIcon WRITE SetGroupIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon sceneIcon READ GetSceneIcon WRITE SetSceneIcon
|
||||
DESIGNABLE true)
|
||||
Q_PROPERTY(QIcon defaultIcon READ GetDefaultIcon WRITE SetDefaultIcon
|
||||
DESIGNABLE true)
|
||||
|
||||
friend class OBSAbout;
|
||||
friend class OBSBasicPreview;
|
||||
|
|
@ -124,6 +157,7 @@ class OBSBasic : public OBSMainWindow {
|
|||
friend class AutoConfig;
|
||||
friend class AutoConfigStreamPage;
|
||||
friend class RecordButton;
|
||||
friend class ReplayBufferButton;
|
||||
friend class ExtraBrowsersModel;
|
||||
friend class ExtraBrowsersDelegate;
|
||||
friend struct OBSStudioAPI;
|
||||
|
|
@ -136,6 +170,7 @@ class OBSBasic : public OBSMainWindow {
|
|||
DropType_Image,
|
||||
DropType_Media,
|
||||
DropType_Html,
|
||||
DropType_Url,
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
@ -153,12 +188,13 @@ private:
|
|||
long disableSaving = 1;
|
||||
bool projectChanged = false;
|
||||
bool previewEnabled = true;
|
||||
bool fullscreenInterface = false;
|
||||
|
||||
const char *copyString;
|
||||
std::list<const char *> copyStrings;
|
||||
const char *copyFiltersString = nullptr;
|
||||
bool copyVisible = true;
|
||||
|
||||
bool closing = false;
|
||||
QScopedPointer<QThread> whatsNewInitThread;
|
||||
QScopedPointer<QThread> updateCheckThread;
|
||||
QScopedPointer<QThread> introCheckThread;
|
||||
QScopedPointer<QThread> logUploadThread;
|
||||
|
|
@ -199,18 +235,20 @@ private:
|
|||
ConfigFile basicConfig;
|
||||
|
||||
std::vector<SavedProjectorInfo *> savedProjectorsArray;
|
||||
QPointer<QWidget> projectors[10];
|
||||
QList<QPointer<QWidget>> windowProjectors;
|
||||
std::vector<OBSProjector *> projectors;
|
||||
|
||||
QPointer<QWidget> stats;
|
||||
QPointer<QWidget> remux;
|
||||
QPointer<QWidget> extraBrowsers;
|
||||
QPointer<QWidget> importer;
|
||||
|
||||
QPointer<QMenu> startStreamMenu;
|
||||
|
||||
QPointer<QPushButton> transitionButton;
|
||||
QPointer<QPushButton> replayBufferButton;
|
||||
QPointer<QHBoxLayout> replayLayout;
|
||||
QScopedPointer<QPushButton> pause;
|
||||
QScopedPointer<QPushButton> replay;
|
||||
|
||||
QScopedPointer<QSystemTrayIcon> trayIcon;
|
||||
QPointer<QAction> sysTrayStream;
|
||||
|
|
@ -305,7 +343,7 @@ private:
|
|||
void Nudge(int dist, MoveDir dir);
|
||||
|
||||
OBSProjector *OpenProjector(obs_source_t *source, int monitor,
|
||||
QString title, ProjectorType type);
|
||||
ProjectorType type);
|
||||
|
||||
void GetAudioSourceFilters();
|
||||
void GetAudioSourceProperties();
|
||||
|
|
@ -330,6 +368,8 @@ private:
|
|||
|
||||
int GetTopSelectedSourceItem();
|
||||
|
||||
QModelIndexList GetAllSelectedSourceItems();
|
||||
|
||||
obs_hotkey_pair_id streamingHotkeys, recordingHotkeys, pauseHotkeys,
|
||||
replayBufHotkeys, togglePreviewHotkeys;
|
||||
obs_hotkey_id forceStreamingStopHotkey;
|
||||
|
|
@ -354,7 +394,7 @@ private:
|
|||
void ClearQuickTransitionWidgets();
|
||||
void RefreshQuickTransitions();
|
||||
void DisableQuickTransitionWidgets();
|
||||
void EnableQuickTransitionWidgets();
|
||||
void EnableTransitionWidgets(bool enable);
|
||||
void CreateDefaultQuickTransitions();
|
||||
|
||||
QMenu *CreatePerSceneTransitionMenu();
|
||||
|
|
@ -370,8 +410,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);
|
||||
void SetCurrentScene(obs_scene_t *scene, bool force = false);
|
||||
static void RenderProgram(void *data, uint32_t cx, uint32_t cy);
|
||||
|
||||
std::vector<QuickTransition> quickTransitions;
|
||||
|
|
@ -386,6 +425,7 @@ private:
|
|||
volatile bool previewProgramMode = false;
|
||||
obs_hotkey_id togglePreviewProgramHotkey = 0;
|
||||
obs_hotkey_id transitionHotkey = 0;
|
||||
obs_hotkey_id statsHotkey = 0;
|
||||
int quickTransitionIdCounter = 1;
|
||||
bool overridingTransition = false;
|
||||
|
||||
|
|
@ -399,6 +439,9 @@ private:
|
|||
inline void OnDeactivate();
|
||||
|
||||
void AddDropSource(const char *file, DropType image);
|
||||
void AddDropURL(const char *url, QString &name, obs_data_t *settings,
|
||||
const obs_video_info &ovi);
|
||||
void ConfirmDropUrl(const QString &url);
|
||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||
|
|
@ -422,8 +465,7 @@ private:
|
|||
void LoadSavedProjectors(obs_data_array_t *savedProjectors);
|
||||
|
||||
void ReceivedIntroJson(const QString &text);
|
||||
|
||||
bool NoSourcesConfirmation();
|
||||
void ShowWhatsNew(const QString &url);
|
||||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
QList<QSharedPointer<QDockWidget>> extraBrowserDocks;
|
||||
|
|
@ -438,6 +480,42 @@ private:
|
|||
bool firstCreate);
|
||||
#endif
|
||||
|
||||
QIcon imageIcon;
|
||||
QIcon colorIcon;
|
||||
QIcon slideshowIcon;
|
||||
QIcon audioInputIcon;
|
||||
QIcon audioOutputIcon;
|
||||
QIcon desktopCapIcon;
|
||||
QIcon windowCapIcon;
|
||||
QIcon gameCapIcon;
|
||||
QIcon cameraIcon;
|
||||
QIcon textIcon;
|
||||
QIcon mediaIcon;
|
||||
QIcon browserIcon;
|
||||
QIcon groupIcon;
|
||||
QIcon sceneIcon;
|
||||
QIcon defaultIcon;
|
||||
|
||||
QIcon GetImageIcon() const;
|
||||
QIcon GetColorIcon() const;
|
||||
QIcon GetSlideshowIcon() const;
|
||||
QIcon GetAudioInputIcon() const;
|
||||
QIcon GetAudioOutputIcon() const;
|
||||
QIcon GetDesktopCapIcon() const;
|
||||
QIcon GetWindowCapIcon() const;
|
||||
QIcon GetGameCapIcon() const;
|
||||
QIcon GetCameraIcon() const;
|
||||
QIcon GetTextIcon() const;
|
||||
QIcon GetMediaIcon() const;
|
||||
QIcon GetBrowserIcon() const;
|
||||
QIcon GetDefaultIcon() const;
|
||||
|
||||
QSlider *tBar;
|
||||
bool tBarActive = false;
|
||||
|
||||
OBSSource GetOverrideTransition(OBSSource source);
|
||||
int GetOverrideTransitionDuration(OBSSource source);
|
||||
|
||||
public slots:
|
||||
void DeferSaveBegin();
|
||||
void DeferSaveEnd();
|
||||
|
|
@ -473,13 +551,13 @@ public slots:
|
|||
void SaveProject();
|
||||
|
||||
void SetTransition(OBSSource transition);
|
||||
void TransitionToScene(OBSScene scene, bool force = false,
|
||||
bool direct = false);
|
||||
void OverrideTransition(OBSSource transition);
|
||||
void TransitionToScene(OBSScene scene, bool force = false);
|
||||
void TransitionToScene(OBSSource scene, bool force = false,
|
||||
bool direct = false,
|
||||
bool quickTransition = false);
|
||||
void SetCurrentScene(OBSSource scene, bool force = false,
|
||||
bool direct = false);
|
||||
bool quickTransition = false,
|
||||
int quickDuration = 0, bool black = false,
|
||||
bool manual = false);
|
||||
void SetCurrentScene(OBSSource scene, bool force = false);
|
||||
|
||||
bool AddSceneCollection(bool create_new,
|
||||
const QString &name = QString());
|
||||
|
|
@ -507,6 +585,7 @@ private slots:
|
|||
void ToggleAlwaysOnTop();
|
||||
|
||||
void ReorderSources(OBSScene scene);
|
||||
void RefreshSources(OBSScene scene);
|
||||
|
||||
void ProcessHotkey(obs_hotkey_id id, bool pressed);
|
||||
|
||||
|
|
@ -559,13 +638,38 @@ private slots:
|
|||
void ScenePasteFilters();
|
||||
|
||||
void CheckDiskSpaceRemaining();
|
||||
void OpenSavedProjector(SavedProjectorInfo *info);
|
||||
|
||||
void ScenesReordered(const QModelIndex &parent, int start, int end,
|
||||
const QModelIndex &destination, int row);
|
||||
|
||||
void ResetStatsHotkey();
|
||||
|
||||
void SetImageIcon(const QIcon &icon);
|
||||
void SetColorIcon(const QIcon &icon);
|
||||
void SetSlideshowIcon(const QIcon &icon);
|
||||
void SetAudioInputIcon(const QIcon &icon);
|
||||
void SetAudioOutputIcon(const QIcon &icon);
|
||||
void SetDesktopCapIcon(const QIcon &icon);
|
||||
void SetWindowCapIcon(const QIcon &icon);
|
||||
void SetGameCapIcon(const QIcon &icon);
|
||||
void SetCameraIcon(const QIcon &icon);
|
||||
void SetTextIcon(const QIcon &icon);
|
||||
void SetMediaIcon(const QIcon &icon);
|
||||
void SetBrowserIcon(const QIcon &icon);
|
||||
void SetGroupIcon(const QIcon &icon);
|
||||
void SetSceneIcon(const QIcon &icon);
|
||||
void SetDefaultIcon(const QIcon &icon);
|
||||
|
||||
void TBarChanged(int value);
|
||||
void TBarReleased();
|
||||
|
||||
void LockVolumeControl(bool lock);
|
||||
|
||||
private:
|
||||
/* OBS Callbacks */
|
||||
static void SceneReordered(void *data, calldata_t *params);
|
||||
static void SceneRefreshed(void *data, calldata_t *params);
|
||||
static void SceneItemAdded(void *data, calldata_t *params);
|
||||
static void SceneItemSelected(void *data, calldata_t *params);
|
||||
static void SceneItemDeselected(void *data, calldata_t *params);
|
||||
|
|
@ -590,10 +694,16 @@ private:
|
|||
void AutoRemux();
|
||||
|
||||
void UpdatePause(bool activate = true);
|
||||
void UpdateReplayBuffer(bool activate = true);
|
||||
|
||||
bool OutputPathValid();
|
||||
void OutputPathInvalidMessage();
|
||||
|
||||
bool LowDiskSpace();
|
||||
void DiskSpaceMessage();
|
||||
|
||||
OBSSource prevFTBSource = nullptr;
|
||||
|
||||
public:
|
||||
OBSSource GetProgramSource();
|
||||
OBSScene GetCurrentScene();
|
||||
|
|
@ -686,6 +796,14 @@ public:
|
|||
|
||||
const char *GetCurrentOutputPath();
|
||||
|
||||
void DeleteProjector(OBSProjector *projector);
|
||||
void AddProjectorMenuMonitors(QMenu *parent, QObject *target,
|
||||
const char *slot);
|
||||
|
||||
QIcon GetSourceIcon(const char *id) const;
|
||||
QIcon GetGroupIcon() const;
|
||||
QIcon GetSceneIcon() const;
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent *event) override;
|
||||
virtual void changeEvent(QEvent *event) override;
|
||||
|
|
@ -722,9 +840,12 @@ private slots:
|
|||
void on_actionVerticalCenter_triggered();
|
||||
void on_actionHorizontalCenter_triggered();
|
||||
|
||||
void on_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
QListWidgetItem *prev);
|
||||
void on_scenes_customContextMenuRequested(const QPoint &pos);
|
||||
void on_actionGridMode_triggered();
|
||||
void on_actionAddScene_triggered();
|
||||
void on_actionRemoveScene_triggered();
|
||||
void on_actionSceneUp_triggered();
|
||||
|
|
@ -783,11 +904,13 @@ private slots:
|
|||
|
||||
void on_toggleListboxToolbars_toggled(bool visible);
|
||||
void on_toggleStatusBar_toggled(bool visible);
|
||||
void on_toggleSourceIcons_toggled(bool visible);
|
||||
|
||||
void on_transitions_currentIndexChanged(int index);
|
||||
void on_transitionAdd_clicked();
|
||||
void on_transitionRemove_clicked();
|
||||
void on_transitionProps_clicked();
|
||||
void on_transitionDuration_valueChanged(int value);
|
||||
|
||||
void on_modeSwitch_clicked();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue