Commit graph

3058 commits

Author SHA1 Message Date
Philippe Normand
a2832689ad gstelementfactory: Remove MEDIA_HARDWARE FactoryType
Using the MEDIA_ classifier prefix was inappropriate. It is sufficient to
specify the additional klass name that element can set in their metadata.

(follow-up of commit ca4b61c555)

https://bugzilla.gnome.org/show_bug.cgi?id=796921
2018-10-12 17:20:02 +01:00
Philippe Normand
ca4b61c555 gstelementfactory: Add MEDIA_HARDWARE klass classifier
The Harware factory type classifier allows elements (decoders and encoders,
mostly) to advertize they rely on hardware devices to perform encoding or
decoding operations. This classifier can be used by applications to filter and
select only the elements that use hardware devices, for instance to ensure
zero-copy support is enabled for a specific pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=796921
2018-10-12 10:08:47 +01:00
Yacine Bandou
05a3da347b protection: Add a new definition for unspecified system protection
In some cases the system protection ID is not present in the contents
or in their metadata.
This define is used to set the value of the "system_id" field in GstProtectionEvent,
with this value, the application will use an external information to choose which
protection system to use.

Example: The matroskademux uses this value in the case of encrypted WebM,
the application will choose the appropriate protection system based on the information
received through EME API.

https://bugzilla.gnome.org/show_bug.cgi?id=797231
2018-10-03 17:05:45 +02:00
Vivia Nikolaidou
22d0f40716 queuearray: Add set_clear_func and clear functions
gst_queue_array_clear will clear the GstQueueArray,
gst_queue_array_set_clear_func will set a clear function for each
element to be called on _clear and on _free.

https://bugzilla.gnome.org/show_bug.cgi?id=797218
2018-09-27 19:32:54 +03:00
Tim-Philipp Müller
da8afaeeea docs: gst: default to single include also for protection meta API
https://bugzilla.gnome.org/show_bug.cgi?id=797165
2018-09-19 15:42:34 +01:00
Tim-Philipp Müller
4aef0fca96 docs: libs: move all includes to canonical single header includes
And fix up bogus libs/ prefix for controller lib includes.

https://bugzilla.gnome.org/show_bug.cgi?id=797165
2018-09-19 15:08:34 +01:00
Linus Svensson
2e6089f0c5 docs: Update include directive for gstreamer-base components
Change to always include gst/libs/base.h in order to also
include base-prelude.h, but also because it's the right
thing for people to include anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=797165
2018-09-19 14:56:42 +01:00
Nirbheek Chauhan
415e0e68af meson: Use copy: true for configure_file()
Fixes a warning.
2018-07-25 14:25:59 +05:30
Sebastian Dröge
d196b0b904 typefind: Add _with_extension() variants for typefinding data or a buffer
And make use of that in the typefind element to also be able to make use
of the extension in push mode. It previously only did that in pull mode
and this potentially speeds up typefinding and might also prevent false
positives.

https://bugzilla.gnome.org/show_bug.cgi?id=796865
2018-07-25 01:12:11 +03:00
Sebastian Dröge
6fa351407a miniobject: Add parent pointers to the miniobject to influence writability
Every container of miniobjects now needs to store itself as parent in
the child object, and remove itself again at a later time.

A miniobject is only writable if there is at most one parent, and that
parent is writable itself, and if the reference count of the miniobject
is 1.

GstBuffer (for memories), GstBufferList (for buffers) and GstSample (for
caps, buffer, bufferlist) was updated accordingly.

Without this it was possible to have e.g. a bufferlist with refcount 2
in two places, modifying the same buffer with refcount 1 at the same
time.

https://bugzilla.gnome.org/show_bug.cgi?id=796692
2018-07-09 09:45:45 +02:00
Edward Hervey
438c1c116d sample: Update documentation 2018-05-21 11:36:42 +02:00
Olivier Crête
05298b3093 aggregator: Add get_next_time function for live streams
Add a function to do the right thing for live streams.

https://bugzilla.gnome.org/show_bug.cgi?id=795486
2018-05-16 18:13:04 +02:00
Wind Yuan
fb4fc8fc09 bitwriter: Add a generic bit writer
GstBitWriter provides a bit writer that can write any number of
bits into a memory buffer. It provides functions for writing any
number of bits into 8, 16, 32 and 64 bit variables.

