Commit graph

17564 commits

Author SHA1 Message Date
Jan Schmidt
748687fc30 queue: Don't generate GST_FLOW_ERROR without logging
At least log a message to the debug log when generating
a GST_FLOW_ERROR, to make it possible to find where it came from.
2017-01-03 02:21:10 +11:00
Jan Schmidt
246618125f padtemplate: Fix null pointer dereference on invalid static caps
A typo in a static caps string may result in failure to
deserialise it, so don't dereference the result without
checking.
2017-01-03 02:21:10 +11:00
Jan Schmidt
269699f621 caps: Fix null pointer dereference on invalid static caps
A typo in a static caps string may result in failure to
deserialise it, so don't dereference the result without
checking.
2017-01-03 02:21:10 +11:00
Stefan Sauer
d118ed3deb structure: reword comment for gst_structure_parse_string()
The comment was a bit confusing. Turn it into gtkdoc style and reword it.
2016-12-30 19:42:57 +01:00
Stefan Sauer
ee52459a5e info: re-eval GST_DEBUG env var for late categories
When registering a new debug category after _debug_init(), we need to
re check the GST_DEBUG filter settings again.
In addition when parsing the filter setting, we need to already bump up
the min-debug level to not suppress debug log statments that dynamically
register a category. This happens in libraries that use a function to
register a category on first use.
2016-12-30 12:10:15 +01:00
Edward Hervey
68b6ff27eb gst-uninstalled: Default to python3
It's 2016, unless you've specified a different version of python,
we'll default to python3
2016-12-29 17:04:04 +01:00
Mark Nauwelaerts
9bcebaacc7 baseparse: also unset DISCONT on buffers in reverse playback fragments 2016-12-28 13:46:33 +01:00
Thibault Saunier
221d65a5e0 gst-launch: Add a '--types' option to filter elements by types to print
This way the user can easily figure out what are the available audio
encoder for example doing:

  gst-inspect-1.0 --types Encoder/Audio

https://bugzilla.gnome.org/show_bug.cgi?id=776392
2016-12-23 08:24:12 -03:00
Nicolas Dechesne
2d5dba8d05 tools: gst-launch: set GST_GL_XINITTHREADS
This ensure that XInitThreads is called and so gl contexts are properly
initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=776401
2016-12-23 12:20:52 +02:00
Thibault Saunier
89799ae90c gstpreset: Lower some debug logs level
A property not defined in a preset file can simply mean that the
user wants it to be set as it default value, and we should not warn
about that.

A missing preset file in a directory can happen has there are several
directory where a preset can be found in.
2016-12-22 16:28:03 -03:00
Nirbheek Chauhan
9e5d1370c8 meson: Fix order of C source and header in mkenums
Otherwise gstenum_h dependencies don't get added properly to gst_dep and
we see racy build failures everywhere.
2016-12-22 23:39:39 +05:30
Tim-Philipp Müller
21d3f9a0e4 meson: use gnome.mkenums() with template files for enum file gen
Saves us a custom script. Template files are nicer than passing
multiline templating stuff through to glib-mkenums. And we can
get rid of our custom python script.
2016-12-22 11:35:04 +00:00
Sebastian Dröge
597e43cffc element: Add guard to gst_element_release_pad() to ensure the pad belongs to this element
It's a programming error to pass other pads here, and it easily causes
crashes or other problematic behaviour down the road as subclasses
usually assume to only get their pads.
2016-12-22 12:08:14 +02:00
Stefan Sauer
a5246f91af gstrusage: explicitly register to hooks
We were attaching to any probe point to take rusage samples. The new refcount
hooks are called way too frequently though to make this still feasible.
2016-12-21 22:19:51 +01:00
Nirbheek Chauhan
aefc8007c6 meson: Add several missing features from configure.ac
* -Wl,-Bsymbolic-functions
* HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID
* HAVE_POSIX_TIMERS
* HAVE_MONOTONIC_CLOCK
* HAVE_UINT128_T
* HAVE_LONG_LONG
* HAVE_PROCESS_H
* HAVE_GMP
* HAVE_GSL
* HAVE_DLADDR

