Commit graph

8202 commits

Author SHA1 Message Date
Olivier Crete
7c01da8476 meson: Only check the first parameter
https://bugzilla.gnome.org/show_bug.cgi?id=781155
2017-04-11 13:24:45 -03:00
Thibault Saunier
57fd614e02 meson: Check bison and flex are recent enough
https://bugzilla.gnome.org/show_bug.cgi?id=781155
2017-04-11 10:59:34 -03:00
Olivier Crête
dd1f0f49ab value: Accept NULL as a structure
Some GstStructure properties default to NULL, so it should
be a supported value.

With unit test.
2017-04-10 12:37:12 -04:00
Tim-Philipp Müller
519d64881f Don't use deprecated g_object_newv()
Use g_object_new() instead which nowadays has a shortcut for the
no-properties check. It still does an extra GType check in the
function guard, but there's a pending patch to remove that
and it's hardly going to be a performance issue in practice,
even less so on a system that's compiled without run-time checks.

Alternative would be to move to the new g_object_new_properties()
with a fallback define for older glib versions, but it makes the
code look more unwieldy and doesn't seem worth it.

Fixes deprecation warnings when building against newer GLib versions.

https://bugzilla.gnome.org/show_bug.cgi?id=780903
2017-04-08 09:49:59 +01:00
Olivier Crête
0b9eb621b6 structure: Don't print warning on NULL strings or pointers
Putting NULL for those is a valid serialization for the NULL value.
2017-04-06 19:25:06 -04:00
Sebastian Dröge
c173771ed2 gst: Use GstClockTimeDiff instead of GstClockTime as type for GST_SECOND and friends
They were (signed!) gint64 before because of G_GINT64_CONSTANT() already
and they are actually used in signed calculations.

With this change we at least ensure that an integer type of the correct
size is used for GI (it was using gint before).
2017-04-05 16:32:38 +03:00
Sebastian Dröge
ddd00c0d2f gst: Update some more types and values of combined-flags constants 2017-04-05 15:46:26 +03:00
Sebastian Dröge
42a8ffcd39 gst: Cast combined-flags constants to their respective target types
This makes C++ compilers a bit more happy without having the user of the
constants cast. It also provides the correct type information to GI.

https://bugzilla.gnome.org/show_bug.cgi?id=780923
2017-04-05 14:45:46 +03:00
Sebastian Dröge
d96c201f5f gst: Set values and types for combined-flags constants in GI annotations 2017-04-05 14:42:16 +03:00
Sebastian Dröge
5399b29979 value: Properly set value and type for GST_FLAG_SET_MASK_EXACT in GI annotations
Storing a -1 inside an unsigned integer confuses GIR based bindings
generators.
2017-04-05 14:27:19 +03:00
Vincent Penquerc'h
c361365890 gstvalue: fix GstValue leak in structure_field_union_into
https://bugzilla.gnome.org/show_bug.cgi?id=780751
2017-03-31 11:57:36 +01:00
Vincent Penquerc'h
efbacf1931 streamcollection: fix racy user-after-free
The issue happens when the structure is printed by the logging
subsystem: the object is included in the log, and this will cause the
full object printout to be done there. However, after dispose, the queue
was already cleared, so the access to it (to print the object) would
assert, as the queue was already freed. The patch changes it so that the
queue is merely empty, and only freed in _finalize.

https://bugzilla.gnome.org/show_bug.cgi?id=776293
2017-03-31 11:32:31 +01:00
Tim-Philipp Müller
d8a1bf08b1 debugutils: add pad EOS flag in pipeline dot file dumps
But only if set. Helps debug issues with EOS propagation.
2017-03-27 18:30:35 +01:00
Nicolas Dufresne
1a65d5b252 paramspec: Fix array validation logic
A paramspec validation should modify the content to match what the spec
requires and return TURE if a modification happened. This previous
implementation would only fix the first element of the array and return.
It was also return TRUE for empty array, while no modification was
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=780111
2017-03-24 13:43:34 -04:00
Nicolas Dufresne
3b9ff1245b array/fraction: In param types, use get_type() function directly
The GST_TYPE macro points to global variables initialized by the
first call to get_type. This is not an issue if you call gst_init()
but unfortunatly pygi will need to acces the param type before
init can be called. This removes an assertion.
2017-03-24 13:30:45 -04:00
Nicolas Dufresne
d486074a9c fraction/array: Make get_type() thread safe
Those aren't suppose to be called from multiple thread, but all
fundamental get_type() function are thread safe. Fix it to
be consistent and it may help if we change the typing mechanism
in GStreamer come day.
2017-03-24 13:30:45 -04:00
Nicolas Dufresne
2c056563bf gstutils: Add helpers to get/set array properties
This is to help bindings access properties of type GST_TYPE_ARRAY.
This function will get/set the property and convert form/to
GValueArray.

