Commit graph

900 commits

Author SHA1 Message Date
Sebastian Dröge bb3fbfbe7f typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
And make use of it in the typefind element. It's useful to distinguish
between the different errors why typefinding can fail, and especially to
not consider GST_FLOW_FLUSHING as an actual error.

https://bugzilla.gnome.org/show_bug.cgi?id=796894
2018-08-02 10:54:35 +03:00
Tim-Philipp Müller c97c95fc60 aggregator: fix exports and since marker for new API
https://bugzilla.gnome.org/show_bug.cgi?id=795332
2018-05-05 11:32:12 +02: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 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 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
Tim-Philipp Müller d06dca135d win32: fix .def file for new API
Fixes check + distcheck
2018-01-18 18:12:14 +00:00
Matthew Waters 9169a2522b update win32 defs for tracer API addition 2017-12-14 16:06:16 +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
Tim-Philipp Müller cea9641fa9 aggregator: hook up to build system
https://bugzilla.gnome.org/show_bug.cgi?id=739010
2017-12-02 15:44:40 +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
Tim-Philipp Müller 02d678a2f8 win32: update for latest promise api changes 2017-11-22 15:59:39 +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
Edward Hervey 90238a8958 win32: update exports file 2017-09-28 10:17:53 +02: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
Edward Hervey 81b1258fbb win32: Update export file 2017-09-27 10:06:12 +02:00
Mathieu Duponchelle 6cddce7663 plugin: API: GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE
When a plugin declares a dependency using this flag, all the
relative paths are considered to be relative to the path of
the main executable.

We try to determine the path of the executable portably,
with implementations provided for Linux, Windows and Mac.

If retrieval of the path fails, we will not detect changes.

In order for the main executable path to be the same when
scanning a plugin in a child process, a new variable is
exposed in gst_private.h, _gst_executable_path

https://bugzilla.gnome.org/show_bug.cgi?id=788152
2017-09-26 13:12:00 +02:00
Tim-Philipp Müller 8f26af8b02 bufferlist: add gst_buffer_list_calculate_size()
Returns size in bytes.
2017-09-17 12:35:25 +01:00
Tim-Philipp Müller 177c4ffe6a bufferlist: add gst_buffer_list_get_writable()
Ensures buffer is writable. Useful if we want to change
metadata on it such as timestamps.

https://bugzilla.gnome.org/show_bug.cgi?id=750241
2017-09-17 12:24:25 +01:00
Sebastian Dröge 0459b2db84 element/deviceprovider: Add instance getter functions for class properties
That is, the metadata and pad templates. Using instance getters is
easier to deal with for bindings, especially autogenerated ones.
2017-08-17 14:13:39 +03:00
Tim-Philipp Müller e7996a23d6 allocator: Hide private sysmem GType func
Was never exposed in any header file, only exported
by accident.
2017-08-14 11:01:44 +01:00
Sebastian Dröge ad0dd860c9 debug: Add a memory ringbuffer based debug logger
This stores debug logs in memory per thread and uses up to a
configurable amount of bytes per thread for the logs. Inactive threads
are timed out after a configurable amount of time.

https://bugzilla.gnome.org/show_bug.cgi?id=785035
2017-07-28 17:27:51 +01:00
Xabier Rodriguez Calvar bda8440f1f protection: add function to filter system ids
gst_protection_filter_systems_by_available_decryptors() takes an array
of strings and returns a new array of strings filtered by the available
decryptors for them so the ones you get are the ones that you should be
able to decrypt.

https://bugzilla.gnome.org/show_bug.cgi?id=770107
2017-06-28 10:52:11 +01:00
Thibault Saunier ff38bfe0ee win32: Update .def file 2017-06-20 11:13:18 -04:00
Sebastian Dröge 848dee060b controller: Export boxed type copy/free functions for GstControlPoint 2017-06-20 10:00:16 +03:00
Sebastian Dröge 35b426ff19 base: Export boxed type copy/free functions for the remaining types 2017-06-20 09:57:01 +03:00
Sebastian Dröge f322740ef9 parse: Make gst_parse_context_copy() public for bindings 2017-05-20 19:43:18 +03:00
Sebastian Dröge 7d930b8693 buffer: Add GstReferenceTimestampMeta
This is a meta that generically allows to attach additional reference
timestamps to a buffer, that don't have to relate to the pipeline clock
in any way.

Examples of this could be an NTP timestamp when the media was captured,
a frame counter on the capture side or the (local) UNIX timestamp when
the media was captured.

https://bugzilla.gnome.org/show_bug.cgi?id=779213
2017-05-12 11:43:02 +02:00
Sebastian Dröge c77f661f6d bus: Add function to get the file descriptor of the bus
This is useful for integration with other event loops that work by
polling file descriptors. G_IO_IN will always be set whenever a message
is available currently.