Also, don't use prefix for checking functions, and only check msvc
functions on Windows.
2016-12-21 23:51:36 +05:30
Nirbheek Chauhan
77d2774f1b build: Remove unused functions
fgetpos, fsetpos, mmap, posix_memalign. None of these are used anywhere
in the codebase.
2016-12-21 23:51:36 +05:30
Nirbheek Chauhan
97f39cae63 meson: Derive defines from header/function names
This is what Autoconf already does for us, so just do this. Avoids
people making typos while adding header or function checks. Because we
use a config.h.meson, such typos won't even be noticed.

Also, starting from Meson 0.36.0, the XCode 8 workaround that we use for
clock_gettime is no longer needed.
2016-12-21 23:51:36 +05:30
Stefan Sauer
2cc2fd7b77 gststructure: simplify test
We can compare structures, that is what the caps fucntion that was used before
would call anyway.
2016-12-21 10:08:35 +01:00
Stefan Sauer
b8476f2de1 tracerrecord: improve the values flags docs 2016-12-20 21:08:09 +01:00
Stefan Sauer
11cc260448 latency: the latency is not an aggregated value
The logged latencies are individual meassurements.
2016-12-20 21:07:14 +01:00
Thibault Saunier
29f0a79880 leaks: Allow user to set the flags to use to retrieve stack traces
https://bugzilla.gnome.org/show_bug.cgi?id=775541
2016-12-20 15:29:10 -03:00
Thibault Saunier
30133909ce leaks: Allow tracing Gst(Mini)Object reffing operations
It makes it much simpler to later debug refcount issues.

https://bugzilla.gnome.org/show_bug.cgi?id=775541
2016-12-20 15:29:10 -03:00
Thibault Saunier
32b17a8f3d leaks: Allow passing a GstStructure to configure the tracer
But keep understanding the simple synthax with a comma separated
list of filters

https://bugzilla.gnome.org/show_bug.cgi?id=775541
2016-12-20 15:29:10 -03:00
Jan Schmidt
e64765c0d8 typefind: Switch to normal mode before have-type
Before emitting have-type, switch to NORMAL
mode, as part of the have-type processing sends
the caps event downstream, which might trigger
actions like downstream autoplugging or
flushing seeks - and the latter are only
passed upstream if we've set typefind to NORMAL
mode.
2016-12-21 00:40:10 +11:00
Sebastian Dröge
47f9223750 multiqueue: Protect against spurious wakeups of the condition variable 2016-12-18 13:59:12 +02:00
Fabrice Bellet
de65529d52 basesink: fix a use after free case
The event may be disposed while being pushed, so we make sure the
debug infrastructure won't use it after the gst_pad_push().
2016-12-17 09:40:25 +05:30
Tim-Philipp Müller
bb28a59d5b check: fix typo in docs 2016-12-16 18:30:46 +00:00
Nirbheek Chauhan
4d179024f0 meson: Don't search for python3 twice 2016-12-17 00:00:11 +05:30
Tim-Philipp Müller
6354b57295 check: export new global variable 2016-12-16 18:20:45 +00:00
Thibault Saunier
7b3d383971 check: Avoid possible double free 2016-12-16 14:00:18 -03:00
Thibault Saunier
f7255f318f check: Allow listing unit tests names
Adding options while running gst_check_init

https://bugzilla.gnome.org/show_bug.cgi?id=775540
2016-12-16 13:46:39 -03:00
Stefan Sauer
1bfd04a5fe tracers/stats: log optional fields instead of GST_CLOCK_TIME_NONE
Simplify the traces and avoid trace analyzer to know that ((1<<64) - 1) means
we had no value.
2016-12-16 15:55:21 +01:00
Josep Torra
564dc742a4 autogen.sh: drop a leftover docbook related bit 2016-12-16 15:05:46 +01:00
Matthew Waters
ad40c5cd36 value: add structure intersect/union/is_subset/fixate implementations
Allows proper usage of structures in structures in caps.  Subtraction
is not implemented due to complications with empty fields representing
all possible values.

The only implementation that doesn't delegate to the already existing
GstStructure functions is the union function.

