Commit graph

1882 commits

Author SHA1 Message Date
Josep Torra ab3c6173b3 baseparse: put the arguments of g_return_val_if_fail in the proper order 2011-08-26 14:11:15 +02:00
Sjoerd Simons 0c0dc0441f basetransform: Fix bodged previous commit 2011-08-26 13:02:34 +01:00
Sjoerd Simons 888e6a91a4 basetransform: Use GstPadDirection in the query vfunc
Wim suggested that using GstPadDirection instead of a GstPad in the
arguments to the new query vfunc would be more consistent with the other
functions.
2011-08-26 12:43:13 +01:00
Wim Taymans 5c8efa9ffe basetransform: remove some unused variables 2011-08-26 12:28:28 +02:00
Wim Taymans b91a5ab60a basetransform: add vmethod to configure upstream bufferpool
Add a vmethod that can be implemented to influence the bufferpool that upstream
elements will use.
2011-08-26 11:44:12 +02:00
Wim Taymans f1566e85c0 basetransform: use pad direction like other vmethods 2011-08-26 11:24:42 +02:00
Wim Taymans 31b70ea701 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
2011-08-26 11:09:07 +02:00
Sjoerd Simons 63a21ca8b1 BaseTransform: Add a query vfunc 2011-08-26 10:39:44 +02:00
Wim Taymans b5ef693e88 buffer: always copy all buffer flags when asked
Don't try to be smart and copy only a subset of buffer flag
2011-08-25 16:20:21 +02:00
Wim Taymans d8d7c62789 basesink: remove preroll-queue-len property
Remove the preroll-queue-len property and move its variables to a private
section so that we can remove them later.
2011-08-25 12:38:58 +02:00
Wim Taymans 6f295dc239 Merge branch 'master' into 0.11
Conflicts:
	gst/gstobject.c
2011-08-24 10:43:09 +02:00
Mark Nauwelaerts c1988b7e55 basesink: ensure start_time reset upon flush 2011-08-23 18:21:38 +02:00
Wim Taymans 8170c34c94 Merge branch 'master' into 0.11
Conflicts:
	gst/gstbuffer.h
	gst/gstcaps.c
	gst/gstcaps.h
	gst/gstevent.c
2011-08-22 12:33:35 +02:00
Tim-Philipp Müller c7f2e85d86 baseparse: don't use == in debug string
It messes up GST_DEBUG=*:5 make foo/bar.valgrind, because
our Makefile looks for '==' as marker of valgrind output.
2011-08-18 20:46:01 +01:00
Tim-Philipp Müller 7043bf9d55 baseparse: fix crash on seek from streaming thread on newsegment event
Event if it's not allowed, we can easily prevent it, so let's do
that.

https://bugzilla.gnome.org/show_bug.cgi?id=656771
2011-08-18 20:44:01 +01:00
Wim Taymans 6b876ebf82 basesrc: add default fixate function
Add a default fixate function which does gst_caps_fixate() because
gst_pad_fixate() does not do that anymore.
2011-08-17 17:16:21 +02:00
Wim Taymans e4db8d0f55 docs: improve some docs 2011-08-17 09:25:04 +02:00
Wim Taymans 8698a8c94e buffer: rename PREROLL -> LIVE flag
Rename the GST_BUFFER_FLAG_PREROLL to GST_BUFFER_FLAG_LIVE and give the new flag
a meaning. The old PREROLL flag never had a clear meaning.
2011-08-16 17:32:20 +02:00
Josep Torra 178bdccb76 Fix and clarify debug statements
Fixes build on MacOSX

Signed-off-by: Edward Hervey <edward.hervey@collabora.co.uk>
2011-08-10 11:01:58 +02:00
Wim Taymans 10485ea803 basesrc: add alloc vmethod
Make an alloc vmethod so that subclasses can override or call the default
implementation when they want.
2011-08-04 18:00:02 +02:00
Wim Taymans dc096f39d1 basesrc: cleanups and mark reconfigure
Don't abuse the result variable.
Mark the srcpad with a reconfigure so that negotiation happens.
2011-08-04 17:12:47 +02:00
Wim Taymans 6bae6b8253 basesrc: remove negotiation from the state change
Remove the negotiation from the state change function, it causes data transfer
and bufferpool negotiation, which is not supposed to be done. Since we have the
reconfigure state on the pad, the create function will do the negotiation as
soon as it gets in the streaming thread.
2011-08-04 16:56:42 +02:00
Wim Taymans fd75c12631 basesrc: expose set_caps method
Expose a previously static method so that custom negotiate implementation can
call it and do the right thing.
2011-08-04 16:34:49 +02:00
Wim Taymans 21ea3fdd96 basesrc: PAUSED<->PLAY doesn't change pool state
Don't change the state of the bufferpool when going between PAUSED and PLAYING,
it will dealloc and realloc all buffers, which is clearly too invasive. We will
need to add some other way of unblocking the bufferpool.
2011-08-04 13:48:11 +02:00
Tim-Philipp Müller 913e5e310c base: update for query API changes 2011-07-28 11:24:19 +01:00
Wim Taymans cf18fa9ce5 Merge branch 'master' into 0.11 2011-07-27 12:50:39 +02:00
Wim Taymans 83e057cdc1 basetransform: add more comments 2011-07-27 12:49:40 +02:00
Wim Taymans c266912124 basetrans: also pass allocation query in in_place
When we are doing an in_place transform, don't do the allocation query but let
the upstream element decide.
2011-07-27 12:45:17 +01:00
Evan Nemerson cf6b41aa78 base: add missing (out) annotation for byte reader/writer functions
https://bugzilla.gnome.org/show_bug.cgi?id=655381
2011-07-27 10:12:33 +01:00
Wim Taymans 6b0a490740 basesrc: add some more debug info 2011-07-26 14:37:51 +02:00
Wim Taymans 32841d258d basesink: make it easy to override the pad query
Add a vmethod to handle the pad query.
Install a default handler for the pad query.
Add a vmethod to setup the allocation properties.
Use the new query function in filesink
2011-07-26 12:21:38 +02:00
Wim Taymans 36de9b92a1 basesrc: improve docs 2011-07-26 12:20:55 +02:00
Wim Taymans c887dd41f8 basesrc: use DEBUG instead of ERROR for logging
Don't use the ERROR log category because the allocation failure migh only be
bacause of a state change.
2011-07-25 12:49:24 +02:00
Tim-Philipp Müller 6a1e2cc6e5 controller: fix build failure due to compiler warning
Presumably with newer GLib version.

