Commit graph

7812 commits

Author SHA1 Message Date
Wim Taymans bc282da83c segment: remove the bounds check from _to_running_time_full()
Do not do any checks for the start/stop in the new
gst_segment_to_running_time_full() method, we can let this be done by
the more capable gst_segment_clip() method. This allows us to remove the
enum of results and only return the sign of the calculated running-time.
We need to put the old clipping checks in the old
gst_segment_to_running_time() still because they work slightly
differently than the _clip methods.

See https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-20 09:00:47 +01:00
Wim Taymans edf484ab6b segment: add option to disable clipping
Add a clip argument to gst_segment_to_running_time_full() to disable
the checks against the segment boundaries. This makes it possible to
generate an extrapolated running-time for timestamps outside of the
segment.

See https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-19 17:36:36 +01:00
Tim-Philipp Müller 1734915850 gst: ref/unref new enum type in gst_init/deinit() 2015-03-18 16:27:36 +00:00
Wim Taymans 8c8b3818e4 segment: add helper to get negative running-time
Add a helper method to get a running-time with a little more features
such as detecting if the value was before or after the segment and
negative running-time.

API: gst_segment_to_running_time_full()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-03-18 11:35:42 +01:00
Wim Taymans 6e67ad7675 segment: fix offset handling with non 0 start
The position in the segment is relative to the start but the offset
isn't, so subtract the start from the position when setting the offset.
Add unit test for this as well.
2015-03-18 11:35:42 +01:00
Sebastian Dröge c19809ef19 pluginloader: Fix indention 2015-03-17 15:41:38 +01:00
Ramiro Polla 5253a4d879 element: properly escape percent sign in documentation 2015-03-14 14:19:47 +00:00
Sebastian Dröge 21da311743 buffer: Use the correct enum type to fix a compiler warning
gstbuffer.c:522:58: error: implicit conversion from enumeration type 'GstBufferFlags' to
      different enumeration type 'GstBufferCopyFlags' [-Werror,-Wenum-conversion]
  if (!gst_buffer_copy_into (copy, (GstBuffer *) buffer, flags, 0, -1))
       ~~~~~~~~~~~~~~~~~~~~                              ^~~~~
gstbuffer.c:534:46: error: implicit conversion from enumeration type 'GstBufferCopyFlags' to
      different enumeration type 'GstBufferFlags' [-Werror,-Wenum-conversion]
  return gst_buffer_copy_with_flags (buffer, GST_BUFFER_COPY_ALL);
         ~~~~~~~~~~~~~~~~~~~~~~~~~~          ^~~~~~~~~~~~~~~~~~~
./gstbuffer.h:433:31: note: expanded from macro 'GST_BUFFER_COPY_ALL'
  ...((GstBufferCopyFlags)(GST_BUFFER_COPY_METADATA | GST_BUFFER_COPY_MEMORY))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2015-03-14 13:37:09 +00:00
Nicolas Dufresne 7f6b11a5b2 allocation: Allow allocation pool without size
This allow proposing a number of buffers required even if the size
of buffer is unfixed. This is often the case for encoded formats.
2015-03-14 12:00:53 +00:00
Nicolas Dufresne c740bad1a0 bufferpool: Don't stop the pool in set_config()
Don't stop the pool in set_config(). Instead, let the controlling
element manage it. Most of the time, when an active pool is being
configured is because the caps didn't change.

https://bugzilla.gnome.org/show_bug.cgi?id=745377
2015-03-14 12:00:53 +00:00
Thiago Santos 96eaeadc0f gstbuffer: add gst_buffer_copy_deep
A variant of gst_buffer_copy that forces the underlying memory
to be copied.

This is added to avoid adding an extra reference to a GstMemory
that might belong to a bufferpool that is trying to be drained.
The use case is when the buffer copying is done to release the
old buffer and all its resources.

