构建Gstreamer Editing Services失败 [英] Building Gstreamer Editing Services fails
问题描述
我在克隆的存储库中运行./autogen.sh
,但无法显示以下内容:
I run ./autogen.sh
inside the cloned repo and it fails saying the following:
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(基本,好,坏和丑陋).构建脚本查找的软件包名称为gstreamer-plugins-base-1.0
,其中系统软件包的名称为gstreamer1.0-plugins-base
.
I have gstreamer (base, good, bad and ugly) installed on my Ubuntu. The package name that the build script looks for is gstreamer-plugins-base-1.0
where as the system package is by the name gstreamer1.0-plugins-base
.
深入研究autoconf设置,我发现了以下内容:
Digging into the autoconf setup I found the following:
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
吗?我在这里想念东西吗?
Shouldn't it be gstreamer[$1]-plugins-base
? Am I missing something here?
通过安装libgstreamer1.0-dev
和libgstreamer-plugins-base1.0-dev
dev软件包修复了上述问题
Fixed the above by installing libgstreamer1.0-dev
and libgstreamer-plugins-base1.0-dev
dev packages
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
如果默认情况下未安装GIntrospection,请运行以下命令
In case GIntrospection isn't installed by default, run the following
sudo apt-get build-dep gstreamer1.0
./autogen.sh
将完成,并且make && sudo make install
也将正常运行.
./autogen.sh
would complete and make && sudo make install
will run fine too.
当前状态:示例无法构建稳定的二进制文件.运行c示例segfault和python示例simple.py
会抱怨名称空间中缺少GES
.
Current status: Examples don't build stable binaries. Running c examples segfault and python example, simple.py
, complains of missing GES
in the namespace.
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看起来像这样
Just for reference: Simple.py looks like this
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失败,并显示以下内容:
Running the C example, simple1.c, fails with the following:
(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中运行垃圾箱.得到了以下
Update
Rebuilt the examples using Meson build system. This enabled running the bins in gdb. Got the following
Program received signal SIGSEGV, Segmentation fault.
ges_track_constructed (object=<optimized out>) at ../ges/ges-track.c:506
506 componame =
表明它在ges-track.c上失败.相关代码如下:
Indicating that it failed at ges-track.c. Relevant code below:
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));
}
逐行进入.显示了以下内容.
Stepping into it line by line. The following was revealed.
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.为什么会有invalid (NULL) pointer instance
.
It looks like it has to do with GES internals. Internally, glib objects are not created right and are all NULL. Why is why you have the invalid (NULL) pointer instance
.
我能够在Mac上运行示例.软件包不匹配似乎是这里的问题.
I was able to run the examples on my mac. Package mismatches seems to be the issue here.
这篇关于构建Gstreamer Editing Services失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!