gstreamer/subprojects/gst-python
Gwyn Ciesla 2be13c82aa gst-python: Fix API call for Python 3.13
_PyUnicode_AsString() is deprecated and PyUnicode_AsUTF8() should be used
instead. The new function was introduced in Python 3.3 and returns const
since Python 3.7, which is now required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5587>
2023-11-03 21:02:48 +05:30
..
examples python: Add a GstDiscoverer example 2023-08-21 17:16:27 +00:00
gi gst-python: Fix API call for Python 3.13 2023-11-03 21:02:48 +05:30
old_examples python: Add a GstDiscoverer example 2023-08-21 17:16:27 +00:00
plugin meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
scripts gst-omx: Retire the whole package 2023-07-16 19:10:03 +00:00
testsuite python: Add a suppression file for a leak in PyGObject 2022-03-29 19:16:58 +02:00
COPYING
gst-python.doap Release 1.22.0 2023-01-23 19:41:07 +00:00
meson.build gst-python: Fix API call for Python 3.13 2023-11-03 21:02:48 +05:30
meson_options.txt gst-python: Add option to disable python plugin 2021-11-10 13:38:04 -05:00
NEWS Release 1.22.0 2023-01-23 19:41:07 +00:00
README.md gst-python: add proper README and delete useless placeholder files 2023-05-29 23:46:49 +00:00
RELEASE Release 1.22.0 2023-01-23 19:41:07 +00:00

gst-python

gst-python is an extension of the regular GStreamer Python bindings based on gobject-introspection information and PyGObject.

It provides two things:

  1. "syntactic sugar" in form of overrides for various GStreamer APIs that makes them easier to use in Python and more pythonic; and

  2. support for APIs that aren't available through the regular gobject-introspection based bindings, such as e.g. GStreamer's fundamental GLib types such as Gst.Fraction, Gst.IntRange etc.

Prerequisites

These libraries are needed to build gst-python:

  • gstreamer core
  • gst-plugins-base
  • pygobject

You will also need pygobject and glib installed. On debian-based distros you can install these with:

sudo apt build-dep python3-gst-1.0

Only Python 3 is supported.

Building

meson setup builddir && ninja -C builddir
meson install -C builddir

Using

Once installed in the right place, you don't need to do anything in order to use the overrides. They will be loaded automatically on

import gi
gi.require_version('Gst', '1.0')
gi.repository import GObject, Gst

Note that additional imports will be required for other GStreamer libraries to make use of their respective APIs, e.g. GstApp or GstVideo.

License

gst-python is licensed under the LGPL 2.1