https://bugzilla.gnome.org/show_bug.cgi?id=655155
2011-07-23 08:00:09 +01:00
Wim Taymans 2ff17fb622 basetransform: fix sink event handling
Implement the sink event handling like the src event handler. Make the default
implementation parse and forward the event. This makes it possible to actually
return an error value from the event handler.
2011-07-22 21:17:42 +02:00
Wim Taymans 5dde10f0e4 basetransform: handle failures
Handle failure to activate the bufferpool.
2011-07-22 19:19:59 +02:00
Wim Taymans 8059ab109a basetrans: improve debugging. 2011-07-22 19:11:56 +02:00
Wim Taymans 85d2355125 basetrans: Remove ref in passthrough
Remove the requirement to have to return a ref to the input buffer when in
passthrough mode. This saves a few ref/unref cycles and fixes another 0.11
FIXME.
2011-07-21 17:42:08 +02:00
Wim Taymans 70d13ae70e basetransform: make new copy_metadata vmethod
Make a new copy_metadata vmethod and move the code to copy the timestamps, flags
and offsets into a default implementation. This will allow us to give the
subclasses a chance to override the copy method.
2011-07-21 17:29:13 +02:00
Wim Taymans 92aa4fede9 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbaseparse.c
	libs/gst/base/gstbasesink.c
2011-07-21 16:49:13 +02:00
Wim Taymans 2763f2bdcd basetrans: avoid intermediate method
Simply call the prepare_output_buffer method instead of calling an intermediate
function.
2011-07-21 16:39:04 +02:00
Wim Taymans f8e75ce406 basetransform: move the metadata copy code
Move the metadata copy code to the default prepare_output_buffer implementation.
2011-07-21 16:30:07 +02:00
Wim Taymans 5253a52cb2 basetransform: move prepare_output_buffer code
Move the code for prepare_output_buffer to a default implementation. this allows
us to simplify some things and have subclasses call into the default
implementation when needed.
2011-07-21 15:49:00 +02:00
Wim Taymans 560c3d7fbc basetransform: only get size for debug 2011-07-21 15:48:25 +02:00
Wim Taymans f1f2a2ff18 basetrans: fix comment and warn
Emit a warning in the debug log when something seems weird.
2011-07-21 14:18:30 +02:00
Wim Taymans 3bb167a1bf basetransform: only get caps for size transform
Delay getting the caps until we need to call the transform_size function.
2011-07-21 14:14:58 +02:00
Wim Taymans e4ee356449 basetrans: remove useless variables from prepare_output_buffer
Remove the caps and size from the prepare_output_buffer function. with
bufferpools and capsnego done differently, we don't need this in most cases and
if we do, we can simply use the transform_size function and get the caps from
the srcpad.
2011-07-21 13:56:11 +02:00
Wim Taymans d23fc81c43 basesrc: don't accidentally disable the pool
When we set a pool and it is the same as the old pool, don't disable the pool.
2011-07-15 16:04:11 +01:00
Tim-Philipp Müller 59441b36b6 baseparse: fix printf format in debug message 2011-07-14 12:45:33 +01:00
Mark Nauwelaerts 27313d05c1 basesink: unset PLAYING transition flag when transition completed 2011-07-13 11:40:26 +02:00
Mark Nauwelaerts e3446a74e0 baseparse: eat incoming caps event
... as it is typically up to baseclass to set proper src caps.
2011-07-11 11:59:18 +02:00
Mark Nauwelaerts c8b9275578 basesink: try harder to arrange increasing position reporting
... rather than having a momentary decreasing one while transitioning
to PLAYING.

Fixes #628021.
2011-07-11 11:14:02 +02:00
Tim-Philipp Müller f47c3472df baseparse: fix invalid memory access in debug messages
Don't use buffers that we've given away or unrefed in debug messages.
2011-07-07 14:57:18 +01:00
Wim Taymans c87375a813 basesrc: fix after merge 2011-07-07 11:14:34 +02:00
Wim Taymans b171259612 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasesrc.c
2011-07-07 11:13:19 +02:00
Tim-Philipp Müller 0a6ec83336 gst: make compiler warn about unstable API if GST_USE_UNSTABLE_API is not defined
And define it in our own build.
2011-07-05 09:46:43 +01:00
Mark Nauwelaerts 0993102834 basesrc: do not sneakily mess with current offset when updating length 2011-06-30 17:59:27 +02:00
Mark Nauwelaerts c79f8a52af basesrc: unref allocation query when no longer needed 2011-06-28 22:18:46 +02:00
Koop Mast c1983b9939 basetransform: remove redundant ()
See #653137
2011-06-22 17:09:52 +02:00
Koop Mast ef1b2b0e8f baseparse: fix seekstop
See #653137
2011-06-22 17:05:27 +02:00
Wim Taymans 6da2a33b7a tags: Remove crazy tag messages
Don't mix messages and pads and tags.
Make the sink post tag messages when a tag event is received.
Since tags are sticky on pads now, they can be retrieved from there
when needed.
2011-06-22 16:16:56 +02:00
Wim Taymans 3884badea6 memory: rename GstMemoryAllocator -> GstAllocator
simplify the name of the allocator object.
2011-06-22 11:42:46 +02:00
Wim Taymans c6a3878369 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	win32/common/config.h
	win32/common/gstversion.h