https://bugzilla.gnome.org/show_bug.cgi?id=745287
2015-03-13 18:37:04 +00:00
Sebastian Dröge d8f572647f bus: Use g_list_free_full() instead of manually unreffing and freeing
Also unref the messages, not the GList nodes.
2015-03-13 15:31:30 +00:00
Sebastian Dröge f50d809c25 bus: Fix another case where we hold the object lock while unreffing a message 2015-03-13 13:42:46 +00:00
Vivia Nikolaidou 721539dc4f bus: Unreferencing messages outside the lock
Shouldn't take the lock while unreferencing messages, because that may cause
more messages to be sent, which will try to take the lock and cause the app to
hang.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728777
2015-03-13 13:37:49 +00:00
Vivia Nikolaidou 6ec3c4bc66 utils: Add gst_bin_sync_children_states()
gst_bin_sync_children_states() will iterate over all the elements of a bin and
sync their states with the state of the bin. This is useful when adding many
elements to a bin and would otherwise have to call
gst_element_sync_state_with_parent() on each and every one of them.

https://bugzilla.gnome.org/show_bug.cgi?id=745042
2015-03-13 12:50:48 +00:00
Aurélien Zanelli 3da3e8df3e printf: handle unsigned modifier for long long
Otherwise, an unsigned integer will be displayed as a signed one if we
use internal print, ie HAVE_LONG_LONG_FORMAT is not defined.

https://bugzilla.gnome.org/show_bug.cgi?id=746096
2015-03-12 15:23:20 +00:00
Matej Knopp b7f958abad printf: add support for %I32
https://bugzilla.gnome.org/show_bug.cgi?id=744281
2015-03-12 13:29:00 +00:00
Tim-Philipp Müller 2d92f5e6d8 info: move category level threshold check into log function dispatcher
Minor optimisation: check category log level earlier in the
log function dispatcher and not only in the default log
function.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
2015-03-12 13:16:22 +00:00
Tim-Philipp Müller bd7d1c8b61 Fix double semicolons 2015-03-10 09:24:28 +00:00
Tim-Philipp Müller 4e777233f5 info: avoid malloc/free if log object is NULL 2015-03-05 18:30:45 +00:00
Tim-Philipp Müller 5764316a8e info: move __FILE__ path shortening into default log handler
Instead of always shortening the __FILE__ path, even if the
log message is not actually printed, which might happen if
the log level is activated but the category is not, only
shorten the path if we're actually going to output it and
if it looks like it needs shortening. Log handlers had no
guarantee that they would get a name instead of a path
anyway on any architecture, so it shouldn't be a problem.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
2015-03-05 17:57:58 +00:00
Peter Urbanec 6cbe86dc58 info: shorten __FILE__ on all platforms
This is useful not only for MSVC, but also with gcc/Linux
when doing cross-compilation builds and out-of-tree builds.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
2015-03-05 17:53:16 +00:00
Tim-Philipp Müller a988871074 utils: improve warning when linking elements without common ancestor
This comes up quite a lot and it's a common mistake, so let's
try to improve the warning message a little.
2015-03-02 20:31:58 +00:00
Arun Raghavan be36d34aee pad: Don't fail latency query on unlinked pads
A single unlinked pad can make the latency query fail across the
pipeline, which is probably not desirable. Instead, we return a default
anything goes value.

Perhaps we should also be emitting a gst_message_new_latency() when a
PLAYING element has one of its pads linked.

https://bugzilla.gnome.org/show_bug.cgi?id=745197
2015-02-26 15:57:26 +05:30
Edward Hervey 075def0f97 gstvalue: Make sure GST_FOURCC_ARGS produces printable characters
Some systems will crash if we use non-printable characters in print/debug
statements.

Make sure that GST_FOURCC_ARGS never does that

https://bugzilla.gnome.org/show_bug.cgi?id=745144
2015-02-26 07:49:05 +01:00
Luis de Bethencourt 4245658d28 gstutils: remove incorrect Fixme comment
If the checks were changed to using g_return_if_fail() the GST_DEBUG lines
about the specific failure would be lost.
2015-02-25 16:11:06 +00:00
Luis de Bethencourt 5f027ae453 gstutils: remove obsolete Fixme comment
gst_pad_link_filtered() is very long gone and current
gst_element_link_pads_filtered() doesn't apply to this Fixme comment.
2015-02-25 16:02:39 +00:00
Luis de Bethencourt bcce3fbcb8 GstDeviceMonitor: keep alphabetical order 2015-02-23 12:24:16 +00:00
Olivier Crête f9baff11c8 Revert "element: set pads need-parent flag to false when removing"
This reverts commit 1911554cff.

