New upstream version 25.0.3+dfsg1

This commit is contained in:
Sebastian Ramacher 2020-03-25 09:07:22 +01:00
parent 04fe0efc67
commit 8b2e5f2130
569 changed files with 62491 additions and 5875 deletions

View file

@ -15,14 +15,6 @@ DecklinkOutputUI::DecklinkOutputUI(QWidget *parent)
propertiesView = nullptr;
previewPropertiesView = nullptr;
connect(ui->startOutput, SIGNAL(released()), this, SLOT(StartOutput()));
connect(ui->stopOutput, SIGNAL(released()), this, SLOT(StopOutput()));
connect(ui->startPreviewOutput, SIGNAL(released()), this,
SLOT(StartPreviewOutput()));
connect(ui->stopPreviewOutput, SIGNAL(released()), this,
SLOT(StopPreviewOutput()));
}
void DecklinkOutputUI::ShowHideDialog()
@ -106,15 +98,10 @@ void DecklinkOutputUI::SavePreviewSettings()
obs_data_save_json_safe(settings, path, "tmp", "bak");
}
void DecklinkOutputUI::StartOutput()
void DecklinkOutputUI::on_outputButton_clicked()
{
SaveSettings();
output_start();
}
void DecklinkOutputUI::StopOutput()
{
output_stop();
output_toggle();
}
void DecklinkOutputUI::PropertiesChanged()
@ -122,18 +109,39 @@ void DecklinkOutputUI::PropertiesChanged()
SaveSettings();
}
void DecklinkOutputUI::StartPreviewOutput()
void DecklinkOutputUI::OutputStateChanged(bool active)
{
SavePreviewSettings();
preview_output_start();
QString text;
if (active) {
text = QString(obs_module_text("Stop"));
} else {
text = QString(obs_module_text("Start"));
}
ui->outputButton->setChecked(active);
ui->outputButton->setText(text);
}
void DecklinkOutputUI::StopPreviewOutput()
void DecklinkOutputUI::on_previewOutputButton_clicked()
{
preview_output_stop();
SavePreviewSettings();
preview_output_toggle();
}
void DecklinkOutputUI::PreviewPropertiesChanged()
{
SavePreviewSettings();
}
}
void DecklinkOutputUI::PreviewOutputStateChanged(bool active)
{
QString text;
if (active) {
text = QString(obs_module_text("Stop"));
} else {
text = QString(obs_module_text("Start"));
}
ui->previewOutputButton->setChecked(active);
ui->previewOutputButton->setText(text);
}

View file

@ -12,13 +12,13 @@ private:
OBSPropertiesView *previewPropertiesView;
public slots:
void StartOutput();
void StopOutput();
void on_outputButton_clicked();
void PropertiesChanged();
void OutputStateChanged(bool);
void StartPreviewOutput();
void StopPreviewOutput();
void on_previewOutputButton_clicked();
void PreviewPropertiesChanged();
void PreviewOutputStateChanged(bool);
public:
std::unique_ptr<Ui_Output> ui;

View file