2011-06-21 17:54:38 +02:00
Wim Taymans 9c3bd65ba7 basesrc: improve debugging 2011-06-21 17:47:23 +02:00
Wim Taymans 69409f1ec8 basetransform: activate the bufferpool
always activate the bufferpool, even if we get it from the allocation
query.
2011-06-20 17:32:47 +02:00
Wim Taymans fc5b0b09da basesrc: always activate the pool we get
Activate the pool when we get it from the allocation query.
2011-06-20 17:32:11 +02:00
Wim Taymans 3822eea7cf basetransform: inprove allocation handling
Add vmethod for subclasses to influence the pool and allocator.
Log when query fails.
Respect negotiated allocator and alignment.
2011-06-20 16:53:04 +02:00
Wim Taymans 9c67925fb7 basesrc: Improve logging
Log when things fail.
Fix a query leak.
2011-06-20 16:53:04 +02:00
Philip Jägenstedt 9f0e066102 basesink: Fix typo in documentation
Fixes #652577.
2011-06-17 01:54:31 -07:00
Wim Taymans c4f35cb2e0 basesrc: fix refcounting problem 2011-06-15 16:56:30 +02:00
Wim Taymans 1ea2722180 Merge branch 'master' into 0.11 2011-06-13 19:10:00 +02:00
Wim Taymans 54fd50bfe1 buffer: add index to _take_memory()
Add an index to gst_buffer_take_memory() so that we can also insert memory at a
certain offset. This is mostly interesting to prepend a header memory block to
the buffer.
2011-06-13 16:31:53 +02:00
Wim Taymans 844e8aefaa basesrc: Allocator buffers from negotiated allocator
Allocate buffers from the negotiated allocator or bufferpool.
Handle the state of the bufferpool when flushing.
Add fill method to pushsrc.
2011-06-13 12:07:03 +02:00
Wim Taymans 3977991c9d basesrc: negotiate allocation
Add vmethod to configure allocation methods.
Remove some unused variables
2011-06-13 10:21:53 +02:00
Wim Taymans 6ca5d44704 bufferpool: remove postfix parameter
Remove the postfix parameter, it's not used and can be done differently.
2011-06-11 18:52:42 +02:00
Wim Taymans 94ae04f098 basesrc: use new _check_reconfigure() method 2011-06-10 17:32:48 +02:00
Wim Taymans b27ee30a35 buffer: make new _buffer_allocate method
Make a new method to allocate a buffer + memory that takes the allocator and the
alignment as parameters. Provide a macro for the old method but prefer to use
the new method to encourage plugins to negotiate the allocator properly.
2011-06-10 13:49:23 +02:00
Tim-Philipp Müller 954bcb09c7 docs: update for gst_base_src_set_dynamic_size
Add to sections file and add Since: marker. Also update
win32 .def file.

API: gst_base_src_set_dynamic_size()
2011-06-10 12:45:37 +01:00
Wim Taymans c35e0de65e basesrc: add fill vmethod to basesrc
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.
2011-06-10 13:04:23 +02:00
Wim Taymans bbfec45ecc event: add reset_time boolean to flush_stop event
Add a boolean to the flush_stop event to make it possible to implement flushes
that don't reset_time.
Make basesink post async_done with the reset_time property from the flush stop
event.
Fix some unit tests
2011-06-10 11:55:08 +02:00
Wim Taymans 4d6e4ea9e6 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasesrc.c
2011-06-09 12:01:02 +02:00
Mark Nauwelaerts f8168cd75f basesrc: add dynamic size handling
This allows subclass to indicate that size reported by src may not be static
and should as such be updated regularly, rather than only when really
needed.

Particular examples are filesrc or fdsrc reading from a file that is still
growing (e.g. being downloaded).

Fixes #652037.
2011-06-08 20:16:25 +02:00
Mark Nauwelaerts c040305b8c Revert "basesrc: Send an update NEWSEGMENT event downstream if the duration changes"
This reverts commit 934faf163c.

Original commit leads to possibly sending newsegment event downstream
in pull mode.  In push mode, quite some downstream elements
are likely to only expect newsegment event following a seek they performed
and as such may have their state messed up.
2011-06-08 20:14:16 +02:00
Wim Taymans b5d4529fa4 basesink: inline the clip segment 2011-06-08 18:35:16 +02:00
Wim Taymans 3cb8b33935 message: move the new_base_time flag to async_done
Move the flag to indicate that a new_base_time should be distributed to the
pipeline, from the async_start to the async_done message. This would allow us to
decide when to reset the pipeline time based on other reasons than the
FLUSH_START event.

The main goal eventually is to make the FLUSH events not reset time at all but
reset the time based on the first buffer or segment that prerolls the pipeline
again.
2011-06-08 13:45:19 +02:00
Wim Taymans a767bf2bf9 caps: use the caps event
Use the caps event instead of gst_pad_set_caps() and the setcaps function
2011-06-07 09:43:20 +02:00
Edward Hervey 69800aa307 basesink: Don't accept segments after EOS
And refactor the code slightly to avoid code duplication.

This solves a regression introduced by bdbc0693
2011-06-06 11:20:29 +02:00
Tim-Philipp Müller 4b920eb5d2 docs: update for API changes
Also remove GST_PAD_CHECKGETRANGEFUNC macro
2011-06-05 18:57:56 +01:00
Wim Taymans 3cbeb3848c baseparse: use caps event instead of setcaps 2011-06-02 19:24:26 +02:00
Wim Taymans 8abc457a3b pad: implement pad block with probes 2011-06-01 19:39:16 +02:00
Wim Taymans a5bbf7f369 utils: remove _full variants of probes
Remove the _full variants and add the destroy notify to the regular methods.
2011-06-01 19:39:11 +02:00
Edward Hervey 9b1c84d5ac basetransform: Use local priv variable instead of trans->priv 2011-05-31 18:31:53 +02:00
Edward Hervey ceb86a586e gst: Remove obvious dead assignments 2011-05-31 18:30:30 +02:00
Wim Taymans 690c81b95d basesrc: remove deprecated clean shutdown method 2011-05-27 17:28:34 +02:00
Sebastian Dröge 26a5a877ff basesrc: Fix for SEGMENT event API changes 2011-05-27 14:02:37 +02:00
Sebastian Dröge 30a7fd7b4d Merge branch 'master' into 0.11 2011-05-27 13:58:26 +02:00
Sebastian Dröge 7295f3e2f6 basetransform: Pass the complete caps to transform_caps
Instead of passing it structure by structure. This allows
better optimized transform_caps functions and allows better
transformation decisions.