New API:
  gst_util_set_object_array
  gst_util_get_object_array

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:30:45 -04:00
Nicolas Dufresne
c21e219ed4 structure: Add get/set_array/list using GValueArray
This adds a binding friendly interface to get and set arrays
and list into GstStructure.

New API:
 - gst_structure_set_array
 - gst_structure_set_list
 - gst_structure_get_array
 - gst_structure_get_list

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:30:45 -04:00
Nicolas Dufresne
84f826a937 gstvalue: Add transformation to/from GValueArray
This allow transforming a GValue of type G_TYPE_VALUE_ARRAY to
and from GST_TYPE_ARRAY/LIST.

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:30:45 -04:00
Jan Schmidt
0ff74f8d6d paramspecs: Use gst_value_array_get_type() for GstParamSpecArray type
When registering GstParamSpecArray, use the gst_value_array_get_type()
function to get the type, rather than the GST_TYPE_ARRAY macro, which
gets it from the _gst_value_array_type, which is in turn only
initialised during gst_init()

Fixes criticals with (python) bindings that look up all the
types from the gobject-introspection info as soon as they
are imported.

/usr/lib64/python3.5/site-packages/gi/module.py:178: Warning: g_param_type_register_static: assertion 'g_type_name (pspec_info->value_type) != NULL' failed
  g_type = info.get_g_type()
/usr/lib64/python3.5/site-packages/gi/module.py:212: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  type_ = g_type.pytype
/usr/lib64/python3.5/site-packages/gi/module.py:226: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  g_type.pytype = wrapper
/usr/lib64/python3.5/site-packages/gi/module.py:226: Warning: g_type_set_qdata: assertion 'node != NULL' failed
  g_type.pytype = wrapper
2017-03-24 17:53:31 +11:00
Vincent Penquerc'h
371fe0be65 value: fix union of int range and int when extending on a side
The internal representation uses bounds scaled by the step

Add tests to catch those cases
2017-03-20 14:09:55 +00:00
Jan Schmidt
d781d09d99 gstvalue: Do more checks when guessing at flagset strings
If guessing that a string matches a flagset, be more thorough
at checking that the string following a string of hex:hex:
actually looks like a flag set string. Add some unit tests
to catch more cases.

https://bugzilla.gnome.org/show_bug.cgi?id=779755
2017-03-09 12:09:57 +11:00
Tim-Philipp Müller
fdd5665b66 elementfactory: promote factory not found log message to WARNING
In most cases people really want to know when an element
could not be created.
2017-03-08 14:51:42 +00:00
Tim-Philipp Müller
c90d3e9d5a info: document that logging macros don't need newlines at the end
https://bugzilla.gnome.org/show_bug.cgi?id=779459
2017-03-03 12:53:26 +00:00
Tim-Philipp Müller
08ee7a86ed pad: add since marker to docs for new API 2017-02-24 21:35:27 +00:00
Thibault Saunier
18a5cff70c registry: Only scan plugin files that end with an extension
Not file that would for some reason end with 'so' or 'dll', etc...

https://bugzilla.gnome.org/show_bug.cgi?id=779175
2017-02-24 16:16:39 -03:00
Thibault Saunier
6326c764ee pad: Add API to get the current state of a task
Avoiding the user to need to deal with the locking himself etc.

API:
  gst_pad_task_get_state

https://bugzilla.gnome.org/show_bug.cgi?id=778830
2017-02-24 16:16:23 -03:00
Thibault Saunier
d6dba3fd6f meson: Add an option to disable usage of libunwind
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=778193
2017-02-24 16:16:23 -03:00
Vivia Nikolaidou
63775ac6e3 value: Add deserialization for arrays/lists outside GstStructures
This is mostly useful for properties of those types when used in
gst-launch or similar.

https://bugzilla.gnome.org/show_bug.cgi?id=777375
2017-02-23 21:00:16 +02:00
Sebastian Dröge
ba49927aaf value: Add a type abbreviation for GstFlagSet in serialization 2017-02-23 20:50:38 +02:00
Vivia Nikolaidou
a3cfcbfede value: Always add the type name to elements when serializing arrays/lists
But only when serializing outside of GstStructures, because in case of
GstStructure the type is already preprended to the array/list and the
GstStructure API makes sure that they have the same "generic" type so
deserialization works properly.

