Commit graph

7617 commits

Author SHA1 Message Date
Sebastian Dröge c3963ae7a3 clock: Don't use invalid objects for GST_DEBUG_OBJECT()
Not sure what "clock" actually is here, it must be something defined by one of
the headers that are included.
2015-01-29 16:37:07 +01:00
Sebastian Dröge 6e47237e66 buffer: Document that gst_buffer_copy_region() accepts -1 as size to copy until the end
It's just a wrapper around gst_buffer_copy_into() after all.
2015-01-29 12:10:49 +01:00
Jan Schmidt f3756af07b segment: Add new skip flags for clarifying trick mode playback.
Add GST_SEEK_FLAG_TRICKMODE_KEY_UNITS and
GST_SEEK_FLAG_TRICKMODE_NO_AUDIO, and rename GST_SEEK_FLAG_SKIP
to GST_SEEK_FLAG_TRICKMODE (with backwards compat define).

Do the same for the corresponding SEGMENT flags.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-01-27 01:51:58 +11:00
Sebastian Dröge 40a0275298 uri: Fix indention 2015-01-22 23:10:06 +02:00
David Waring ab9b66e6be uri: Fix parsing issues
Make host IPs in square brackets store only the IP, i.e. strip the brackets.
Strip leading whitespace characters in URIs.
Fail parsing when host part does not match any valid formats from RFC3986.

https://bugzilla.gnome.org/show_bug.cgi?id=743195
2015-01-22 22:08:00 +01:00
Edward Hervey a6373625f3 gstpad: Inline apply_pad_offset()
Avoid doing a function call for something which will mostly be unused
2015-01-21 14:13:15 +01:00
Edward Hervey 64b451c170 gstpad: Fix debug message 2015-01-21 14:13:15 +01:00
Edward Hervey 93f540bb62 gstpad: Fix PROBE_NO_DATA macro
The problem was that the macro was always used with 'ret' as the defaultval
argument.

This would result in the macro eventually expanding to
    if (G_UNLIKELY (ret != ret && ret != GST_FLOW_OK))

... ret != ret will always fail, and therefore we'd never call the
following line.

Instead of that, store the previous value locally for comparision
2015-01-21 14:11:41 +01:00
Jan Schmidt 81d613694c clock: Improve slaving regression.
Add domain checks for the input values, and a variable precision
calculation that loops if necessary to ensure we never overflow
accumulators and then silently produce garbage results.

Make the (non-public) linear regression function available for
unit testing by putting it in a separate source file the test
can include. Add a unit test that the new regression function
produces sensible results for several inputs taken from real-world
captures.
2015-01-21 22:27:18 +11:00
Jan Schmidt 4bc7d34f57 clock: Add gst_clock_add_observation_unapplied()
gst_clock_add_observation_unapplied() adds a new master/slave clock
observation and runs the regression without activating the new
calibration results.
2015-01-21 22:27:18 +11:00
Jan Schmidt b79b14815e clock: Add gst_clock_adjust_with_calibration()
gst_clock_adjust_with_calibration() uses directly passed calibration
parameters, instead of using the clock's current calibration,
allowing for calculations using pending or old calibration params
2015-01-21 22:27:18 +11:00
Thiago Santos 0ab956d2c2 docs: fix typo in GstEvent docs
send -> sent
2015-01-20 10:35:47 -03:00
Sebastian Dröge 5b2c79eda7 bin: Pass structs we plan to modify around by pointer, not value
Otherwise the struct is going to be copied, which is not very efficient. And
also has the nice side effect that modifications of the struct might be
done in a copy, and we later use the original struct without the changes.

Caused LATENCY queries to always return the initialization values in one of my
tests, instead of the actual values reported by child elements.
2015-01-16 19:17:31 +01:00
Phillip Wood aefb6fda5e preset: fix incorrect preset version comparison
Use app_version if there are no system presets, so that if the
application presets are newer than the user presets they are merged.

