Commit graph

7803 commits

Author SHA1 Message Date
Sebastian Dröge 3e8ef4cf5a Update GLib dependency to 2.40.0 2015-10-02 22:18:24 +03:00
Matthew Waters d5ded15889 bin: implement context propagation when adding elements
When adding an element to a bin we need to propagate the GstContext's
to/from the element.

This moves the GstContext list from GstBin to GstElement and adds
convenience functions to get the currently set list of GstContext's.

This does not deal with the collection of GstContext's propagated
using GST_CONTEXT_QUERY.  Element subclasses are advised to call
gst_element_set_context if they need to propagate GstContext's
received from the context query.

https://bugzilla.gnome.org/show_bug.cgi?id=705579
2015-09-28 18:21:59 +10:00
Thiago Santos 4b5e79cd18 pad: don't fallback to caps queries with proxy pads
A proxy-pad should always proxy the caps related queries
and events to its down or upstream peers on the other side
of the element. Falling back to a caps query seems wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=754112
2015-09-26 07:13:45 -03:00
Vivia Nikolaidou 44ba1565d9 segment: Replaced gst_segment_to_position with gst_segment_position_from_running_time
gst_segment_to_position might cause confusion, especially with the addition of
gst_segment_position_from_stream_time . Deprecated gst_segment_to_position
now, and replaced it with gst_segment_position_from_running_time.

Also added unit tests.
2015-09-26 00:00:08 +02:00
Vivia Nikolaidou 26ef44f17c segment: gst_segment_to_stream_time: Renamed 'result' to 'stream_time'
Renamed the "result" variable to "stream_time" for better readability.
2015-09-25 23:59:59 +02:00
Vivia Nikolaidou c0d4b1b646 segment: Added gst_segment_position_from_stream_time()
gst_segment_position_from_stream_time() will convert stream time into a
position in the segment so that gst_segment_to_stream_time() with that
position returns the same stream time. It will return -1 if the stream time
given is not inside the segment.
2015-09-25 23:59:53 +02:00
Vivia Nikolaidou 60130eb5f0 segment: Rewording of struct field descriptions
The new wording makes it easier to understand exactly what each field of the
GstSegment struct represents.
2015-09-25 23:58:41 +02:00
Sebastian Dröge a3513d6e97 event: Make sure that timestamp + diff in QoS events is never smaller than 0
When a running-time-offset is stored in the event, it could become smaller
than 0 although the event is otherwise correct. This can happen when pad
offsets are used.

To prevent this, we set the timestamp to -diff, so that in the end the sum of
both is exactly 0.

https://bugzilla.gnome.org/show_bug.cgi?id=754356
2015-09-25 23:55:18 +02:00
Stian Selnes 0fbf1d3eb7 bin: element: Ignore activate result for removed pads on state change
This fixes a race where a state change may return failure if it has
request pads that are deactivated and removed (and thus have no
parent) at the same time as the element changes state and (de)activates
its pads.

https://bugzilla.gnome.org/show_bug.cgi?id=755342
2015-09-24 12:14:57 +02:00
Vikram Fugro c12bd5d807 gst: Documentation typo fix in caps & pad APIs
gst_caps_can_intersect() & GST_PAD_IS_ACCEPT_INTERSECT()
documentation typo fix.

https://bugzilla.gnome.org/show_bug.cgi?id=755257
2015-09-19 17:57:55 +02:00
Tim-Philipp Müller 366680ee59 bufferpool: sprinkle some allow-none and out annotations for g-i 2015-09-15 18:05:43 +01:00
Vineeth TM 09900bbfb1 bin: fix typo in log message when threadpool alloc fails
https://bugzilla.gnome.org/show_bug.cgi?id=754975
2015-09-14 16:03:51 +01:00
Igor Rondarev 6972e7a926 configure: Check for socketpair() in -lsocket too
On e.g. QNX it is in an external library, not libc.

https://bugzilla.gnome.org/show_bug.cgi?id=754875
2015-09-11 23:23:50 +02:00
Vivia Nikolaidou ee1bbe2f15 bin: Make sure we don't add/remove a bin to/from itself
Doing so would deadlock from trying to acquire the object lock twice

https://bugzilla.gnome.org/show_bug.cgi?id=754036
2015-08-25 10:19:44 +03:00
Stefan Sauer f3e122ffec debugutils: bring the dot style a bit closer to what we use in the docs
Use round corners for bins and elements. Put sink pads on the left and src pads
on the right of elements.
2015-08-17 22:08:07 +02:00
Sebastian Dröge 1176fbf6dc pad: Break sticky event array iterations if the type is bigger than the one we look for
Microoptimization we can do because the array is sorted by type.
2015-08-15 17:59:21 +02:00
Edward Hervey 7f0e0ff3ca gstpad: Add a new GST_PROBE_HANDLED return value for probes
In some cases, probes might want to handle the buffer/event/query
themselves and stop the data from travelling further downstream.

