Commit graph

1431 commits

Author SHA1 Message Date
Sebastian Dröge
10707f437f Fix build with Python 3.8 by also checking for python-3.X-embed.pc
Since Python 3.8 the normal checks don't include the Python libraries
anymore and linking of the gst-python module would fail.

See also https://github.com/mesonbuild/meson/issues/5629

Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
2019-12-13 10:48:04 +02:00
Thibault Saunier
986d6d12fb example: Use do_fill in AudioTestSrc instead of do_create
With the new mapping API we can efficiently use the ->fill vmethod
which is sensibly better.
2019-12-11 08:32:44 -03:00
Thibault Saunier
d365954fc0 Subclass Exception for mapping and unmapping errors
And minor cleanup in the way errors are handled
2019-12-10 12:05:19 -03:00
Philipp Zabel
6d53d0ae0e tests: Add buffer map/unmap tests 2019-12-09 21:03:19 +01:00
Daniel Klamt
fecfe451a7 Changes the mapinfo so that the mapped data is writable
The Problem is, that in the current state it is not easily possible to
edit the buffer data in a gstreamer python element since you get a copy
of the real buffer.

This patch overrides the mapinfo and the function generating it in a way
so that mapinfo.data is now a memoryview pointing to the real buffer.
Depending on the flags given for this buffer the memoryview is r/w.
2019-12-09 09:23:55 +01:00
Thibault Saunier
91d05de9b9 python: Fix type type qualifiers issues 2019-11-28 10:47:07 -03:00
Thibault Saunier
95b2f64394 Remove python2 support
We have notified application developers this would happen a long time
ago and python2 is going to be deprecated very soon now, before 1.18
is going to be released.
2019-11-19 11:18:59 -03:00
Tim-Philipp Müller
acb2da66f5 Remove autotools build 2019-10-14 19:08:47 +01:00
Mathieu Duponchelle
c04bb945b0 overrides: fix callback setter overrides (bis)
The previous commit broke those by trying to pass weak refs
through pygobject, but we should probably have tested the elements
beyond instantiation: weakref.WeakMethod returns a callable, but
that callable when called only returns the ephemeral bound method,
which is the object we want to call, but pygobject has no support
for that.

Instead, fix the memory leaks we were going after by decoupling the
lifecycle of the callback and that of the pad, by passing functors
to pygobject.
2019-09-02 18:42:39 +02:00
Mathieu Duponchelle
34e0e3ce11 overrides: fix callback setter overrides
Use weakref to avoid leaks, and remove refcount hack as the actual
issue has been fixed in pygobject
2019-08-08 23:35:16 +00:00
Thibault Saunier
42a27817bc suppr: Add a supression on wrong jump in python from fedora 30 2019-08-08 10:58:06 -04:00
Mathieu Duponchelle
dae8210e0f meson: expose plugins variable 2019-05-26 16:20:08 +02:00
Thibault Saunier
6fcd2c835f override Element before Bin so we can access element fields of bins
And add a test

See https://gitlab.gnome.org/GNOME/pygobject/issues/325
2019-05-06 11:30:47 -04:00
Mathieu Duponchelle
2e91b713f1 Gst.py: add high-level helpers 2019-05-03 15:12:02 +00:00
Tim-Philipp Müller
6e51428cbd Back to development 2019-04-19 11:00:07 +01:00
Tim-Philipp Müller
7f1b5fe985 Release 1.16.0 2019-04-19 00:37:16 +01:00
Luis de Bethencourt
0bb109b5a6 Update TODO 2019-04-11 15:00:15 -04:00
Tim-Philipp Müller
996f54ac25 Release 1.15.90 2019-04-11 00:38:39 +01:00
Tim-Philipp Müller
30cc0fc83d Back to development 2019-03-04 09:15:26 +00:00
Tim-Philipp Müller
5a5eae51f9 Release 1.15.2 2019-02-26 12:00:59 +00:00
Thibault Saunier
96ecb22468 Gst.init() has to be called before GstPbutils is imported
This makes sure that we do not try to use GstPbutils before Gst is init
and in case GstPbutils is imported while Gst is not imported, use the
`GstPbutils.pb_utils_init()` function to have the oportunity to
initialize the overrides.

Not that we also introduce a `GstPbutils.init()` variant because
`GstPbutils.pb_utils_init()` is an ugly name.
2019-01-30 15:46:35 -03:00
Thibault Saunier
8e42b63201 meson: Re add workarounds to detect libpython path
This was removed all together in af4ade3743
"meson: use new python module".

And add `-Dlibpython-dir` option for the cases the logic fails.
2019-01-22 17:02:52 -03:00
Tim-Philipp Müller
fcfcbe76d3 Release 1.15.1 2019-01-17 02:33:53 +00:00
Antonio Ospite
1cece5bde5 overrides: add a set_caps() method to the Pad override
The C API provides the gst_pad_set_caps() helper which makes it easier
to set caps on pads (see gst/gstcompat.h in gstreamer core).