See bug #619844.
2011-05-27 11:37:24 +02:00
Sebastian Dröge 934faf163c basesrc: Send an update NEWSEGMENT event downstream if the duration changes
This allows streaming the complete file for files that have grown since
streaming started.

Fixes bug #647940.
2011-05-27 09:05:46 +02:00
Sebastian Dröge 5076688c1f pushsrc: Fix infinite recursion in pushsrc query handler 2011-05-26 14:14:13 +02:00
Wim Taymans 2c221a5729 feature: use object name
Remove the name property from the plugin feature and port code to use the object
name instead.
2011-05-24 18:17:24 +02:00
Wim Taymans b0fad063b5 Merge branch 'master' into 0.11 2011-05-24 17:43:36 +02:00
Wim Taymans 7e6d579301 scheduling: port to new scheduling query 2011-05-24 17:39:56 +02:00
Debarshi Ray f9a4dcd074 check: add fail_unless_equals_int64
https://bugzilla.gnome.org/show_bug.cgi?id=650973
2011-05-24 16:21:20 +02:00
Wim Taymans 7754d8d7ba transform: fixes for bufferpool handling
Don't error out when the allocation query returns success.
Do bufferpool query after we pushed the caps event downstream so that we can get
a good bufferpool suggestion.
Also proxy the bufferpool query downstream when we operate in in_place mode.
2011-05-23 18:15:00 +02:00
Wim Taymans 35cc371363 transform: reset reconfigure state
When we negotiate new caps, reset the reconfigure state.
2011-05-23 16:53:01 +02:00
Wim Taymans 1cb7523efa basetransform: WIP handle bufferpool 2011-05-23 15:38:31 +02:00
Wim Taymans 4e13568d27 basesrc: avoid calling _set_caps() on the srcpad
Avoid installing a setcaps function on the srcpad and calling the setcaps
function, we can do more efficiently with sending the event ourself and calling
our vmethod.
2011-05-21 19:06:08 +02:00
Wim Taymans d33909302e basetransform: remove some more code
Remove some more unused code from basetransform.
Prepare for implementing bufferpools.
2011-05-20 16:01:57 +02:00
Sebastian Dröge ce216c1406 Merge branch 'master' into 0.11 2011-05-20 13:06:57 +02:00
Sebastian Dröge 1d57e46dbd basesink: Only reinit the cached GstClockID if it is for the same clock
The clock might have changed since the clock ID was created and in
that case we have to request a new one.
2011-05-20 13:05:04 +02:00
Sebastian Dröge a46c9c2a62 event: Make SEGMENT event parsing API more consistent with the others 2011-05-18 16:56:43 +02:00
Wim Taymans ad0693f47d basetransform: relax caps check
Also run the caps transform function on ANY caps, like we used to do before.
This makes sure that capsfilter has a chance to filter ANY caps as well.
2011-05-18 16:49:28 +02:00
Wim Taymans e39182a085 Merge branch 'master' into 0.11
Conflicts:
	gst/gstminiobject.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstplugin.h
	libs/gst/base/gstbaseparse.c
2011-05-18 13:14:57 +02:00
Mark Nauwelaerts 35567592ef baseparse: maintain frame state during frame parsing round
See #650093.
2011-05-18 09:49:35 +02:00
Mark Nauwelaerts af5061e943 baseparse: provide latency query support 2011-05-18 09:49:22 +02:00
Mark Nauwelaerts 82a6cb39ae baseparse: make minimum frame size handling more efficient and convenient
While some formats allow subclass to determine a specific subsequent
needed frame size, others may to need to scan for markers and can only
request 'additional data' by whatever reasonable available step.

In push mode, trying to minimize additional latency leads to step size
being the next input buffer.  In pull mode, any reasonable step size
(such as already used by buffer caching) can be applied.
2011-05-18 09:49:12 +02:00
Mark Nauwelaerts ee3344824c baseparse: set correct buffer size 2011-05-18 09:49:02 +02:00
Sebastian Dröge 5f2cd2b0a3 base: Update for caps/pad template related API changes 2011-05-17 13:14:12 +02:00
Sebastian Dröge 3d2127f865 Revert "query: allow _make_writable on query handlers"
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.
2011-05-17 11:21:41 +02:00
Wim Taymans 53e4d1a007 basetransform: fix buffer refcounting
When we fail to allocate an output buffer, set the buffer pointer to NULL or
else the calling function will try to unref it.
Remove some old comments
2011-05-16 18:48:20 +02:00
Wim Taymans 115c34badd basesink: handle more formats
Don't hardcode GST_FORMAT_TIME in places, we can work with many formats.
2011-05-16 17:09:06 +02:00
Sebastian Dröge b935a814d9 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	docs/gst/gstreamer-sections.txt
	gst/gstbin.c
	gst/gstelement.c
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
	gst/gstminiobject.h
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstinputselector.c
	tests/check/gst/gstminiobject.c
