Commit graph

7678 commits

Author SHA1 Message Date
Matthieu Bouron
ee9ca5d48b gstutils: check uri before using it in gst_pad_create_stream_id_internal
If an element implements wrongly the URI query and set the uri to NULL and if
the element calls gst_pad_create_stream_id at some point, it will lead to crash
as the uri is not supposed to be NULL in the gst_pad_create_stream_id_internal
function.

https://bugzilla.gnome.org/show_bug.cgi?id=744520
2015-02-15 17:35:35 +00:00
Sebastian Dröge
ae0b12b109 pad: gst_pad_iterate_internal_links() can return NULL if there are none 2015-02-12 14:03:15 +02:00
Sebastian Dröge
5141641dc8 pad: Return NULL instead of FALSE for pointers 2015-02-12 14:03:03 +02:00
Sebastian Dröge
1937d09a95 pad: Implement more useful default handling for the LATENCY query
Before we just took the values from the first pad that succeded the query,
now we accumulate the results of every sinkpad properly and return that
result.
2015-02-12 13:55:36 +02:00
Sebastian Dröge
4a5ce862a2 Improve and fix LATENCY query handling
This now follows the design docs everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 17:53:04 +02:00
Jan Schmidt
9d2b2768e3 clock: Make linear regression x/y base start from maximum observation.
Project the results of the linear regression to the end of the
regression range, so they're more directly comparable to results
going forward
2015-02-07 04:38:39 +11:00
Tim-Philipp Müller
08167e3234 pad: add "offset" property to go with gst_pad_set_offset()
So we can set the offset via gst-launch.
2015-02-05 13:49:47 +00:00
Stefan Sauer
423bd42d44 plugin: add more detail to logging when not loading a plugin
Improve the log messages and add e.g the version number we checked.
2015-02-02 09:41:06 +01:00
Jan Schmidt
ae2b0bacb6 gstpad: Fix a typo in a docstring. 2015-02-02 17:38:00 +11:00
Nicolas Dufresne
2b7a15172f build: Check that _MSC_VER macro is defined 2015-02-01 14:23:26 -05:00
Ilya Konstantinov
05296b35a5 task: Add thread name support on OS X and iOS 2015-02-01 20:11:20 +01:00
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
Arun Raghavan
8bf0cbf4a8 docs: Update GstQOSType documentation a bit
Correction for who is producing data too fast, and some other minor
clarifications.

https://bugzilla.gnome.org/show_bug.cgi?id=738166
2014-10-11 12:53:08 +02:00
Nicolas Huet
00bcd94723 systemclock: fix multi-thread entry status issue
Running two threads, one executing the timer and one unscheduling it, the
unscheduled status set by the second thread is sometimes overwritten by the
first one.

https://bugzilla.gnome.org/show_bug.cgi?id=737999
2014-10-06 15:58:42 +03:00
Sebastian Dröge
2b6298ebc5 uri: Don't unconditionally use g_list_copy_deep()
We don't depend on GLib 2.34 yet and just for this seems a bit useless.

https://bugzilla.gnome.org/show_bug.cgi?id=737584
2014-09-29 17:48:29 +03:00
Sebastian Dröge
55c7656a03 uri: Include our own BSD licensed copy of strcasestr() for Windows and others 2014-09-29 16:22:47 +03:00
Sebastian Dröge
932d9c1657 uri: Fix compiler warnings with gcc
These are actually not true.

