Commit graph

1416 commits

Author SHA1 Message Date
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
Thibault Saunier
7f78ed2541 meson: Install in gi._overidesdir only if we are installing in right prefix
And make sure python detector did not fail

https://bugzilla.gnome.org/show_bug.cgi?id=780369
2017-03-24 12:38:04 -03:00
Sebastian Dröge
c32670e405 meson: Update version 2017-02-24 16:01:39 +02:00
Sebastian Dröge
4f43877e11 Back to development 2017-02-24 15:38:09 +02:00
Sebastian Dröge
6bc2f3844d Release 1.11.2 2017-02-24 15:09:54 +02:00
Sebastian Dröge
c2fbf423fb Back to development 2017-02-24 12:08:48 +02:00
Jan Schmidt
4731dbc118 Port old helloworld.py example to GI 2017-02-21 22:02:14 +11:00
Thibault Saunier
1acc0ec664 python: Add an option to set where to install pygi overrides 2017-02-15 10:49:12 -03:00
Tim-Philipp Müller
67574b3a75 meson: bump version and bump meson requirement
Adjust meson requirement to same as used in other modules.
2017-01-13 12:51:11 +00:00
Sebastian Dröge
25b98c1ef5 Release 1.11.1 2017-01-12 16:15:50 +02:00
Tim-Philipp Müller
bb59915326 Remove bitrotten and unused gst-python.spec.in file 2016-12-16 17:43:11 +00:00
Tim-Philipp Müller
ad3f55dadd common: use https protocol for common submodule
https://bugzilla.gnome.org/show_bug.cgi?id=775110
2016-11-26 11:28:41 +00:00
Thibault Saunier
08d0d09fbd Play nicely with gst-build uninstalled
As overrides_hack is being used as user sitecustomize script
2016-11-04 11:40:10 -03:00
Thibault Saunier
490028ba21 meson: Add testsuite 2016-11-04 11:40:10 -03:00
Tim-Philipp Müller
21f8b168d3 meson: update version 2016-11-01 18:12:33 +00:00
Sebastian Dröge
906bb35360 Back to development 2016-11-01 18:53:15 +02:00
Sebastian Dröge
1581310200 Release 1.10.0 2016-11-01 18:06:58 +02:00
Thibault Saunier
d680386ab0 meson: use the version keyword argument for dependencies version 2016-10-19 14:47:07 -03:00
Marianna Smidth Buschle
a9cc3ed6f2 examples: Added identity example
Created a simple BaseTransform element (identity)

https://bugzilla.gnome.org/show_bug.cgi?id=772853
2016-10-17 10:03:13 +02:00
Thibault Saunier
b7a78a37dc meson: Setup pre-commit hooks when configuring 2016-09-30 11:39:21 -03:00
Sebastian Dröge
329c3faf90 Release 1.9.90 2016-09-30 13:04:26 +03:00
Sebastian Dröge
a7eebda2ae meson: Add a workaround for finding the Python library on Fedora 2016-09-14 15:18:17 +02:00
Sebastian Dröge
1b60fedc31 meson: Fix pythondetector on Debian and use sysconfig for getting the ABIFLAGS too
Paths like /usr/lib/python3.5/config-3.5m-x86_64-linux-gnu would not be
detected by the old code, but it's all nicely stored in sysconfig so
let's just use that.
2016-09-14 13:42:49 +02:00
Sebastian Dröge
2f0bd77249 configure: Depend on gstreamer 1.9.2.1 2016-09-14 11:31:32 +02:00
Thibault Saunier
0f98e1ff44 meson: Search python shared lib in lib64/ if it is a directory 2016-09-13 15:17:41 -03:00
Thibault Saunier
b5e834df90 build: Remove unused variables 2016-09-05 12:52:46 -03:00
Thibault Saunier
16f971226d Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson
2016-09-05 12:13:03 -03:00
Sebastian Dröge
df995fad7b Back to development 2016-09-01 12:31:53 +03:00
Sebastian Dröge
ffbb6a65f0 Release 1.9.2 2016-09-01 12:31:42 +03:00
Sebastian Dröge
fb9bbd83ff Back to development 2016-07-06 13:54:19 +03:00
Sebastian Dröge
83def05ad5 Release 1.9.1 2016-07-06 13:38:12 +03:00
Sebastian Dröge
be4bf83b9c Back to development 2016-03-24 13:34:28 +02:00
Sebastian Dröge
8bf58f1bb5 Release 1.8.0 2016-03-24 13:03:02 +02:00
Sebastian Dröge
0bf0e6f7e6 Release 1.7.91 2016-03-15 12:34:35 +02:00