2011-05-16 16:53:04 +02:00
Sebastian Dröge bdf9022861 base: Improve negotiation with new getcaps() filter 2011-05-16 15:33:10 +02:00
Wim Taymans bdbc069348 Rework GstSegment handling
Improve GstSegment, rename some fields. The idea is to have the GstSegment
structure represent the timing structure of the buffers as they are generated by
the source or demuxer element.
gst_segment_set_seek() -> gst_segment_do_seek()
Rename the NEWSEGMENT event to SEGMENT.
Make parsing of the SEGMENT event into a GstSegment structure.
Pass a GstSegment structure when making a new SEGMENT event. This allows us to
pass the timing info directly to the next element. No accumulation is needed in
the receiving element, all the info is inside the element.
Remove gst_segment_set_newsegment(): This function as used to accumulate
segments received from upstream, which is now not needed anymore because the
segment event contains the complete timing information.
2011-05-16 11:37:52 +02:00
Sebastian Dröge e8688b62b2 basetransform: When trying to fixate the sink suggestion prefer its structure order 2011-05-14 11:39:34 +02:00
Sebastian Dröge f56c6e1225 basetransform: In getcaps() prefer the caps order and caps of downstream if possible 2011-05-14 11:39:34 +02:00
Sebastian Dröge b4bed6e09e basetransform: Prefer caps order given by the subclass of the template caps order 2011-05-14 11:39:34 +02:00
Vincent Penquerc'h 03050fd71d basesrc: do not set first buffer timestamp to 0 for live sources
Doing so avoids a large timestamp gap between first and second buffer
for live sources which take time to start up.
The first buffer now has a "live" timestamp based on the running time,
as other buffers do.

https://bugzilla.gnome.org/show_bug.cgi?id=649369
2011-05-12 18:10:14 +01:00
Wim Taymans a59bc0ab02 basetransform: remove obsolete code
Remove some obsolete code.
Don't try to reconfigure when we don't have sink caps.
2011-05-11 18:09:03 +02:00
Sebastian Dröge ef673656b7 basetransform: Implement support for pad reconfiguration again 2011-05-11 15:26:02 +02:00
Wim Taymans cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans bd540bfb66 event: Hide the GstStructure
Hide the GstStructure of the event in the implementation specific part so that
we can change it.
Add methods to check and make the event writable.
Add a new method to get a writable GstStructure of the element.
Avoid directly accising the event structure.
2011-05-10 11:50:16 +02:00
Wim Taymans 7f24a48387 event: _qos_full -> _qos 2011-05-09 18:48:55 +02:00
Wim Taymans c07b57fc05 segment: remove _full version
Rename the _full versions of the functions to the normal function names.
2011-05-09 17:51:07 +02:00
Wim Taymans d63829fc9a segment: remove abs_rate from segment structure
Remove the abs_rate field from the segment structure, we can trivially compute
it when needed.
2011-05-09 16:39:13 +02:00
Wim Taymans 4eed658be1 basetransform: Use CAPs event
Use the caps event to configure basetransform.
Remove force_alloc hack, we don't need this in 0.11 with new upstream
negotiation.
Avoid getting some pad caps.
2011-05-09 15:08:51 +02:00
Wim Taymans f127a416fa basesink: add some more debug 2011-05-09 15:08:51 +02:00
Wim Taymans 24573211c6 Merge branch 'master' into 0.11 2011-05-08 13:14:55 +02:00
Wim Taymans d34ca6140b basesink: use CAPS event instead of setcaps function 2011-05-08 13:07:13 +02:00
Wim Taymans ba6b915651 base: avoid using buffer caps
Comment all code using buffer caps.
Rework capsfilter code a little.
Fix some unit tests
2011-05-08 12:46:17 +02:00
Tim-Philipp Müller dccde2652f baseparse: don't post loads of empty taglists
Only post bitrate updates if there's something to post, don't
post empty taglists if nothing changed.
2011-05-06 23:44:15 +01:00
Wim Taymans 02e5feb2bf pad: avoid using the old GST_PAD_CAPS
Don't use GST_PAD_CAPS but instead use the new gst_pad_get_current_caps()
method.
Avoid setting caps on buffers.
2011-05-06 19:04:54 +02:00
Wim Taymans 5f06f3b0ae check: let the normal code unset caps 2011-05-06 17:39:08 +02:00
Wim Taymans fb3da828e5 element: rename gst_element_lost_state_full()
Rename gst_element_lost_state_full() to gst_element_lost_state() and
remove the old method name.
2011-05-06 12:19:16 +02:00
Sebastian Dröge 0069dc08ec basetransform: Don't get the parent twice in the setcaps function 2011-05-05 18:21:21 +02:00
Sebastian Dröge aebe4a3c13 basetransform: In getcaps() prefer the caps order and caps of downstream if possible 2011-05-05 15:22:08 +02:00
Sebastian Dröge a6c1cbe69a basetransform: Prefer caps order given by the subclass of the template caps order 2011-05-05 15:20:10 +02:00
Sebastian Dröge 07f59f5404 basesrc: Use the reconfigure flag on the pad instead of the event 2011-05-05 15:20:02 +02:00
Sebastian Dröge 1cc95da945 basetransform: Use new reconfigure flag on the pads instead of the reconfigure event 2011-05-05 15:19:56 +02:00
Sebastian Dröge 0179530bf1 basesrc: Only renegotiate once after receiving a renegotiate event
Also make this threadsafe.
2011-05-05 15:04:16 +02:00
Thiago Santos 93904ef3ad basesrc: Handle the new renegotiate event
Makes basesrc handle the new renegotiate event by using a
renegotiate flag.
2011-05-05 15:03:54 +02:00
Sebastian Dröge 24cef7aa2f basetransform: Also call gst_base_transform_reconfigure() on renegotiate events 2011-05-05 15:02:56 +02:00
Thiago Santos 3baed25383 basetransform: Handle the new renegotiate event
Let basetransform push a renegotiate event upstream
when it gets a new suggestion
2011-05-05 15:02:46 +02:00
Wim Taymans c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Sebastian Dröge de5ce36dd1 basetransform: Remove nowadays unused and uninitialized setcaps variable 2011-05-05 12:28:02 +02:00
Sebastian Dröge 65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Stefan Kost 511f556915 docs: it its %TRUE (constant)
As spotted by Tim.
2011-05-03 14:01:57 +03:00
Stefan Kost 217b209aba docs: add missing parameter docs 2011-05-03 13:03:21 +03:00
Stefan Kost 59670baf8e docs: add docs for GstDPPacketizer 2011-05-03 13:03:20 +03:00
Wim Taymans baebf253ad transform: do pad_alloc fallback correctly 2011-04-29 13:42:57 +02:00
Wim Taymans 6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Josep Torra 5ccda2f8f4 Small cosmetic cleanups
Make sure the return values from g_return_* are of the right type.
2011-04-25 11:10:47 +02:00
Wim Taymans 070cdaab7c Merge branch 'master' into 0.11 2011-04-25 10:30:41 +02:00
Thiago Santos 0253c85b0d basetransform: fix negotiation regression
Fixup patch for 83597767b1

