Commit graph

7710 commits

Author SHA1 Message Date
Jan Schmidt
58e5cd2695 gstvalue: Implement gst_value_is_subset() for flagsets 2015-06-03 00:48:17 +10:00
Reynaldo H. Verdejo Pinochet
01b9874687 structure: add note about missing field creation on _set() 2015-05-31 20:22:34 -03:00
Nirbheek Chauhan
b174ec6903 gst/gst.c: Add a warning about DllMain to prevent misuse
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.
2015-05-27 13:21:03 +01:00
Jan Schmidt
f9e5178dd1 gstvalue: Add GstFlagSet type
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
2015-05-25 16:23:33 +10:00
Thibault Saunier
99d3179634 gstvalue: Add a comparision function for GstStructures 2015-05-20 20:21:24 +02:00
Vincent Penquerc'h
d0c3e33bbe pad: bump chain function call logs from LOG to DEBUG
They're really useful compared to other LOG stuff in there, so
there is value is including them and not the rest.
2015-05-15 14:57:14 +01:00
Stefan Sauer
b8c6ebd0f2 gstobject: add gst_object_has_as_ancestor and deprecate previous function
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()
2015-05-15 13:55:19 +02:00
Stefan Sauer
3492105a06 gstobject: rename gst_object_has_parent to gst_object_has_as_parent
This avoid confusion with a potential punction that check if a gstobject has-a
parent.

API: gst_object_has_as_parent()
2015-05-15 13:45:18 +02:00
Tim-Philipp Müller
1a9a3c7ef9 docs: gst-launch -> gst-launch-1.0 in example pipelines
And some small example pipeline fix-ups.
2015-05-10 11:35:50 +01:00
Jimmy Ohn
937ad1615a event: remove duplicated include
https://bugzilla.gnome.org/show_bug.cgi?id=748739
2015-05-01 10:39:19 +01:00
Sebastian Dröge
18b0581009 taglist: Copy the tag scope too when copying tag lists 2015-04-28 15:51:23 +02:00
Tim-Philipp Müller
8e6561be91 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 17:49:44 +01:00
Tim-Philipp Müller
6c394643be printf: fix invalid memory access in case of %%
https://bugzilla.gnome.org/show_bug.cgi?id=748414
2015-04-24 15:16:24 +01:00
Jason Litzinger
1b881ecc26 gstinfo: fix infinite loop in gst_debug_unset_threshold_for_name()
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
2015-04-23 11:20:25 +01:00
Sebastian Dröge
a5ab02733a buffer: Check return value of meta transform function in gst_buffer_copy_into()
... by printing some debug output whenever copying a GstMeta fails.

https://bugzilla.gnome.org/show_bug.cgi?id=748119
2015-04-20 09:23:43 +02:00
Tim-Philipp Müller
243889a88c event: fix header formatting 2015-04-18 12:31:02 +01:00
Tim-Philipp Müller
640e3ecfee gst.h: include the new gstprotection.h header
https://bugzilla.gnome.org/show_bug.cgi?id=705991
2015-04-18 12:27:46 +01:00
Alex Ashley
abdafb0d64 protection: add GstProtectionMeta to support protected content
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
2015-04-18 12:24:06 +01:00
Alex Ashley
0f36b16a29 event: add new GST_EVENT_PROTECTION
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
2015-04-18 12:04:29 +01:00
Thiago Santos
3d8de8a4f9 pad: block data flow when idle probe is running
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
2015-04-16 10:09:29 -03:00
Tim-Philipp Müller
ac8a8f90b3 docs: clarify that return value of gst_filename_to_uri() must be freed
https://bugzilla.gnome.org/show_bug.cgi?id=747104
2015-04-16 13:42:18 +01:00
Vincent Penquerc'h
a3b42ec42a bin: undo upward state changes on children when a child fails
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
2015-04-15 16:00:21 +01:00
Tim-Philipp Müller
d3400ce358 elementfactory: add ENCRYPTOR class defines
to go with DECRYPTOR.
2015-04-14 17:51:05 +01:00
Alex Ashley
b8f5a7ba45 elementfactory: add DECRYPTOR class defines
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
2015-04-14 17:50:32 +01:00
Hyunjun Ko
e08c03ed07 gstvalue: reset errno before g_ascii_strtoull call
"errno" already has meaningless value before g_ascii_strtoull call.
This causes invalid error check without reset.

https://bugzilla.gnome.org/show_bug.cgi?id=747690
2015-04-13 11:39:59 +01:00
Prashant Gotarne
a754eb45b9 bufferlist: make sure list is writable before adding or removing buffers
https://bugzilla.gnome.org/show_bug.cgi?id=747439
2015-04-08 09:51:18 +01:00
Prashant Gotarne
c547e01018 bufferlist: minor docs addition for gst_buffer_list_get()
Return buffer remains valid as long as list is valid
and buffer is not removed from list.

