Skip to main content

A module that makes GstBase.BaseTransform python-compatible

Project description

Build Status

gstbasetransform is a module that aims to provide a patched GstBase.BaseTransform class usable from python.

Source code repository and issue tracker:
LGPL 2.1 – see the file LICENSE for details.


gstbasetransform should work with python 2.7 and python 3.4+.

You will first need to install PyGObject and python-gst, as they are not available on pip. You can then install the latest version of gstbasetransform with pip:

pip install gstbasetransform


gstbasetransform provides a subclass of GstBase.BaseTransform, also called BaseTransform, whose do_transform_size virtual method has been patched to be usable in python.

In the original do_transform_size virtual method, the othersize parameter that represents the size of the output buffer is an int, and is passed by copy, preventing it from being changed. In gstbasetransform.BaseTransform, it has been removed, and the size of the output buffer can be set with a return value of the method.

The signature of the method is:

do_transform_size(direction, caps, size, othercaps)

and it should return a tuple (bool, int), where the int is the size of the output buffer.

See the file for a basic example.


Thanks to Dustin Spicuzza for writing pygi-treeview-dnd, which served as a base for writing gstbasetransform.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gstbasetransform, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size gstbasetransform-0.1.0-py2.py3-none-any.whl (15.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size gstbasetransform-0.1.0.tar.gz (17.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page