Commit graph

291 commits

Author SHA1 Message Date
Wim Taymans
d805f0f034 pad: _get_caps() -> _query_caps() 2011-11-15 16:46:37 +01:00
Wim Taymans
b5c3e254b1 pad: remove getcaps and use caps query
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.
2011-11-15 11:20:48 +01:00
René Stadler
cb4ac0cf70 basetransform: fix caps unref in transform_caps filter subset check
I did not test this, but the code looked very wrong.
2011-11-12 01:55:45 +01:00
Wim Taymans
11aacfadc8 basetransform: fix vmethods
Make a default implementation of the transform_caps vmethod so that subclasses
can call into it.
Make a default implementation of transform_size.
Avoid doing something in the vmethod trampoline.
2011-11-10 13:38:58 +01:00
Wim Taymans
37318a8cd2 pad: remove GstPadFixateCapsFunction
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.
2011-11-10 10:58:42 +01:00
Wim Taymans
b7966c0c7d pad: make an ACCEPT_CAPS query
Replace the acceptcaps function with a query.
2011-11-09 17:36:00 +01:00
Wim Taymans
6cc7254166 remove query types
It was not really useful
2011-11-09 11:47:10 +01:00
Tim-Philipp Müller
4f004eff38 pad: rename GstActivateMode to GstPadActivateMode
These might be useful:
sed -i -e 's/GstActivateMode/GstPadActivateMode/g' `git grep GstActivateMode | sed -e 's/:.*//' | sort -u`
sed -i -e 's/GST_ACTIVATE_/GST_PAD_ACTIVATE_/g'    `git grep GST_ACTIVATE_   | sed -e 's/:.*//' | sort -u`
2011-11-01 00:25:02 +00:00
René Stadler
de58242760 basetransform: fix crash/warning in find_transform when pad is unlinked
Looks like the revert conflict in commit a44271 was resolved incorrectly.
2011-10-31 19:27:07 +01:00
René Stadler
c7fba914a0 basetransform: fix invalid access to unreffed allocation query 2011-10-28 21:42:10 +02:00
Edward Hervey
ece5909804 basetransform: Fix a caps leak and move a codeblock
The result from the block of code that was moved would only have
been used if 'peercaps' was present.
2011-10-11 13:51:54 +02:00
Wim Taymans
47f77a9e24 transform: fix after merge 2011-09-28 11:28:25 +02:00
Wim Taymans
99d4a57d7c Merge branch 'master' into 0.11 2011-09-28 11:24:42 +02:00
Vincent Penquerc'h
01172b8126 basetransform: send delayed events earlier
Some elements (such as videorate) might push buffers early,
for instance in in transform_ip. We want events (and in particular
any NEWSEGMENT event) to be pushed before that.

This fixes transmageddon wedging on converting a file starting
with a non zero offset to Ogg.

https://bugzilla.gnome.org/show_bug.cgi?id=660165
2011-09-27 12:00:23 +02:00
Edward Hervey
10e7159cf8 Merge branch 'master' into 0.11
Conflicts:
	gst/gstcaps.c
	gst/gstpad.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesink.h
	libs/gst/base/gstbasetransform.c
2011-09-23 13:09:25 +02:00
Vincent Penquerc'h
56b3acb043 basetransform: delay serialized events when src caps are not set yet
https://bugzilla.gnome.org/show_bug.cgi?id=659571
2011-09-21 13:22:02 +02:00
Sebastian Dröge
a44271899c Revert "Revert "basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible""
This reverts commit 0bc6d49c95.

Conflicts:

	libs/gst/base/gstbasetransform.c
2011-09-08 14:39:30 +02:00
Sebastian Dröge
43538e2e75 Merge branch 'master' into 0.11
Conflicts:
	docs/design/draft-buffer2.txt
	docs/design/part-TODO.txt
	docs/design/part-block.txt
	docs/design/part-bufferlist.txt
	docs/design/part-caps.txt
	docs/design/part-element-transform.txt
	docs/design/part-events.txt
	docs/design/part-negotiation.txt
	gst/gstcaps.c
	gst/gstevent.h
	gst/gstghostpad.c
	gst/gstinterface.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstutils.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gstcapsfilter.c
	plugins/elements/gsttee.c
	tests/check/generic/sinks.c
	tools/gst-launch.1.in
2011-09-08 14:28:23 +02:00
Sebastian Dröge
0bc6d49c95 Revert "basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible"
This reverts commit 5e5cc5e89e.

See bug #658541.
2011-09-08 13:42:52 +02:00
Piotr Fusik
14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Sebastian Dröge
a121713f0c basetransform: If there's no peer we still have to transform ANY caps in getcaps()
Otherwise elements like capsfilter will return ANY caps if no
peer is present instead of the filter caps. The transform_caps()
vfunc could do transformations to the template caps that do not
result in the unmodified template caps.
2011-09-07 16:05:07 +02:00
Sebastian Dröge
5e5cc5e89e basetransform: Use check for subsets and not non-empty intersection to check if caps are compatible 2011-09-06 12:37:16 +02:00
Wim Taymans
5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Wim Taymans
d924c30f5b base: rename allocation vmethods
Name the allocation vmethod on srcpad decide_allocation because source pads will
have to decide what allocation parameters will be used.
Name the allocation vmethod on sinkpads propose_allocation because they will
need to configure the allocation query with a proposed values for upstream.
2011-08-26 14:18:33 +02: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
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
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
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
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
Koop Mast
c1983b9939 basetransform: remove redundant ()
See #653137
2011-06-22 17:09:52 +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
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