Commit graph

118 commits

Author SHA1 Message Date
Sebastian Dröge 226d01a941 base: Export boxed type copy/free functions for the remaining types 2017-06-20 10:08:38 +03: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
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
Sebastian Dröge 8c7da1d426 adapter: Rename functions and implement new functions, update test
We don't do calculations with different units (buffer offsets and bytes)
anymore but have functions for:
1) getting the number of bytes since the last discont
2) getting the offset (and pts/dts) at the last discont

and the previously added function to get the last offset and its distance from
the current adapter position.

https://bugzilla.gnome.org/show_bug.cgi?id=766647
2016-06-10 09:49:33 +03:00
Edward Hervey 67ae0ad225 adapter: Add methods to query current offset
API: gst_buffer_prev_offset
API: gst_buffer_get_offset_from_discont

The gst_buffer_get_offset_from_discont() method allows retrieving the current
offset based on the GST_BUFFER_OFFSET of the buffers that were pushed in.

The offset will be set initially by the GST_BUFFER_OFFSET of
DISCONT buffers, and then incremented by the sizes of the following
buffers.

The gst_buffer_prev_offset() method allows retrievent the previous
GST_BUFFER_OFFSET regardless of flags. It works in the same way as
the other gst_buffer_prev_*() methods.

https://bugzilla.gnome.org/show_bug.cgi?id=766647
2016-06-10 09:49:33 +03:00
Tim-Philipp Müller 41b85d91eb baseparse: add API for subclass to set tags
This is needed so that we can do proper tag handling
all around, and combine the upstream tags with the
tags set by the subclass and any extra tags the
base class may want to add.

API: gst_base_parse_merge_tags()

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 14:32:23 +01:00
Tim-Philipp Müller d0f85838ab queuearray: allow storing of structs in addition to pointers
This way we don't have to allocate/free temporary structs
for storing things in the queue array.

API: gst_queue_array_new_for_struct()
API: gst_queue_array_push_tail_struct()
API: gst_queue_array_peek_head_struct()
API: gst_queue_array_pop_head_struct()
API: gst_queue_array_drop_struct()

https://bugzilla.gnome.org/show_bug.cgi?id=750149
2015-07-04 11:03:51 +01:00
Sebastian Dröge 866f9ace5c adapter: Add get variants of the buffer based take functions
Main difference to gst_adapter_map() for all practical purposes is that
GstMeta of the buffers will be preserved.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 18:40:28 +02:00
Tim-Philipp Müller 936b252253 win32: add new API to exports 2015-04-03 00:37:10 +01:00
Tim-Philipp Müller e6a0f52e3c adapter: add gst_adapter_take_buffer_list()
API: gst_adapter_take_buffer_list()
2015-03-14 17:22:22 +00:00
Mark Nauwelaerts 4aee7ca58a win32: update exports 2015-03-07 20:18:43 +01:00
Tim-Philipp Müller 5231f84bce win32: update .def file
It's sorted. If it's unsorted, make check-exports fails.
2014-09-25 18:57:32 +01:00
Jonas Holmberg 4a304a7774 flowcombiner: add a gst_flow_combiner_clear() method
https://bugzilla.gnome.org/show_bug.cgi?id=737359

API: gst_flow_combiner_clear()
2014-09-25 15:40:42 +01:00
Tim-Philipp Müller 86d7a597f0 bytereader: add gst_byte_reader_peek_sub_reader() and _get_sub_reader()
Adds API to get or peek a sub-reader of a certain size from
a given byte reader. This is useful when parsing nested chunks,
one can easily get a byte reader for a sub-chunk and make
sure one never reads beyond the sub-chunk boundary.

API: gst_byte_reader_peek_sub_reader()
API: gst_byte_reader_get_sub_reader()
2014-08-15 10:03:26 +01:00
Thiago Santos f8323b17fb bytereader: add gst_byte_reader_masked_scan_uint32_peek
Adds gst_byte_reader_masked_scan_uint32_peek just like
GstAdapter has a _peek and non _peek version

