The NO_SHARE flag does not influence the exclusiveness of the buffer initially
but only if a _share operation can be done. Otherwise, we would not be able to
WRITE map a buffer memory because it would have a share count of at least 2.
We implement the locking in gst_memory_map with the lock flags, make matching
flags the same number so that we can use the map flags directly as lock flags.
Expose the internally used methods for locking and unlocking the object. Pass
the access mode to the unlock function for extra checks and because we need it
for the EXCLUSIVE locks.
Make some new defines to specify the desired locking.
Add a new EXCLUSIVE lock mode which will increment the shared counter. Objects
with a shared counter > 1 will not be lockable in WRITE mode.
Improve parallel installability in setups like jhbuild by
providing versioned variants of some environment variables:
GST_REGISTRY_1_0
GST_PLUGIN_PATH_1_0
GST_PLUGIN_SYSTEM_PATH_1_0
GST_PLUGIN_SCANNER_1_0
will now be checked before checking the unversioned ones.
https://bugzilla.gnome.org/show_bug.cgi?id=679407
We added a minimum length of three letters originally so we would
fail to recognise DOS/Windows-style filenames as valid URIs (as we
should). Two should be just fine as well.
Make GstSeekFlag to GstSegmentFlag conversion explicit, and
set only those seek flags in the segment flags which are
mapped. This makes sure we don't have extraneous flags
littering our segment flag field, which also fixes the
debug printing/serialisation of segment events in the
debug log.
Visual C++ does not have isnan(), so add fallback to
math-compat.h (could use _isnan() in this case, but
this makes it work for all cases where isnan is missing).
https://bugzilla.gnome.org/show_bug.cgi?id=679112
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().
If we have a file called Foo\Bar.ogg, there is no way to pass
that filename properly to filesrc in gst_parse_launch(), since
gst_parse_unescape() will just unescape \x to x.
Not cherry-picking this into 0.10 since there are apparently
apps that work around this problem and which would break if
we fixed it there too.
https://bugzilla.gnome.org/show_bug.cgi?id=673319
Take into account that not all fields might be valid (though they
are valid in the GDateTime structure). But we should just return
unordered if the set fields don't match. Also, don't check
microseconds when comparing datetimes, since we don't serialise
those by default if they're available. This ensures date times are
still regarded as equal after serialising+deserialising.
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
Now that TOCs are refcounted and have a GType, we can just
stuff a ref of the TOC directly into the various toc
event/message/query structures and get rid of lots of
cracktastic GstStructure <-> GstToc serialisation and
deserialisation code. We lose some TOC sanity checking
in the process, but that should really be done when
it's being created anyway.
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
So mini objects don't have to poke into the GstMiniObject part
of the structure. Saves lines of code, and seems slightly cleaner.
We don't have proper OO hierarchies or methods here after all.
These changes are to clean up syntax issues such as missing colons,
missing spaces, etc., and minor issues such as argument names in
headers not matching the implementation and/or documentation.
When 2 weak refs are added, the array is not resized big enough.
Simplify the weak ref handling code.
Free memory when we remove all weak refs.
Allow installing the same weak ref multiple times, like in gobject.
The size field is used by subclasses to store the total allocated size of the
memory for this miniobject. Because miniobject doesn't really do anything with
this field we can move it to the subclasses.
Add the running-time of the buffer that caused the async operation to complete
to the async-done message.
Update bin to handle the new async-done message.
Use the new RESET_TIME message to reset the start-time of the pipeline to the
requested time.
Make basesink request a new running-time when the flush-stop message tells it to
insteasd of waiting for preroll.
Add a new message to reset the pipeline running_time. Currently reseting the
pipeline can only be requested in the async_done message which means that the
pipeline needs to be prerolled. It is better to move this to a separate message.
Remove constructors we don't want:
gst_date_time_new_ymd_h() because we don't want to
support hour-only for now;
gst_date_time_new_ymd_hm() because we don't want to
add constructors with time info where the caller doesn't
have to think about what timezone the time is in.
Lots of compulsive clean-up. Docs fixes. Replace
has_minute() and has_hour() with has_time().
In order to deserialise and re-serialise dates and date times
from tags properly, we need to be able to express partial
dates (e.g. YYYY or YYYY-MM) and date times.
We only support partial date times where all the more
significant fields above the first unset field are set
(e.g. YYYY-00-DD is not supported).
Calling _get_foo() when foo is not set is not allowed
any more, callers need to check which fields are set
first.
https://bugzilla.gnome.org/show_bug.cgi?id=677757
Make the gst_bin_remove_func more like the add_func. Check if the element we try
to remove from the bin has the bin as the parent and set the parent flag to NULL
immediately, this allows us to avoid concurrent remove operations without using
the UNPARENTING element flag. After we unparented the element from the bin, we
update the bin state and remove the element from the list. Finally we unlink
all the pads.
This avoids a race condition where the element could still claim to have the
bin as the parent while the bin didn't have a pointer to the element anymore.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=647759
In the dispose handler we first need to release all the request pads and then
remove the remaining pads. This is because it is possible that releasing the
request pad might also cleanly remove some of the other dynamic pads, like
what rtpsession does.
https://bugzilla.gnome.org/show_bug.cgi?id=677436
Context: Latency configuration should not be
messed up because of not-linked pads. In general,
one return FALSE on latency distribution causes
the "overall" pipeline latency configuration to
fail. This shows up as noise in logs (warning).
Conflicts:
gst/gstpad.c
Otherwise a pipeline where one sticky event fails to be sent will
never forward EOS events downstream. This can cause pipelines to
wait forever for EOS on errors.
The linking behaviour of external variables that are not initialized
in the compilation unit where they are defined is undefined. On OS X
this causes a linking failure when statically linking GStreamer.
When the bin does an upward state change, try to avoid doing a downward state
change on the child and vice versa.
Add some more unit tests for this fix.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=621833
Make GstPluginFeature opaque until we have time to
clean it up a little. Only GstElementFactory and
GstTypefindFactory derive from it, and they are
opaque already, and we currently don't support
custom plugin features in the registry anyway.
They can be used to select snapping behavior (to previous, next, or
nearest location, where relevant) when seeking.
The seeking implementation (eg, demuxer) may currently ignore some
or all of these flags.
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).
There's no reason anyone would want to derive from this, so
just make opaque until we manage to make all the private bits
private properly (which I'm not doing right now because it's
more invasive and I have registry modifications locally which
touch all that code as well).
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.
Reset the buffer not after we acquire but before we release into the pool. This
makes sure that the pool only has buffers in a clean state and that we can set
extra metadata on buffers in the acquire method. this means that we need to
remove an argument from the method.
Add a new LOCKED flag to the metadata. Refuse removing LOCKED metadata from
a buffer.
Mark the metadata from the bufferpool LOCKED.
Add unit test for LOCKED flag
Ass serialize and deserialize functions for GstSegment so that gdp and
gst_structure_to_string show the segment values. We convert to a GstSegment
first to make things easier..
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674100
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()
After a writer has written to its reserved write location, it can only make the
location available for reading if all of the writers with lower locations have
finished.
Fix a race where the reader would see the updated the tail pointer before the
write could write the data into the queue. Fix this by having a separate reader
tail pointer that is only incremented after the writer wrote the data.
Remove GST_MAJORMINOR and replace it by GST_API_VERSION
Also set GST_VERSION_{MAJOR,MINOR,MICRO,NANO} explicitely
now.
All versions are at 1.0.0 now for the release soon but
API/ABI can still change until the 1.0.0 release.
Next release versions until 1.0.0 will be 0.10.9X and
these will be release candidates. GST_VERSION_* will
nonetheless stay at 1.0.0.0.
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.