Commit graph

1399 commits

Author SHA1 Message Date
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
Tim-Philipp Müller
10ba0a08ce Release 1.13.91 2018-03-13 19:31:05 +00:00
Tim-Philipp Müller
abb68ad440 Release 1.13.90 2018-03-03 22:55:57 +00:00
Edward Hervey
2818bf3012 configure.ac: Don't use runtime location of overrides by default
If someone wants to put the overrides in a non-standard location,
they can use the --with-pygi-overrides-dir option.

The default is to put them in ${pyexecdir}/gi/overrides

Fixes make distcheck

https://bugzilla.gnome.org/show_bug.cgi?id=793756
2018-02-23 14:42:23 +01:00
Nicolas Dufresne
146b8cca43 makefiles: Add missing dist files
https://bugzilla.gnome.org/show_bug.cgi?id=793560
2018-02-22 17:05:35 -05:00
Thibault Saunier
693005716e bitmask: Do not use long() directly with python3
It doesn't exist anymore there
2018-02-22 08:05:54 -03:00
Thibault Saunier
fb9401d6e9 gi: Check Gst has not been initialized before loading bindings
It can have been initialized by some C code (in a C app with plugins
for example).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=788088
2018-02-22 07:52:24 -03:00
Sebastian Dröge
063562c986 Allow Bitmask to be created from ints and longs but always store as long
We need a 64 bit integer, and previously the test failed because it was
already created from longs in various cases (e.g. when reading from a
GstStructure).
2018-02-22 10:58:48 +01:00
Tim-Philipp Müller
e1c6f864b2 Back to development 2018-02-15 19:44:33 +00:00
Mathieu Duponchelle
8a807cc1be overrides: accept Gst.Structure in Caps.__new__
Also rename misleading parameter (*kwargs -> *args)

https://bugzilla.gnome.org/show_bug.cgi?id=793493
2018-02-15 20:23:34 +01:00
Tim-Philipp Müller
429b58ed29 Release 1.13.1 2018-02-15 17:24:36 +00:00
Sebastian Dröge
c3de24be05 Print Python version after initialization 2018-02-14 10:13:36 +02:00
Sebastian Dröge
3517f37b65 pluginloader: Print Python library path that is tried to be loaded 2018-02-14 10:10:39 +02:00
Sebastian Dröge
2dd3bb0cb7 Ship meson build system in autotools generated tarballs 2018-01-23 19:32:18 +02:00
Thibault Saunier
a8aaada019 meson: Fix detection of overrides path in some cases 2017-08-03 14:38:36 -04:00
Thibault Saunier
425990047b plugin: Always initialize GIL state
gcc warns about possibly unintialized use of it

(even if it can't actually happen)
2017-07-29 23:05:24 -04:00
Thibault Saunier
fcbca025e3 Fix simply running testsuite in meson
- Make sure to never have root folder in sys.path when running meson,
  as pythondetector won't be able to access gi._overridesdir

- Generate a mesonconfig.py file that will be used by the testsuite to
  know where meson generated files, making `python -m unittest` working.
2017-07-26 15:27:21 -04:00
Thibault Saunier
cb0dd804f7 Add support for Gst.Bitmask 2017-07-26 15:27:21 -04:00
Thibault Saunier
fe222637a6 tests: Stop using deprecated assertion methods 2017-07-26 15:27:21 -04:00
Thibault Saunier
9845c91a5f tests: Move all Fundamental types tests in a file
No reason to have one file per type and it makes it more complicated
to handle.
2017-07-26 15:27:21 -04:00
Thibault Saunier
dd943155a1 structure: Add a .keys() method and implement __str__
We are making it behave like a dict, so we should provide the
same kind of utilities.
2017-07-26 15:27:21 -04:00
Thibault Saunier
31dfe42b37 Return a Gst.*Range instead of a python range converting from GValue to python
Otherwise we lose the information about what type of range it is, which
is mandatory, especially when dealing with Structure and Caps.
2017-07-26 15:27:21 -04:00
Thibault Saunier
02ddaf29f9 structures: Override __new__ to make it more pythonic 2017-07-26 15:27:19 -04:00
Olivier Crête
24156b0b0d overrides: Remove IntRange And Int64Range on Python2
They use the range() built-in type which is a Python 3 change.

https://bugzilla.gnome.org/show_bug.cgi?id=782927
2017-05-21 18:08:36 +02:00
Olivier Crête
2cfded4834 pythonplugin: Rename plugin file to match plugin name
This is required by the new loader macro.
2017-05-21 13:16:41 +02:00
Sebastian Dröge
7352b78a39 Back to development 2017-05-04 19:00:37 +03:00
Sebastian Dröge
6981cbfbab Release 1.12.0 2017-05-04 15:40:29 +03:00
Sebastian Dröge
dddffea0f0 Release 1.11.91 2017-04-27 17:37:36 +03:00
Sebastian Dröge
09cca0831f Release 1.11.90 2017-04-07 16:35:42 +03:00
Nicolas Dufresne
d44975a1fe array/list: Make gvalue conversion symmetric
This is needed to support matrix. Otherwise, getting
a matrix would remove the rows envelopess, which would
make the "cast" fails, since it would not know if the
internal rows are ValueArray or ValueList. I think reading,
modifying and setting back the matrix is an important use
case.
2017-03-27 15:02:41 -04:00
Nicolas Dufresne
c6dee2c26b gstmodule: Factor out gst type creation
This reduces a lot the boiler plate all over. At the same
time, use N instead of O when passing PyObject to fix
the objects leaks.
2017-03-27 14:52:24 -04:00
Nicolas Dufresne
7279ae40b6 Add /build and install to the gitignore 2017-03-24 13:28:35 -04:00
Nicolas Dufresne
a4566ffbc8 overrides: Add more GstValue overrides
This patch adds overrides to support IntRange, Int64Range, DoubleRange,
FractionRange, Array and List. For integer ranges, it maps this
to python 'range'. Gst.IntRange() and Gst.Int64Range() are simple cast
to let the underlying code know which GType to use. To set such range in
python you will do:

  structure["range"] = Gst.IntRange(range(0,10,2)))

Same for the 64 bit variant. And when you do:

  r = structure.get_value("range")

A range will be returned directly, without the wrapper. For DoubleRange
and FractionRange, there is no native support in python. So the usage
will be:

  structure["range"] = Gst.DoubleRange(0,10.0)
  structure["range"] =
      Gst.FractionRange(Gst.Fraction(1/30), Gst.Fraction(1/5)

When getting this value, Gst.DoubleRange and Gst.FractionRange class are
returned. They both have start/stop members. The naming was taken from
range type.

For Array and List, both uses the native list type, though they can be
constructed from any python sequence. So again, the class is just like
a cast, to let it pick the right GType and python list are being
returned.

  structure["list"] = Gst.ValueList([1,2,3,4])
  structure["array"] = Gst.ValueArray([1,2,3,4)

Using string and tuple could also work. Since Gst.ValueList/Array are
sequence, you can convert one to the other with:

  list = Gst.ValueList([1,2,3,4])
  array = Gst.ValueArray (list)

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:26:21 -04:00