Commit graph

1602 commits

Author SHA1 Message Date
Wim Taymans
05635b374f Merge remote-tracking branch 'origin/0.10' 2012-04-10 16:07:52 +02:00
Wim Taymans
2e28804a6e queue2: clear seeking flag in all cases
Also clear the seeking flag when downstream is in pull mode.
2012-04-10 16:06:41 +02:00
Wim Taymans
393c758a1c Merge remote-tracking branch 'origin/0.10'
Conflicts:
	gst/gst.c
	plugins/elements/gstqueue2.c
2012-04-10 12:55:31 +02:00
Wim Taymans
b7a8051d95 queue2: set seeking flag with the queue lock 2012-04-10 12:44:38 +02:00
Wim Taymans
5755e24379 queue2: Keep track of the seeking state
Set the seeking flag right before we send a seek event upstream and discard all
data untill we see a flush-stop again. We need to do this because we activate
the range that we seek to immediately after sending the seek event and it is
possible that we receive data in our chain function from before the seek
which would then be added to the wrong range resulting in data corruption.
2012-04-10 12:44:35 +02:00
Wim Taymans
49a4b801ac queue2: make range on newsegment for ringbuffer
When using the ringbuffer, handle the newsegment event like we handle it when
using the temp-file mode: create a new range for the new byte segment. The new
segment should normally already be created when we do a seek.
2012-04-10 12:44:30 +02:00
Sebastian Dröge
1a61f3ec19 Merge remote-tracking branch 'origin/0.10' 2012-04-09 16:42:30 +02:00
Sebastian Dröge
829eafad0e multiqueue: Don't use buffer after pushing it downstream 2012-04-09 16:40:47 +02:00
Tim-Philipp Müller
a63829b4ff plugins: use new gst_element_class_set_static_metadata() 2012-04-09 13:05:07 +01:00
Tim-Philipp Müller
4348851cd9 Merge remote-tracking branch 'origin/0.10'
Conflicts:
	gst/gstatomicqueue.c
2012-04-07 15:42:08 +01:00
Tim-Philipp Müller
d05d29d0c9 filesrc: set default block size from local define
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.
2012-04-07 15:21:29 +01:00
Wim Taymans
4638f15de2 queue2: don't update the current reading_pos in flush
A flush from the upstream element should not make buffering go to 0, the next
pull request might be inside a range that we have and then we don't need to
buffer at all. If the next pull is outside anything we have, buffering will
happen as usual anyway.
2012-04-06 16:46:58 +02:00
Wim Taymans
d5d0d10979 queue2: fix for merged changes 2012-04-06 12:42:39 +02:00
Wim Taymans
fb8fbdaeb3 Merge branch '0.10' 2012-04-06 12:37:41 +02:00
Wim Taymans
d8a61930af queue2: check the pad mode on the right pad 2012-04-06 12:32:49 +02:00
Wim Taymans
f06458aabc queue2: forward flush events correctly
We want to forward the flush events received on the sinkpad whenever the srcpad
is activated in pushmode, which can also happen when using the RINGBUFFER or
DOWNLOAD mode and downstream failed to activate us in pull mode.
2012-04-06 12:24:22 +02:00
Sebastian Dröge
aca083c56d gst: Change name parameter of GST_PLUGIN_DEFINE() to not take a string anymore
This will be needed when we later add support for static linking
of plugins without introducing new API or changing existing API.
2012-04-05 14:17:16 +02:00
Wim Taymans
0ba0f7cd5b Merge branch '0.10'
Conflicts:
	plugins/elements/gstqueue2.c
2012-04-05 10:36:08 +02:00
Wim Taymans
67ccad0621 queue2: stop waiting for more data after EOS
When we have EOS, read the remaining bytes in the buffer and make sure we don't
wait for more data. Also clip the output buffer to the amount of remaining
bytes.
2012-04-05 10:17:46 +02:00
Wim Taymans
9a1185673e queue2: check for filled buffer correctly
When using the ringbuffer mode, the buffer is filled when we reached the
max_level.bytes mark or the total size of the ringbuffer, whichever is smaller.
2012-04-05 10:16:52 +02:00
Wim Taymans
0bb0c68566 queue2: avoid waiting for a filled buffer
Use a threshold variable to hold the maximum distance from the current position
for with we will wait instead of doing a seek.
When using the ringbuffer and the requested offset is not available, avoid
waiting until the complete ringbuffer is filled but instead do a seek when the
requested data is further than the threshold.
Avoid doing the seek twice in the ringbuffer case.
Use the same threshold for ringbuffer and download buffering.
2012-04-05 10:16:46 +02:00
Sebastian Dröge
b0d89da6b6 gst: Change versioning
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.
2012-04-04 14:28:55 +02:00
Руслан Ижбулатов
f140cb8dbd Timeout is not used on W32
Fixes #673267
2012-04-02 11:24:26 +02:00
Wim Taymans
38b96e6c8c buffer: improve the buffer memory methods
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.
2012-03-30 18:15:24 +02:00
Mark Nauwelaerts
bcb98f409b typefindelement: plug caps leaks 2012-03-30 16:53:09 +02:00
Edward Hervey
2bdd71a710 queue: Flush the internal queue when we see GST_FLOW_FLUSHING
Ensures that we don't end up with stale contents (like GstQuery) in
the internal GQueue after any blocking upstream thread returns.
2012-03-29 17:46:35 +02:00
Edward Hervey
c36748177f queue: Don't unref GstQuery travelling through the queue
Unlike events and buffers, the reference is not given to us
2012-03-29 17:46:35 +02:00
Sebastian Dröge
4b6c3c7fea Merge remote-tracking branch 'origin/0.10'
Conflicts:
	plugins/elements/gstmultiqueue.c