gsturi.c: In function '_gst_uri_string_to_table.constprop':
gsturi.c:1316:27: error: 'pct_kv_sep' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             for (next_sep = strcasestr (value, pct_kv_sep); next_sep;
                           ^
gsturi.c:1283:24: error: 'pct_part_sep' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               next_sep = strcasestr (next_sep + 1, pct_part_sep)) {
                        ^
2014-09-29 15:54:37 +03:00
Sebastian Dröge
b9bf5d5ff2 uri: Fix memory leak in gst_uri_join()
The merged path segments are a deep-copied list and we need to free the
contained strings too instead of just the list nodes themselves.
2014-09-29 12:19:35 +03:00
David Waring
54c5f1855c GstUri: Add GstUri miniobject to handle URIs in an RFC 3986 compliant fashion
https://bugzilla.gnome.org/show_bug.cgi?id=725221
2014-09-29 12:19:05 +03:00
Stefan Sauer
d5518edf12 fixme: bump leftover 0.11 fixme comments 2014-09-25 21:27:03 +02:00
Stefan Sauer
7bb838be40 event: 'newsegment' to 'segment' in the docs
Brings the api-docs in sync with the 1.0 api rename.
2014-09-25 21:04:23 +02:00
Tim-Philipp Müller
70d692c431 info: remove confusing warning about running under valgrind
We're not actually doing anything differently anywhere when
we detect that we're running under valgrind, so let's not
print that confusing message that makes people wonder how
they can switch it off so they can valgrind the normal
code paths. Seeing that we're not doing that nor have done
so in the last 10 years we might just as well remove the
entire check actually.
2014-09-25 18:55:03 +01:00
William Manley
e9e620cd37 docs: Fix GstBuffer typo "memory bock" -> "memory block"
https://bugzilla.gnome.org/show_bug.cgi?id=737117
2014-09-23 19:31:21 +03:00
William Manley
f6b053d375 docs: Improve gst_buffer_get_meta() to clear up confusion
I was confused by the existence of `gst_buffer_get_meta` as it suggested
to me that you should only attach one of any type of GstMeta to a buffer.
It's perfectly fine to attach multiple from a single API so I'm
documenting that here.

https://bugzilla.gnome.org/show_bug.cgi?id=737129
2014-09-23 19:30:15 +03:00
Marcin Kolny
4707c0410c datetime: added missing include directives
https://bugzilla.gnome.org/show_bug.cgi?id=737133
2014-09-23 19:27:25 +03:00
Ravi Kiran K N
7a93e6b005 gsturi: Remove unnecessary code
gst_uri_handler_set_uri() function has new_uri, location and colon
are not necessary, they can be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=736877
2014-09-19 10:42:03 +01:00
Olivier Crête
e87660425c gst: Fix spelling error
Thank to Adrian Owen for reporting this error.

https://bugzilla.gnome.org/show_bug.cgi?id=736839
2014-09-17 21:49:47 -04:00
Stefan Sauer
a528dadb98 info: avoid global variable for log_file
Use user_data to pass the log_file handle to the logger-function.

If one wants to change the log target (e.g. GST_DEBUG_FILE), simply call
gst_debug_remove_log_function() and re-add the handler with the new log-target
using gst_debug_add_log_function ().
2014-09-17 09:47:36 +02:00
Ognyan Tonchev
343007894e event: add annotations to gst_event_parse_toc_select()
https://bugzilla.gnome.org/show_bug.cgi?id=736739
2014-09-17 09:51:45 +03:00
Ognyan Tonchev
3f19a75d63 query: Add annotations to gst_query_add_allocation_pool()
https://bugzilla.gnome.org/show_bug.cgi?id=736736
2014-09-16 14:44:12 +03:00
Sebastian Dröge
126c511e62 pad: Make sure the buffer to get/pull_range() has at least the requested size
https://bugzilla.gnome.org/show_bug.cgi?id=735861
2014-09-12 15:22:19 +03:00
Ognyan Tonchev
475f8e8cfb query: add annotations to gst_query_set_nth_allocation_pool()
https://bugzilla.gnome.org//show_bug.cgi?id=736424
2014-09-12 10:15:46 +01:00
Tim-Philipp Müller
c06d9f7b98 devicemonitor: fix typo in sample code in docs
https://bugzilla.gnome.org/show_bug.cgi?id=735975
2014-09-03 19:55:07 +01:00
Wim Taymans
060b16ac75 pad: don't accept flush-stop on inactive pads
Inactive pads should at all times have the flushing flag set. This means
that when we get a flush-stop on an inactive pad we must ignore it.

On sinkpads, make this more explicit. We used to not clear the flush
flag but remove the events and then return an error because the flushing
flag was set. Now just simply refuse the event without doing anything.

On srcpads, check that we are trying to push a flush-stop event and
refuse it. We would allow this and mark the srcpad as non-flushing
anymore.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=735357
2014-09-02 12:04:15 +02:00
Arnaud Vrac
f0deb37a86 buffer: do not touch memory tag flag when copying buffer flags
The tag memory flag will be set later if the memory is also copied. This
patch avoids buffers being freed needlessly in bufferpools.

https://bugzilla.gnome.org/show_bug.cgi?id=735574
2014-08-28 12:20:12 +03:00
Linus Svensson
b0fff643dc bus: gst_bus_add_watch() can return 0 on error
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=735195
2014-08-28 10:10:37 +03:00
Tim-Philipp Müller
b38264a9cb pad: add g-i 'transfer full' annotations to chain and chain_list functions
https://bugzilla.gnome.org/show_bug.cgi?id=735210
2014-08-23 12:24:27 +01:00
Guillaume Desmottes
a647d83267 pad: annotate GstPadEventFunction event with 'transfer full'
The callback is supposed to take ownership of the event so
best to be explicit about it.

https://bugzilla.gnome.org/show_bug.cgi?id=735210
2014-08-23 12:21:30 +01:00
Philippe Normand
b1f2359809 bus: destroy signal watch from the context it was mapped to
Don't rely on g_source_remove() because it operates on the main
context. If a signal watch was added to a new thread-default context
g_source_remove() would have no effect. So simply use
g_source_destroy() to avoid this problem.

Additionally the source_id was removed from GstBusPrivate because it
was redundant with the signal watch GSource also stored in that
structure.

https://bugzilla.gnome.org/show_bug.cgi?id=734716
2014-08-13 18:44:39 +03:00
Sebastian Dröge
2f33fd5c19 bin: Use allow-none instead of nullable until we depend on a new enough GI version 2014-08-13 12:40:37 +03:00
Sebastian Dröge
9b96d4c7cd bin: gst_bin_new() can accept NULL as name 2014-08-13 12:39:47 +03:00
Sebastian Dröge
82e01491a0 element: Clarify docs about gst_element_get_request_pad() and remove deprecation part
This function is not really pad or slow for the common case of requesting a
pad with the name of the template. It is only slower if you to name your pads
directly instead of letting the element handle it.

Also there's no reason to deprecate it in favor of a more complicated function
for the common case.
2014-08-13 12:37:08 +03:00
Arun Raghavan
d3e411bda4 docs: Trivial pad documentation fix
Presumably a copy-pasto.
2014-08-12 20:04:11 +05:30
Sebastian Dröge
27d1901d19 utils: Ghostpads can be request pads too but check if the pad has a template
Otherwise we dereference NULL in some cases and crash.
2014-08-06 14:43:08 +02:00
Sebastian Rasmussen
a041e65503 utils: Unref/release pads in error cases when linking pads
Previously gst_element_link_pads_full() forgot to unreference or release
request pads in several error cases. Also comments were added mentioning
why releasing is not necessary in some places.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733119
2014-08-06 09:58:30 +02:00
Mohammed Sameer
59749833bb bufferpool: Add missing error checking to default_alloc_buffer()
default_alloc_buffer() calls gst_buffer_new_allocate() but does not check for
failed allocation.

This patch makes default_alloc_buffer() return an error (GST_FLOW_ERROR) if
buffer allocation fails.

https://bugzilla.gnome.org/show_bug.cgi?id=733974
2014-07-30 09:02:20 -04:00
Sebastian Rasmussen
0887020581 parse: Unref reference to enclosing bins
Previously all reference to enclosing bins of an element were leaked
when doing delaying setting a property.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733697
2014-07-28 08:41:27 -03:00
Руслан Ижбулатов
b87c55f6ed poll: Prevent false-negative from WAKE_EVENT() on W32
SetEvent() seems to not call SetLastError(0) internally, so checking last
error after calling SetEvent() may return the error from an earlier W32 API
call. Fix this by calling SetlastError(0) explicitly.

Currently WAKE_EVENT() code is cramped into a macro and doesn't look to be
entirely correct. Particularly, it does not check the return value of
SetEvent(), only the thread-local W32 error value. It is likely that SetEvent()
actually just returns non-zero value, but the code mistakenly thinks that the
call has failed, because GetLastError() seems to indicate so.

https://bugzilla.gnome.org/show_bug.cgi?id=733805
2014-07-28 09:13:44 +02:00
Tim-Philipp Müller
24080568a1 gst: include atomicqueue.h again in gst.h
It's a public header of gstreamer core, so #include <gst/gst.h>
should make the API available.
2014-07-26 14:43:34 +01:00
Tim-Philipp Müller
fbe2477fae bufferlist: pre-allocate buffer array in one go with the buffer list
We can now create and free a buffer list with one slice alloc/free
call in most cases, instead of one slice alloc/free for the list,
one slice alloc/free for the GArray, and one malloc/free for the
GArray array. In practice we know the max size of our buffer list
from the start, so can avoid reallocs.

https://bugzilla.gnome.org/show_bug.cgi?id=732284
2014-07-24 10:45:23 +01:00
Stefan Sauer
3fbc3d76dc private: allow internal access to the debug base-time
Moving the extern to the head lets us access this from other parts as well. This
is neeed in the tracer branch.
2014-07-23 21:30:21 +02:00