https://bugzilla.gnome.org/show_bug.cgi?id=707543
2018-05-06 17:05:21 +02:00
luz.paz
98200ddd8d Source code typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:25:21 +01:00
luz.paz
4a402c1c7d Fix typos in comments and docs
Found via `codespell`

https://bugzilla.gnome.org/show_bug.cgi?id=795610
2018-05-01 11:18:03 +01:00
Olivier Crête
dda9a99989 aggregator: Add API to check if a pad has a new buffer
https://bugzilla.gnome.org/show_bug.cgi?id=795332
2018-04-25 14:20:19 -04:00
Mathieu Duponchelle
03e27aa5f0 API: gst_queue_array_peek_nth
https://bugzilla.gnome.org/show_bug.cgi?id=795157
2018-04-14 00:14:56 +02:00
Mathieu Duponchelle
ed5d888ba5 gstsample: new API
gst_sample_set_buffer
gst_sample_set_caps
gst_sample_set_segment
gst_sample_set_info
gst_sample_is_writable
gst_sample_make_writable

This commit makes it possible to reuse a sample object and avoid
unnecessary memory allocations, for example in appsink.

In addition, writability is now required to set the buffer list.

https://bugzilla.gnome.org/show_bug.cgi?id=795144
2018-04-13 23:44:54 +02:00
Edward Hervey
22fac0b212 docs: Update libs documentation
* Make sure all libcheck headers are ignored
* Add all missing symbols
2018-04-02 12:44:15 +02:00
Edward Hervey
9704bb1c4d docs: Update gst core doc 2018-04-02 12:43:57 +02:00
Tim-Philipp Müller
b405b35f8c Back to development 2018-03-20 09:02:34 +00:00
Tim-Philipp Müller
81450fb55b Update docs 2018-03-19 20:09:51 +00:00
Tim-Philipp Müller
f9961026c0 Update docs 2018-03-13 19:08:54 +00:00
Tim-Philipp Müller
e1ac1bc3a8 meson: docs: update api decorators to ignore 2018-03-13 11:54:42 +00:00
Tim-Philipp Müller
99df754c22 docs: fixup for new libs API export decorators 2018-03-13 00:57:37 +00:00
Tim-Philipp Müller
8983cce9f6 gst: GST_EXPORT -> GST_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 00:45:35 +00:00
Sebastian Dröge
89eac59e92 queuearray: Implement pop_tail_struct() for completeness
All other variants of {peek,pop}_{head,tail}_{,struct} were already
implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=794035
2018-03-05 09:39:57 +02:00
Tim-Philipp Müller
28612e15cc Update docs 2018-03-03 21:51:49 +00:00
Tim-Philipp Müller
cbe24ecc89 Add new symbol to docs and .def file
Fixes make check
2018-03-01 22:21:17 +00:00
Tim-Philipp Müller
bbf8f50cde queuearray: add _peek_tail() and _pop_tail()
API: gst_queue_array_pop_tail()
API: gst_queue_array_peek_tail()

These will be needed later for appsrc.
2018-02-19 15:44:04 +00:00
Tim-Philipp Müller
81a767bbdb Back to development 2018-02-15 19:44:14 +00:00
Tim-Philipp Müller
124f2f566f Release 1.13.1 2018-02-15 16:43:52 +00:00
Tim-Philipp Müller
7b7b3e754a docs: add flow combiner ref/unref to docs
So new-in-1.12 index actually has some entries.
2018-02-14 19:37:35 +00:00
Tim-Philipp Müller
8f4e4b0261 docs: add index for new symbols in 1.14 2018-02-14 19:13:28 +00:00
Tim-Philipp Müller
5389254f2f docs: add index for new symbols in 1.12 2018-02-14 19:12:06 +00:00
Tim-Philipp Müller
cd10f14726 buffer: add gst_buffer_get_n_meta() convenience function
Counts how many metas there are for a certain api type.

https://bugzilla.gnome.org/show_bug.cgi?id=791918
2018-01-27 11:18:19 +00:00
François Laignel
46b1a6e505 message: Add gst_message_writable_structure()
Add gst_message_writable_structure() to be able to add extra fields to
messages (and be on par with GstEvent).

