Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
d3c163b7
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d3c163b7
编写于
8月 11, 2017
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Fix Stats not showing stream data until start
上级
65049533
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
16 deletion
+15
-16
UI/window-basic-stats.cpp
UI/window-basic-stats.cpp
+14
-15
UI/window-basic-stats.hpp
UI/window-basic-stats.hpp
+1
-1
未找到文件。
UI/window-basic-stats.cpp
浏览文件 @
d3c163b7
...
@@ -388,8 +388,8 @@ void OBSBasicStats::Update()
...
@@ -388,8 +388,8 @@ void OBSBasicStats::Update()
/* ------------------------------------------- */
/* ------------------------------------------- */
/* recording/streaming stats */
/* recording/streaming stats */
outputLabels
[
0
].
Update
(
strOutput
);
outputLabels
[
0
].
Update
(
strOutput
,
false
);
outputLabels
[
1
].
Update
(
recOutput
);
outputLabels
[
1
].
Update
(
recOutput
,
true
);
}
}
void
OBSBasicStats
::
Reset
()
void
OBSBasicStats
::
Reset
()
...
@@ -411,15 +411,9 @@ void OBSBasicStats::Reset()
...
@@ -411,15 +411,9 @@ void OBSBasicStats::Reset()
Update
();
Update
();
}
}
void
OBSBasicStats
::
OutputLabels
::
Update
(
obs_output_t
*
output
)
void
OBSBasicStats
::
OutputLabels
::
Update
(
obs_output_t
*
output
,
bool
rec
)
{
{
if
(
!
output
)
uint64_t
totalBytes
=
output
?
obs_output_get_total_bytes
(
output
)
:
0
;
return
;
const
char
*
id
=
obs_obj_get_id
(
output
);
bool
rec
=
strcmp
(
id
,
"rtmp_output"
)
!=
0
;
uint64_t
totalBytes
=
obs_output_get_total_bytes
(
output
);
uint64_t
curTime
=
os_gettime_ns
();
uint64_t
curTime
=
os_gettime_ns
();
uint64_t
bytesSent
=
totalBytes
;
uint64_t
bytesSent
=
totalBytes
;
...
@@ -439,12 +433,17 @@ void OBSBasicStats::OutputLabels::Update(obs_output_t *output)
...
@@ -439,12 +433,17 @@ void OBSBasicStats::OutputLabels::Update(obs_output_t *output)
QString
str
=
QTStr
(
"Basic.Stats.Status.Inactive"
);
QString
str
=
QTStr
(
"Basic.Stats.Status.Inactive"
);
QString
themeID
;
QString
themeID
;
bool
active
=
output
?
obs_output_active
(
output
)
:
false
;
if
(
rec
)
{
if
(
rec
)
{
if
(
obs_output_active
(
output
)
)
if
(
active
)
str
=
QTStr
(
"Basic.Stats.Status.Recording"
);
str
=
QTStr
(
"Basic.Stats.Status.Recording"
);
}
else
{
}
else
{
if
(
obs_output_active
(
output
))
{
if
(
active
)
{
if
(
obs_output_reconnecting
(
output
))
{
bool
reconnecting
=
output
?
obs_output_reconnecting
(
output
)
:
false
;
if
(
reconnecting
)
{
str
=
QTStr
(
"Basic.Stats.Status.Reconnecting"
);
str
=
QTStr
(
"Basic.Stats.Status.Reconnecting"
);
themeID
=
"error"
;
themeID
=
"error"
;
}
else
{
}
else
{
...
@@ -465,8 +464,8 @@ void OBSBasicStats::OutputLabels::Update(obs_output_t *output)
...
@@ -465,8 +464,8 @@ void OBSBasicStats::OutputLabels::Update(obs_output_t *output)
QString
(
"%1 kb/s"
).
arg
(
QString
::
number
(
kbps
,
'f'
,
0
)));
QString
(
"%1 kb/s"
).
arg
(
QString
::
number
(
kbps
,
'f'
,
0
)));
if
(
!
rec
)
{
if
(
!
rec
)
{
int
total
=
o
bs_output_get_total_frames
(
output
)
;
int
total
=
o
utput
?
obs_output_get_total_frames
(
output
)
:
0
;
int
dropped
=
o
bs_output_get_frames_dropped
(
output
)
;
int
dropped
=
o
utput
?
obs_output_get_frames_dropped
(
output
)
:
0
;
if
(
total
<
first_total
||
dropped
<
first_dropped
)
{
if
(
total
<
first_total
||
dropped
<
first_dropped
)
{
first_total
=
0
;
first_total
=
0
;
...
...
UI/window-basic-stats.hpp
浏览文件 @
d3c163b7
...
@@ -42,7 +42,7 @@ class OBSBasicStats : public QWidget {
...
@@ -42,7 +42,7 @@ class OBSBasicStats : public QWidget {
int
first_total
=
0
;
int
first_total
=
0
;
int
first_dropped
=
0
;
int
first_dropped
=
0
;
void
Update
(
obs_output_t
*
output
);
void
Update
(
obs_output_t
*
output
,
bool
rec
);
void
Reset
(
obs_output_t
*
output
);
void
Reset
(
obs_output_t
*
output
);
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录