Upgraded tests to check that the returned value is correct in the
_peek version

API: gst_byte_reader_masked_scan_uint32_peek

https://bugzilla.gnome.org/show_bug.cgi?id=728356
2014-07-24 17:00:09 -03:00
Tim-Philipp Müller 97fe853e42 win32: add exports for new get_type() function 2014-06-14 16:28:48 +01:00
Thiago Santos 9e8bd15c12 flowcombiner: add GstFlowCombiner
Adds a utility struct that is capable of storing and aggregating flow returns
associated with pads.

This way all demuxers will have a standard function to use and have the
same expected results.

Includes tests.

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 15:29:53 -03:00
Tim-Philipp Müller fa94322349 sparsefile: keep it private as helper API for downloadbuffer
There's no expectation that any other element or applications
might want to use this helper API any time soon, so keep it
private for the time being. There were open questions regarding
portability and binding-friendliness too.

This also removes the gio dependency of -base again.

https://bugzilla.gnome.org/show_bug.cgi?id=729951
https://bugzilla.gnome.org/show_bug.cgi?id=729949
2014-05-13 20:05:55 +01:00
Wim Taymans b0ae6166f1 win32: update def 2014-05-08 15:53:46 +02:00
Sebastian Rasmussen 3de939cb5b adapter: Adapt gst_adapter_copy() for bindings
This is done by introducing a new gst_adapter_copy_bytes() call that
returns a GBytes structure.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725476
2014-03-15 13:16:16 +01:00
Sebastian Dröge f47c704b99 basesrc: Add gst_base_src_set_automatic_eos() API
This defaults to TRUE and if it is set to FALSE it is the subclasses
responsibility to return GST_FLOW_EOS from the create() vmethod once
the stream is done.
2014-02-13 12:09:06 +01:00
Sebastian Dröge fee7c89a6d win32: Update def files 2013-11-11 17:02:35 +01:00
Thiago Santos 581c4297d0 dataqueue: add gst_data_queue_push_force
Adds a variant of the _push function that doesn't check the queue limits
before adding the new item. It is useful when pushing an element to the
queue shouldn't lock the thread.

One particular scenario is when the queue is used to serialize buffers
and events that are going to be pushed from another thread. The
dataqueue should have a limit on the amount of buffers to be stored to
avoid large memory consumption, but events can be considered to have
negligible impact on memory compared to buffers. So it is useful to be
used to push items into the queue that contain events, even though the
queue is already full, it shouldn't matter inserting an item that has
no significative size.

This scenario happens on adaptive elements (dashdemux / mssdemux) as
there is a single download thread fetching buffers and putting into the
dataqueues for the streams. This same download thread can als generate
events in some situations as caps changes, eos or a internal control
events. There can be a deadlock at preroll if the first buffer fetched
is large enough to fill the dataqueue and the download thread and the
next iteration of the download thread decides to push an event to this
same dataqueue before fetching buffers to other streams, if this push
locks, the pipeline will be stuck in preroll as no more buffers will be
downloaded.
There is a somewhat common practice in dash streams to have a single
very large buffer for audio and one for video, so this will always
happen as the download thread will have to push an EOS right after
fetching the first buffer for any stream.

API: gst_data_queue_push_force

https://bugzilla.gnome.org/show_bug.cgi?id=705694
2013-08-13 12:00:48 -03:00
Olivier Crête 5920491597 adapter: Add function to return buffer composed of multiple memories
API: gst_adapter_take_fast()
2013-07-16 14:07:48 -04:00
Thiago Santos 1681a1b1e0 dataqueue: add gst_data_queue_peek
This function works just like gst_data_queue_pop, but it doesn't
remove the object from the queue.

Useful when inspecting multiple GstDataQueues to decide from which
to pop the element from.