Use a separate variable for knowing if a pad alloc has been made
instead of checking for the flow return that might not be the
result of the pad alloc

https://bugzilla.gnome.org/show_bug.cgi?id=648220
2011-04-21 14:04:49 +01:00
Wim Taymans 24bb414035 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-04-19 16:21:15 +02:00
Havard Graff 38dcd41b97 basetransform: don't unref trans until the function is done using it
trans->priv->force_alloc = FALSE would crash if the ref held is the last

https://bugzilla.gnome.org/show_bug.cgi?id=648215
2011-04-19 15:09:14 +01:00
Tim-Philipp Müller b35d54dcd1 baseparse: don't deadlock when setting external index
Protect index with its own lock. gst_index_get_writer_id() may take
the object lock internally (the default resolver, GST_INDEX_RESOLVER_PATH,
will anyway), so if we're using that to protect the index as well,
we'll deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=646811
2011-04-19 13:05:53 +01:00
Tim-Philipp Müller c364539620 baseparse: make fmtlist constant 2011-04-19 11:51:30 +01:00
Sebastian Dröge 1cff66d587 base{sink,src}: Don't try to fixate ANY caps 2011-04-19 11:45:36 +02:00
Sebastian Dröge 100bdfb01c net: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:45:36 +02:00
Sebastian Dröge 7da7494adc base: Use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-19 11:45:36 +02:00
Tim-Philipp Müller 94c0bc74ce docs: remove reference to baseparse API that didn't make it 2011-04-16 15:20:08 +01:00
Sebastian Dröge caaf5ad528 Merge branch 'master' into 0.11 2011-04-16 16:06:02 +02:00
Sebastian Dröge 9b90d3d9c0 base: Update docs to say class_init instead of base_init
And remove a useless base_init in basesrc
2011-04-16 15:59:40 +02:00
Sebastian Dröge 64f6a18bad net: Use G_DEFINE_TYPE 2011-04-16 15:59:40 +02:00
Tim-Philipp Müller 0bb5b6e435 libs: gobject-introspection scanner doesn't need to scan or update plugin info
Make sure the scanner doesn't load or introspect or check any plugins,
(especially not outside the build directory).
2011-04-16 10:45:16 +01:00
Tim-Philipp Müller 62d0001c84 libs: make sure gobject-introspection scanner calls gst_init()
https://bugzilla.gnome.org/show_bug.cgi?id=647922
2011-04-16 10:33:53 +01:00
Sebastian Dröge 8bfdd8c817 Merge branch 'master' into 0.11 2011-04-16 09:33:06 +02:00
Sebastian Dröge f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Tim-Philipp Müller 886246661f baseparse: expose gst_base_parse_frame_free() for completeness
API: gst_base_parse_frame_free()
2011-04-15 19:07:55 +01:00
Tim-Philipp Müller 84a92464cf baseparse: init frames on the stack with gst_base_parse_frame_init()
Frames must now be inited this way, can't just zero them
out and use them.
2011-04-15 18:52:18 +01:00
Tim-Philipp Müller 127df9a586 baseparse: more debug logging, minor clean-up
Trace frames, split out code to queue a frame for later.
2011-04-15 18:38:46 +01:00
Tim-Philipp Müller 8fe1924678 baseparse: change gst_base_parse_frame_init() to not take a GstBaseParse argument 2011-04-15 18:00:21 +01:00
Tim-Philipp Müller e8ccbf4ca9 baseparse: make GstBaseParseFrame handling more bindings-friendly
Change semantics of gst_base_parse_push_frame() and make it take
ownership of the whole frame, not just the frame contents. This
is more in line with how gst_pad_push() etc. work. Just transfering
the content, but not the container of something that's not really
known to be a container is hard to annotate properly and probably
won't work. We mark frames allocated on the stack now with a private
flag in gst_base_parse_frame_init(), so gst_base_parse_frame_free()
only frees the contents in that case but not the frame struct itself.

https://bugzilla.gnome.org/show_bug.cgi?id=518857

API: gst_base_parse_frame_new()
2011-04-15 17:50:46 +01:00
Tim-Philipp Müller 37d7857e18 baseparse: register boxed type for GstBaseFrameParse
To make this usable for bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-15 17:47:22 +01:00
Robert Swain 223a1f62be baseparse: Remove unused but set variable
GCC 4.6.0 spits warnings about these.
2011-04-15 10:53:56 +02:00
Ole André Vadla Ravnås e7bf5484c7 base: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:39:05 +02:00
Wim Taymans 62329c606a baseparse: port to 0.11 2011-04-11 10:53:39 +02:00
Wim Taymans 6be4dbdb5a Merge branch 'master' into 0.11
Conflicts:
	android/base.mk
	android/controller.mk
	android/dataprotocol.mk
	android/elements.mk
	android/gst-inspect.mk
	android/gst-launch.mk
	android/gst-plugin-scanner.mk
	android/gst.mk
	android/indexers.mk
	android/net.mk
	win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Alessandro Decina 3f1ef2255a android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 01:08:07 +02:00
