Commit graph

7586 commits

Author SHA1 Message Date
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