This is because we need to be able to signal different TOCs
to downstream elements such as muxers and the application,
and because we need to send both types as events (because
the sink should post the TOC messages for the app in the
end, just like tag messages are now posted by the sinks),
and hence need to make TOC events multi-sticky.
https://bugzilla.gnome.org/show_bug.cgi?id=678742
Move the locking methods from GstMemory to GstMiniObject.
Add a miniobject flag to enable LOCKABLE objects. LOCKABLE objects can
use the lock/unlock API to control the access to the object.
Add a minobject flag that allows you to lock an object in readonly mode.
Modify the _is_writable() method to check the shared counter for LOCKABLE
objects. This allows us to control writability separately from the refcount for
LOCKABLE objects.
Make a gst_buffer_append_region() function that allows you to append a memory
region from one buffer to another. This is a more general version of
gst_buffer_append().
Some tag parsers and writers use same datetime format based on ISO 8601.
We can reduce some code by creating some general functions for it.
API: gst_date_time_to_iso8601_string()
API: gst_date_time_new_from_iso8601_string()
https://bugzilla.gnome.org/show_bug.cgi?id=678031
Let's keep it simple for now:
gst_toc_setter_reset_toc() -> gst_toc_setter_reset()
gst_toc_setter_get_toc_copy() -> removed
gst_toc_setter_get_toc() -> returns a ref now
gst_toc_setter_get_toc_entry_copy() -> removed,
use TOC functions instead
gst_toc_setter_get_toc_entry() -> removed,
use TOC functions instead
gst_toc_setter_add_toc_entry() -> removed,
to avoid problems with (refcount-dependent)
writability of TOC; use TOC functions instead
It's only used internally, most other users will likely
want to use gst_registry_find_plugin() directly instead
(and if not, they can easily walk the list and doing the
strcmp themselves).
This is an implementation detail really, and it's not
clear what anyone would do with this. It's unused as
far as I'm aware, so just remove it for now.
Rename the _get_value_array() functions to _get_g_value_array() and reintroduce
the former to operate on plain unboxed c datatypes (like in 0.10). The _g_value
variants are for bindings while the _value ones are more suited to processing
in elements.
Add gst_element_class_{add,set}_metadata() variants for static strings,
so we can avoid unnecessary g_strdup()s.
API: gst_element_class_add_static_metadata()
API: gst_element_class_set_static_metadata()
gst_buffer_take_memory -> gst_buffer_insert_memory because insert is what the
method does.
Make all methods deal with ranges so that we can replace, merge, remove and map
a certain subset of the memory in a buffer. With the new methods we can make
some code nicer and reuse more code. Being able to deal with a subset of the
buffer memory allows us to optimize more cases later (most notably RTP headers
and payload that could be in different memory objects).
Make some more convenient macros that call the more generic range methods.
Add gst_buffer_append() which appends the memory blocks from one buffer to
another. Remove the old inefficient _merge() and _join() methods which forced a
premature memcpy in most cases.
Remove the _is_span() and _span() methods they are not needed anymore now that
we can _append(). Merging and spanning will be delayed until mapping or maybe
not at all when the element can deal with the different memory blocks.
Rename _do_simplify() to _simplify(). The name was introduced as a replacement
method for a deprecated method but we can now rename it again.
Fix some docs.
There isn't really any need to provide public API for that. It's not
used anywhere in practice, and we aim to provide an API that works
for GstCaps, not some kind of generic set manipulation API based on
GValue. Making this private also makes it easier to optimise this
later. We can always put it back if someone actually needs it.
We introduced our own when GLib didn't want to add a GType
for GError. But now that there is one, we can use GLib's
unconditionally and remove our version.
Make the memory object simply manage the data pointer and the maxsize and move
the offset and size handling to common functionality.
Use the READONLY flag to set a readonly lock.
Remove the data and size fields from the unmap method. We need an explicit
resize operation instead of using the unmap function.
Make internal helper lock and unlock functions.
Update unit test and users of the old API.
Which we had to add because GLib didn't have it
back in the day. Port everything to plain old
G_TYPE_DATE, which is also a boxed type. Ideally
we'd just use GDateTime for everything, but it
doesn't support not setting some of the fields
unfortuntely (which would be very useful for
tag handling in general, if we could express
2012-01 for example).
https://bugzilla.gnome.org/show_bug.cgi?id=666351
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
Add a GstControlBinding class. This is a preparation for making the
controlsources generate double valued control curves and do the gparamspec
mapping in the control binding. Now the API in GstObject is again mostly
for convenience.
An extra application preset dir help to organize presets created for special
purposes. Fixes#660760
API: gst_preset_set_app_dir(), gst_preset_get_app_dir()
Add _full variants of the pad function setters that take a destroy notify.
Make some macros that make the old method name pass NULL to this new
function.
Add the pad mode to the activate function so that we can reuse the same function
for all activation modes. This makes the core logic smaller and allows for some
elements to make their activation code easier. It would allow us to add more
scheduling modes later without having to add more activate functions.
Remove the getcaps function on the pad and use the CAPS query for
the same effect.
Add PROXY_CAPS to the pad flags. This instructs the default caps event and query
handlers to pass on the CAPS related queries and events. This simplifies a lot
of elements that passtrough caps negotiation.
Make two utility functions to proxy caps queries and aggregate the result. Needs
to use the pad forward function instead later.
Make the _query_peer_ utility functions use the gst_pad_peer_query() function to
make sure the probes are emited properly.
Make that implizit with attaching/detaching controlsources. This is a lot easier
and has less invalid state (controlled property without control source).
No one but filesrc used that API. Should probably be replaced by
requiring an "uri" property instead, and then objects can do a
notify on that. Also removed interface structure padding, it's
not needed.
This make the controller even more lightweight (no extra object, no extra lock,
less indirections). For object that don't use the controller the only 'overhead'
is a 3 unused fields in the gst_object structure.
The fixate caps function was not used externally and we have vmethods in the
base classes where it is needed.
Update some docs.
simplify some fixate functions in the base classes. Also pass the untruncated
caps to the vmethod.
Better now than later in the cycle. These might come in handy:
sed -i -e 's/GstProbeReturn/GstPadProbeReturn/g' `git grep GstProbeReturn | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_PROBE_/GST_PAD_PROBE_/g' `git grep GST_PROBE_ | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GstProbeType/GstPadProbeType/g' `git grep GstProbeType | sed -e 's/:.*//' | sort -u`
No one uses this or should ever need to use it, since
the size is architecture-specific anyway. If normal
integers don't do, one should use 64-bit integers.
It was a bit too clever, and didn't really work as an API,
confusing people to no end. Better implement specific methods
whether an interface is usable/available/ready on the interface
itself, or even add GError arguments, rather than try to have
per-instance interfaces.
This allows to get the internal pad of ghostpads and
proxypads without using gst_pad_iterate_internal_links()
and is much more convenient.
The internal pad of a ghostpad is the pad of the opposite direction
that is used to link to the ghostpad target.
Add first implementation of arbitrary buffer metadata. We use a simple linked
linked of slice allocated metadata chunks. Future implementations could use
something more performant.
Add get, remove, iterate methods to handle the metadata.
Add function that (unlike the GLib equivalent) also accepts paths that
aren't absolute and will clean up relative markers such as ./ and ../
before forming a URI.
Fixes warnings with e.g. filesrc location=foo ! typefind caused by the
recent switch to g_filename_to_uri(), but also actually creates valid
URIs for the first time.
Windows code paths could need some more work, e.g. we don't clean up
the relative markers there for now (because path could have \ and /
as separators).
API: gst_filename_to_uri()
The new request_new_pad_full vmethod provides an additional caps field,
which allows elements to take better decision process.
Also, add a gst_element_request_pad() function to allow developers to be
able to specify which pad template they want a pad of.
Convert gstutils to use that new method instead of the old one when more
efficient.
This is useful for being able to request pads in a more flexible way,
especially when the element can provide pads whose caps depend on
runtime configuration and therefore can't provide pre-registered
pad templates.
API: GstElement::request_new_pad_full
API: gst_element_request_pad
https://bugzilla.gnome.org/show_bug.cgi?id=637300
Make GstObject extend from GInitiallyUnowned, remove the FLOATING flag and use
GObject methods for managing the floating ref.
Remove class lock, it was a workaround for a glib < 2.8 bug.
Remove the parent-set and parent-unset signals, attempt to implement with notify
but disabled because deadlocks in deep-notify.
Adds a new tag to indicate the error in horizontal positioning
in meters. This is one of the available 'gps error' fields in
exif, for example.
API: GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR
Add _set_value() variants that take ownership of the value passed
instead of making a copy of the value. This is useful for setting
values to things that aren't refcounted (e.g. GValueArrays or
strings or string arrays, etc.).
API: gst_structure_take_value()
API: gst_structure_id_take_value()
https://bugzilla.gnome.org/show_bug.cgi?id=629831
Add a GstStructure to GstElementClass and GstElementFactory. Add setters/getter.
Handle it in the registry code. Print items in gst-inspect.
Fixes#396774.
API: gst_element_class_set_meta_data(), gst_element_factory_get_meta_data_detail()
Added a new query type to retrieve informations about the areas of the
media currently buffered. See bug 623121.
API: gst_query_add_buffering_range
API: gst_query_get_n_buffering_ranges
API: gst_query_parse_nth_buffering_range
Make code including GStreamer headers compile with -Wcast-qual by
maintaining const-ness when casting. Also fix function signature of
gst_byte_writer_set_pos(): the byte writer should not be marked as
const.
https://bugzilla.gnome.org/show_bug.cgi?id=627910
Adds GST_TAG_APPLICATION_DATA for representing arbitrary private
data that applications might want to store into tags. Exif/id3,
for example, have tags for this.
API: GST_TAG_APPLICATION_DATA
Fixes#626651
For some reason the static inline function GST_CAT_LEVEL_LOG_valist is
now picked up, which then breaks the build because it's not documented,
so add it to the sections file.
Based on patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com>.
Fixes#625862.
Adds a new tag to inform about the image orientation and how
to rotate and flip it before display.
Note that this tag is a string with a predefined set of
possible values.
API: GST_TAG_IMAGE_ORIENTATION
Fixes#619508
A pad is 'negotiable' when its container element is in a state greater
than GST_STATE_READY
API:gst_pad_is_negotiable
API:gst_pad_set_negotiable
API:GST_PAD_NEGOTIABLE
https://bugzilla.gnome.org/show_bug.cgi?id=618644
This allows removing structures from caps without them being freed. Helpful when
plugins need to move around structures without having to do an expensive structure
copy.
API:gst_caps_steal_structure
https://bugzilla.gnome.org/show_bug.cgi?id=621527
This makes it possible to easily get a *:5 debug log without all
the refcounting noise, and drastically reduces the number of lines
output for a normal log (46m to 28m for a 20min video). The full log
including refcounting information can still be gotten using *:7.
Fixes#620460.
Adds 3 new geo location tags involving direction and
movement of capture. Those are:
API: GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
API: GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
API: GST_TAG_GEO_LOCATION_MOVEMENT_SPEED
Fixes#617223
Adds those new tags to describe the device manufacturer and
model used to create medias.
API: GST_TAG_DEVICE_MANUFACTURER
API: GST_TAG_DEVICE_MODEL
Fixes#615941
Adds a new tag for user favorite media rating.
User rating informs how much (from 0 to 100) a user
'likes' a media.
Having an percent uint range for this is easy to map into other scales,
like some players that allow users to attribute 'stars' to its
media.
API: GST_TAG_USER_RATING
Fixes#520697
Adds that warning to configure.ac
Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.
https://bugzilla.gnome.org/show_bug.cgi?id=611692
The only reason these two functions are still around is that at some
point in the past they were in a public header, so we can't really
remove them now even though they should have been private all along
(and aren't really particularly useful). Since these are just empty
stubs now that do nothing but return FALSE and will be removed in
0.11 anyway, we may just as well deprecate them formally.
Adds the following new tags:
GST_TAG_SHOW_NAME
GST_TAG_SHOW_SORTNAME
GST_TAG_SHOW_EPISODE_NUMBER
GST_TAG_SHOW_SEASON_NUMBER
GST_TAG_LYRICS
GST_TAG_COMPOSER_SORTNAME
GST_TAG_GROUPING
Fixes#599759
gst_event_new_sink_message()
gst_event_parse_sink_message()
This event is used for sending a GstMessage downstream and synchronized
with the stream, to be posted by the sink once it reaches the sink.
Fixes bug #602275.
gst_util_greatest_common_divisor()
gst_util_double_to_fraction()
gst_util_fraction_to_double()
Using these instead of going over GValue has much lower overhead.
Also add float<->fraction transform functions for GValue.
This returns the internal feature list cookie, which changes every
time a feature is added or removed. This can be used by elements
to check if they should update their cached feature lists.
This patch adds gst_caps_set_value() and allows gst_caps_set_simple() to
work on non-simple caps. See the API documentation for the functions
about what they do.
The intention of these changes is to ease working with caps in caps
transform functions. An example for this would be ffmpegcolorspace,
where the caps transform function could be changed to look roughly like
this (pseudocode ahead):
result = gst_caps_copy (template_caps);
value = gst_structure_get_value (gst_caps_get_structure (caps, 0),
"widh");
gst_caps_set_value (result, value);
/* same for height, framerate and par */
return caps;
which is much cleaner and easier to understand than the current code.
https://bugzilla.gnome.org/show_bug.cgi?id=597690
In most places in core and baseclasses we just need the caps to do caps-
intersections. In that case ref'ed caps are enough (no need to copy).
This patch also switches the code to use the new functions.
API: gst_pad_get_caps_refed(), gst_pad_peer_get_caps_refed()