Tim-Philipp Müller d353ddf38e docs: minor fixes for baseparse docs
Class vfunc references still aren't right, no idea what
the correct markup for those is.
2011-04-09 23:02:50 +01:00
Tim-Philipp Müller 2401fe36fd baseparse: minor variable name clean-up 2011-04-08 19:07:02 +01:00
Tim-Philipp Müller 9d98c62f0e baseparse: rename _set_frame_props() to _set_frame_rate()
Seems like the best fit to what it does, and is shorter than
set_frame_properties() which might also have been confusing
because of GstBaseParseFrame.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller 5073948380 baseparse: replace format flags with gst_base_parse_set_{passthrough,syncable,has_timing_info}
This is more in line with e.g. GstBaseTransform's API, and makes for nicer
to read code. No getters for now since I don't see any use case for them,
the API is for subclasses, which usually know what format they're
dealing with already and hence know what they've set.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller 1874d63808 baseparse: make DRAIN and SYNC flags on baseparse, not the frame, and change to DRAINING and LOST_SYNC
The first because it seems a better fit conceptually, the second
to express booleanness. Also change the accessor macros for subclasses
to GST_BASE_PARSE_DRAINING and GST_BASE_PARSE_LOST_SYNC.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:58 +01:00
Tim-Philipp Müller 242e077e46 baseparse: add some padding to GstBaseParseFrame
Esp. since it's usually allocated on the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller 99014adcae baseparse: fix typo in docs for GST_BASE_PARSE_FORMAT_FLAG_PASSTHROUGH
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller 251dfa402c baseparse: use GQueue instead of GList for queued frames
and make buffer metadata writable before setting caps on queued
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=646341
2011-04-08 15:44:57 +01:00
Zaheer Abbas Merali 783dbb9a71 baseparse: add GST_BASE_PARSE_FLOW_QUEUED to queue buffers until caps are known
This is useful for parser like flacparse or h264parse which may need to process
some buffers before they can construct the final caps, in which case they may
want to delay pushing the initial buffers until the full and proper caps are
known.

https://bugzilla.gnome.org/show_bug.cgi?id=646341
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller 22b7dfc800 baseparse: add to docs and fix up gtk-doc markup a little
And add Since markers.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller 4709a26473 baseparse: replace set_seek() with _set_average_bitrate() and FLAG_SYNCABLE
This makes more sense conceptually, since the bitrate may be used
to estimate a seek position if there's no seek table or just for
duration reporting/estimation if we can't seek. Also, even if the
format is not syncable, we could still seek by pushing data from the
start and using the segment to make downstream clip.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller de16d5adb3 baseparse: rename GstBaseFormat to GstBaseFormatFlags and fix up associated API
Also change gst_base_parse_set_format(parse,flags,switch_on) to
gst_base_parse_set_format_flags(parse,flags) which is more in line
with the rest of our API and how the function is used.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller f691be223e baseparse: don't expose GstAdapter in public header
None of the existing subclasses needs access to that, so there's
no reason to expose it for now.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller e2bf3647f8 baseparse: move various segment-related members into the private instance struct
If none of the existing subclasses uses these, there's probably no
need to expose them at the moment. Keep the segment itself exposed
though.

https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller b2a76895af baseparse: remove unused GST_BASE_PARSE_{SINK,SRC}_NAME
https://bugzilla.gnome.org/show_bug.cgi?id=518857
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller 9f1b9f1419 baseparse: re-indent header 2011-04-08 15:44:57 +01:00
Tim-Philipp Müller c88a143cb6 baseparse: fix up GType name and make _get_type() function thread-safe
Rename GType from GstBaseParseBad to GstBaseParse.
2011-04-08 15:44:57 +01:00
Tim-Philipp Müller 20f29628aa libs: add GstBaseParse which was moved from -bad 2011-04-08 15:44:57 +01:00
David Schleef d6847fd4a1 baseparse: make_metadata_writable() fix 2011-04-08 15:44:56 +01:00
Tim-Philipp Müller 940a47ae09 baseparse: rename GType from GstAudioBaseParseBad to GstBaseParseBad
We use it for video as well now.
2011-04-08 15:44:56 +01:00
Stefan Kost 0774878e92 baseparse: trim trailing whitespace 2011-04-08 15:44:56 +01:00
Stefan Kost e8f04e76b7 baseparse: use delta-unit flags instead of none 2011-04-08 15:44:56 +01:00
David Schleef 35a7228ed5 baseparse: update documentation for API changes 2011-04-08 15:44:56 +01:00
David Schleef e57cb6b47a baseparse: Create baseparse library 2011-04-08 15:44:56 +01:00
Havard Graff 3d833e42b6 basesrc: Make src query MT-safe
It is possible that the element might be going down while the event arrives
2011-04-08 14:58:41 +02:00
Sebastian Dröge 237e54d4fe base: Unref events if the parent element disappeared
And also unref events if the basetransform subclass has no
event handler and the event is not forwarded at all.
2011-04-08 14:57:05 +02:00
Havard Graff 0daedb7409 base: Make upstream events MT-safe 2011-04-08 14:57:00 +02:00
Wim Taymans 5077630a99 Merge branch 'master' into 0.11 2011-04-07 16:13:56 +02:00
Sebastian Dröge 7945821f92 basesrc: Handle tag and custom downstream events the same
Especially drop tag events when flushing to not send them over
and over again.

Should've been in the last commit already but I forgot to call
git rebase --continue...
2011-04-07 10:48:04 +02:00
Sebastian Dröge c7c3e46b08 bla 2011-04-07 10:40:16 +02:00
Sebastian Dröge 1d9cd86af6 basesrc: Send syncronized custom downstream/both events downstream from the streaming thread
Instead of just silently dropping them. The same was done for tag events
before already.

Fixes bug #635718.
2011-04-07 10:29:41 +02:00
Wim Taymans d1a7d54cb5 bytewriter: don't add NULL data 2011-03-31 18:39:57 +02:00
Wim Taymans 468ec5bc40 bufferlist: simplify bufferlists
We now have multiple memory blocks as part of the buffers and we can therefore
reduce the bufferlist to a simple array of buffers.
2011-03-31 17:51:02 +02:00
Wim Taymans ebb14d95b2 buffer: more API tweaks
_trim -> _resize
_create_sub -> copy_region
2011-03-30 16:47:55 +02:00
Wim Taymans a12ede3fb1 Merge branch 'master' into 0.11-fdo
Conflicts:
	gst/gst.c
	libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Wim Taymans 121b82ce27 buffer: fix subbuffers 2011-03-28 20:08:47 +02:00
