Commit graph

8250 commits

Author SHA1 Message Date
Sebastian Dröge
0bf3531efa segment: Add missing out annotations for various parameters 2017-07-28 17:27:32 +01:00
George Kiagiadakis
4c3092e07a element: document that gst_element_continue_state needs to be called with the STATE_LOCK
It internally calls gst_element_change_state(), which requires the STATE_LOCK

https://bugzilla.gnome.org/show_bug.cgi?id=785431
2017-07-26 12:36:20 +03:00
Tim-Philipp Müller
ea62c96b94 miniobject: don't modify memory if it's clearly not a valid miniobject
Add back function guard that checks the refcount in a read-only
operation first, and bail out without modifying the passed-in
memory if it's clearly not a valid mini object. Otherwise we
probably cause more harm than good. We keep the second sanity
check based on the 'real refcount' at the time of the unref
around for now too.

https://bugzilla.gnome.org/show_bug.cgi?id=784383
2017-07-15 11:57:43 +01:00
Tim-Philipp Müller
d123291183 win32: find plugin scanner in libexecdir subdir as configured
https://bugzilla.gnome.org/show_bug.cgi?id=679115
2017-07-14 16:13:12 +01:00
Tim-Philipp Müller
f28435b0d4 meson: find python3 via python3 module
And rename python3 variable in meson build files for clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=783198
2017-07-07 12:07:09 +01:00
Tim-Philipp Müller
d93ebba58b meson: add option to disable tracer hooks 2017-07-05 13:27:48 +01:00
Tim-Philipp Müller
d0c956adac tracing: fix build with tracer hooks disabled 2017-07-05 13:17:49 +01:00
Tim-Philipp Müller
cce18426f7 miniobject: make refcount tracing and debug logging reliable
Tracing of the refcounts wasn't thread-safe, and log output of
the refcount values before/after wasn't reliable.

https://bugzilla.gnome.org/show_bug.cgi?id=784383
2017-07-05 13:15:22 +01:00
Tim-Philipp Müller
f29082bfe1 plugin: clarify code that deduces plugin name from file name
Make the final else branch explicit for clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=783333
2017-07-05 11:15:43 +01:00
Xabier Rodriguez Calvar
bda8440f1f protection: add function to filter system ids
gst_protection_filter_systems_by_available_decryptors() takes an array
of strings and returns a new array of strings filtered by the available
decryptors for them so the ones you get are the ones that you should be
able to decrypt.

https://bugzilla.gnome.org/show_bug.cgi?id=770107
2017-06-28 10:52:11 +01:00
Matej Knopp
c9c2902604 gstplugin: remove gst prefix when loading plugin on MSVC
When building with Meson and MSVC, our plugins don't have a 'libgst'
suffix and are just 'gstfoo.dll', so look for that too.

https://bugzilla.gnome.org/show_bug.cgi?id=783333
2017-06-23 14:40:48 +05:30
Thibault Saunier
3a1f2c22dc utils: Add a function to get a string representation of GstStateChange
API:
    gst_state_change_get_name

https://bugzilla.gnome.org/show_bug.cgi?id=783798
2017-06-20 09:33:31 -04:00
Thibault Saunier
54e16cc34e element: Add missing values for "to same" state changes
And handle newly added GstStateChange values in GstPipeline

https://bugzilla.gnome.org/show_bug.cgi?id=783798
2017-06-20 09:33:25 -04:00
Heekyoung Seo
c30c39b5ad utils: Fix leak in failed case of regression overflow checking
https://bugzilla.gnome.org/show_bug.cgi?id=783978
2017-06-20 10:55:49 +03:00
Heekyoung Seo
d32afe3f71 registrychunk: Fix leak in failed case of reading plugin dependency string
https://bugzilla.gnome.org/show_bug.cgi?id=783978
2017-06-20 10:55:49 +03:00
Tim-Philipp Müller
25bf82a187 meson: fix tests build with --werror
Need to pass -DGST_DISABLE_DEPRECATED to avoid warnings when
testing deprecated API such as gst_uri_construct().

Also remove #ifndef GST_DISABLE_DEPRECATED guard from header
file, we don't use those any more for functions, the
GST_DEPRECATED_FOR macro is enough.
2017-06-15 10:53:11 +01:00
Dimitrios Katsaros
688d79033f gsturi: Fixed incorrect escaping of path as a generic string
The gst_uri_construct function was escaping the location string
as a generic uri string. This is incorrect since the slash('/')
characters are reserved for use in this exact case. The patch
changes the escape_string function mode to handle the path correctly.

