Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
15251056
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,发现更多精彩内容 >>
提交
15251056
编写于
9月 25, 2014
作者:
A
Alexander Smorkalov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed compatibility with GStreamer 1.x
上级
cc6e6aa0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
6 deletion
+19
-6
modules/videoio/src/cap_gstreamer.cpp
modules/videoio/src/cap_gstreamer.cpp
+14
-5
modules/videoio/test/test_basic_props.cpp
modules/videoio/test/test_basic_props.cpp
+5
-1
未找到文件。
modules/videoio/src/cap_gstreamer.cpp
浏览文件 @
15251056
...
...
@@ -788,26 +788,32 @@ bool CvCapture_GStreamer::open( int type, const char* filename )
duration
=
-
1
;
}
GstPad
*
pad
=
gst_element_get_pad
(
color
,
"src"
);
GstPad
*
pad
=
gst_element_get_static_pad
(
color
,
"src"
);
#if GST_VERSION_MAJOR == 0
GstCaps
*
buffer_caps
=
gst_pad_get_caps
(
pad
);
#else
GstCaps
*
buffer_caps
=
gst_pad_get_current_caps
(
pad
);
#endif
const
GstStructure
*
structure
=
gst_caps_get_structure
(
buffer_caps
,
0
);
if
(
!
gst_structure_get_int
(
structure
,
"width"
,
&
width
))
{
CV_WARN
(
"Cannot query video width
\n
"
);
}
if
(
!
gst_structure_get_int
(
structure
,
"height"
,
&
height
))
{
CV_WARN
(
"Cannot query video heigth
\n
"
);
if
(
!
gst_structure_get_int
(
structure
,
"height"
,
&
height
))
CV_WARN
(
"Cannot query video heigth
\n
"
);
}
gint
num
=
0
,
denom
=
1
;
if
(
!
gst_structure_get_fraction
(
structure
,
"framerate"
,
&
num
,
&
denom
))
{
CV_WARN
(
"Cannot query video fps
\n
"
);
}
fps
=
(
double
)
num
/
(
double
)
denom
;
// GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(pipeline), GST_DEBUG_GRAPH_SHOW_ALL, "pipeline");
}
else
...
...
@@ -1217,8 +1223,11 @@ bool CvVideoWriter_GStreamer::open( const char * filename, int fourcc,
gboolean
done
=
FALSE
;
GstElement
*
element
=
NULL
;
gchar
*
name
=
NULL
;
#if GST_VERSION_MAJOR == 0
GstElement
*
splitter
=
NULL
;
GstElement
*
combiner
=
NULL
;
#endif
// we first try to construct a pipeline from the given string.
// if that fails, we assume it is an ordinary filename
...
...
modules/videoio/test/test_basic_props.cpp
浏览文件 @
15251056
...
...
@@ -51,7 +51,11 @@ using namespace cv;
using
namespace
std
;
using
namespace
cvtest
;
const
string
ext
[]
=
{
"avi"
};
//, "mov", "mp4"};
#ifdef HAVE_GSTREAMER
const
string
ext
[]
=
{
"avi"
};
#else
const
string
ext
[]
=
{
"avi"
,
"mov"
,
"mp4"
};
#endif
TEST
(
Videoio_Video
,
prop_resolution
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录