问题标签 [python-gstreamer]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 在 PyGI 中获取窗口句柄
在我的程序中,我使用 PyGObject/PyGI 和 GStreamer 在我的 GUI 中显示视频。视频显示在 a 中Gtk.DrawingArea
,因此我需要在realize
-signal-handler 中获取它的窗口句柄。在 Linux 上,我使用以下方法获得该句柄:
但是如何在 Windows 上获取句柄?
我在互联网上搜索,但只找到了使用 PyGtk 的示例,window.handle
而使用 PyGI 则不起作用。
GStreamer 文档提供了一个使用宏来获取句柄的示例。GDK_WINDOW_HWND
此宏使用 AFAIK gdk_win32_drawable_get_handle
。但是如何使用 PyGI 在 Python 中做到这一点?
28 年 7 月 15 日更新:添加(简化)代码
我仍然无法在 Windows 上播放视频。
问题 1:我无法在 _on_video_realize() 中获取窗口句柄。
问题 2:永远不会调用 _on_player_sync_message() 方法。
python - 在 GStreamer 0.10 中的不同源之间切换不起作用
我正在尝试在两个流之间切换,input-selector
但出现错误:
这是我的 Python 代码:
我认为这两个功能只是你需要的。我写它是为了测试input-stream
元素。发生的事情是,None
当我尝试获取sink0
垫子时,我得到了类型。为什么 ?
python - Gstreamer 管道动态更改 Python
我一直在尝试动态更改 gstreamer 管道,但只要我更改状态,它就会停止流。我在这里绞尽脑汁是为了什么。这是我的代码:
如果有任何替代方法或任何我可以参考的教程,请建议我。提前致谢。
gstreamer - 使用 new_single_shot_id 在预定义时间后在 gstreamer 中发送 eos
我有一个 gstreamer 应用程序,我在其中创建带有图像的视频。我需要为预定义的时间创建视频。我想在预定义的时间之后发送 eos。我知道这可以使用 gstClock 中的 new_single_shot_id 来实现。但我找不到任何关于如何使用 new_single_shot_id 创建触发器的示例,该触发器绑定到将 eos 发送到管道的函数。
我的简化管道代码是这样的。
我是 gstreamer 的新手,没有 c 编程经验。python中的示例将有很大帮助。
python - How to create gstreamer pipe in python and open in OpenCV
Hi I want to create the following pipe in python.
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
I have tried the following
What am I doing wrong ?
I read the following questions : Question 1
python - GLib.Error:gst_parse_error:没有元素“zbar”
错误:
按照python gstreamer script error message no element "h264parse"的答案,我发现zbar
是 的一部分gst-plugins-bad
,但我已经安装了gst-plugins-bad 1.4.5-1
。那么为什么我仍然收到此错误?
如果有帮助,我正在使用 Arch Linux。
linux - GStreamer:如何将 1 个文件循环播放?
有了这个:
我怎么能强制该 test.ogg 文件的无限循环?
python - 部署 python-gst。Windows 上的 Pyinstaller 在 gi 包上失败 - DLL 加载失败
我正在尝试部署一个在 python (python-gst) 中运行 gstreamer 绑定的程序。我为此使用 pyinstaller。我正在运行 Windows 7,python-2.7 64 位。这是一个最小的工作示例 - pyinstallertest.py:
然后我运行pyinstaller foo.spec
没有任何错误或警告,其中 foo.spec 是以下文件:
在 \dist\pytest\ 中运行生成的 pytest.exe 时,它会失败并出现以下错误:
关于如何解决这个问题的任何想法,或者在包含 gstreamer(和 gi 包)的 Windows 中部署 python 程序的替代方法?
python - 无法在 pygst 中的 GstXvImageSink 上获取 GstBaseSink 的属性
我正在尝试从 GstBaseSink 派生的 GstXvImageSink 访问“last-sample”属性。我越来越:
TypeError:“GstXvImageSink”类型的对象没有属性“last-sample”
有没有一种特殊的方法可以从 pygtk 中的基类获取属性,或者这个属性是否以某种方式隐藏?
代码: