我在克隆的repo中运行./autogen.sh并且它没有说出以下内容:
configure: No package 'gstreamer-plugins-base-1.0' found
configure: error: no gstreamer-plugins-base-1.0 >= 1.14.1 (GStreamer Base Plugins) found
configure failed
我在我的Ubuntu上安装了gstreamer(base,good,bad和ugly).构建脚本查找的包名称是gstreamer-plugins-base-1.0,其中系统包的名称为gstreamer1.0-plugins-base.
深入了解autoconf设置,我发现了以下内容:
if test -z $GSTPB_PLUGINS_DIR; then
GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-[$1]`
if test -z $GSTPB_PLUGINS_DIR; then
AC_MSG_ERROR(
[no pluginsdir set in GStreamer Base Plugins pkg-config file])
fi
fi
不应该是gstreamer [$1] -plugins-base?我在这里错过了什么吗?
更新:
通过安装libgstreamer1.0-dev和libgstreamer-plugins-base1.0-dev开发软件包修复了上述问题
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
如果默认情况下未安装GIntrospection,请运行以下命令
sudo apt-get build-dep gstreamer1.0
./autogen.sh将完成并制作&& sudo make install也会正常运行.
当前状态:示例不构建稳定的二进制文件.运行c示例segfault和python示例,simple.py,抱怨命名空间中缺少GES.
Traceback (most recent call last):
File "simple.py", line 26, in <module>
gi.require_version('GES', '1.0')
File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 130, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GES not available
仅供参考:Simple.py看起来像这样
import gi
gi.require_version('Gst', '1.0')
gi.require_version('GES', '1.0')
from gi.repository import Gst, GES, GLib # noqa
class Simple:
def __init__(self, uri):
timeline = GES.Timeline.new_audio_video()
self.project = timeline.get_asset()
self.project.connect("asset-added", self._asset_added_cb)
self.project.connect("error-loading-asset", self._error_loading_asset_cb)
self.project.create_asset(uri, GES.UriClip)
self.layer = timeline.append_layer()
self._create_pipeline(timeline)
self.loop = GLib.MainLoop()
def _create_pipeline(self, timeline):
self.pipeline = GES.Pipeline()
self.pipeline.set_timeline(timeline)
bus = self.pipeline.get_bus()
bus.add_signal_watch()
bus.connect("message", self.bus_message_cb)
def bus_message_cb(self, unused_bus, message):
if message.type == Gst.MessageType.EOS:
print("eos")
self.loop.quit()
elif message.type == Gst.MessageType.ERROR:
error = message.parse_error()
print("error %s" % error[1])
self.loop.quit()
def start(self):
self.loop.run()
def _asset_added_cb(self, project, asset):
self.layer.add_asset(asset, 0, 0, Gst.SECOND * 5, GES.TrackType.UNKNOWN)
self.pipeline.set_state(Gst.State.PLAYING)
def _error_loading_asset_cb(self, project, error, asset_id, type):
print("Could not load asset %s: %s" % (asset_id, error))
self.loop.quit()
if __name__ == "__main__":
if len(os.sys.argv) != 2:
print("You must specify a file URI")
exit(-1)
Gst.init(None)
GES.init()
simple = Simple(os.sys.argv[1])
simple.start()
运行C示例simple1.c失败,并显示以下内容:
(simple1:15606): GLib-GObject-WARNING **: 12:42:28.910: invalid (NULL) pointer instance
(simple1:15606): GLib-GObject-CRITICAL **: 12:42:28.910: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(simple1:15606): GLib-GObject-WARNING **: 12:42:28.910: invalid (NULL) pointer instance
(simple1:15606): GLib-GObject-CRITICAL **: 12:42:28.910: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(simple1:15606): GLib-GObject-CRITICAL **: 12:42:28.910: g_object_set: assertion 'G_IS_OBJECT (object)' failed
[1] 15606 segmentation fault (core dumped) ./simple1 ~/Downloads/out.mp4
运行gdb,
gst-editing-services/examples/c/simple1": not in executable format: File format not recognized
更新
使用Meson构建系统重建示例.这启用了在gdb中运行bin.得到以下
Program received signal SIGSEGV, Segmentation fault.
ges_track_constructed (object=<optimized out>) at ../ges/ges-track.c:506
506 componame =
表明它在ges-track.c失败了.相关代码如下:
if (self->type == GES_TRACK_TYPE_VIDEO) {
componame =
g_strdup_printf ("video_%s", GST_OBJECT_NAME (self->priv->composition));
} else if (self->type == GES_TRACK_TYPE_AUDIO) {
componame = // This is where it errirs
g_strdup_printf ("audio_%s", GST_OBJECT_NAME (self->priv->composition));
}
逐行进入它.以下是揭晓的.
0x00007ffff701c2cd in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffc980,
operate=0x7ffff54530d0 <dlsym_doit>, args=0x7fffffffc9f0) at dl-error-skeleton.c:194
194 dl-error-skeleton.c: No such file or directory.
最佳答案 看起来它与GES内部有关.在内部,glib对象不是正确创建的,都是NULL.为什么你有无效(NULL)指针实例.
我能够在我的mac上运行示例.包装不匹配似乎是这里的问题.