Commit graph

8412 commits

Author SHA1 Message Date
Nicolas Dufresne 9722e89644 structure: Update doc error in ARRAY/LIST helpers 2018-07-04 14:00:35 -04:00
Philippe Normand cc55b304ef protection: Release decryptors list, even if it's empty
https://bugzilla.gnome.org/show_bug.cgi?id=796651
2018-06-25 16:38:13 +01:00
Tim-Philipp Müller 2db8e3705f Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-24 12:49:14 +02:00
Sebastian Dröge 8f496b7392 event: Unset SNAP flags when creating a new seek event without KEY_UNIT flag
The SNAP flags only make sense in combination with the KEY_UNIT flag,
and without they expose all kinds of unexpected behaviour in various
elements that don't expect this from happening.

Also warn if this ever happens.

https://bugzilla.gnome.org/show_bug.cgi?id=796558
2018-06-18 10:31:16 +03:00
Sebastian Dröge 1908daf29c event: Require writable events for setting the running-time-offset and sequence number
Otherwise multiple code paths with the same event could change the
values on each other.

https://bugzilla.gnome.org/show_bug.cgi?id=796615
2018-06-18 10:30:51 +03:00
Guillaume Desmottes 6dba0d91ed gst_structure_to_string: display actual value of pointers
We used to always display "NULL" which was pretty confusing when
debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=794355
2018-06-15 11:37:24 +02:00
Thibault Saunier 8833ca942e stream: Add some missing API safe guards 2018-06-13 16:27:24 -04:00
Tim-Philipp Müller b0777476ff poll: minor docs clarification
'Not implemented' could be misinterpreted to mean that
the API doesn't even exist there.
2018-06-08 17:58:43 +01:00
Guillaume Desmottes b2593133b5 poll: add API to watch for POLLPRI
Windows doesn't seem to have an equivalent of POLLPRI so disabled those
functions on this platform.

This API can be used, for example, to wait for video4linux events which
are using POLLPRI.

https://bugzilla.gnome.org/show_bug.cgi?id=794977
2018-06-08 11:53:55 -04:00
Guillaume Desmottes 1e321eb51f poll: stop treating on POLLPRI as 'read'
Current code was considering "can read" as having either POLLIN or POLLPRI being
set.
This may lead to client being awaken because of POLLPRI, starting a blocking
read and getting stuck because there is actually nothing to read.

This patch removes POLLPRI handling in read code and I'll add specific
API to wait for POLLPRI.

https://bugzilla.gnome.org/show_bug.cgi?id=794977
2018-06-08 11:53:55 -04:00
Edward Hervey 52d4ae7680 message: Only allow setting valid seqnum on messages
If we want to make sure we never end up with invalid seqnum on
messages let's forbid setting them.
2018-06-05 17:01:05 +02:00
Edward Hervey 14e849927d event: Only allow setting valid seqnum on events
If we want to make sure we never end up with invalid seqnum on
events let's forbid setting them.
2018-06-05 16:59:50 +02:00
Edward Hervey 5b0fe8d174 bin: Make sure we don't use invalid seqnums on messages
There is a possibility that the accumlation functions don't set
a seqnum. Make sure we only set/override the seqnum of the new
messages if we *have* a valid upstream seqnum to use
2018-06-05 16:58:21 +02:00
Edward Hervey dea69f4c1e datetime: Update/fix documentation 2018-05-21 11:37:00 +02:00
Edward Hervey 438c1c116d sample: Update documentation 2018-05-21 11:36:42 +02:00
Edward Hervey 580f94ee97 gst: Add an example to GST_STATIC_PAD_TEMPLATE macro 2018-05-21 11:17:30 +02:00
Mark Nauwelaerts a7456eec0d gst: add some GIR array annotations 2018-05-21 09:15:09 +02:00
Sebastian Dröge 13d5957fd7 pad: Fix race condition causing the same probe to be called multiple times
Probes were remembering a cookie that was used to check if the probe was
already called this time before the probes list changed. However the
same probes could've been called by another thread in between and thus
gotten a new cookie, and would then be called a second time.