2012-03-29 14:54:53 +02:00
Sebastian Dröge
9441e711df multiqueue: Wake up all not-linked streams when a stream switches from linked to not-linked
We reset all the waiting streams, let them push another buffer to
see if they're now active again. This allows faster switching
between streams and prevents deadlocks if downstream does any
waiting too.

Also improve locking a bit, srcresult must be protected by the
multiqueue lock too because it's used/set from random threads.
2012-03-29 14:49:53 +02:00
Sebastian Dröge
17e691421f multiqueue: Recompute high-time too when flushing, not only high-id 2012-03-29 14:47:57 +02:00
Sebastian Dröge
d03e3d7772 inputselector: Only wait until the active pad's running time is reached if the active pad already saw data
Otherwise we might block forever because upstream (e.g. multiqueue) is waiting
for the previously active stream to return forever (which is waiting here
in inputselector) before pushing something on the newly selected stream.
2012-03-29 14:47:57 +02:00
Wim Taymans
f9c85a53dc pad: improve docs of get/pull_range
Improve the docs of the get/pull_range functions, define the lifetime of the
buffer in case of errors and short reads.
Make sure the code does what the docs say.
2012-03-20 13:14:55 +01:00
Wim Taymans
d540a5fc68 multiqueue: handle serialized queries 2012-03-19 11:45:27 +01:00
Wim Taymans
db1318ab4a pad: change the semantics of get/pull_range a little
Make it so that one can specify a buffer for get/pull_range where the downstream
element should write into. When passing NULL, upstream should allocate a buffer,
like in 0.10.
We also need to change the probes a little because before the pull probe, there
could already be a buffer passed. This then allows us to use the same PROBE
macro for before and after pulling.
While we're at the probes, make the query probe more powerful by handling the
GST_PAD_PROBE_DROP return value. Returning _DROP from a query probe will now
return TRUE upstream and will not forward the probe to the peer or handler.
Also handle _DROP for get/pull_range properly by not dispatching to the
peer/handler or by generating EOS when the probe returns DROP and no buffer.
Make filesrc handle the non-NULL buffer passed in the get_range function and
skip the allocation in that case, writing directly into the downstream provided
buffer.
Update tests because now we need to make sure to not pass a random value in the
buffer pointer to get/pull_range
2012-03-16 21:37:10 +01:00
Wim Taymans
b54b886fc5 typefind: proxy allocation query 2012-03-16 21:36:33 +01:00
Wim Taymans
85c9543841 memory: group allocation parameters in a struct
Group the extra allocation parameters in a GstAllocationParams structure to make
it easier to deal with them and so that we can extend them later if needed.
Make gst_buffer_new_allocate() take the GstAllocationParams for added
functionality.
Add boxed type for GstAllocationParams.
2012-03-15 13:42:17 +01:00
Wim Taymans
c93cde0a30 filesrc: only update buffer size on short read 2012-03-15 13:42:17 +01:00
Wim Taymans
0addca0810 queue: remove useless PROXY_ALLOCATION flag 2012-03-15 13:42:12 +01:00
Wim Taymans
9e2ef19dc2 queues: warn when receiving a serialized event
.. until we implement it.
2012-03-14 16:00:48 +01:00
Wim Taymans
2e864c4722 queue: add support for serialized queries 2012-03-14 15:42:33 +01:00
Wim Taymans
8a76c3269a caps: _do_simplify() -> _simplify()
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.
2012-03-12 11:38:37 +01:00
Wim Taymans
9cdbffea94 caps: improve _do_simplify
Make gst_caps_do_simplify() take ownership of the input caps and produce a
simplified output caps. This removes the requirement of having writable input
caps and the method can make the caps writable only when needed.
2012-03-12 10:42:23 +01:00
Wim Taymans
fe5fe438d3 typefind: remove const from refcounted GstCaps
Having const on refcounted objects require us to make copies instead of simply
taking a ref, don't do that.
2012-03-10 09:25:43 +01:00
Wim Taymans
cfa639c56c tee: fix refcount error 2012-03-08 10:47:39 +01:00
Sebastian Dröge
6b4091a30d Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gsttee.c
2012-03-08 10:19:52 +01:00
Sebastian Dröge
f000bbe924 tee: Fix 'use of logical '&&' with constant operand' compiler warning
This is actually a real bug.
2012-03-06 12:27:33 +01:00
Sebastian Dröge
cfe71423f0 gst: Remove gstmarshal.[ch] completely and use the generic marshaller
Fixes bug #671130.
2012-03-02 11:05:48 +01:00
Tim-Philipp Müller
f701237b77 fdsink: fix compilation after merge 2012-02-27 00:09:57 +00:00
Tim-Philipp Müller
1fbcc71dbd Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	NEWS
	RELEASE
	configure.ac
	docs/plugins/gstreamer-plugins.hierarchy
	docs/plugins/inspect/plugin-coreelements.xml
	libs/gst/base/gstcollectpads.c
	libs/gst/base/gstcollectpads2.c
	plugins/elements/gstfdsink.c
	win32/common/config.h
	win32/common/gstenumtypes.c
	win32/common/gstversion.h
2012-02-27 00:08:39 +00:00
Tim-Philipp Müller
4594e4311d fdsink: implement GstBaseSink::query instead of messing with the pad 2012-02-25 15:18:00 +00:00