Add such handy helper to the python bindings too.

The implementation follows as close as possible the one in gstcompat.h
with two changes:
  1. the type check on the pad has been removed because self is
     guaranteed to be a Gst.Pad in python.
  2. the null check on the caps has been extended to be a type check.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/issues/19
2019-01-09 12:32:37 +01:00
Tim-Philipp Müller
a37b7c7a13 autogen.sh: update to match updated common submodule
Unbreaks the autotools build and fixes #15.
2018-12-30 23:53:03 +00:00
Tim-Philipp Müller
7b1dcdab58 Fix indentation of .c files
Required to make gst-indent linter on CI happy.
2018-12-15 13:55:07 +00:00
Thibault Saunier
31a98a889e Update common submodule 2018-12-05 18:43:14 -03:00
Jordan Petridis
86f7386fab
Add Gitlab CI configuration
This commit adds a .gitlab-ci.yml file, which uses a feature
to fetch the config from a centralized repository. The intent is
to have all the gstreamer modules use the same configuration.

The configuration is currently hosted at the gst-ci repository
under the gitlab/ci_template.yml path.

Part of https://gitlab.freedesktop.org/gstreamer/gstreamer-project/issues/29
2018-11-12 13:26:58 +02:00
Matthew Waters
93c7308eca Update git locations to gitlab 2018-11-05 05:51:05 +00:00
Mathieu Duponchelle
f79ac2d143 Tests: the sys.meta_path trick does not work for python2
Instead, for python2 revert to manipulating gi.overrides.__path__
2018-10-31 17:02:24 +01:00
Mathieu Duponchelle
d64bbc1e0c Tests: refactor testing approach
Instead of fiddling with sys.path, we instead use a custom
sys.meta_path importer
2018-10-31 00:41:31 +01:00
Mathieu Duponchelle
ae3ffd3ac8 meson: address python module port comments 2018-10-31 00:41:03 +01:00
Havard Graff
af4ade3743 meson: use new python module
This patch makes the tests pass running uninstalled and installed, with
python2 and python3 on linux, windows and osx.

The main gist is to use the new python-module to do the lifting done
by pythondetector, and with that add support for python2 and windows.
2018-10-28 17:53:44 +01:00
Mathieu Duponchelle
a15ed715f0 automake: remove __init__.py's 2018-10-28 17:53:08 +01:00
Mathieu Duponchelle
055e2e17ec Remove __init__.py files
They were not installed, and were simply used for our
uninstalled setup, which we now implement differently.
2018-10-28 14:14:09 +01:00
Mathieu Duponchelle
11a2fa995a meson: add pygobject fallback 2018-10-27 18:04:11 +02:00
Mathieu Duponchelle
4ce52c0211 Examples: add audiotestsrc plugin example 2018-07-29 20:06:09 +02:00
Mathieu Duponchelle
71bb950965 Examples: add audioplot plugin example 2018-07-29 20:05:52 +02:00
Mathieu Duponchelle
6cf081fa11 Examples: add mixer plugin example 2018-07-29 19:51:34 +02:00
Mathieu Duponchelle
6fcc1433d7 examples: add a dynamic pipeline example 2018-07-20 17:00:22 +02:00
Mathieu Duponchelle
71d4c9f989 helloworld: fix typo 2018-07-20 15:58:35 +02:00
Havard Graff
e9d615bf53 gstmodule: fix warning when building against python2
PyMapping_GetItemString’ discards ‘const’ qualifier from pointer target type

https://bugzilla.gnome.org/show_bug.cgi?id=796093
2018-05-14 07:51:43 -04:00
Tim-Philipp Müller
548dead568 Fix distcheck 2018-05-01 15:01:11 +01:00
Tim-Philipp Müller
c20e6d4453 meson: drop config.h.meson template 2018-05-01 12:10:42 +01:00
Thibault Saunier
f1c3050f2c Bump pygobject dependency to 3.8 2018-04-25 15:11:31 -03:00
Emilio Pozuelo Monfort
e84b9b05f2 overrides: use get_introspection_module
https://bugzilla.gnome.org/show_bug.cgi?id=795555
2018-04-25 15:10:28 -03:00
Thibault Saunier
861a67bde6 overrides: Fix mixup between query function and chain one 2018-04-07 21:47:29 -03:00
Tim-Philipp Müller
f77c69cceb Dist autogen.sh and configure.ac 2018-04-03 13:28:16 +01:00
Tim-Philipp Müller
31c33043d8 Back to development 2018-03-20 10:27:38 +00:00
Tim-Philipp Müller
38d95adb18 Release 1.14.0 2018-03-19 20:29:29 +00:00