This breaks the functionality of GST_PAD_FLAG_NEED_PARENT, the reason for this
flag is that if a pad is removed from a running element, you don't want
functions (such as chain or event) to be called on the pad without a parent set.
This can happen if you remove a request or sometimes pad from a running element.

I don't see the code that caused this in tsdemux, but if it needs to unset
the flag on remove, it should do it itself and then make sure that the parent
exists in any pad function.
2015-02-20 16:22:23 -05:00
Sebastian Dröge 6f9adbe273 pad: If the latency query fails for one of the pads, it fails overall 2015-02-19 01:12:49 +02:00
Tim-Philipp Müller 10f038d4fb message: revive async delivery message before bus thread can run unref
Revive message in dispose handler before we signal the bus thread,
otherwise the bus thread might be woken up and unref the message
before we had a chance to revive it yet.
2015-02-17 20:49:53 +00:00
Tim-Philipp Müller da7847d1ad message, bus: fix async message delivery
Async message delivery (where the posting thread gets blocked
until the message has been processed and/or freed) was pretty
much completely broken.

For one, don't use GMutex implementation details to check
whether a mutex has been initialized or not, esp. not
implementation details that don't hold true any more with
newer GLib versions where atomic ops and futexes are used
(spotted by Josep Torras). This led to async message
delivery no longer blocking with newer GLib versions on
Linux.

Secondly, after async delivery don't free mutex/GCond
embedded inside the just-freed message structure.

Use a new (private) mini object flag to signal GstMessage
that the message being freed is part of an async delivery
on the bus so that the dispose handler can keep the message
alive and the bus can free it once it's done cleaning up
stuff.
2015-02-17 09:52:09 +00:00
Tim-Philipp Müller 9f58aa080a info: nicer buffer offset printing when offsets are not set
Print unset offsets as 'none' instead of humongous numbers,
for better readability.
2015-02-16 19:36:11 +00:00
Sebastian Dröge 9107a5e041 pad: Only initialize GValue to a type once, not on every retry
Otherwise we'll get warnings like this:
cannot initialize GValue with type 'gboolean', the value has already been initialized as 'gboolean'
2015-02-16 11:35:41 +02:00
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
Thiago Santos 4ca6694e09 gstvalue: add GstTagList compare function
When serializing GstStructures from events in GDP it will add a taglist
as a GstStructure field, having the compare function allows comparison of
GstStructures to check if the serialized/deserialized version matches the
original one, among other cases.

https://bugzilla.gnome.org/show_bug.cgi?id=733131
2014-07-21 11:42:05 -03:00
Sebastian Dröge 1299d06ef1 pipeline: Reset the start time when going from PAUSED to READY too 2014-07-21 09:33:54 +02:00
Sebastian Dröge aa6aaa42a8 pipeline: Reset start time in READY->PAUSED before chaining up
Otherwise bin will change the state of the child elements without
distributing the new start time.
2014-07-21 09:33:54 +02:00
Sebastian Rasmussen 4dca9a79a2 debugutils: Unref pad template after use
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733121
2014-07-16 16:44:11 +02:00
Thiago Santos c7aa4e6a5f gst: init taglist gtype to use it in gstvalue
Otherwise it will have a 0 value and GstTagList won't be found
for GstValue functions (serialization/deserialization)

https://bugzilla.gnome.org/show_bug.cgi?id=733131
2014-07-14 18:45:11 -03:00
Sebastian Rasmussen 863ba1a598 docs: Fix documentation typos and inconsistencies
* GstGlobalDeviceMonitor was renamed to GstDeviceMonitor
 * Expand GST_MESSAGE_DEVICE to the full enum value names
 * Correct the incorrect references to the GstDeviceProvider interfaces
 * Describe caps arguments for gstcheck interface
 * Add missing docs for GstNetAddressMeta and its add function
 * Add docs for toc helper macros
 * Avoid refering to GstValueList type as done elsewhere

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732786
2014-07-09 09:22:11 +02:00
Sebastian Dröge 125ae3acb1 message: Work around g-i/pygobject/gjs bug with ~0 in enums
GST_MESSAGE_ANY was considered a long by pygobject and gjs, and thus
couldn't be used in gst_bus_poll() and similar APIs as they expect an
int-typed enum.

Just use 0xffffffff instead for now.