https://bugzilla.gnome.org/show_bug.cgi?id=742877
2015-01-14 11:05:01 +01:00
Stefan Sauer 70788b8578 preset: fix sorting presets
The glib docs are not clear on this, but the qsort man-page is - the
GCompareDataFunc does not get the strings, but pointers to them.
2015-01-11 23:02:57 +01:00
Stefan Sauer 266481e9ff preset: don't return empty preset lists
Add a shortcut for the cases where an element implements the preset iface but
has no presets and return NULL instead of an empty list in that case.
2015-01-04 23:26:19 +01:00
Stefan Sauer 7326d4d71b docs: fix two gtk-doc warnings
One by correcting the end-of-comment marker and one by making sure the function
prototype in the header is in sync with the c file and doc-blob.
2014-12-29 12:05:27 +01:00
Nirbheek Chauhan b627201e7e iterator: Fix outdated example code and accompanying documentation
GstIterator no longer returns a refcounted gpointer
2014-12-27 10:59:31 +00:00
Stefan Sauer ef4910b9e6 debugutils: use a constant for the max param length
Improve readability by using a define for the max-chars. Also use the unicode
ellipsis as dot files are utf-8.
2014-12-21 14:15:54 +01:00
Edward Hervey d92e18b722 gstinfo: Add new maximum level debugging
API: GST_LEVEL_MAX

By compiling gstreamer (or plugins) with GST_LEVEL_MAX defined, only
the debugging statements at or below that level will be compiled in.

This allows compiling in some debugging (like errors and warnings) which
helps in debugging, but without the full cpu/memory overhead of all debugging
enabled.
2014-12-19 11:35:24 +01:00
Arun Raghavan e4d6896d0c debugutils: Truncate parameter values that are too long
This removes some information from the dumps, but improves readability.

https://bugzilla.gnome.org/show_bug.cgi?id=739165
2014-12-18 17:19:36 +05:30
Sebastian Dröge 1f6d5d3ff5 structure/caps: Add gst_{structure,caps}_filter_and_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
2014-12-16 18:22:46 +01:00
Sebastian Dröge bc11a1b79d caps: Add gst_caps_foreach() and gst_caps_map_in_place()
https://bugzilla.gnome.org/show_bug.cgi?id=739765
2014-12-16 18:22:46 +01:00
Nicolas Dufresne a8d6653037 bufferpool: Don't check size in config validation
Pools are allowed to change the size in order to adapt padding. So
don't check the size. Normally pool will change the size without
failing set_config(), but it they endup changing the size before
the validate method may fail on a false positive.

https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-16 10:20:37 -05:00
Wim Taymans 6f136b5399 bufferpool: log reason for discarded buffers
PERFORMANCE log the reason why a buffer could not be recycled in the
bufferpool.
2014-12-16 12:22:56 +01:00
Stefan Sauer a35094f1b3 preset: add gst_preset_is_editable()
Add a function to check if the preset iface implementation is editable and
document this from the implementers perspective.
API: gst_preset_is_editable()
2014-12-12 21:49:16 +01:00
Sebastian Dröge 82117cae03 debugutils: Fix compiler warning
gstdebugutils.c: In function 'gst_debug_bin_to_dot_data':
gstdebugutils.c:683:530: error: 'return' with no value, in function returning non-void [-Werror]
   g_return_if_fail (GST_IS_BIN (bin));
2014-12-12 13:57:39 +01:00
Arun Raghavan 8fadde9d23 debugutils: Add a gst_debug_bin_to_dot_data() method
This provides the dot file as a string, rather than dumping to a file.

https://bugzilla.gnome.org/show_bug.cgi?id=741425
2014-12-12 17:58:49 +05:30
Sebastian Dröge 154eefecc9 Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.

Also normalize booleans in a few places.
2014-12-01 09:51:37 +01:00
Edward Hervey 53cbbcd8d9 element: Fix doc and default implementation of send_event
The documentation states that gst_element_send_event is to "send an event
to an element".

Therefore we *send* upstream events to a source pad and downstream events
to a sink pad
2014-11-28 16:25:02 +01:00
Edward Hervey 78577fd8e4 element: Figure default send_event direction handling
If we get a downstream event we want to send it to a random SINK pad
(and vice-versa).
2014-11-28 11:16:00 +01:00
Wim Taymans 5cf630697c structure: don't overread input when searching for "
When searching for the string terminator don't read past the ending
0-byte when escaping characters.
Add unit test for various escaping cases.
2014-11-20 13:37:08 +01:00
Vincent Penquerc'h d4c551a292 pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.

We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.

Added back after previous revert, as it's been double checked.