While this was somewhat possible with buffer/events and using
GST_PROBE_DROP, it was not applicable to queries, and would result
in the query failing.

With this new GST_PROBE_HANDLED value, the buffer/event/query will
be considered as successfully handled, will not be pushed further
and the appropriate return value (TRUE or GST_FLOW_OK) will be returned

This also allows probes to return a non-default GstFlowReturn when dealing
with buffer push. This can be done by setting the
GST_PAD_PROBE_INFO_FLOW_RETURN() field accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=748643
2015-08-15 17:00:12 +02:00
Mathieu Duponchelle afff60b0b5 gstversion: Add missing include in .in file. 2015-08-15 13:26:12 +02:00
Mathieu Duponchelle 24e1abe367 Headers: add missing includes. 2015-08-15 13:17:07 +02:00
Thiago Santos b76ecfd992 pad: add GST_PAD_FLAG_ACCEPT_TEMPLATE
It will make the default accept-caps handler use the pad template
caps instead of the query-caps result to check if the caps is
acceptable. This is aligned with what the design docs says the
accept-caps should do (be non-recursive) and should be faster. It
is *not* enabled by default, though.

API: GST_PAD_FLAG_ACCEPT_TEMPLATE
API: GST_PAD_IS_ACCEPT_TEMPLATE
API: GST_PAD_SET_ACCEPT_TEMPLATE
API: GST_PAD_UNSET_ACCEPT_TEMPLATE

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 08:56:53 -03:00
Vivia Nikolaidou 88f6334af6 datetime: accept just a time as ISO 8601 string and use today's date then
If no date and only a time is given in gst_date_time_new_from_iso8601_string(),
assume that it is "today" and try to parse the time-only string. "Today" is
assumed to be in the timezone provided by the user (if any), otherwise Z -
just like the behavior of the existing code.

https://bugzilla.gnome.org/show_bug.cgi?id=753455
2015-08-11 09:50:50 +01:00
Wim Taymans ffa90b2e72 devicemonitor: fix provider leak 2015-08-08 17:59:51 +02:00
Edward Hervey 2ef06fd39d pad: Fix previous commit
We want to get the caps query *result*
2015-08-08 15:29:30 +02:00
Wim Taymans 5a7b7e66bd deviceprovider: Add method to hide devices from a provider
Add methods to add/remove the providers that should be hidden by this
provider. Also make a method to get a list of hidden providers.

This makes it possible to have multiple systems monitor the same devices
and remove duplicates.

Add a property to see all devices, even duplicate ones from hidden
providers.
2015-08-08 15:21:50 +02:00
Edward Hervey 2499349d94 pad: get_allowed_caps() should go through both pads
The previous implementation was doing a direct call to the peer pad,
which resulted in query probes never being called on the original pad.

Instead of that, get the peer pad caps by using gst_pad_peer_query()
which will call probes in the expected fashion.
2015-08-08 14:51:59 +02:00
Vineeth TM 0eb9dde1e8 value: free caps during failure
While calling gst_value_deserialize_sample, if there is a failure
after caps is ref'ed, then caps is getting leaked. Hence checking for
caps in fail: goto condition and unref'ing it

https://bugzilla.gnome.org/show_bug.cgi?id=753338
2015-08-07 10:17:02 +02:00
Thibault Saunier 749810b238 registry: Add plugins to the registry we are loading and not default one
When running gst_registry_scan_plugin_file we were losing the
information about the registry being loaded and ended up adding the
plugin to the default registry which was not correct.

https://bugzilla.gnome.org/show_bug.cgi?id=752662
2015-08-05 17:32:00 -04:00
Wim Taymans 62f6207e04 devicemonitor: get a list of currently monitored providers
Get a list of the currently monitored providers.
2015-08-04 13:24:10 +02:00
George Kiagiadakis 794a08d7e9 pad: fix invalid unref after IDLE probe on non-OK flow return
In case there is an IDLE probe fired from gst_pad_push_data and it
doesn't return GST_FLOW_OK, the code jumps to the probe_stopped
label which tries to unref the data object. However, at this point
the data object belongs downstream and must not be touched.
By setting data = NULL, the code skips this unref.

