c++ - 如何将 GstVideoOrientationInterface 添加到 Gst 管道?
问题描述
我正在尝试旋转/翻转由 plabin 元素(在 C++ 中)播放的视频。我想要做的类似于问题Rotate a Video in gstreamer中提出的问题,但我不喜欢依赖 videoflip 元素。相反,我想使用 gst 中的 GstVideoOrientation 接口(https://thiblahute.github.io/GStreamer-doc/gst-plugins-base-video-1.0/videoorientation.html?gi-language=c#interfaces)视频库(https://thiblahute.github.io/GStreamer-doc/gst-plugins-base-video-1.0/index.html?gi-language=c)。
接口本身的文档以及如何使用它非常清楚,但我不明白如何将这样的接口添加到 GstElement。
在https://gstreamer.freedesktop.org/documentation/application-development/advanced/interfaces.html和https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/interfaces.html中有一些文档,但我仍然无法弄清楚这是如何工作的。
下面是我正在使用的代码示例:
#include <gst/video/video.h>
#include <gst/gst.h>
gint
main (gint argc, gchar * argv[])
{
//...
GstElement *pipeline;
pipeline = NULL;
gst_init (NULL,NULL);
pipeline = gst_element_factory_make("playbin", "playbin");
g_object_set (pipeline, "uri", "an_uri", NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
//...
return 0;
}
任何帮助都会得到帮助
非常感谢
解决方案
推荐阅读
- c - 为什么子进程运行代码意味着父进程
- python - 有没有办法从表格的两列生成 matplotlib 图?
- c# - 在 Visual Studio C# 中发出 Ping 请求
- javascript - 将嵌套的excel数据显示为json中的一个数据
- javascript - 如何向下滚动并在同一页面上显示部分?
- reactjs - 为什么在 React 中,render() 方法与“this”关键字配合得很好
- java - gradle如何将另一个子项目的代码和资源添加到子项目中
- sql - 使用和不使用 TIMEZONE 存储 DATETIME
- sql - SQL 拓扑排序
- c# - ASP.NET 网络服务安全?