https://bugzilla.gnome.org/show_bug.cgi?id=740003
2014-11-12 14:05:19 +00:00
Vincent Penquerc'h 1b06822ce3 Revert "pad: fail dropped queries"
This was pushed by mistake along with an unrelated patch.

This reverts commit c7103ce4b8.
2014-11-12 13:55:23 +00:00
Vincent Penquerc'h c7103ce4b8 pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.

We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.
2014-11-12 11:04:21 +00:00
Haakon Sporsheim 6c079367f1 task: Fix pause/stop race condition
If a task thread is calling pause on it self and the
controlling/"main" thread stops the task, it could end in a race
where gst_task_func loops and then checks for paused after the
controlling thread just changed the task state to stopped.
Hence the task would actually call func again even though it was
both paused and stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=740001
2014-11-12 12:00:48 +01:00
Jan Alexander Steffens (heftig) 5a930aa642 gstobject: Add gst_object_has_parent()
Adds gst_object_has_parent, which works like gst_object_has_ancestor
but does not ascend further.

API: gst_object_has_parent()
2014-11-10 10:03:57 +01:00
Stefan Sauer 969841f893 structure: remove conditional for G_VALUE_COLLECT_INIT
This API is in glib since 2.24 and we currently require 2.32 and already use
this unconditionally elsewhere.
2014-11-07 17:10:55 +01:00
Stefan Sauer ddc2fa2dab preset: remove commented code
The GQuark was never used.
2014-11-07 17:10:55 +01:00
Sebastian Dröge 444ceb0684 gstconfig: Put gstconfig.h into $(libdir)/gstreamer-1.0/include
It's architecture dependent and should not be placed into the include
directory as the assumption is that all those headers are architecture
independent.

https://bugzilla.gnome.org/show_bug.cgi?id=739767
2014-11-07 11:59:58 +01:00
Sebastian Dröge 83905c9937 uri: Fix gobject-introspection warnings
gsturi.c:997: Error: Gst: Skipping invalid GTK-Doc comment block:
/** private GstUri functions **/
^
gsturi.c:1179: Error: Gst: Skipping invalid GTK-Doc comment block:
/** RFC 3986 functions **/
^
2014-11-07 10:57:14 +01:00
Tim-Philipp Müller b77446bc6d toc: minor code clean-up
And get rid of g_list_prepend/g_list_reverse
anti-pattern while we're at it.
2014-11-02 20:18:38 +00:00
Luis de Bethencourt 4c66d08d08 gst: ensure GStreamer initialization debug message is displayed
The GST_INFO ("initialized GStreamer succesfully") is currently at the end of
gst_init_check which isn't guaranteed to be run since GStreamer can be
initialized by using init_pre and init_post directly from GOptionContext like
gst-launch does. Ensure this message is displayed by moving it to init_post.
2014-11-02 18:51:08 +00:00
Luis de Bethencourt c42b525848 doc: Do not use deprecated gtk-doc 'Rename to' tag
GObject introspection GTK-Doc tag "Rename to" has been deprecated, changing to
rename-to annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=739514
2014-11-02 15:17:57 +00:00
Tim-Philipp Müller e0d4eccc1e gst: make gst_init() thread-safe
Because we can, and there isn't really any
reason not to do so.
2014-10-28 19:16:52 +00:00
Arun Raghavan 03abd3bcc7 debugutils: Trivial typo fix 2014-10-25 17:17:21 +05:30
Tim-Philipp Müller 008f4ec46d message: remove duplicate gst_message_get_type() in init
Spotted by: Jan Steffens
2014-10-21 12:18:33 +01:00
Jan Schmidt d33440b51e gstvalue: Tidy initialisation
Use some macros to make our value functions setup a bit
tidier, and micro-optimise a few reallocs by setting an
initial size for the global type arrays.
2014-10-20 23:55:47 +11:00
Stefan Sauer bca04b06aa typefind: simplify registration code
Remove a useless assert (we just instantiated this type). Drop the free'ing of
the extension array. As we just created the instance this is always NULL.
2014-10-17 12:41:04 +02:00
Linus Svensson c8b512d2f0 bus: Add a function to remove a bus watch
If a bus watch is added to the non default main context it's not
possible to remove it using g_source_remove().

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=735195
2014-10-14 10:31:18 +02:00