Skip to content

Commit

Permalink
Merge pull request #47 from OPENSPHERE-Inc/patch-1.0.0
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
hanatyan128 authored Dec 17, 2024
2 parents 61fe69f + 59486c8 commit 7ad5b7b
Show file tree
Hide file tree
Showing 9 changed files with 655 additions and 653 deletions.
10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ if(ENABLE_QT)
endif()

target_sources(
${CMAKE_PROJECT_NAME}
PRIVATE src/plugin-main.cpp
src/plugin-ui.cpp
src/plugin-audio.cpp
src/utils.cpp
src/audio/audio-capture.cpp
src/UI/output-status-dock.cpp
src/UI/resources.qrc)
${CMAKE_PROJECT_NAME} PRIVATE src/plugin-main.cpp src/plugin-ui.cpp src/utils.cpp src/audio/audio-capture.cpp
src/UI/output-status-dock.cpp src/UI/resources.qrc)

set_target_properties_plugin(${CMAKE_PROJECT_NAME} PROPERTIES OUTPUT_NAME ${_name})
2 changes: 1 addition & 1 deletion buildspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"name": "osi-branch-output",
"displayName": "Branch Output Plugin",
"version": "0.9.18",
"version": "1.0.0",
"author": "OPENSPHERE Inc.",
"website": "https://opensphere.co.jp/",
"email": "[email protected]",
Expand Down
19 changes: 9 additions & 10 deletions src/UI/output-status-dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ BranchOutputStatusDock::BranchOutputStatusDock(QWidget *parent) : QFrame(parent)

interlockLabel = new QLabel(QTStr("Interlock"), this);
interlockComboBox = new QComboBox(this);
interlockComboBox->addItem(QTStr("AlwaysOn"), INTERLOCK_TYPE_ALWAYS_ON);
interlockComboBox->addItem(QTStr("Streaming"), INTERLOCK_TYPE_STREAMING);
interlockComboBox->addItem(QTStr("Recording"), INTERLOCK_TYPE_RECORDING);
interlockComboBox->addItem(QTStr("StreamingOrRecording"), INTERLOCK_TYPE_STREAMING_RECORDING);
interlockComboBox->addItem(QTStr("VirtualCam"), INTERLOCK_TYPE_VIRTUAL_CAM);
interlockComboBox->addItem(QTStr("AlwaysOn"), BranchOutputFilter::INTERLOCK_TYPE_ALWAYS_ON);
interlockComboBox->addItem(QTStr("Streaming"), BranchOutputFilter::INTERLOCK_TYPE_STREAMING);
interlockComboBox->addItem(QTStr("Recording"), BranchOutputFilter::INTERLOCK_TYPE_RECORDING);
interlockComboBox->addItem(QTStr("StreamingOrRecording"), BranchOutputFilter::INTERLOCK_TYPE_STREAMING_RECORDING);
interlockComboBox->addItem(QTStr("VirtualCam"), BranchOutputFilter::INTERLOCK_TYPE_VIRTUAL_CAM);

auto buttonsContainerLayout = new QHBoxLayout();
buttonsContainerLayout->addWidget(enableAllButton);
Expand Down Expand Up @@ -192,8 +192,7 @@ void BranchOutputStatusDock::addFilter(BranchOutputFilter *filter)
auto otr = new OutputTableRow(this);

otr->filter = filter;
otr->filterCell =
new FilterCell(QString::fromUtf8(obs_source_get_name(filter->filterSource)), filter->filterSource, this);
otr->filterCell = new FilterCell(filter->name, filter->filterSource, this);
otr->parentCell = new ParentCell(obs_source_get_name(parent), parent, this);
otr->status = new StatusCell(QTStr("Status.Inactive"), this);
otr->status->setIcon(QPixmap(":/branch-output/images/streaming.svg").scaled(16, 16));
Expand Down Expand Up @@ -279,7 +278,7 @@ void BranchOutputStatusDock::setEabnleAll(bool enabled)
BranchOutputFilter *BranchOutputStatusDock::findFilter(const QString &parentName, const QString &filterName)
{
for (auto row : outputTableRows) {
if (filterName == obs_source_get_name(row->filter->filterSource) &&
if (filterName == row->filter->name &&
parentName == obs_source_get_name(obs_filter_get_parent(row->filter->filterSource))) {
return row->filter;
}
Expand Down Expand Up @@ -312,7 +311,7 @@ OutputTableRow::~OutputTableRow() {}
// Imitate UI/window-basic-stats.cpp
void OutputTableRow::update()
{
auto output = filter->streamOutput ? filter->streamOutput : filter->recordingOutput;
auto output = filter->streamOutput ? filter->streamOutput.Get() : filter->recordingOutput.Get();
uint64_t totalBytes = output ? obs_output_get_total_bytes(output) : 0;
uint64_t curTime = os_gettime_ns();
uint64_t bytesSent = totalBytes;
Expand Down Expand Up @@ -413,7 +412,7 @@ void OutputTableRow::update()

void OutputTableRow::reset()
{
auto output = filter->streamOutput ? filter->streamOutput : filter->recordingOutput;
auto output = filter->streamOutput ? filter->streamOutput.Get() : filter->recordingOutput.Get();
if (!output) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/UI/output-status-dock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class QTableWidget;
class QString;
class QCheckBox;
class QPushButton;
struct BranchOutputFilter;
class BranchOutputFilter;
class OutputTableRow;

class FilterCell : public QWidget {
Expand Down
37 changes: 0 additions & 37 deletions src/plugin-audio.cpp

This file was deleted.

Loading

0 comments on commit 7ad5b7b

Please sign in to comment.