无法从GSTREAMER获取AppSRC元素
我需要制作Gstreamer音频管道以重定向音频流。 GSTREAMER已由VCPG(V 1.19.2)构建。
我还从MSI文件安装了 有同样的问题。
项目是由Visual Studio 2019制成的。
我成功地从工厂获得了一些元素:
GstElement* queue2 = gst_element_factory_make("queue", "queue");
GstElement* audio_sink = gst_element_factory_make("autoaudiosink", "sink");
但是仍然无法获取AppSRC元素:
GstElement* app_source = gst_element_factory_make("appsrc", "source"); // null !!!
看来存在相关插件(GST-INPECT):
appsrc: Factory Details:
appsrc: Rank none (0)
appsrc: Long-name AppSrc
appsrc: Klass Generic/Source
appsrc: Description Allow the application to feed buffers to a pipeline
appsrc: Author David Schleef <[email protected]>, Wim Taymans <[email protected]>
appsrc:
appsrc: Plugin Details:
appsrc: Name app
appsrc: Description Elements used to communicate with applications
appsrc: Filename C:\src\vcpkg\installed\x64-windows\bin\gstapp.dll
appsrc: Version 1.19.2
appsrc: License LGPL
appsrc: Source module gst-plugins-base
appsrc: Source release date 2021-09-23
appsrc: Binary package GStreamer Base Plug-ins source release
appsrc: Origin URL Unknown package origin
appsrc:
appsrc: GObject
appsrc: +----GInitiallyUnowned
appsrc: +----GstObject
appsrc: +----GstElement
appsrc: +----GstBaseSrc
appsrc: +----GstAppSrc
...
我测试了:
GstPlugin* pl = gst_plugin_load_file("C:\\src\\vcpkg\\installed\\x64-windows\\bin\\gstapp.dll",&error);
// still NULL... after warning message "specified module not found"
但是相同的代码与其他插件一起使用。 ”
“ gstcoreelement.dll
GList* list, * walk;
list = gst_registry_feature_filter(registry, filter_vis_features, FALSE, NULL);
for (walk = list; walk != NULL; walk = g_list_next(walk)) {
const gchar* name;
GstElementFactory* factory;
factory = GST_ELEMENT_FACTORY(walk->data);
name = gst_element_factory_get_longname(factory);
g_print(" %s\n", name);
// returns notably: AppSink and AppSrc
}
GList *list2 = gst_registry_plugin_filter(registry, filter_vis_plugins, FALSE, NULL);
for (walk = list2; walk != NULL; walk = g_list_next(walk)) {
const gchar* name;
GstPlugin* plugin;
plugin = GST_PLUGIN(walk->data);
name = gst_plugin_get_filename(plugin);
g_print(" ---- %s\n", name);
name = gst_plugin_get_name(plugin);
g_print(" ---- %s\n", name);
// ---- C:\src\vcpkg\installed\x64-windows\bin\gstapp.dll
// ---- app
}
例如 “ g_module_open_full”功能。
我现在不知道为什么,因为Debug Infos停止了“未找到的Gmodule-win32.c”。
任何想法,提示,线索(,解决方案)都将不胜感激。
I need to make a GStreamer audio pipeline to redirect audio stream.
GStreamer has been built from vcpg (v 1.19.2).
I also made an install from msi file,
with same issue.
Project is made with Visual Studio 2019.
I succeed to get some elements from factories :
GstElement* queue2 = gst_element_factory_make("queue", "queue");
GstElement* audio_sink = gst_element_factory_make("autoaudiosink", "sink");
but still failed to get appsrc element:
GstElement* app_source = gst_element_factory_make("appsrc", "source"); // null !!!
It appears that relevant plugin exists (gst-inpect):
appsrc: Factory Details:
appsrc: Rank none (0)
appsrc: Long-name AppSrc
appsrc: Klass Generic/Source
appsrc: Description Allow the application to feed buffers to a pipeline
appsrc: Author David Schleef <[email protected]>, Wim Taymans <[email protected]>
appsrc:
appsrc: Plugin Details:
appsrc: Name app
appsrc: Description Elements used to communicate with applications
appsrc: Filename C:\src\vcpkg\installed\x64-windows\bin\gstapp.dll
appsrc: Version 1.19.2
appsrc: License LGPL
appsrc: Source module gst-plugins-base
appsrc: Source release date 2021-09-23
appsrc: Binary package GStreamer Base Plug-ins source release
appsrc: Origin URL Unknown package origin
appsrc:
appsrc: GObject
appsrc: +----GInitiallyUnowned
appsrc: +----GstObject
appsrc: +----GstElement
appsrc: +----GstBaseSrc
appsrc: +----GstAppSrc
...
I tested:
GstPlugin* pl = gst_plugin_load_file("C:\\src\\vcpkg\\installed\\x64-windows\\bin\\gstapp.dll",&error);
// still NULL... after warning message "specified module not found"
However same code works with other plugins. e.g. "gstcoreelements.dll"
Strangely, looping on element factories and plugins show me what I need:
GList* list, * walk;
list = gst_registry_feature_filter(registry, filter_vis_features, FALSE, NULL);
for (walk = list; walk != NULL; walk = g_list_next(walk)) {
const gchar* name;
GstElementFactory* factory;
factory = GST_ELEMENT_FACTORY(walk->data);
name = gst_element_factory_get_longname(factory);
g_print(" %s\n", name);
// returns notably: AppSink and AppSrc
}
GList *list2 = gst_registry_plugin_filter(registry, filter_vis_plugins, FALSE, NULL);
for (walk = list2; walk != NULL; walk = g_list_next(walk)) {
const gchar* name;
GstPlugin* plugin;
plugin = GST_PLUGIN(walk->data);
name = gst_plugin_get_filename(plugin);
g_print(" ---- %s\n", name);
name = gst_plugin_get_name(plugin);
g_print(" ---- %s\n", name);
// ---- C:\src\vcpkg\installed\x64-windows\bin\gstapp.dll
// ---- app
}
Using break points, it seems that module loading failed in glib
"g_module_open_full" function.
I don't know why at the moment, because debug infos stopped with "gmodule-win32.c not found".
Any idea, tip, clue (,solution) will be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后,通过在.EXE目录中添加GSTAPP-1.0-0.dll来使其正常工作。
Finally get it working by adding gstapp-1.0-0.dll in .exe directory.