Wim Taymans 826a7d83d4 buffer: more fixes 2011-03-28 20:08:47 +02:00
Wim Taymans beac9c4a95 buffer: fix remaining unit tests 2011-03-28 20:08:46 +02:00
Wim Taymans 121ab46aa6 memory: remove memory metadata again 2011-03-28 20:08:46 +02:00
Wim Taymans 38ffe30745 memory: more work on implementing buffer memory 2011-03-28 20:08:46 +02:00
Wim Taymans d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Arun Raghavan bae67f116c basesrc: Return FALSE if we don't handle an event
basesrc's default event handler returns TRUE regardless of whether the
event is handled or not. This fixes the handler to conform with the
expected behaviour (which is to only return TRUE when the event has
actually benn handled). gst_bin_do_latency_func() depended on this
(incorrect) behaviour, and is now modified as well.

(Remaining 1-liner change in gstbasesrc.c is to keep gst-indent happy)
2011-03-28 21:48:23 +05:30
Stefan Kost 02eda0e3d9 docs: cleanup and xref fixes
Deal with the hints from gtk-doc and fix the xrefs. Apply a work-around for ()
precedence over @. Move "MT Safe" text to doc body in many places. Trim eol
whitespaces.
2011-03-24 18:32:20 +02:00
Stefan Kost 71dcd52cc0 basesink: print flow return as a name in debug log 2011-03-24 18:32:20 +02:00
Edward Hervey d979eb3e9e basesrc: Keep downstream caps order when fixating
This allows use to use the first intersecting format prefered by downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=617045
2011-03-24 12:30:42 -03:00
Edward Hervey 0f0a62f316 basetransform: Retain caps order when getting caps
If the element gave us caps in a specific order, let's retain that
by intersecting against the template but retaining the order given
by the element.

https://bugzilla.gnome.org/show_bug.cgi?id=617045
2011-03-24 11:47:32 -03:00
Tim-Philipp Müller 5300a5e73b bytereader, bytewriter: fix up inline functions to make g++ happy
gstbytereader.h: In function ‘guint8* gst_byte_reader_dup_data_unchecked(GstByteReader*, guint)’:
gstbytereader.h:249:75: error: invalid conversion from ‘void*’ to ‘guint8*’
gstbytewriter.h: In function ‘gboolean _gst_byte_writer_ensure_free_space_inline(GstByteWriter*, guint)’:
gstbytewriter.h:196:75: error: invalid conversion from ‘void*’ to ‘guint8*’

https://bugzilla.gnome.org/show_bug.cgi?id=645595
2011-03-23 20:52:44 +00:00
Jason D. Clinton a789096c04 build: fix build with -Werror with GCC 4.6.0
This touches three areas of code, removes unused variables and discards
return values from two functions with (void).

https://bugzilla.gnome.org/show_bug.cgi?id=645267
2011-03-21 09:29:19 +01:00
Wim Taymans f505f778cc pad: more preroll lock to basesink
Move the preroll lock to basesink where it belongs.
2011-03-04 17:25:02 +01:00
Wim Taymans 230c3455ac Merge branch 'master' into 0.11
Conflicts:
	gst/gstregistry.h
2011-03-02 11:08:34 +01:00
Tim-Philipp Müller c71241d9dd docs: typo fixes
convinience -> convenience
2011-02-28 15:01:54 +00:00
Wim Taymans 6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01:00
Wim Taymans 1218511185 libs: cleanups for 0.11
Remove deprecated stuff, fix padding, rearrange methods.
2011-02-22 19:09:48 +01:00
Wim Taymans 0894ed2053 Merge branch 'master' into 0.11 2011-02-22 15:08:51 +01:00
Wim Taymans 238b9a57cc Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst/gstelement.c
	gst/gstelement.h
	gst/gstpad.c
	gst/gstutils.c
	libs/gst/base/Makefile.am
	libs/gst/check/Makefile.am
	libs/gst/controller/Makefile.am
	libs/gst/dataprotocol/Makefile.am
	libs/gst/net/Makefile.am
	win32/common/libgstreamer.def
2011-02-22 14:11:59 +01:00
Thiago Santos 83597767b1 basetransform: Be smarter with pad allocs
Avoid doing unnecessary pad-allocs when on passthrough mode.
If multiple basetransform elements are on a pipeline, they
would do a pad-alloc for each received buffer, each element
would do this, so we would have lots of pad allocs on the
pipeline for a single buffer being pushed through it.

This patch attempts to reduce this amount by avoiding
doing pad-allocs if the element has already done it
after the last pushed buffer. So it will only be allowed
to do a new pad-alloc after it has pushed a buffer, so we get
1x1 pad-alloc and buffer ratio

https://bugzilla.gnome.org/show_bug.cgi?id=642373
2011-02-21 10:31:22 -03:00
Thiago Santos 3aaef921c5 basetransform: Check for pad alloc caps when suggestion is not fixed
If after computing the suggestion with downstream caps we still have
a non-fixed suggestion caps try to intersect with the input caps
of the pad alloc to avoid useless renegotiations.

https://bugzilla.gnome.org/show_bug.cgi?id=642130
2011-02-14 15:59:25 +01:00
Wim Taymans f8828eace6 basesink: improve duration calculation
Keep track of the average distance between incomming timestamps and
use that to estimate the frame duration when buffers have no duration set on
them.
2011-02-14 15:17:45 +01:00
Wim Taymans 79665e8247 basesink: improve rate calculation
When there is no duration on input buffers, assume the rate is 1.0
instead of (the undefined) 0.0.
2011-02-14 15:17:44 +01:00