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.
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.
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.
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
Do not ignore the caps argument when requesting a pad by template.
This is particularly harmful when the pad caps query by default
returns ANY so it will match the first template instead of the
one that actually intersects with the caps.
https://bugzilla.gnome.org/show_bug.cgi?id=751235
A core meta which helps implement the old concept
of sub-buffering in some situations, by making it
possible for a buffer to keep a ref on a different
parent buffer. The parent buffer is unreffed when
the Meta is freed.
This meta is used to ensure that a buffer whose
memory is being shared to a child buffer isn't freed
and returned to a buffer pool until the memory
is.
https://bugzilla.gnome.org/show_bug.cgi?id=750039
This macro didn't work well as it relied on the sign on the last
divided number (number of days). This value is most of the time
zero, and zero is considered positive in printf. Instead, deal with
the sign manually, and resuse the original macros for the rest. This
actually simplify the macro a lot.
So from this point, the remaining warning for libgstreamer are about
protected member not showing in the doc. This may need some discussion
with upstream gtk-doc people.
* Remove % in from of none macro
* Fixed GST_TYPE_FAGS -> GST_TYPE_FAG_SET
* Minor wording fix
* Can't link to GstUri.port, so split the .port part
There was few Since: mark missing their column. Also unify the way
we set the Since mark on enum value and structure members. These
sadly don't show up in the index.
This tell GI if this function is for actions (call) or is the
answer of this method being asynchronous (async). In this case
it's a call. This also silence warning from the GI scanner.
Just like gst_buffer_add_meta() this function should also be
transfer none. This also silence a gi warning about returning
a copy of a non boxed bare structure.
It make no sense to allow using that. Any use would lead to leak
of crash. Note that GMiniObject is entirely unusable as you cannot
cast from let's say GstBuffer to GstMiniObject.
Add utility to print signed value of time. This is useful to
trace running time values in gint64 or GstClockTimeDiff values.
Additionally, define GST_CLOCK_STIME_NONE to indicate an invalid
signed time value and validation macro. New macros are:
GST_CLOCK_STIME_NONE
GST_CLOCK_STIME_IS_VALID
GST_STIME_FORMAT
GST_STIME_ARGS
https://bugzilla.gnome.org/show_bug.cgi?id=740575
Follow up of 7130230ddb
Provide the memory implementation the GstMapInfo that will be used to
map/unmap the memory. This allows the memory implementation to use
some scratch space in GstMapInfo to e.g. track different map/unmap
behaviour or store extra implementation defined data about the map
in use.
https://bugzilla.gnome.org/show_bug.cgi?id=750319
This overrides the default latency handling and configures the specified
latency instead of the minimum latency that was returned from the LATENCY
query.
https://bugzilla.gnome.org/show_bug.cgi?id=750782
gst_clock_wait_for_sync(), gst_clock_is_synced() and gst_clock_set_synced()
plus a signal to asynchronously wait for the clock to be synced.
This can be used by clocks to signal that they need initial synchronization
before they can report any time, and that this synchronization can also get
completely lost at some point. Network clocks, like the GStreamer
netclientclock, NTP or PTP clocks are examples for clocks where this is useful
to have as they can't report any time at all before they're synced.
https://bugzilla.gnome.org/show_bug.cgi?id=749391
There are gstmemory's available that operate in two memory domains
and need to ensure consistent access between these domains.
Imagine a scenario where e.g. the GLMemory is mapped twice in both
the GPU and the CPU domain. On unmap or a subsequent map, it would
like to ensure that the most recent data is available in the memory
domain requested. Either by flushing the writes and/or initiating a
DMA transfer. Without knowing which domain is being unmapped, the
memory does not know where the most recent data is to transfer to
the other memory domain.
Note: this still does not allow downgrading a memory map.
https://bugzilla.gnome.org/show_bug.cgi?id=750319
Now that locking exclusively dows not always succeed, we need to signal
the failure case from gst_memory_init.
Rather than introducing an API or funcionality change to gst_memory_init,
workaround by checking exclusivity in the calling code.
https://bugzilla.gnome.org/show_bug.cgi?id=750172
gst_memory_lock (mem, WRITE | EXCLUSIVE);
gst_memory_lock (mem, WRITE | EXCLUSIVE);
Succeeds when the part-miniobject.txt design doc suggests that this should fail:
"A gst_mini_object_lock() can fail when a WRITE lock is requested and
the exclusive counter is > 1. Indeed a GstMiniObject object with an
exclusive counter 1 is locked EXCLUSIVELY by at least 2 objects and is
therefore not writable."
https://bugzilla.gnome.org/show_bug.cgi?id=750172
DllMain should not be relied on for anything except storing the DLL handle.
It should also not be defined for static builds, but doing so is not
straightforward and is mostly harmless, so let's just add a comment about that
for now.
GstFlagSet is a new type designed for negotiating sets
of boolean capabilities flags, consisting of a 32-bit
flags bitfield and 32-bit mask field. The mask field
indicates which of the flags bits an element needs to have
as specific values, and which it doesn't care about.
This allows efficient negotiation of arrays of boolean
capabilities.
The standard serialisation format is FLAGS:MASK, with
flags and mask fields expressed in hexadecimal, however
GstFlagSet has a gst_register_flagset() function, which
associates a new GstFlagSet derived type with an existing
GFlags gtype. When serializing a GstFlagSet with an
associated set of GFlags, it also serializes a human-readable
form of the flags for easier debugging.
It is possible to parse a GFlags style serialisation of a
flagset, without the hex portion on the front. ie,
+flag1/flag2/flag3+flag4, to indicate that
flag1 & flag4 must be set, and flag2/flag3 must be unset,
and any other flags are don't-care.
https://bugzilla.gnome.org/show_bug.cgi?id=746373
The old gst_object_has_ancestor will call the new code. This establishes the
symetry with the new gst_object_has_as_parent.
API: gst_object_has_as_ancestor()
Ensure iterator is advanced. The current list iteration code only
advances the iterator (walk) if a match is found, which results
in an infinite loop when more than one entry exists in the list.
https://bugzilla.gnome.org/show_bug.cgi?id=748321
In order to support some types of protected streams (such as those
protected using DASH Common Encryption) some per-buffer information
needs to be passed between elements.
This commit adds a GstMeta type called GstProtectionMeta that allows
protection specific information to be added to a GstBuffer. An example
of its usage is qtdemux providing information to each output sample
that enables a downstream element to decrypt it.
This commit adds a utility function to select a supported protection
system from the installed Decryption elements found in the registry.
The gst_protection_select_system function that takes an array of
identifiers and searches the registry for a element of klass Decryptor that
supports one or more of the supplied identifiers. If multiple elements
are found, the one with the highest rank is selected.
This commit adds a unit test for the gst_protection_select_system
function that adds a fake Decryptor element to the registry and then
checks that it can correctly be selected by the utility function.
This commit adds a unit test for GstProtectionMeta that creates
GstProtectionMeta and adds & removes it from a buffer and performs some
simple reference count checks.
API: gst_buffer_add_protection_meta()
API: gst_buffer_get_protection_meta()
API: gst_protection_select_system()
API: gst_protection_meta_api_get_type()
API: gst_protection_meta_get_info()
https://bugzilla.gnome.org/show_bug.cgi?id=705991
In order for a decrypter element to decrypt media protected using a
specific protection system, it first needs all the protection system
specific information necessary (E.g. information on how to acquire
the decryption keys) for that stream.
The GST_EVENT_PROTECTION defined in this commit enables this information
to be passed from elements that extract it (e.g. qtdemux, dashdemux) to
elements that use it (E.g. a decrypter element).
API: GST_EVENT_PROTECTION
API: gst_event_new_protection()
API: gst_event_parse_protection()
https://bugzilla.gnome.org/show_bug.cgi?id=705991
When idle probe runs directly from the gst_pad_add_probe() function
we need to make sure that no data flow happens as idle probe
is a blocking probe. The idle probe will prevent that any
buffer, bufferlist or serialized events and queries are not
flowing while it is running.
https://bugzilla.gnome.org/show_bug.cgi?id=747852
When a bin changes states upwards, and a child fails to change,
any child that was already switched will not be reset to its
original state, leaving its state inconsistent with the bin,
which does not change state due to the failure.
If the state change was from NULL to READY, it means that deleting
this bin will cause those children to be deleted while not in
NULL state, which is a Bad Thing. For other upward changes, it
is less of a problem, as a subsequent switch back to NULL will
cause an actual downwards change on those inconsistent elements,
albeit from the "wrong" state.
We now reset state to the original one when a child fails.
Includes unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=747610
An element that performs decryption does not naturally fit within any
of the existing element factory class types. It is useful to be able
to easily get a list of all elements that support decryption so that
a union can be computed between the protection systems that have a
supported decryptor and the allowed protection systems for a particular
stream.
This commit adds a new GST_ELEMENT_FACTORY_TYPE_DECRYPTOR and its
associated string identifier "Decryptor". It also adds
GST_ELEMENT_FACTORY_TYPE_DECRYPTOR to GST_ELEMENT_FACTORY_TYPE_DECODABLE
so that uridecodebin can auto-plug a decryption element.
https://bugzilla.gnome.org/show_bug.cgi?id=705991
Use case: we want to block the source pad of a leaky queue and
drop the buffer that causes the block. If we return PROBE_DROP
then the buffer gets dropped, but we get called again. If we
return PROBE_OK we can't easily drop the buffer. If we just
replace the item into the GstPadProbeInfo structure with NULL,
GStreamer will push a NULL buffer to the next element when we
unblock the pad probe. This patch ensures it doesn't do that.
https://bugzilla.gnome.org/show_bug.cgi?id=734342
Also skip gst_pipeline_get_clock() and gst_pipeline_set_clock() from the
bindings as they are confused with gst_element_*_clock().
API: gst_pipeline_get_pipeline_clock()
https://bugzilla.gnome.org/show_bug.cgi?id=744442