Add: gst_data_queue_peek
2013-04-18 14:45:47 -03:00
Sebastian Dröge b909061031 gst: Add new GstContext miniobject for sharing contexts in a pipeline 2013-03-29 16:40:21 +01:00
David Schleef 92674800ed update exports for baseparse API changes 2013-02-12 12:32:23 -08:00
Sebastian Dröge 08e0fcd7b2 value: API: Add boxed type for GThread 2012-11-12 11:40:59 +01:00
Sebastian Dröge 09982c3c13 dataqueue/queuearray: Make public API again
These are actually used outside of coreelements nowadays.
Also hide lots of internals and add padding and documentation.
2012-10-25 14:03:01 +02:00
Tim-Philipp Müller 4e373aa952 docs: add Since markers for new API and add it to docs and .def file 2012-10-04 11:24:09 +01:00
Wim Taymans 25665ff90d defs: add new baseparse function 2012-09-13 11:38:52 +02:00
Stefan Sauer 57ea490f5a collectpads: remove gst_collect_pads_add_pad_full
Rename gst_collect_pads_add_pad_full() to gst_collect_pads_add_pad() and fix all
invocations.
2012-09-12 21:04:47 +02:00
Sebastian Dröge f24d36c380 docs: Add new basesrc/basetransform API to the docs 2012-08-14 15:46:35 +02:00
Stefan Sauer e9b62b030c collectpads: remove unimplemented api
We can always add this back if we need it. Fixes parts of #670852.
2012-07-24 21:38:35 +02:00
Tim-Philipp Müller 94f6ba9c0b base: make GstQueueArray private to coreelements for now
Keep it private until we have a reason to make it public.
2012-07-14 19:36:02 +01:00
Sebastian Dröge 67f95a795a win32: Fix exported symbols list for real now 2012-07-11 13:14:57 +02:00
Sebastian Dröge f773771b0e win32: Updated exported symbols list 2012-07-11 12:46:31 +02:00
Edward Hervey 94e0e06efa win32: Update defs file for API changes/addition 2012-07-09 20:31:45 +02:00
Sebastian Dröge 2d049b41ab win32: Update exported symbols list 2012-07-05 12:34:43 +02:00
Sebastian Dröge dfd9b60221 toc: Make structures opaque and clean up function names and fields a bit 2012-07-05 12:29:02 +02:00
Edward Hervey c0970867bf win32: API additions 2012-07-04 17:46:54 +02:00
Edward Hervey 588cdcd369 libs: New growing-only queue.
This is a queue which has the same API as GQueue, except that:
* It uses an array, instead of a doubled-linked-list
* The array can only grow.

This code is not-threadsafe. It is up to the owner to make sure the
proper locking is taken before calling this API.
2012-07-04 17:46:53 +02:00
Wim Taymans 927f261b1c basesink: wait_eos() -> wait()
Rename gst_base_sink_wait_eos() to gst_base_sink_wait() to avoid confusion and
introspection problems with the ::wait_eos vmethod. Also this method can be used
to wait for other things than EOS. Update the docs a little.
2012-06-18 11:36:25 +02:00
Mark Nauwelaerts e076e36840 collectpads2: rename to collectpads 2012-04-17 15:07:54 +02:00
Mark Nauwelaerts 569c48052a win32: add new collectpads2 API to .def file 2012-04-16 16:36:52 +02:00
Edward Hervey 5e554fde91 win32: Update defs file 2012-03-30 08:55:33 +02:00
Wim Taymans beea57dca7 basetransform: fix reconfigure methods
Rename gst_base_transform_suggest to gst_base_transform_reconfigure_sink because
that is what it does. Also remove the caps and size because that is not needed.
Rename gst_base_transform_reconfigure to gst_base_transform_reconfigure_src.
Remove some old unused code in capsfilter.
2012-02-24 11:00:21 +01:00
Wim Taymans f5aa6e294f defs: update 2012-02-14 10:30:40 +01:00
Sebastian Dröge b6d11d844e collectpads: Remove old collectpads
Still have to rename collectpads2 to collectpads before the 1.0 release.
2012-01-26 10:48:56 +01:00