https://bugzilla.gnome.org/show_bug.cgi?id=747438
2015-04-08 09:44:29 +01:00
Tim-Philipp Müller
bcbe8d0f01 docs: fix cross-reference to environment variables in GstInfo
https://bugzilla.gnome.org/show_bug.cgi?id=747416
2015-04-06 18:56:25 +01:00
Prashant Gotarne
6a8f65936b memory: add check for writablity in resize
Add guard to gst_memory_resize() to make sure the
memory to be resized is actually writable.

https://bugzilla.gnome.org/show_bug.cgi?id=747392
2015-04-06 13:32:20 +01:00
Sebastian Dröge
36f7b13658 pad: Print debug output from gst_pad_link_full() if preparing linking failed
Makes it easier to find linking failures in debug logs.
2015-04-04 18:33:50 -07:00
Tim-Philipp Müller
c8f680e395 segment: small docs addition
https://bugzilla.gnome.org/show_bug.cgi?id=690564
2015-04-04 19:32:27 +01:00
Nicolas Dufresne
1b955c08df uri: Silence a compiler warning
This is a false positive for use initialized. The variable is set and
used enclosed in the safe if condition.
2015-04-03 19:12:48 -04:00
Vincent Penquerc'h
d6ae9c0feb segment: add gst_segment_is_equal
It beats memcmp due to the 'reserved' fields.

API: gst_segment_is_equal()

Found via, but probably not directly linked to,
https://bugzilla.gnome.org/show_bug.cgi?id=738216
2015-04-03 12:10:33 +01:00
Tim-Philipp Müller
5deb4f658e pad: allow probes to remove the data item whilst returning PROBE_OK
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
2015-04-03 00:07:26 +01:00
Olivier Crête
518babf6cb element: Document when a clock is available from gst_element_get_clock()
https://bugzilla.gnome.org/show_bug.cgi?id=744442
2015-04-02 17:33:22 -04:00
Olivier Crête
59d9992ed0 pipeline: Add binding friendly gst_pipeline_get_pipeline_clock()
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
2015-04-02 17:33:22 -04:00
Ilya Konstantinov
82abdae1bb memory: improve docs for _copy() and _share() 2015-04-02 17:45:54 +01:00
Thibault Saunier
04d8b01e2e element: Add a FIXME for 2.0 about request_new_pad VS request_pad naming 2015-04-02 09:48:02 +02:00
Thibault Saunier
43a31d4835 element: Fix request_new_pad introspection
Marking gst_element_request_pad as the caller of the ->request_new_pad
virtual method.
2015-04-02 09:34:00 +02:00
Tim-Philipp Müller
1dd72f56ea debugutils: nicer printing of caps features
Only print interesting caps features, don't
append (memory:SystemMemory) to all caps,
which makes them much more unwieldy and
harder to read. Also use internal function
to get caps features so that our printing
has no side effects on the caps.

https://bugzilla.gnome.org/show_bug.cgi?id=746809
2015-04-01 12:15:30 +01:00
Lubosz Sarnecki
373af462db debugutils: plot caps features
https://bugzilla.gnome.org/show_bug.cgi?id=746809
2015-03-31 20:16:39 +01:00
Wonchul Lee
ca380d16a0 pad: Fix a typo in a docstring
https://bugzilla.gnome.org/show_bug.cgi?id=747119
2015-03-31 19:28:51 +01:00
Edward Hervey
e4d07e161d introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:16:09 +02:00
Tim-Philipp Müller
eb2d1f5b96 pad: fix outdated debug message
Buffer lists don't have groups any more in 1.0
2015-03-28 14:47:45 +00:00
Luis de Bethencourt
555e0211c8 gstvalue: only unwrap string delimited with "
Don't unwrap strings that start but don't finish with a double quote. If a
string is delimited by two quotes we unescape them and any special characters
in the middle (like \" or \\). If the first character or the last character
aren't a quote we assume it's part of an unescaped string.

Moved some deserialize_string unit tests because we don't try to unwrap strings
missing that second quote anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:18:23 +00:00
Luis de Bethencourt
c565c5ecb4 parse: check before truncating strings
Don't truncate the last character of a string if it isn't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=688625
2015-03-27 17:16:07 +00:00
Sebastian Dröge
2064a07feb bus: Add guards against invalid arguments to set_flushing() and poll()
https://bugzilla.gnome.org/show_bug.cgi?id=746871
2015-03-27 10:15:45 +01:00
Michael Catanzaro
f718962467 pluginloader: Fix typos
https://bugzilla.gnome.org/show_bug.cgi?id=746585
2015-03-25 23:36:54 +00:00
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