I have deleted the escape_string function since it is no longer being
used and have created a unit test for the function. I have also
deprecated this function in favour of the GstUri API.

https://bugzilla.gnome.org/show_bug.cgi?id=783787
2017-06-15 11:39:00 +03:00
Sebastian Dröge
5f5caffa70 bin: Put correct annotations on gst_bin_add() too 2017-05-31 20:40:00 +03:00
Sebastian Dröge
3a23b518d4 object: Add missing annotations to get_value_array() / get_value_g_array()
Same as already used in GstControlBinding.
2017-05-22 12:01:41 +03:00
Sebastian Dröge
d4f2ae611b protection: Fix annotations for gst_protection_select_system() 2017-05-21 19:17:15 +03:00
Olivier Crête
156ce96296 plugin: Stop plugin symbol name at first .
This is because the python plugin ends up named
libgstpython.cpython-35m-x86_64-linux-gnu.so so we need to stop
at the first dot.

https://bugzilla.gnome.org/show_bug.cgi?id=782924
2017-05-21 17:06:24 +02:00
Tim-Philipp Müller
f6b42d1f56 meson: don't need config.h.meson any more
Meson does the largefile support automatically nowadays, and
can generate a config.h from configuration_data() without a
template as input.
2017-05-21 14:31:56 +01:00
Sebastian Dröge
f322740ef9 parse: Make gst_parse_context_copy() public for bindings 2017-05-20 19:43:18 +03:00
Matthew Waters
e3ab5e4df9 debugutils: add missing E character to the legend
The E character on pads indicates the presence of the EOS flag.
2017-05-19 19:22:27 +02:00
Matej Knopp
d59e26d37d gst-plugin: allow '-' in plugin file name
'-' will be translated to underscore when determining symbol name

https://bugzilla.gnome.org/show_bug.cgi?id=782756
2017-05-17 20:55:18 -04:00
Christoph Reiter
9bf46a1065 gst: ref_sink() some more floating references returned by g_object_new()
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 15:36:12 +03:00
Sebastian Dröge
f119e93b47 gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
I.e. most of them unfortunately.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:37 +03:00
Sebastian Dröge
888fc33bc2 allocator: ref_sink() the global sysmem allocator after creation
It's not owned by the first one to ask for it, but by this very code.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:37 +03:00
Sebastian Dröge
daa98fc02a gst: Don't ref_sink() GstObject subclasses in instance_init/constructor
This is something bindings can't handle and it causes leaks. Instead
move the ref_sink() to the explicit, new() constructors.

This means that abstract classes, and anything that can have subclasses,
will have to do ref_sink() in their new() function now. Specifically
this affects GstClock and GstControlSource.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:37 +03:00
Sebastian Dröge
30f871d274 gst: Correctly annotate functions taking floating reference parameters and returning floating references
https://bugzilla.gnome.org/show_bug.cgi?id=702960
2017-05-17 10:40:37 +03:00
Sebastian Dröge
2e4c82d850 gst: Handle floating references consistently
If a function takes a floating reference parameter, it should also be
sinked in error cases. Otherwise the function behaves differently
between error and normal cases, which is impossible for bindings to
handle.

https://bugzilla.gnome.org/show_bug.cgi?id=747990
2017-05-17 10:40:37 +03:00
Vineeth TM
7c4d3a6c52 gst: Fix floating reference inconsistencies in error cases
If a function takes a floating reference and sinks it, it should also do
that in error cases. I.e. call ref_sink() followed by unref().

Otherwise the reference counting behaviour of the function will be
different between the good and the error case, and simply inconsistent.