@ -51,31 +51,40 @@ OBSData load_settings()
return nullptr;
}
void output_stop()
{
obs_output_stop(output);
obs_output_release(output);
main_output_running = false;
doUI->OutputStateChanged(false);
}
void output_start()
{
if (!main_output_running) {
OBSData settings = load_settings();
OBSData settings = load_settings();
if (settings != nullptr) {
output = obs_output_create("decklink_output",
"decklink_output", settings,
NULL);
if (settings != nullptr) {
output = obs_output_create("decklink_output", "decklink_output",
settings, NULL);
obs_output_start(output);
obs_data_release(settings);
bool started = obs_output_start(output);
obs_data_release(settings);
main_output_running = true;
}
main_output_running = started;
doUI->OutputStateChanged(started);
if (!started)
output_stop();
}
}
void output_stop()
void output_toggle()
{
if (main_output_running) {
obs_output_stop(output);
obs_output_release(output);
main_output_running = false;
}
if (main_output_running)
output_stop();
else
output_start();
}
OBSData load_preview_settings()
@ -97,88 +106,93 @@ OBSData load_preview_settings()
void on_preview_scene_changed(enum obs_frontend_event event, void *param);
void render_preview_source(void *param, uint32_t cx, uint32_t cy);
void preview_output_stop()
{
obs_output_stop(context.output);
obs_output_release(context.output);
video_output_stop(context.video_queue);
obs_remove_main_render_callback(render_preview_source, &context);
obs_frontend_remove_event_callback(on_preview_scene_changed, &context);
obs_source_release(context.current_source);
obs_enter_graphics();
gs_stagesurface_destroy(context.stagesurface);
gs_texrender_destroy(context.texrender);
obs_leave_graphics();
video_output_close(context.video_queue);
preview_output_running = false;
doUI->PreviewOutputStateChanged(false);
}
void preview_output_start()
{
if (!preview_output_running) {
OBSData settings = load_preview_settings();
OBSData settings = load_preview_settings();
if (settings != nullptr) {
context.output = obs_output_create(
"decklink_output", "decklink_preview_output",
settings, NULL);
if (settings != nullptr) {
context.output = obs_output_create("decklink_output",
"decklink_preview_output",
settings, NULL);
obs_get_video_info(&context.ovi);
obs_get_video_info(&context.ovi);
uint32_t width = context.ovi.base_width;
uint32_t height = context.ovi.base_height;
uint32_t width = context.ovi.base_width;
uint32_t height = context.ovi.base_height;
obs_enter_graphics();
context.texrender =
gs_texrender_create(GS_BGRA, GS_ZS_NONE);
context.stagesurface =
gs_stagesurface_create(width, height, GS_BGRA);
obs_leave_graphics();
obs_enter_graphics();
context.texrender = gs_texrender_create(GS_BGRA, GS_ZS_NONE);
context.stagesurface =
gs_stagesurface_create(width, height, GS_BGRA);
obs_leave_graphics();
const video_output_info *mainVOI =
video_output_get_info(obs_get_video());
const video_output_info *mainVOI =
video_output_get_info(obs_get_video());
video_output_info vi = {0};
vi.format = VIDEO_FORMAT_BGRA;
vi.width = width;
vi.height = height;
vi.fps_den = context.ovi.fps_den;
vi.fps_num = context.ovi.fps_num;
vi.cache_size = 16;
vi.colorspace = mainVOI->colorspace;
vi.range = mainVOI->range;
vi.name = "decklink_preview_output";
video_output_info vi = {0};
vi.format = VIDEO_FORMAT_BGRA;
vi.width = width;
vi.height = height;
vi.fps_den = context.ovi.fps_den;
vi.fps_num = context.ovi.fps_num;
vi.cache_size = 16;
vi.colorspace = mainVOI->colorspace;
vi.range = mainVOI->range;
vi.name = "decklink_preview_output";
video_output_open(&context.video_queue, &vi);
video_output_open(&context.video_queue, &vi);
obs_frontend_add_event_callback(
on_preview_scene_changed, &context);
if (obs_frontend_preview_program_mode_active()) {
context.current_source =
obs_frontend_get_current_preview_scene();
} else {
context.current_source =
obs_frontend_get_current_scene();
}
obs_add_main_render_callback(render_preview_source,
&context);
obs_output_set_media(context.output,
context.video_queue,
obs_get_audio());
obs_output_start(context.output);
preview_output_running = true;
obs_frontend_add_event_callback(on_preview_scene_changed,
&context);
if (obs_frontend_preview_program_mode_active()) {
context.current_source =
obs_frontend_get_current_preview_scene();
} else {
context.current_source =
obs_frontend_get_current_scene();
}
obs_add_main_render_callback(render_preview_source, &context);
obs_output_set_media(context.output, context.video_queue,
obs_get_audio());
bool started = obs_output_start(context.output);
preview_output_running = started;
doUI->PreviewOutputStateChanged(started);
if (!started)
preview_output_stop();
}
}
void preview_output_stop()
void preview_output_toggle()
{
if (preview_output_running) {
obs_output_stop(context.output);
video_output_stop(context.video_queue);
obs_remove_main_render_callback(render_preview_source,
&context);
obs_frontend_remove_event_callback(on_preview_scene_changed,
&context);
obs_source_release(context.current_source);
obs_enter_graphics();
gs_stagesurface_destroy(context.stagesurface);
gs_texrender_destroy(context.texrender);
obs_leave_graphics();
video_output_close(context.video_queue);
preview_output_running = false;
}
if (preview_output_running)
preview_output_stop();
else
preview_output_start();
}
void on_preview_scene_changed(enum obs_frontend_event event, void *param)

View file

@ -1,8 +1,6 @@
#pragma once
void output_start();
void output_stop();
void output_toggle();
OBSData load_settings();
void preview_output_start();
void preview_output_stop();
OBSData load_preview_settings();
void preview_output_toggle();
OBSData load_preview_settings();

View file

@ -42,7 +42,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>-1</number>
<number>6</number>
</property>
<item>
<spacer name="horizontalSpacer">
@ -58,16 +58,12 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="startOutput">
<widget class="QPushButton" name="outputButton">
<property name="text">
<string>Start</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="stopOutput">
<property name="text">
<string>Stop</string>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
@ -99,21 +95,30 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="startPreviewOutput">
<widget class="QPushButton" name="previewOutputButton">
<property name="text">
<string>Start</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="stopPreviewOutput">
<property name="text">
<string>Stop</string>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="keyerLabel">
<property name="text">

View file

@ -1,35 +1,43 @@
SceneSwitcher="Автоматичен превключвател на сцени"
SceneSwitcher.OnNoMatch.DontSwitch="Не превключвай"
SceneSwitcher.OnNoMatch="Когато прозорците не съвпадат:"
SceneSwitcher.OnNoMatch.DontSwitch="Без превключване"
SceneSwitcher.OnNoMatch.SwitchTo="Превключи на:"
SceneSwitcher.CheckInterval="Проверка название на активния прозорец всеки:"
SceneSwitcher.ActiveOrNotActive="Превключвателят на сцени е:"
InvalidRegex.Title="Невалиден регулярен израз"
InvalidRegex.Text="Въведохте невалиден регулярен израз."
Active="Активен"
Inactive="Изключен"
Start="Начало"
Stop="Край"
Captions="Надписи (експериментално)"
Captions.AudioSource="Аудио източник"
Captions.CurrentSystemLanguage="Текущ основен език (%1)"
Captions.AudioSource="Звуков източник"
Captions.CurrentSystemLanguage="Текущ език на системата (%1)"
Captions.Provider="Доставчик"
Captions.Error.GenericFail="Неуспешно зареждане на надписи"
OutputTimer="Изходен таймер"
OutputTimer.Stream="Прекъсни излъчването след:"
OutputTimer.Record="Прекъсни записването след:"
OutputTimer.Stream.StoppingIn="Излъчването ще спре след:"
OutputTimer.Record.StoppingIn="Записването ще спре след:"
OutputTimer.Stream.EnableEverytime="Показвай брояча на излъчването всеки път"
OutputTimer.Record.EnableEverytime="Включване на таймера при запис всеки път"
OutputTimer.Record.PauseTimer="Пауза на таймера при пауза на записа"
Scripts="Скриптове"
LoadedScripts="Заредени скриптове"
AddScripts="Добавяне скриптове"
RemoveScripts="Премахване скриптове"
ReloadScripts="Опресняване скриптове"
PythonSettings="Настройки Python"
AddScripts="Добавяне на скриптове"
RemoveScripts="Премахване на скриптове"
ReloadScripts="Презареждане на скриптове"
PythonSettings="Настройки на Python"
PythonSettings.PythonInstallPath32bit="Път за инсталация на Python (32 бита)"
PythonSettings.PythonInstallPath64bit="Път за инсталация на Python (64 бита)"
PythonSettings.BrowsePythonPath="Разглеждане на пътя до Python"
ScriptLogWindow="Записи на скриптове"
Description="Описание"
FileFilter.ScriptFiles="Файлове със скрипт"
FileFilter.AllFiles="Всички файлове"

View file

@ -4,7 +4,7 @@ SceneSwitcher.OnNoMatch.DontSwitch="Nicht wechseln"
SceneSwitcher.OnNoMatch.SwitchTo="Wechseln zu:"
SceneSwitcher.CheckInterval="Titel des aktiven Fensters überprüfen alle:"
SceneSwitcher.ActiveOrNotActive="Szenenwechsler ist:"
InvalidRegex.Title="Ungültiger, regulärer Ausdruck"
InvalidRegex.Title="Ungültiger regulärer Ausdruck"
InvalidRegex.Text="Der reguläre Ausdruck, den Sie eingegeben haben, ist ungültig."
Active="Aktiv"
Inactive="Inaktiv"
@ -18,8 +18,8 @@ Captions.Provider="Service"
Captions.Error.GenericFail="Fehler beim Starten der Untertitel"
OutputTimer="Ausgabetimer"
OutputTimer.Stream="Stoppe Stream nach:"
OutputTimer.Record="Stoppe Aufnahme nach:"
OutputTimer.Stream="Stream stoppen nach:"
OutputTimer.Record="Aufnahme stoppen nach:"
OutputTimer.Stream.StoppingIn="Stream stoppt in:"
OutputTimer.Record.StoppingIn="Aufnahme stoppt in:"
OutputTimer.Stream.EnableEverytime="Streamingtimer jedes Mal aktivieren"

View file

@ -24,6 +24,7 @@ OutputTimer.Stream.StoppingIn="Lähetys pysäytetään:"
OutputTimer.Record.StoppingIn="Tallennus pysäytetään:"
OutputTimer.Stream.EnableEverytime="Ota lähetysajastin käyttöön aina"
OutputTimer.Record.EnableEverytime="Ota tallennusajastin käyttöön aina"
OutputTimer.Record.PauseTimer="Pysäytä ajastin kun tallennus on pysäytettynä"
Scripts="Skriptit"
LoadedScripts="Ladatut skriptit"

View file

@ -24,6 +24,7 @@ OutputTimer.Stream.StoppingIn="Thèid an sruthadh a chur na stad às dèidh:"
OutputTimer.Record.StoppingIn="Thèid an clàradh a chur na stad às dèidh:"
OutputTimer.Stream.EnableEverytime="Cuir tìmear an t-sruthaidh an comas gach turas"
OutputTimer.Record.EnableEverytime="Cuir tìmear a chlàraidh an comas gach turas"
OutputTimer.Record.PauseTimer="Cuir an tìmear na stad nuair a bhios an clàradh na stad"
Scripts="Sgriobtaichean"
LoadedScripts="Sgriobtaichean luchdaichte"

View file

@ -13,7 +13,7 @@ Stop="Stopp"
Captions="Bildetekster (eksperimentell)"
Captions.AudioSource="Lyd kilde"
Captions.CurrentSystemLanguage="Någjeldende System Språk"
Captions.CurrentSystemLanguage="Någjeldende System Språk (%1)"
Captions.Provider="Leverandør"
Captions.Error.GenericFail="Feilet å starte undertekst"
@ -24,6 +24,7 @@ OutputTimer.Stream.StoppingIn="Streaming stopper om:"
OutputTimer.Record.StoppingIn="Opptak stopper om:"
OutputTimer.Stream.EnableEverytime="Aktiver strømmeklokken hver gang"
OutputTimer.Record.EnableEverytime="Aktiver opptaksklokken hver gang"
OutputTimer.Record.PauseTimer="Sett stoppeklokken på pause når innspilling er pauset"
Scripts="Skripter"
LoadedScripts="Innlastede skripter"

View file

@ -24,6 +24,7 @@ OutputTimer.Stream.StoppingIn="Streamovanie za zastaví za:"
OutputTimer.Record.StoppingIn="Nahrávanie za zastaví za:"
OutputTimer.Stream.EnableEverytime="Povoliť časovač streamovania zakaždým"
OutputTimer.Record.EnableEverytime="Zapnúť časovač nahrávania zakaždým"
OutputTimer.Record.PauseTimer="Pozastaviť časovač keď je nahrávanie pozastavené"
Scripts="Skripty"
LoadedScripts="Načítané skripty"

View file

@ -2,7 +2,7 @@ SceneSwitcher="Samodejno preklapljanje prizorov"
SceneSwitcher.OnNoMatch="Ko se nobeno okno ne ujema:"
SceneSwitcher.OnNoMatch.DontSwitch="Ne preklopi"
SceneSwitcher.OnNoMatch.SwitchTo="Preklopi na:"
SceneSwitcher.CheckInterval="Preveri naziv dejavnega okna vsakih:"
SceneSwitcher.CheckInterval="Preveri naziv aktivnega okna vsakih:"
SceneSwitcher.ActiveOrNotActive="Preklopnik prizorov je:"
InvalidRegex.Title="Neveljaven regularni izraz"
InvalidRegex.Text="Vneseni regularni izraz ni veljaven."

View file

@ -24,6 +24,7 @@ OutputTimer.Stream.StoppingIn="Прекидање емитовања за:"
OutputTimer.Record.StoppingIn="Прекидање снимања за:"
OutputTimer.Stream.EnableEverytime="Укључи тајмер стримовања сваки пут"
OutputTimer.Record.EnableEverytime="Укључи тајмер снимања сваки пут"
OutputTimer.Record.PauseTimer="Паузирај тајмер када је снимање паузирано"
Scripts="Скрипте"
LoadedScripts="Учитане скрипте"

View file

@ -22,7 +22,7 @@ OutputTimer.Stream="Dừng stream sau:"
OutputTimer.Record="Dừng ghi video sau:"
OutputTimer.Stream.StoppingIn="Stream sẽ dừng trong:"
OutputTimer.Record.StoppingIn="Quay video sẽ dừng trong:"
OutputTimer.Stream.EnableEverytime="Bật hẹn giờ phát trực tuyến mỗi lần"
OutputTimer.Stream.EnableEverytime="Bật hẹn giờ phát luồng mỗi lần"
OutputTimer.Record.EnableEverytime="Bật hẹn giờ phát mỗi lần"
Scripts="Kịch bản"
@ -30,7 +30,7 @@ LoadedScripts="Kịch bản đã nạp"
AddScripts="Thêm script"
RemoveScripts="Gỡ bỏ kịch bản"
ReloadScripts="Nạp lại kịch bản"
PythonSettings="Thiết lập Python"
PythonSettings="Thiết đặt Python"
PythonSettings.PythonInstallPath32bit="Đường dẫn cài đặt Python (32bit)"
PythonSettings.PythonInstallPath64bit="Đường dẫn cài đặt Python (64bit)"
PythonSettings.BrowsePythonPath="Duyệt đường dẫn Python"

View file

@ -111,7 +111,7 @@ function script_properties()
local sources = obs.obs_enum_sources()
if sources ~= nil then
for _, source in ipairs(sources) do
source_id = obs.obs_source_get_id(source)
source_id = obs.obs_source_get_unversioned_id(source)
if source_id == "text_gdiplus" or source_id == "text_ft2_source" then
local name = obs.obs_source_get_name(source)
obs.obs_property_list_add_string(p, name, name)

View file

@ -66,7 +66,7 @@ def script_properties():
sources = obs.obs_enum_sources()
if sources is not None:
for source in sources:
source_id = obs.obs_source_get_id(source)
source_id = obs.obs_source_get_unversioned_id(source)
if source_id == "text_gdiplus" or source_id == "text_ft2_source":
name = obs.obs_source_get_name(source)
obs.obs_property_list_add_string(p, name, name)

View file

@ -232,6 +232,19 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>streamingTimerHours</tabstop>
<tabstop>streamingTimerMinutes</tabstop>
<tabstop>streamingTimerSeconds</tabstop>
<tabstop>outputTimerStream</tabstop>
<tabstop>autoStartStreamTimer</tabstop>
<tabstop>recordingTimerHours</tabstop>
<tabstop>recordingTimerMinutes</tabstop>
<tabstop>recordingTimerSeconds</tabstop>
<tabstop>outputTimerRecord</tabstop>
<tabstop>autoStartRecordTimer</tabstop>
<tabstop>pauseRecordTimer</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View file

@ -180,8 +180,8 @@ void OutputTimer::UpdateStreamTimerDisplay()
int minutes = (remainingTime % 3600) / 60;
int hours = remainingTime / 3600;
QString text;
text.sprintf("%02d:%02d:%02d", hours, minutes, seconds);
QString text =
QString::asprintf("%02d:%02d:%02d", hours, minutes, seconds);
ui->streamTime->setText(text);
}
@ -199,8 +199,8 @@ void OutputTimer::UpdateRecordTimerDisplay()
int minutes = (remainingTime % 3600) / 60;
int hours = remainingTime / 3600;
QString text;
text.sprintf("%02d:%02d:%02d", hours, minutes, seconds);
QString text =
QString::asprintf("%02d:%02d:%02d", hours, minutes, seconds);
ui->recordTime->setText(text);
}