https://bugzilla.gnome.org/show_bug.cgi?id=776126
2017-05-09 15:01:46 +02:00
Nicolas Dufresne ebdb4c6984 Fix win32 libgstreamer.def ordering
This should fix make distcheck
2017-03-24 14:33:19 -04:00
Nicolas Dufresne 2c056563bf gstutils: Add helpers to get/set array properties
This is to help bindings access properties of type GST_TYPE_ARRAY.
This function will get/set the property and convert form/to
GValueArray.

New API:
  gst_util_set_object_array
  gst_util_get_object_array

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:30:45 -04:00
Nicolas Dufresne c21e219ed4 structure: Add get/set_array/list using GValueArray
This adds a binding friendly interface to get and set arrays
and list into GstStructure.

New API:
 - gst_structure_set_array
 - gst_structure_set_list
 - gst_structure_get_array
 - gst_structure_get_list

https://bugzilla.gnome.org/show_bug.cgi?id=753754
2017-03-24 13:30:45 -04:00
Tim-Philipp Müller 827e5d4fad win32: update .def file for new API 2017-02-24 21:33:49 +00:00
Vivia Nikolaidou 978df5d0ff paramspecs: Add GstParamSpecArray for GST_TYPE_ARRAY typed properties
These are mostly useful to get our automatic
serialization/deserialization from strings and simple usage from
gst-launch or similar.

https://bugzilla.gnome.org/show_bug.cgi?id=777375
2017-02-23 20:16:17 +02:00
Tim-Philipp Müller ca4ac71555 buffer: add gst_buffer_iterate_meta_filtered()
For convenience. Pretty much every user of
gst_buffer_iterate_meta() filters for a specific
api type.

https://bugzilla.gnome.org/show_bug.cgi?id=775727
2016-12-14 18:18:43 +00:00
Tim-Philipp Müller 34660946f1 win32: update .def file for new API 2016-12-12 19:25:17 +00:00
Seungha Yang 0494c173e0 uri: Add new uri API to get media fragments URI as table
As an usecase of URI fragment, it can indicate temporal or spatial
dimension of a media stream. To easily parse key-value pair,
newly added gst_uri_get_media_fragment_table () API will provide
the table of key-value pair likewise URI query.
See also https://www.w3.org/TR/media-frags/

https://bugzilla.gnome.org/show_bug.cgi?id=774830
2016-12-06 20:28:55 +00:00
Sebastian Dröge a7d282d272 utils: Export linear regression calculation as public function
It is useful outside the GstClock code too.

https://bugzilla.gnome.org/show_bug.cgi?id=774916
2016-11-28 14:26:50 +02:00
Matthew Waters 3eb4896435 controllers: add new proxy control binding
Allows proxying the control interface from one property on one GstObject
to another property (of the same type) in another GstObject.

E.g. in a parent-child relationship, one may need to
gst_object_sync_values() on the child and have a binding (set elsewhere)
on the parent update the value.

Note: that this doesn't solve GObject property forwarding and must be
taken care of by the implementation manually or using GBinding.

https://bugzilla.gnome.org/show_bug.cgi?id=774657
2016-11-23 17:15:09 +11:00
Tim-Philipp Müller bb14800ba6 win32: remove copies of generated headers 2016-11-14 21:28:22 +00:00
Tim-Philipp Müller 66d2bae604 Add gst_print(), gst_println(), gst_printerr(), gst_printerrln()
Useful for debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=766470
2016-11-12 10:43:55 +00:00
Tim-Philipp Müller bce5d0fc55 baseparse: add since marker for new API to docs and fix win32 .def file 2016-11-10 13:49:29 +00:00
Vincent Penquerc'h 4caf66fbca baseparse: expose gst_base_parse_drain 2016-11-10 12:47:37 +00:00
Tim-Philipp Müller fe5102f4d3 win32: update .def for new API 2016-11-04 21:15:58 +00:00
Jan Schmidt bf3a7c54f7 Add new basesink API to exports and Since markers
Add Since markers to the new basesink API to drop
out-of-segment buffers, and add them to the
win32 exports
2016-11-02 11:34:47 +11:00
Jan Schmidt e1dc60524e dynamic types: Implement dynamic types in the registry
Implement GstDynamicTypeFactory as a new registry feature.

GstDynamicTypeFactory provides a way of registering a GType
into the registry, such that it will be registered as a dynamic
type when the registry is loaded, and then automatically loaded
if the type is needed during caps parsing.

This allows using non-core types in pad templates, by loading a
registry feature to create the GType on the fly.

https://bugzilla.gnome.org/show_bug.cgi?id=750079
2016-11-02 11:21:37 +11:00