https://bugzilla.gnome.org/show_bug.cgi?id=792928
2018-01-26 16:09:10 +02:00
Tim-Philipp Müller
bce246f39f aggregator: rename _get_buffer() -> _peek_buffer() and _steal -> _pop
https://bugzilla.gnome.org/show_bug.cgi?id=791204
2018-01-23 09:44:44 +00:00
Matthew Waters
a0400a0d28 docs: include tracers in the documentation
Requires exposing the tracer GType from the GstTracerFactory in order
to link the plugin with the tracer in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=791253
2017-12-14 14:46:46 +11:00
Tim-Philipp Müller
18fe36a286 basesrc: add buffer list support
Add a gst_base_src_submit_buffer_list() function that allows subclasses
to produce a bufferlist containing multiple buffers in the ::create()
function. The buffers in the buffer list will then also be pushed out
in one go as a GstBufferList. This can reduce push overhead
significantly for sources with packetised inputs (such as udpsrc)
in high-throughput scenarios.

The _submit_buffer_list() approach was chosen because it is fairly
straight-forward, backwards-compatible, bindings-friendly (as opposed
to e.g. making the create function return a mini object instead),
and it allows the subclass maximum control: the subclass can decide
dynamically at runtime whether to return a list or a single buffer
(which would be messier if we added a create_list virtual method).

https://bugzilla.gnome.org/show_bug.cgi?id=750241
2017-12-07 12:17:09 +00:00
Edward Hervey
62ebee096b docs: Misc addition/fixes
And also add the "Since" API sections for 1.12 and 1.14
2017-12-05 18:48:56 +01:00
Edward Hervey
eb6ba249c4 docs: Add documentation for GST_SEQNUM_INVALID
And link to it
2017-12-05 18:20:34 +01:00
Edward Hervey
e5c15f6b96 utils: Never return a group_id of 0, add GST_GROUP_ID_INVALID
Various plugins use special values (0 or G_MAXUINT32) as an
invalid/unset group_id, but nothing guarantees a groupid won't have
that value.

Instead define a value which group_id will never have and make
gst_group_id_next() always return a value different from that.

API: GST_GROUP_ID_INVALID
2017-12-05 18:19:32 +01:00
Tim-Philipp Müller
d8e7fc40b1 harness: add gst_harness_take_all_data() + _take_all_data_as_{bytes,buffer}()
Convenience function to just grab all pending data
from the harness, e.g. if we just want to check if
it matches what we expect and we don't care about
the chunking or buffer metadata.

Based on patch by: Havard Graff <havard.graff@gmail.com>
2017-12-05 15:37:00 +00:00
Tim-Philipp Müller
e6dbbb3854 aggregator: hook up to docs 2017-12-02 19:00:32 +00:00
Havard Graff
eb9ac74362 utils: add gst_utils_dump_buffer()
Useful for debugging.
2017-11-24 13:40:33 +01:00
Mathieu Duponchelle
c01949a99e pad templates: Allow specifying GType
See https://bugzilla.gnome.org/show_bug.cgi?id=731301

https://bugzilla.gnome.org/show_bug.cgi?id=789986
2017-11-22 16:44:08 +01:00
Matthew Waters
86abf49c23 gst: add a promise object
An object that can be waited on and asked for asynchronous values.
In much the same way as promise/futures in js/java/etc

A callback can be installed for when the promise changes state.

Original idea by
Jan Schmidt <jan@centricular.com>

With contributions from
Nirbheek Chauhan <nirbheek@centricular.com>
Mathieu Duponchelle <mathieu@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=789843
2017-11-23 00:48:30 +11:00
Tim-Philipp Müller
d106390adc element: add gst_element_foreach_*pad()
Add convenience API that iterates over all pads, sink pads or
source pads and makes sure that the foreach function is called
exactly once for each pad.

This is a KISS implementation. It doesn't use GstIterator and
doesn't try to do clever things like resync if pads are added
or removed while the function is executing. We can still do that
in future if we think it's needed, but in practice it will
likely make absolutely no difference whatsoever, since these
things will have to be handled properly elsewhere by the element
anyway if they're important.

After all, it's always possible that a pad is added or removed
just after the iterator finishes iterating, but before the
function returns.

This is also a replacement for gst_aggregator_iterate_sink_pads().

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-11-02 15:59:22 +00:00
Mathieu Duponchelle
895bb7bcd6 gst: API: gst_get_main_executable_path()
This is useful for plugins that need to inspect the
folder of the main executable in order to determine the
set of features they will expose, for example:

https://github.com/centricular/gstreamer-vst3

https://bugzilla.gnome.org/show_bug.cgi?id=788214
2017-09-27 20:59:54 +02:00