https://bugzilla.gnome.org//show_bug.cgi?id=753151
2015-08-04 11:10:45 +01:00
Jan Schmidt cde3524f52 buffer: Fix the name of the parentbuffermeta debug category.
Don't use 'glbufferrefmeta' as the debug category for the
parent buffer meta.
2015-08-04 20:09:47 +10:00
Jan Schmidt fa370153bc buffer: Remove extra debug symbol from exports
Don't export the debug variable for the parent_buffer_meta.

This was accidentally exported and shouldn't be public
2015-08-04 20:02:00 +10:00
Tim-Philipp Müller 62bd514c8e docs: info: remove 0.8 terminology from log level description
We don't "iterate" bins or pipelines any more.
2015-07-30 17:29:25 +01:00
Nicolas Dufresne 48ab4f6fe2 doc/seekflags: Fix cross references
This fixes miss-use of @ instead of % to refer to enumeration
values.
2015-07-28 21:14:40 -04:00
Tim-Philipp Müller 0a50d1be52 docs: fix description of gst_buffer_extract_dup()
No GBytes involved.
2015-07-22 15:38:06 +01:00
Wim Taymans eedd9cb7b7 devicemonitor: do start and stop outside of the lock
Release the monitor lock when calling the provider start/stop methods.
Because we release the lock now, We need to make sure we check the
cookie again and keep track of started and removed providers.
2015-07-16 18:54:50 +02:00
Wim Taymans b4dbb9d742 deviceprovider: small cleanups
Protect against wrong arguments.
Clean up the header file indentation.
2015-07-16 18:54:50 +02:00
Wim Taymans 8caf9b7a87 devicemonitor: keep order of providers and devices
The deviceproviders are added to the array sorted by their rank. Make
sure we keep this ordering when removing a provider.

We use _prepend to collect the devices, use g_list_reverse to get the
devices in the right order; sorted by rank and in the same order as
returned by the provider.
2015-07-16 18:54:50 +02:00
Tim-Philipp Müller 162fc1f7d6 docs: drop reference to sourceforge mailing list adress 2015-07-16 17:13:35 +01:00
Wim Taymans 661a1947b1 device: add generic struct with properties
Add a generic structure to hold any additional properties about the
device.
2015-07-15 18:21:13 +02:00
Tim-Philipp Müller 3b6fa8e81a docs: bus: mention main loop requirement in gst_bus_add_watch() docs 2015-07-13 14:25:42 +01:00
Prashant Gotarne 3cea60dc6f task: add function guard for _set_lock() and fix guard for _join()
Should only access the object structure after checking
it's valid in gst_task_join().

https://bugzilla.gnome.org/show_bug.cgi?id=746385
https://bugzilla.gnome.org/show_bug.cgi?id=746431
2015-07-13 14:16:52 +01:00
Philippe Normand ee40730558 protection: implement meta transform function
Copy the GstMeta contents over to the new buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=749590
2015-07-11 00:19:20 +01:00
Hyunjun Ko eaf4153668 meta: transform_func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 13:40:17 +03:00
Arun Raghavan f0da038c34 pad: Clarify pad probe return type documentation 2015-07-06 14:35:51 +05:30
Olivier Crête f126094dce pad: Enforce NEED_PARENT flag also for chain
The check for the presence of the parent in the presence of
the NEED_PARENT flag was missing for the chain function. Also keep
a ref on the parent in case the pad is removed mid-chain.
2015-07-03 12:56:01 -04:00
Stian Selnes 1a67066ddc memory: Add missing field initializers to GstMapInfo
https://bugzilla.gnome.org/show_bug.cgi?id=751881
2015-07-03 11:36:13 +02:00
Sebastian Dröge 0aae36567d buffer: Don't copy "memory" metas unconditionally
Don't copy memory metas if we only copied part of the buffer, didn't
copy memories or merged memories. In all these cases the memory
structure has changed and the memory meta becomes meaningless.

https://bugzilla.gnome.org/show_bug.cgi?id=751712
2015-07-01 10:37:37 +02:00
Sebastian Dröge d43f256a9e Revert "buffer: Don't copy POOLED and memory metadata unconditionally"
This reverts commit 7a08fa5ec4.
2015-07-01 10:37:35 +02:00
Sebastian Dröge 7a08fa5ec4 buffer: Don't copy POOLED and memory metadata unconditionally
https://bugzilla.gnome.org/show_bug.cgi?id=751712
2015-06-30 18:40:28 +02:00
Prashant Gotarne 03dccde1ef task: guard against NULL task function
https://bugzilla.gnome.org/show_bug.cgi?id=746439
2015-06-25 09:56:19 +01:00