https://bugzilla.gnome.org/show_bug.cgi?id=732633
2014-07-03 10:13:28 +02:00
Göran Jönsson d0a808cdc8 pad: Don't unlock while iterating over all sticky events for removal
Otherwise we might end up getting the event removed from elsewhere
at the same time while we're unlocked for g_object_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=732556
2014-07-01 19:26:18 +02:00
Evan Nemerson 5abc82e9f3 introspection: Assorted minor introspection and documentation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=732534
2014-07-01 09:03:41 +02:00
Guillaume Desmottes 688108431a devicemonitor: Stop using g_clear_pointer()
We dont't want to depend on GLib 2.34 for now.
2014-06-30 11:17:44 +02:00
Tim-Philipp Müller 0e0e78e8af devicemonitor: don't fail when started without any filters
Just show all devices then.
2014-06-27 10:47:50 +01:00
Tim-Philipp Müller 9b07b935a4 deviceproviderfactory: handle NULL classes argument and match any 2014-06-27 10:44:01 +01:00
Olivier Crête 67440ce084 devicemonitor: Improve documentation 2014-06-26 21:01:38 -04:00
Olivier Crête 6d12b33945 devicemonitor: Make it possible to add multiple filters
Each filter will include a GstCaps and a set of classes to match
2014-06-26 21:01:38 -04:00
Olivier Crête d76e0be9fd device: Add pre-conditions 2014-06-26 16:31:51 -04:00
Olivier Crête c2583cae90 GstDeviceMonitor: Rename from GstGlobalDeviceMonitor 2014-06-26 15:08:46 -04:00
Olivier Crête 7992174a1a DeviceProvider: Rename from DeviceMonitor 2014-06-26 14:45:30 -04:00
Philip Withnall 9edef56efc miniobject: Add missing (nullable) annotations
gst_mini_object_replace() can take NULL mini-objects.

https://bugzilla.gnome.org/show_bug.cgi?id=730873
2014-06-26 19:16:07 +02:00
Sebastian Dröge fe192fe399 message: Application and element messages should not have NULL structures
It does not make sense for them.
2014-06-26 19:02:06 +02:00
Evan Nemerson 4088363aea introspection: add some missing allow-none annotations to in params
https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 19:00:58 +02:00
Evan Nemerson 5d80cf12ba introspection: add nullability annotations to out and inout params
https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:59:15 +02:00
Evan Nemerson 2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +02:00
George Kiagiadakis 780c83d5c4 caps: unset the parent refcount of the old features before freeing them in gst_caps_set_features()
Otherwise gst_caps_features_free() asserts and the features structure is leaked
2014-06-26 11:16:34 +03:00
Tim-Philipp Müller 8e30a9462c caps: gst_caps_is_any() should return TRUE or FALSE
Not some flag value instead of TRUE. Fixes code like
gst_caps_is_any() == TRUE.