https://bugzilla.gnome.org/show_bug.cgi?id=775796
2016-12-15 13:39:57 +11:00
Matthew Waters
865247d32a tests/structure: add some more is_subset checks
Explicitly testing extra/missing fields and name differences
2016-12-15 13:07:08 +11:00
Tim-Philipp Müller
3d283665cc tests: meta: add test for gst_buffer_iterate_meta*()
https://bugzilla.gnome.org/show_bug.cgi?id=775727
2016-12-14 18:19:00 +00:00
Tim-Philipp Müller
ca4ac71555 buffer: add gst_buffer_iterate_meta_filtered()
For convenience. Pretty much every user of
gst_buffer_iterate_meta() filters for a specific
api type.

https://bugzilla.gnome.org/show_bug.cgi?id=775727
2016-12-14 18:18:43 +00:00
Tim-Philipp Müller
de65b88d13 buffer: mark gst_buffer_iterate_meta() as 'skip' for bindings
The pointer state arg won't work well, bindings can use
the foreach function instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775727
2016-12-14 15:23:41 +00:00
Iñaki García Etxebarria
9cdacefa98 g-i: Fix annotations for gst_event_new_select_streams() and gst_event_parse_select_streams()
A gchar is not a string.

https://bugzilla.gnome.org/show_bug.cgi?id=775944
2016-12-14 09:07:14 +00:00
Reynaldo H. Verdejo Pinochet
eb9c8bdf66 gstpad: only warn on performance penalty if not using the template caps
After b76ecfd992 introduced
GST_PAD_FLAG_ACCEPT_TEMPLATE, the performance penalty this
message is refering to (the cascading ACCEPT_CAPS query)
only applies to the cases where !GST_PAD_IS_ACCEPT_TEMPLATE
2016-12-14 00:01:34 -08:00
Sebastian Dröge
3fab00b46a queue/queue2: Protect against spurious condition variable wakeups
Make sure that we only wake up when we have to flush, or when this
specific query was handled.

https://bugzilla.gnome.org/show_bug.cgi?id=776039
2016-12-13 21:03:54 +02:00
Sebastian Dröge
33c239828b queue/queue2: Ensure that the streaming thread is unlocked after deactivating the srcpad
It might happen that the srcpad task function is never called at all, in
which case unlocking everything from there will never happen.

Make sure to unlock everything another time after the task function is
definitely stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=776039
2016-12-13 21:03:54 +02:00
Stefan Sauer
96304d613f gstvalue: add serialisation for GTypes
We need this in the GstTracerRecord. This will serialize GTypes to the typename
and vice versa.
2016-12-13 13:24:18 +01:00
Thibault Saunier
97b6d8fb12 gst: Fix building with msvc 2016-12-13 09:21:16 -03:00
Tim-Philipp Müller
49f1f351c8 gst: init new flags type in gst_init()
Fix 'make check' some more.
2016-12-12 20:55:31 +00:00
Tim-Philipp Müller
34660946f1 win32: update .def file for new API 2016-12-12 19:25:17 +00:00
Thibault Saunier
33616d47be info: Add a 'flags' parametter to gst_debug_get_stack_trace
This is an API break but that API has not been released yet.

We are passing a flag rather than a simple boolean as we can imagine
to implement more features in the future for example to retrieve a
stack trace for all the threads, etc..

Retrieving source file and line numbers is pretty
expensive while getting a stack trace, this new argument
allows the user to decide to retrieve a backtrace
without those infos instead which is much faster.

For example running $ GST_LEAKS_TRACER_STACK_TRACE=1 GST_DEBUG=GST_TRACER:7 \
GST_TRACERS=leaks time gst-launch-1.0 videotestsrc num-buffers=1 ! fakesink:

* With simple stack traces:

    0.04s user 0.02s system 99% cpu 0.060 total

* With full stack traces:

    0.66s user 0.23s system 96% cpu 0.926 total

https://bugzilla.gnome.org/show_bug.cgi?id=775423
2016-12-12 15:06:20 -03:00
Edward Hervey
6b73bf38d1 filesrc: Set GError in another error case
When changing the location while open, properly set the GError regarding
the failure.
2016-12-12 16:19:13 +01:00
Seungha Yang
ce11ddeb0c multiqueue: Fix overflow on get_buffering_level()
guint64 denominator factor for gst_util_uint64_scale_int() can cause overflow

https://bugzilla.gnome.org/show_bug.cgi?id=775921
2016-12-11 13:30:52 +02:00
Thibault Saunier
16bd0e7bac meson: Fix build 2016-12-09 19:31:51 -03:00