Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
0f10c081
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0f10c081
编写于
4月 18, 2020
作者:
C
Colin Edwards
提交者:
GitHub
4月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2720 from Bennik2000/status_icons_streaming_recording
UI: Add status icons for recording and streaming
上级
e15f4e44
d8e67d2f
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
364 addition
and
14 deletion
+364
-14
UI/forms/images/recording-active.svg
UI/forms/images/recording-active.svg
+37
-0
UI/forms/images/recording-inactive.svg
UI/forms/images/recording-inactive.svg
+37
-0
UI/forms/images/recording-pause-inactive.svg
UI/forms/images/recording-pause-inactive.svg
+45
-0
UI/forms/images/recording-pause.svg
UI/forms/images/recording-pause.svg
+45
-0
UI/forms/images/streaming-active.svg
UI/forms/images/streaming-active.svg
+55
-0
UI/forms/images/streaming-inactive.svg
UI/forms/images/streaming-inactive.svg
+55
-0
UI/forms/obs.qrc
UI/forms/obs.qrc
+6
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+4
-0
UI/window-basic-status-bar.cpp
UI/window-basic-status-bar.cpp
+68
-14
UI/window-basic-status-bar.hpp
UI/window-basic-status-bar.hpp
+12
-0
未找到文件。
UI/forms/images/recording-active.svg
0 → 100644
浏览文件 @
0f10c081
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
id=
"svg8"
version=
"1.1"
viewBox=
"0 0 2.1166666 2.1166667"
height=
"8"
width=
"8"
>
<defs
id=
"defs2"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform=
"translate(0,-294.88332)"
id=
"layer1"
>
<circle
r=
"0.52916664"
cy=
"295.94165"
cx=
"1.0583333"
id=
"path4544"
style=
"fill:#d40000;fill-opacity:1;stroke:none;stroke-width:0.06614584;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
</g>
</svg>
UI/forms/images/recording-inactive.svg
0 → 100644
浏览文件 @
0f10c081
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
id=
"svg8"
version=
"1.1"
viewBox=
"0 0 2.1166666 2.1166667"
height=
"8"
width=
"8"
>
<defs
id=
"defs2"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform=
"translate(0,-294.88332)"
id=
"layer1"
>
<circle
r=
"0.52916664"
cy=
"295.94165"
cx=
"1.0583333"
id=
"path4544"
style=
"fill:#999999;fill-opacity:1;stroke:none;stroke-width:0.06614584;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
</g>
</svg>
UI/forms/images/recording-pause-inactive.svg
0 → 100644
浏览文件 @
0f10c081
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
id=
"svg8"
version=
"1.1"
viewBox=
"0 0 5.2916665 5.2916668"
height=
"20"
width=
"20"
>
<defs
id=
"defs2"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform=
"translate(0,-291.70832)"
id=
"layer1"
>
<rect
y=
"293.03125"
x=
"1.3229166"
height=
"2.6458333"
width=
"1.0583333"
id=
"rect822"
style=
"fill:#999999;fill-opacity:1;stroke:none;stroke-width:0.5020116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<rect
y=
"293.03125"
x=
"2.9104166"
height=
"2.6458333"
width=
"1.0583333"
id=
"rect822-1"
style=
"fill:#999999;fill-opacity:1;stroke:none;stroke-width:0.5020116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
</g>
</svg>
UI/forms/images/recording-pause.svg
0 → 100644
浏览文件 @
0f10c081
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
id=
"svg8"
version=
"1.1"
viewBox=
"0 0 5.2916665 5.2916668"
height=
"20"
width=
"20"
>
<defs
id=
"defs2"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform=
"translate(0,-291.70832)"
id=
"layer1"
>
<rect
y=
"293.03125"
x=
"1.3229166"
height=
"2.6458333"
width=
"1.0583333"
id=
"rect822"
style=
"fill:#d4ae00;fill-opacity:1;stroke:none;stroke-width:0.5020116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<rect
y=
"293.03125"
x=
"2.9104166"
height=
"2.6458333"
width=
"1.0583333"
id=
"rect822-1"
style=
"fill:#d4ae00;fill-opacity:1;stroke:none;stroke-width:0.5020116;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
</g>
</svg>
UI/forms/images/streaming-active.svg
0 → 100644
浏览文件 @
0f10c081
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
id=
"svg8"
version=
"1.1"
viewBox=
"0 0 2.1166666 2.1166667"
height=
"8"
width=
"8"
>
<defs
id=
"defs2"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform=
"translate(0,-294.88332)"
id=
"layer1"
>
<circle
r=
"0.39687499"
cy=
"295.94165"
cx=
"1.0582843"
id=
"path4544-3"
style=
"fill:#5079cc;fill-opacity:1;stroke:none;stroke-width:0.13229169;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
d=
"M 0.41577997,296.5497 A 0.79374999,0.79374999 0 0 1 0.13224262,295.94165 0.79374999,0.79374999 0 0 1 0.41577996,295.3336"
id=
"path4546-7"
style=
"fill:none;fill-opacity:1;stroke:#5079cc;stroke-width:0.15875001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
transform=
"scale(-1,1)"
d=
"m -1.7008867,296.5497 a 0.79374999,0.79374999 0 0 1 -0.2835374,-0.60805 0.79374999,0.79374999 0 0 1 0.2835374,-0.60805"
id=
"path4546-1-3"
style=
"fill:none;fill-opacity:1;stroke:#5079cc;stroke-width:0.15875001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
d=
"M 0.63239977,296.41847 A 0.62244385,0.62244385 0 0 1 0.4100551,295.94165 0.62244385,0.62244385 0 0 1 0.63239977,295.46483"
id=
"path4546-5-7"
style=
"fill:none;fill-opacity:1;stroke:#5079cc;stroke-width:0.15875001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
transform=
"scale(-1,1)"
d=
"m -1.484193,296.41847 a 0.62244391,0.62244391 0 0 1 -0.2223447,-0.47682 0.62244391,0.62244391 0 0 1 0.2223447,-0.47682"
id=
"path4546-5-4-2"
style=
"fill:none;fill-opacity:1;stroke:#5079cc;stroke-width:0.15875001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
</g>
</svg>
UI/forms/images/streaming-inactive.svg
0 → 100644
浏览文件 @
0f10c081
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
id=
"svg8"
version=
"1.1"
viewBox=
"0 0 2.1166666 2.1166667"
height=
"8"
width=
"8"
>
<defs
id=
"defs2"
/>
<metadata
id=
"metadata5"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform=
"translate(0,-294.88332)"
id=
"layer1"
>
<circle
r=
"0.39687499"
cy=
"295.94165"
cx=
"1.0583333"
id=
"path4544"
style=
"fill:#7f7d7f;fill-opacity:1;stroke:none;stroke-width:0.13229167;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
d=
"M 0.41582902,296.5497 A 0.79374999,0.79374999 0 0 1 0.13229167,295.94165 0.79374999,0.79374999 0 0 1 0.41582902,295.3336"
id=
"path4546"
style=
"fill:none;fill-opacity:1;stroke:#7f7d7f;stroke-width:0.15875;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
transform=
"scale(-1,1)"
d=
"m -1.7009357,296.5497 a 0.79374999,0.79374999 0 0 1 -0.2835373,-0.60805 0.79374999,0.79374999 0 0 1 0.2835373,-0.60805"
id=
"path4546-1"
style=
"fill:none;fill-opacity:1;stroke:#7f7d7f;stroke-width:0.15875;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
d=
"M 0.6324488,296.41847 A 0.6224438,0.6224438 0 0 1 0.41010416,295.94165 0.6224438,0.6224438 0 0 1 0.6324488,295.46483"
id=
"path4546-5"
style=
"fill:none;fill-opacity:1;stroke:#7f7d7f;stroke-width:0.15875;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
<path
transform=
"scale(-1,1)"
d=
"m -1.484242,296.41847 a 0.62244385,0.62244385 0 0 1 -0.2223447,-0.47682 0.62244385,0.62244385 0 0 1 0.2223447,-0.47682"
id=
"path4546-5-4"
style=
"fill:none;fill-opacity:1;stroke:#7f7d7f;stroke-width:0.15875;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
/>
</g>
</svg>
UI/forms/obs.qrc
浏览文件 @
0f10c081
...
...
@@ -34,6 +34,12 @@
<file>images/sources/text.svg</file>
<file>images/sources/window.svg</file>
<file>images/sources/default.svg</file>
<file>images/recording-active.svg</file>
<file>images/recording-inactive.svg</file>
<file>images/recording-pause.svg</file>
<file>images/recording-pause-inactive.svg</file>
<file>images/streaming-active.svg</file>
<file>images/streaming-inactive.svg</file>
</qresource>
<qresource prefix="/settings">
<file>images/settings/output.svg</file>
...
...
UI/window-basic-main.cpp
浏览文件 @
0f10c081
...
...
@@ -7714,6 +7714,8 @@ void OBSBasic::PauseRecording()
pause
->
setChecked
(
true
);
pause
->
blockSignals
(
false
);
ui
->
statusbar
->
RecordingPaused
();
if
(
trayIcon
)
trayIcon
->
setIcon
(
QIcon
(
":/res/images/obs_paused.png"
));
...
...
@@ -7741,6 +7743,8 @@ void OBSBasic::UnpauseRecording()
pause
->
setChecked
(
false
);
pause
->
blockSignals
(
false
);
ui
->
statusbar
->
RecordingUnpaused
();
if
(
trayIcon
)
trayIcon
->
setIcon
(
QIcon
(
":/res/images/tray_active.png"
));
...
...
UI/window-basic-status-bar.cpp
浏览文件 @
0f10c081
...
...
@@ -11,18 +11,36 @@ OBSBasicStatusBar::OBSBasicStatusBar(QWidget *parent)
:
QStatusBar
(
parent
),
delayInfo
(
new
QLabel
),
droppedFrames
(
new
QLabel
),
streamIcon
(
new
QLabel
),
streamTime
(
new
QLabel
),
recordIcon
(
new
QLabel
),
recordTime
(
new
QLabel
),
cpuUsage
(
new
QLabel
),
transparentPixmap
(
20
,
20
),
greenPixmap
(
20
,
20
),
grayPixmap
(
20
,
20
),
redPixmap
(
20
,
20
)
redPixmap
(
20
,
20
),
recordingActivePixmap
(
QIcon
(
":/res/images/recording-active.svg"
)
.
pixmap
(
QSize
(
20
,
20
))),
recordingPausePixmap
(
QIcon
(
":/res/images/recording-pause.svg"
)
.
pixmap
(
QSize
(
20
,
20
))),
recordingPauseInactivePixmap
(
QIcon
(
":/res/images/recording-pause-inactive.svg"
)
.
pixmap
(
QSize
(
20
,
20
))),
recordingInactivePixmap
(
QIcon
(
":/res/images/recording-inactive.svg"
)
.
pixmap
(
QSize
(
20
,
20
))),
streamingActivePixmap
(
QIcon
(
":/res/images/streaming-active.svg"
)
.
pixmap
(
QSize
(
20
,
20
))),
streamingInactivePixmap
(
QIcon
(
":/res/images/streaming-inactive.svg"
)
.
pixmap
(
QSize
(
20
,
20
)))
{
streamTime
->
setText
(
QString
(
"LIVE: 00:00:00"
));
recordTime
->
setText
(
QString
(
"REC: 00:00:00"
));
cpuUsage
->
setText
(
QString
(
"CPU: 0.0%, 0.00 fps"
));
streamIcon
->
setPixmap
(
streamingInactivePixmap
);
recordIcon
->
setPixmap
(
recordingInactivePixmap
);
QWidget
*
brWidget
=
new
QWidget
(
this
);
QHBoxLayout
*
brLayout
=
new
QHBoxLayout
(
brWidget
);
brLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
@@ -39,8 +57,12 @@ OBSBasicStatusBar::OBSBasicStatusBar(QWidget *parent)
delayInfo
->
setAlignment
(
Qt
::
AlignVCenter
);
droppedFrames
->
setAlignment
(
Qt
::
AlignRight
);
droppedFrames
->
setAlignment
(
Qt
::
AlignVCenter
);
streamIcon
->
setAlignment
(
Qt
::
AlignRight
);
streamIcon
->
setAlignment
(
Qt
::
AlignVCenter
);
streamTime
->
setAlignment
(
Qt
::
AlignRight
);
streamTime
->
setAlignment
(
Qt
::
AlignVCenter
);
recordIcon
->
setAlignment
(
Qt
::
AlignRight
);
recordIcon
->
setAlignment
(
Qt
::
AlignVCenter
);
recordTime
->
setAlignment
(
Qt
::
AlignRight
);
recordTime
->
setAlignment
(
Qt
::
AlignVCenter
);
cpuUsage
->
setAlignment
(
Qt
::
AlignRight
);
...
...
@@ -50,13 +72,15 @@ OBSBasicStatusBar::OBSBasicStatusBar(QWidget *parent)
delayInfo
->
setIndent
(
20
);
droppedFrames
->
setIndent
(
20
);
stream
Time
->
setIndent
(
20
);
record
Time
->
setIndent
(
20
);
stream
Icon
->
setIndent
(
20
);
record
Icon
->
setIndent
(
20
);
cpuUsage
->
setIndent
(
20
);
kbps
->
setIndent
(
10
);
addPermanentWidget
(
droppedFrames
);
addPermanentWidget
(
streamIcon
);
addPermanentWidget
(
streamTime
);
addPermanentWidget
(
recordIcon
);
addPermanentWidget
(
recordTime
);
addPermanentWidget
(
cpuUsage
);
addPermanentWidget
(
delayInfo
);
...
...
@@ -93,6 +117,14 @@ void OBSBasicStatusBar::Activate()
statusSquare
->
setPixmap
(
grayPixmap
);
}
}
if
(
streamOutput
)
{
streamIcon
->
setPixmap
(
streamingActivePixmap
);
}
if
(
recordOutput
)
{
recordIcon
->
setPixmap
(
recordingActivePixmap
);
}
}
void
OBSBasicStatusBar
::
Deactivate
()
...
...
@@ -103,11 +135,13 @@ void OBSBasicStatusBar::Deactivate()
if
(
!
streamOutput
)
{
streamTime
->
setText
(
QString
(
"LIVE: 00:00:00"
));
streamIcon
->
setPixmap
(
streamingInactivePixmap
);
totalStreamSeconds
=
0
;
}
if
(
!
recordOutput
)
{
recordTime
->
setText
(
QString
(
"REC: 00:00:00"
));
recordIcon
->
setPixmap
(
recordingInactivePixmap
);
totalRecordSeconds
=
0
;
}
...
...
@@ -247,25 +281,26 @@ void OBSBasicStatusBar::UpdateRecordTime()
{
bool
paused
=
os_atomic_load_bool
(
&
recording_paused
);
if
(
!
paused
)
if
(
!
paused
)
{
totalRecordSeconds
++
;
QString
text
;
if
(
paused
)
{
text
=
QStringLiteral
(
"REC: PAUSED"
);
}
else
{
int
seconds
=
totalRecordSeconds
%
60
;
int
totalMinutes
=
totalRecordSeconds
/
60
;
int
minutes
=
totalMinutes
%
60
;
int
hours
=
totalMinutes
/
60
;
text
=
QString
::
asprintf
(
"REC: %02d:%02d:%02d"
,
hours
,
minutes
,
seconds
);
}
QString
text
=
QString
::
asprintf
(
"REC: %02d:%02d:%02d"
,
hours
,
minutes
,
seconds
);
recordTime
->
setText
(
text
);
recordTime
->
setMinimumWidth
(
recordTime
->
width
());
recordTime
->
setText
(
text
);
recordTime
->
setMinimumWidth
(
recordTime
->
width
());
}
else
{
recordIcon
->
setPixmap
(
streamPauseIconToggle
?
recordingPauseInactivePixmap
:
recordingPausePixmap
);
streamPauseIconToggle
=
!
streamPauseIconToggle
;
}
}
void
OBSBasicStatusBar
::
UpdateDroppedFrames
()
...
...
@@ -483,3 +518,22 @@ void OBSBasicStatusBar::RecordingStopped()
recordOutput
=
nullptr
;
Deactivate
();
}
void
OBSBasicStatusBar
::
RecordingPaused
()
{
QString
text
=
QStringLiteral
(
"REC: PAUSED"
);
recordTime
->
setText
(
text
);
recordTime
->
setMinimumWidth
(
recordTime
->
width
());
if
(
recordOutput
)
{
recordIcon
->
setPixmap
(
recordingPausePixmap
);
streamPauseIconToggle
=
true
;
}
}
void
OBSBasicStatusBar
::
RecordingUnpaused
()
{
if
(
recordOutput
)
{
recordIcon
->
setPixmap
(
recordingActivePixmap
);
}
}
UI/window-basic-status-bar.hpp
浏览文件 @
0f10c081
...
...
@@ -14,8 +14,10 @@ class OBSBasicStatusBar : public QStatusBar {
private:
QLabel
*
delayInfo
;
QLabel
*
droppedFrames
;
QLabel
*
streamIcon
;
QLabel
*
streamTime
;
QLabel
*
recordTime
;
QLabel
*
recordIcon
;
QLabel
*
cpuUsage
;
QLabel
*
kbps
;
QLabel
*
statusSquare
;
...
...
@@ -24,6 +26,7 @@ private:
obs_output_t
*
recordOutput
=
nullptr
;
bool
active
=
false
;
bool
overloadedNotify
=
true
;
bool
streamPauseIconToggle
=
false
;
int
retries
=
0
;
int
totalStreamSeconds
=
0
;
...
...
@@ -48,6 +51,13 @@ private:
QPixmap
grayPixmap
;
QPixmap
redPixmap
;
QPixmap
recordingActivePixmap
;
QPixmap
recordingPausePixmap
;
QPixmap
recordingPauseInactivePixmap
;
QPixmap
recordingInactivePixmap
;
QPixmap
streamingActivePixmap
;
QPixmap
streamingInactivePixmap
;
float
lastCongestion
=
0.0
f
;
QPointer
<
QTimer
>
refreshTimer
;
...
...
@@ -81,6 +91,8 @@ public:
void
StreamStopped
();
void
RecordingStarted
(
obs_output_t
*
output
);
void
RecordingStopped
();
void
RecordingPaused
();
void
RecordingUnpaused
();
void
ReconnectClear
();
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录