Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
3377ddaf
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3377ddaf
编写于
12月 07, 2020
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19041 from alalek:issue_19025
上级
2c634eee
962f5c9b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
1 deletion
+10
-1
modules/videoio/src/cap_gstreamer.cpp
modules/videoio/src/cap_gstreamer.cpp
+2
-0
modules/videoio/test/test_video_io.cpp
modules/videoio/test/test_video_io.cpp
+8
-1
未找到文件。
modules/videoio/src/cap_gstreamer.cpp
浏览文件 @
3377ddaf
...
...
@@ -1062,6 +1062,8 @@ double GStreamerCapture::getProperty(int propId) const
switch
(
propId
)
{
case
CV_CAP_PROP_POS_MSEC
:
CV_LOG_ONCE_WARNING
(
NULL
,
"OpenCV | GStreamer: CAP_PROP_POS_MSEC property result may be unrealiable: "
"https://github.com/opencv/opencv/issues/19025"
);
format
=
GST_FORMAT_TIME
;
status
=
gst_element_query_position
(
sink
.
get
(),
CV_GST_FORMAT
(
format
),
&
value
);
if
(
!
status
)
{
...
...
modules/videoio/test/test_video_io.cpp
浏览文件 @
3377ddaf
...
...
@@ -237,6 +237,11 @@ public:
if
(
!
isBackendAvailable
(
apiPref
,
cv
::
videoio_registry
::
getStreamBackends
()))
throw
SkipTestException
(
cv
::
String
(
"Backend is not available/disabled: "
)
+
cv
::
videoio_registry
::
getBackendName
(
apiPref
));
// GStreamer: https://github.com/opencv/opencv/issues/19025
if
(
apiPref
==
CAP_GSTREAMER
)
throw
SkipTestException
(
cv
::
String
(
"Backend "
)
+
cv
::
videoio_registry
::
getBackendName
(
apiPref
)
+
cv
::
String
(
" does not return reliable values for CAP_PROP_POS_MSEC property"
));
if
(((
apiPref
==
CAP_FFMPEG
)
&&
((
ext
==
"h264"
)
||
(
ext
==
"h265"
))))
throw
SkipTestException
(
cv
::
String
(
"Backend "
)
+
cv
::
videoio_registry
::
getBackendName
(
apiPref
)
+
cv
::
String
(
" does not support CAP_PROP_POS_MSEC option"
));
...
...
@@ -253,10 +258,12 @@ public:
double
timestamp
=
0
;
ASSERT_NO_THROW
(
cap
>>
img
);
EXPECT_NO_THROW
(
timestamp
=
cap
.
get
(
CAP_PROP_POS_MSEC
));
if
(
cvtest
::
debugLevel
>
0
)
std
::
cout
<<
"i = "
<<
i
<<
": timestamp = "
<<
timestamp
<<
std
::
endl
;
const
double
frame_period
=
1000.
f
/
bunny_param
.
getFps
();
// NOTE: eps == frame_period, because videoCapture returns frame begining timestamp or frame end
// timestamp depending on codec and back-end. So the first frame has timestamp 0 or frame_period.
EXPECT_NEAR
(
timestamp
,
i
*
frame_period
,
frame_period
);
EXPECT_NEAR
(
timestamp
,
i
*
frame_period
,
frame_period
)
<<
"i="
<<
i
;
}
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录