https://bugzilla.gnome.org/show_bug.cgi?id=747990
2017-05-17 10:40:37 +03:00
Nicolas Dufresne
eafaefe9da Also use default visibility for plugins symbol 2017-05-16 13:31:06 -04:00
Tim-Philipp Müller
5fd554aa34 gstconfig.h: use default visibility for GST_EXPORT for gcc/clang too
This will be needed later when we switch to using -fvisibility=hidden.
2017-05-15 23:14:20 +01:00
Tim-Philipp Müller
0eecc49c13 gst: add GST_DEPRECATED_FOR() and also export deprecated symbols
Can't use a #ifndef GST_DISABLE_DEPRECATED guard around deprecated
functions any more, as they won't get exported then. Besides, we
get a nicer error message from the compiler telling us what function
to use instead this way.
2017-05-15 23:14:20 +01:00
Tim-Philipp Müller
92d3246f76 gst: mark symbols explicitly for export with GST_EXPORT
One omission: gst_allocator_sysmem_get_type() was
exported but never in any public header file.
2017-05-15 23:14:12 +01:00
Sebastian Dröge
7d930b8693 buffer: Add GstReferenceTimestampMeta
This is a meta that generically allows to attach additional reference
timestamps to a buffer, that don't have to relate to the pipeline clock
in any way.

Examples of this could be an NTP timestamp when the media was captured,
a frame counter on the capture side or the (local) UNIX timestamp when
the media was captured.

https://bugzilla.gnome.org/show_bug.cgi?id=779213
2017-05-12 11:43:02 +02:00
Sebastian Dröge
c77f661f6d bus: Add function to get the file descriptor of the bus
This is useful for integration with other event loops that work by
polling file descriptors. G_IO_IN will always be set whenever a message
is available currently.

https://bugzilla.gnome.org/show_bug.cgi?id=776126
2017-05-09 15:01:46 +02:00
Nicolas Dufresne
e7ede5a487 plugin: Unify static and dynamic plugin interface
This patch changes the entry point of each plugin in order to unify the
interface for static and dynamic plugin. What we do is replace the
current static plugin interface and extend the dymamic one. The plugin
entry was a C structure, name "gst_plugin_desc". With this patch, the
interface is now:

  GstPpluginDesc *gst_plugin_<name>_get_desc(void);

The reason we change the C structure into function, is that it is
potentially more common to have function pointers, avoiding possible
binding language limitation. Additionally to that. This change prevents
the symbols from clashing between plugins, allowing to build once the
plugin (assuming you have -fPIC).

On the plugin loader side, we symply derive the shared object basename
to extract the plugin name. If this symbol is not found, we fallback to
gst_plugin_desc for backward compatibility.

This has one side effect, which is that the shared objects now need to
be named after their plugin name. This is generally the case with few
exceptions. The benifit of this limitation is that you can control the
gst_plugin_<name>_desc clash at file level.

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-05-09 08:48:19 -04:00
Tim-Philipp Müller
4425f8c368 debugutils: make local variable static 2017-05-07 11:17:22 +01:00
Tim-Philipp Müller
dcfb222e05 meson: add gst-ptp-helper
https://bugzilla.gnome.org/show_bug.cgi?id=774418
2017-05-05 11:49:08 +01:00
Tim-Philipp Müller
3d8d81ecb7 g-i: no need to load registry in g-i scanner 2017-05-04 21:59:48 +01:00
Sebastian Dröge
cd3a49b69b message: Don't pass a NULL debug string to g_utf8_validate()
g_utf8_validate() crashes on NULL, but NULL is valid for the debug
string nonetheless.
2017-05-02 14:35:50 +03:00
Víctor Manuel Jáquez Leal
d108ed2251 gst: check non-null before dereference
It is possible to use gst_deinit() without registering the base
classes. For example, when using gst_init_get_option_group() and
call the program with an invalid parameter. In that case,
gst_deinit() will lead to a segmentation fault, since there is a
dereference to a pointer that is null.

This patch validates if the type is non-null before dereferencing
it.

https://bugzilla.gnome.org/show_bug.cgi?id=781914
2017-04-28 21:01:43 +02:00
Thibault Saunier
b15d59b53c doc: Fix some doctsing making GI happy 2017-04-21 10:51:59 -03:00
Thibault Saunier
e6db45a8af doc: Fix GstChangeState docstring 2017-04-20 17:58:08 -03:00
Sebastian Dröge
04676df4a8 info: Move debug output in for_each_threshold_by_entry() to TRACE level
It's otherwise appearing many, many times in logs and usually is nothing
you're interested in.
2017-04-19 17:32:17 +01:00
Rico Tzschichholz
72e42f0ce9 meson: A couple for GIR-generation fixes 2017-04-13 10:05:53 +01:00
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