https://bugzilla.gnome.org//show_bug.cgi?id=731704
2014-06-22 12:50:42 +01:00
Tim-Philipp Müller 2092754ed1 device: rename "klass" and get_klass() to "device-class" and _get_device_class()
There's some precedent in GstElementFactory, but a
"klass" property just seems weird.
2014-06-21 01:26:46 +01:00
Tim-Philipp Müller 89a5b89388 value: simplify GST_VALUE_HOLDS for our boxed and fundamental types
Boxed types can't be derived from, and we don't support
deriving from our special fundamental types (the code
checks for GType equality in most places.
2014-06-21 01:10:22 +01:00
Olivier Crête 77db6bf3d6 GstDevice: Document GstDevice and related classes 2014-06-20 16:55:06 -04:00
Tim-Philipp Müller bc75a166f0 gstvalue: optimise checks for lists
Our fundamental types are non-derivable, so we can
just check for equality. Also avoid doing the same
check multiple times in a couple of places.
2014-06-19 08:40:16 +01:00
Tim-Philipp Müller d74708a820 gstvalue: use g_assert() in internal function for already-checked things
So these get compiled out for releases.
2014-06-19 08:40:15 +01:00
Tim-Philipp Müller bbefd6082f gstvalue: add internal _can_compare_unchecked() 2014-06-19 08:40:15 +01:00
Tim-Philipp Müller adcbe94aff gstvalue: add internal _list_concat() that takes ownership of input values
Avoids unnecessary copies.
2014-06-19 08:40:15 +01:00
Tim-Philipp Müller 5f6088f039 structure: simplify value type checks in getters
Just check for GType equality in common cases.
2014-06-19 08:40:15 +01:00
Sebastian Dröge 8f4b479c98 value: Add a FIXME 2.0 for a fraction ranges optimization
Currently we leak the internal representation of them as two GValues that
contain a fraction. Without this we could store fraction ranges as
  data[0] = (min_n << 32) | (min_d)
  data[1] = (max_n << 32) | (max_d)
and wouldn't require an additional allocation per range.
2014-06-19 09:33:55 +02:00
Sebastian Dröge 9b7da39b68 value: Make sure to cast int range values to guints before storing them
Otherwise negative values will sets all of the 64 bits due to two's
complement's definition of negative values.

Also add a test for negative int ranges.
2014-06-19 09:33:54 +02:00
Sebastian Dröge d84d01aad4 value: Store integer ranges directly in a GValue without additional allocation
Micro optimization to save some allocations. Next step to do this
with fraction ranges too.
2014-06-19 09:09:07 +02:00
Edward Hervey 37e8ffcc4f gst_private: Fix duplicate definition 2014-06-19 08:43:36 +02:00
Sebastian Dröge db1e4422b6 gst: Store more basic type GTypes in variables
Micro optimization to change a function call to a variable access
for all our basic types.
2014-06-19 08:06:55 +02:00
Sebastian Dröge f47a95f4cb value: Store our fundamental type GTypes in variables
Micro optimization to change a function call to a variable access
for all our basic types.
2014-06-19 08:06:55 +02:00
Edward Hervey b0b20b44e5 gstvalue: Speed up gst_value_intersect/_subtract
Both gst_value_intersect and gst_value_subtract will call
gst_value_compare if one of their arguments isn't a list.

gst_value_compare will then re-do a check to see if one of
the arguments is a list (for the special case of comparing a unitary
value with a list of length 1).

The problem is that the various G_VALUE_HOLDS represent an expensive
amount of calling gst_value_compare (almost half of it) to see if
the provided arguments are list. These checks can be done without
when we know that the arguments aren't lists.

* Create a new "nolist" gst_value_compare which avoids that special
  case comparision

Benchmarks:
 valgrind/callgrind: average speedup in instruction calls for
 gst_value_intersect and gst_value_subtract is around 56% (Makes 63%
 of the calls it used to take previously)

 tests/benchmarks/capsnego: With default settings (depth 4, children 3
 607 elements), time taken for transition from READY to PAUSED:
   Before : 00.391519153
   After  : 00.220397492
    56% of the time previously used, +77% speedup

https://bugzilla.gnome.org/show_bug.cgi?id=731756
2014-06-17 16:27:07 +02:00
Tim-Philipp Müller 87fcf1e078 bufferlist: fix buffer leak in _remove() 2014-06-16 20:29:56 +01:00
Tim-Philipp Müller bd26fa7ccb devicemonitor: some docs additions and fixes 2014-06-14 16:30:49 +01:00
Evan Nemerson 2a14482c62 introspection: minor annotation additions
https://bugzilla.gnome.org/show_bug.cgi?id=731541
2014-06-12 09:26:38 +01:00
Evan Nemerson ba1212f63b introspection: include gstversion.h in GIR generation
https://bugzilla.gnome.org/show_bug.cgi?id=703021
2014-06-12 08:22:20 +01:00
Tim-Philipp Müller 12088d87bb globaldevicemonitor: prettify header 2014-06-07 10:13:56 +01:00
Evan Nemerson 1fe6d3ad08 introspection: fix some minor annotation bugs
https://bugzilla.gnome.org/show_bug.cgi?id=730982
2014-06-06 15:15:12 -04:00
Tim-Philipp Müller b65a7a7034 info: make printing datetimes work with GST_PTR_FORMAT 2014-06-03 23:49:26 +01:00
Tim-Philipp Müller 8998cf840d datetime: change internal implementation to mini object
And move type stuff from GstValue to GstDateTime.
2014-06-03 23:49:21 +01:00
Wim Taymans 36d4c4c218 info: first handle all miniobjects, then GObjects
First handle all miniobjects before we attempt to dereference the first
field pointer and look at the GType. With the recent glib change to
speed up G_IS_OBJECT, this causes crashes on miniobjects otherwise.
2014-06-03 14:47:17 +02:00
Wim Taymans 460be3e124 info: GstDateTime does not have a GType as first field
GstDateTime does not have the GType as the first field so we can't use
it to detect its type.
2014-06-03 14:46:11 +02:00
Wim Taymans e457739ac9 info: use macros to check types
Use the macros to check the type of objects instead of directly poking
at the first field.
2014-06-03 14:45:22 +02:00
Tim-Philipp Müller 64c71323a6 globaldevicemonitor: connect sync-message signal on the right object
Fixes criticals at runtime and makes stuff actually work.
2014-06-01 23:51:20 +01:00
Sebastian Dröge 066fdcd432 Revert "miniobject: Add missing (nullable) annotations"
This reverts commit 96361e9b5c.

This was not supposed to be pushed yet!
2014-05-30 09:13:16 +02:00
Sebastian Dröge 67138f4ee8 bufferpool: It's pool, not poo... even when talking about flushing 2014-05-30 09:12:50 +02:00
Philip Withnall 96361e9b5c miniobject: Add missing (nullable) annotations
gst_mini_object_replace() can take NULL mini-objects.

https://bugzilla.gnome.org/show_bug.cgi?id=730873
2014-05-30 09:12:49 +02:00
Evan Nemerson e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller 88191aa880 docs: fix type in GstObject docs 2014-05-30 00:14:01 +01:00
Evan Nemerson 4397150d54 bufferpool: fix gst_buffer_pool_has_option() documentation
https://bugzilla.gnome.org/show_bug.cgi?id=730962
2014-05-29 23:18:18 +01:00
Thiago Santos 1911554cff element: set pads need-parent flag to false when removing
When a pad is added the need-parent flag is set to true, so when
they are removed the flag should be set back to false

This was preventing GstPads to be reused in elements (removed and
later re-added). A unit tests was added to verify that this is
working now.

The use case is tsdemux that has a program-number property and
allows the user to switch programs. In order to do that tsdemux
will remove the pads of the current program and add from the new
ones. The removed pads are kept in the demuxer for later if the
user selects the old program again.
2014-05-29 17:01:20 -03:00
Tim-Philipp Müller ba3073ffce pad: two minor docs fixes 2014-05-27 13:37:05 +01:00
Thiago Santos c6f92562b6 pad: store last flow return and provide acessor function
Stores the last result of a gst_pad_push or a pull on the GstPad and provides
a getter and a macro to access this field.

Whenever the pad is inactive it is set to FLUSHING

API: gst_pad_get_last_flow_return

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Nicolas Dufresne 103a40b6ce bufferpool: Add method and virtuals to set flushing state
Currently there is no other way to unlock a buffer pool other then
stopping it. This may have the effect of freeing all the buffers,
which is too heavy for a seek. This patch add a method to enter and
leave flushing state. As a convenience, flush_start/flush_stop
virtual are added so pool implementation can also unblock their own
internal poll atomically with the rest of the pool.  This is fully
backward compatible with doing stop/start to actually flush the pool
(as being done in GstBaseSrc).

https://bugzilla.gnome.org/show_bug.cgi?id=727611
2014-05-26 13:31:21 -04:00
Tim-Philipp Müller 48b608337b pluginloader: fix compiler warning on windows
gstpluginloader.c:584:1: error: label 'beach' defined but not used

https://bugzilla.gnome.org/show_bug.cgi?id=730125
2014-05-14 13:40:03 +01:00
Edward Hervey c7d68da704 pluginloader: Don't leak pluginloader in error cases
CID #1212154
2014-05-12 17:03:46 +02:00
Edward Hervey 25bcc2d7f6 caps: Don't leak features on error cases
If we fail to parse fields, we would end up leaking the features we
parsed just before

CID #1212152
2014-05-12 16:59:29 +02:00
Nicolas Dufresne 194db480e0 bufferpool: Add an helper to validate config
When we call gst_buffer_pool_set_config() the pool may return FALSE and
slightly change the parameters. This helper is useful to do the minial required
validation before accepting the modified configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:11:14 -04:00
Nicolas Dufresne 43acfbbb86 bufferpool: Update the configure even if set_config() returned false
According to the documentation, when set_config() return false, it should be
possible to read the modified version of the config. This patch fixes the
implementation so it is now according to the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
2014-05-08 13:08:21 -04:00