https://bugzilla.gnome.org/show_bug.cgi?id=795987
2018-05-11 18:54:55 +03:00
Edward Hervey 80dfb7bb3f gst: Use memcpy() instead of strncpy() where appropriate
strncpy() is assumed to be for strings so the compiler assumes that
it will need an extra byte for the string-terminaning NULL.

For cases where we know it's actually "binary" data, just copy it
with memcpy.

https://bugzilla.gnome.org/show_bug.cgi?id=795756
2018-05-07 17:05:36 +02:00
Jan Schmidt 273d0a05e8 gstevent: Add some FIXME: 2.0 about removing the timestamp
The timestamp field isn't valuable or used well anywhere. We
should remove it for GStreamer 2.0

https://bugzilla.gnome.org/show_bug.cgi?id=761462
2018-05-07 01:33:16 +10:00
Nirbheek Chauhan 4fb02fc85b meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually.
2018-05-05 20:30:43 +05:30
Tim-Philipp Müller a5ecb465a9 bufferlist: fix abort due to underflow when creating 0-sized list
gst_buffer_list_new_sized(0) will cause an underflow in a calculation
which then makes it try to allocate huge amounts of memory, which
may lead to aborts.

https://bugzilla.gnome.org/show_bug.cgi?id=795758
2018-05-05 16:20:05 +02:00
Francisco Velazquez 554f604d37 debugutils: Update configure option in documentation
Update documentation on non existent option `gst-enable-gst-debug'.  Instead,
one has to make sure that the `--disable-gst-debug' option was not used when
compiling GStreamer (i.e., `./configure --disable-gst-debug').

https://bugzilla.gnome.org/show_bug.cgi?id=795801
2018-05-04 15:25:24 +03:00
luz.paz 98200ddd8d Source code typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:25:21 +01:00
luz.paz 4a402c1c7d Fix typos in comments and docs
Found via `codespell`

https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:18:03 +01:00
Tim-Philipp Müller 0691278377 buffer: don't over-allocate internal GstMeta items
We would allocate space for two GstMeta structs even though
there is only one in the end (the one in GstMetaItem and in
GstFooMeta overlap).
2018-04-25 18:28:00 +01:00
Xavier Claessens b00b1d5361 Meson: Use library() to build both static and shared libs
Meson supports building both static and shared libraries in a single
library() call. It has the advantage of reusing the same .o objects and
thus avoid double compilation.

https://bugzilla.gnome.org/show_bug.cgi?id=794627
2018-04-25 00:40:30 +01:00
Thibault Saunier 121cfe3575 Revert "docs: Minor fix in event_new_select_streams"
This reverts commit f218917d02.
2018-04-18 11:35:20 -03:00
Thibault Saunier f218917d02 docs: Minor fix in event_new_select_streams 2018-04-17 20:03:37 -03:00
Thibault Saunier b27ee943c2 caps: Add a macro based variant of gst_caps_copy
This way we do not hit the performance overhead of having the method
not inlined but still can use it from bindings.
2018-04-17 14:00:20 -03:00
Thibault Saunier 11e0f451eb pad: Handle changing sticky events in pad probes
In the case where the user sets a new padprobeinfo->data in a probe
where the data is a sticky event, the new sticky event should be automatically
sticked on the probed pad.

https://bugzilla.gnome.org/show_bug.cgi?id=795330
2018-04-17 13:36:26 -03:00
Thibault Saunier 588e054e6d debug: Make PADS debug background blue
Red on red was... suboptimal!

https://bugzilla.gnome.org/show_bug.cgi?id=795330
2018-04-17 13:36:26 -03:00
Thibault Saunier d1b2d3429c gst: Stop inlining gst_caps_copy
This way it gets exposed to bindings through GObject Introspection.
2018-04-17 10:15:06 -03:00
Aurelien Jarno 8a156d1725 gstconfig.h.in: initial RISC-V support
RISC-V supports unaligned accesses, but these might run extremely slowly
depending on the implementation. Therefore set GST_HAVE_UNALIGNED_ACCESS
to 0 on this architecture.

https://bugzilla.gnome.org/show_bug.cgi?id=795271
2018-04-15 11:22:48 +03:00
Mathieu Duponchelle ed5d888ba5 gstsample: new API
gst_sample_set_buffer
gst_sample_set_caps
gst_sample_set_segment
gst_sample_set_info
gst_sample_is_writable
gst_sample_make_writable

This commit makes it possible to reuse a sample object and avoid
unnecessary memory allocations, for example in appsink.

In addition, writability is now required to set the buffer list.

https://bugzilla.gnome.org/show_bug.cgi?id=795144
2018-04-13 23:44:54 +02:00
Mark Nauwelaerts ea0f8ebce1 gst: add some GIR array annotations 2018-04-13 20:16:33 +02:00
Víctor Manuel Jáquez Leal e141c85f96 debugutils: Add missing parameters documentation 2018-04-13 10:57:07 +02:00
Tim-Philipp Müller ae612551fa gstdebug: fix occasional deadlocks on windows when outputting debug logging
When outputting debug logs on Windows, some sections are protected
with a non-recursive lock. Turns out though that gst_debug_message_get()
might indirectly, via our printf format extensions, call code which
in turn would try to log something when it can't handle something. If
that happens we end up in gst_debug_log_default() again recursively and
try to again take the lock that's already taken, thus deadlocking.

Format the debug message string outside of the critical section
instead to avoid this.

https://bugzilla.gnome.org/show_bug.cgi?id=784382
2018-04-11 23:12:44 +01:00
Tim-Philipp Müller 629bd08e02 gsturi: include gstconfig.h earlier for GST_API define 2018-04-09 14:19:19 +01:00
Jan Alexander Steffens (heftig) 6436437d83 gstinfo: fix debug levels being applied in the wrong order
Remove unneeded reapplication of patterns. Besides being
superfluous (gst_debug_reset_threshold already applies
patterns) it was also wrong and didn't stop checking patterns
after the first match (broken in 67e9d139).

Also fix up unit test which checked for the wrong order.

https://bugzilla.gnome.org/show_bug.cgi?id=794717
2018-04-05 11:00:09 +01:00
Jan Alexander Steffens (heftig) c4ff069864 gstinfo: Simplify gst_debug_reset_threshold() implementation
Replace the while+goto with a for+break and check walk to determine
whether we had a match. Move up the unlock to keep the locked section as
small as possible.

https://bugzilla.gnome.org/show_bug.cgi?id=794717
2018-04-05 10:52:13 +01:00
Jan Alexander Steffens (heftig) b12df466f2 gstinfo: Reduce code duplication around level pattern matching
Move the match, logging and set_threshold to a new function.

The log levels are different, so choose the higher one (LOG). Having two
equivalent messages at two different levels seems like a bad idea
anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=794717
2018-04-05 10:52:13 +01:00
Tim-Philipp Müller 8117a29408 streamcollection: embed GQueue into the private struct 2018-04-05 10:52:13 +01:00
Edward Hervey f5b962cd0d gst: Documentation fixes
* Fix copy-paste error for GstParamSpecArray documentation
* Use proper field name for tracer utils documentation
2018-04-02 12:42:30 +02:00
Matthew Waters f5f1fb5780 bin: fix deep-element-added signal debug log message
Adding the bin to the child element doesn't really make sense.
2018-03-29 12:36:11 +11:00
Tim-Philipp Müller ccf7751613 meson: remove no longer needed core enumtypes template files 2018-03-22 12:50:55 +00:00
Alessandro Decina 145eca289a meson: use gnome.mkenums_simple() to generate core enumtypes 2018-03-22 12:50:30 +00:00
Petr Kulhavy 7d75d3ef41 gstbuffer: reset buffer to its original size if intact
Enhance default_reset_buffer() to resize the buffer to its full size if the
memory hasn't changed. This allows to reuse the buffer even if the offset has
changed or the size has shrunk, rather than freeing the buffer.

Change related to: https://bugzilla.gnome.org/show_bug.cgi?id=772841
2018-03-21 17:50:30 -04:00
Sebastian Dröge bd116608de paramspecs: Set g-i annotation values for GST_PARAM_* constants 2018-03-21 10:13:44 +02:00
Sebastian Dröge e884980666 elementfactory: GST_ELEMENT_FACTORY_TYPE_DECODABLE had DECRYPTOR added, update g-i annotation value 2018-03-21 10:11:30 +02:00