They can fail for various reasons.
For non-fatal cases (such as the dump feature of identiy and fakesink),
we just silently skip it.
For other cases post an error message.
https://bugzilla.gnome.org/show_bug.cgi?id=728326
This should never happen theoretically, but since a transient
failure would get us to silently read wrong data, it's worth
erroring out. And it silence this:
Coverity 206034
The offset can be -1 when we are configured in TIME format. Instead of
failing the seek and erroring, do what and offset of -1 is supposed to
do and simply read from the current offset.
Doesn't actually change the default value, just makes use of the
define there is. Superficial testing with fakesink and jpegdec did
not reveal improved performance for bigger block sizes, so leave
default as it is.
Conflicts:
libs/gst/base/gstbasetransform.c
libs/gst/controller/gstinterpolationcontrolsource.c
libs/gst/controller/gstlfocontrolsource.c
plugins/elements/gstfilesrc.c
Dit not merge controller or basetransform changes.
While local filesystems will usually not cause short reads,
this may happen on seekable files on some remote filesystems.
Instead, loop till we get the requested amount of data, or
an actual EOS (ie, 0 bytes).
https://bugzilla.gnome.org/show_bug.cgi?id=665921
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.
Add a new fill virtual method to basesrc. The purpose of this method is to fill
a provided buffer with data.
Add a default implementation of the create method that allocates a buffer and
calls the fill method on it. This would allow the base class to implement
bufferpool and allocator negotiation on behalf of the subclasses.
Fix the blocksize property.
Make filesrc use the new fill method.
This reverts commit cf4fbc005c.
This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
Passing e.g. location=foo would lead to warnings because g_filename_to_uri()
wants an absolute file path and returns NULL otherwise. Use brand-new
gst_filename_to_uri() instead, which will try harder to create a proper
URI for us.
Also add unit test.