This keeps serialization of GstStructures the same as before, and the
GstCaps unit tests already test for that. However when serializing
standalone arrays/lists get the types added now.
2017-02-23 20:48:40 +02:00
Vivia Nikolaidou
33118f6118 value: Move list/array serialization/deserialization functions from GstStructure to GstValue
https://bugzilla.gnome.org/show_bug.cgi?id=777375
2017-02-23 20:22:03 +02:00
Vivia Nikolaidou
978df5d0ff paramspecs: Add GstParamSpecArray for GST_TYPE_ARRAY typed properties
These are mostly useful to get our automatic
serialization/deserialization from strings and simple usage from
gst-launch or similar.

https://bugzilla.gnome.org/show_bug.cgi?id=777375
2017-02-23 20:16:17 +02:00
Wim Taymans
a15f7ad8f8 info: put () around macro arguments
Put braces around macro arguments or else we might run into problems
with operater precedence.
2017-02-20 12:16:32 +01:00
Wim Taymans
c1bcf748cc deviceproviderfactory: ignore empty classes 2017-02-20 10:45:57 +01:00
Wim Taymans
50cb645d1f deviceproviderfactory: compare class against NULL
gstdeviceproviderfactory.c:501:20: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (classes[0] == '\0')
2017-02-20 10:25:50 +01:00
Nirbheek Chauhan
cd9e154c73 meson: Fix build with latest upstream git
Trivial incorrect include_directories() call
2017-02-18 16:49:40 +05:30
Peter Korsgaard
c893882fd9 gstconfig: Fix unaligned access support for the openrisc architecture
Teach gstconfig.h.in about the openrisc (or1k) architecture.  Fixes
buildroot autobuild failure:

http://autobuild.buildroot.net/results/717/717d78ce0935749f477bdf3133b6f20057a28c01/build-end.log

https://bugzilla.gnome.org/show_bug.cgi?id=778866
2017-02-18 11:53:30 +02:00
Stefan Sauer
5bb137e9ee pad: revert the content changes from previous commit
The default behaviour when returning GST_PAD_PROBE_OK is unrelated to
the other return code.
2017-02-15 20:58:49 +01:00
Stefan Sauer
ed7d1b668b pad: fix docs for GstPadProbeReturn
There is no 'block' value, but we have 'drop'. Also fix the markup; it
is '%' to link to constants (and enum values).
2017-02-15 20:37:40 +01:00
Sebastian Dröge
ef42e3811e parse: Don't translate the "bin" element name
Otherwise we won't be able to create bins, there is no element called
"Behälter" if you're using a German locale.

https://bugzilla.gnome.org/show_bug.cgi?id=777998
2017-01-31 21:20:22 +02:00
Seungha Yang
15f2898e87 segment: Modifiy inside segment condition
There is a special case that segment_start == segment_stop == start.
It's inside of segment

https://bugzilla.gnome.org/show_bug.cgi?id=764707
2017-01-31 15:55:12 +01:00
Thibault Saunier
94da8f5d8d info: Check libunwind return codes 2017-01-27 16:49:56 -03:00
Thibault Saunier
a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Thibault Saunier
76f049bc49 gst: Fix includes so that files can be built separately
It used to work but it has broke in the 1.10 cycle.
2017-01-27 16:33:42 -03:00
Thibault Saunier
6c9a092def gstpoll: Encode in utf-8 2017-01-27 16:30:02 -03:00
Brendan Shanks
e286e81856 GstStream/GstStreamCollection: add g_autoptr() support
https://bugzilla.gnome.org/show_bug.cgi?id=777810
2017-01-27 00:07:51 +00:00
Stefan Sauer
a533b6c2f9 bin: update the docs for the event forwarding
First this sends the events not only to the sources and 2nd this is not only
for seek events.
2017-01-18 22:39:33 +01:00
Sebastian Dröge
80c5fd50db parse: Don't hold element's object lock while querying element pads' caps
This can easily deadlock if the element uses the object lock for
something internally, like posting an error message. Use an GstIterator
for iterating over the pads instead.

https://bugzilla.gnome.org/show_bug.cgi?id=777449
2017-01-18 15:43:13 +02:00
Jan Schmidt
b3296183fc gstbin: Quieten a noisy FIXME about duration caching
Only print this FIXME once per run, at it's pretty annoying in
lots of logs otherwise.
2017-01-16 09:44:15 +11:00