GStreamer multimedia framework
Find a file
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
common@d7ecca1611 Update common submodule 2014-06-05 17:47:17 +02:00
examples Port old helloworld.py example to GI 2017-02-21 22:02:14 +11:00
gi overrides: Add more GstValue overrides 2017-03-24 13:26:21 -04:00
hooks meson: Setup pre-commit hooks when configuring 2016-09-30 11:39:21 -03:00
old_examples Move old example to a dedicated folder so user know it is no up to date 2014-06-06 10:35:46 +02:00
plugin build: Remove unused variables 2016-09-05 12:52:46 -03:00
scripts meson: Install in gi._overidesdir only if we are installing in right prefix 2017-03-24 12:38:04 -03:00
testsuite overrides: Add more GstValue overrides 2017-03-24 13:26:21 -04:00
.gitignore Remove bitrotten and unused gst-python.spec.in file 2016-12-16 17:43:11 +00:00
.gitmodules common: use https protocol for common submodule 2016-11-26 11:28:41 +00:00
acinclude.m4 Reimplement gstpython plugin on top of PyGobject 2014-06-06 10:28:58 +02:00
AUTHORS distcheck and final release prep fixes 2003-07-10 04:27:47 +00:00
autogen.sh Implement the glue code so GstFraction works 2012-08-19 18:56:29 -04:00
ChangeLog Release 1.11.2 2017-02-24 15:09:54 +02:00
config.h.meson Add support for Meson as alternative/parallel build system 2016-09-05 12:13:03 -03:00
configure.ac Back to development 2017-02-24 15:38:09 +02:00
COPYING Fix zip code of new FSF address 2013-12-12 11:35:41 +00:00
env gst/: Update for core changes. 2005-09-02 16:21:45 +00:00
gst-python.doap Release 1.11.2 2017-02-24 15:09:54 +02:00
Makefile.am win32: remove outdated build cruft 2016-02-21 10:46:24 +00:00
meson.build meson: Install in gi._overidesdir only if we are installing in right prefix 2017-03-24 12:38:04 -03:00
meson_options.txt python: Add an option to set where to install pygi overrides 2017-02-15 10:49:12 -03:00
NEWS Release 1.11.2 2017-02-24 15:09:54 +02:00
pygst.py.in Fix zip code of new FSF address 2013-12-12 11:35:41 +00:00
README distcheck and final release prep fixes 2003-07-10 04:27:47 +00:00
RELEASE Release 1.11.2 2017-02-24 15:09:54 +02:00
TODO todo: Update the todo 2013-08-23 23:19:18 -04:00

This file will be autogenerated.  Please read README-docs.