Commit graph

1836 commits

Author SHA1 Message Date
Wim Taymans
bdcf1dc3cd basetransform: remove metadata tagged with the memory tag
Remove metadata that describes the particular memory of the buffer it is
attached to. We need to do this because in non-passthrough mode we will allocate
new memory for our output buffer.
2012-03-01 17:41:57 +01:00
Wim Taymans
d6a28a6e3a basetransform: improve propose_allocation
Improve the propose allocation vmethod by passing the downstream allocation
query to it. This way the vmethod implementation can use properties of the
downstream allocation to generate the upstream query result. If there is no
downstream quety, it means that the element is working in passthrough mode.
Implement a default decide_allocation.
2012-03-01 17:41:57 +01:00
Wim Taymans
4f6faa3405 basetransform: clear allocation parameters in passthrough
Clear the allocation parameters when we operate in passthrough.
2012-03-01 17:41:57 +01:00
Sebastian Dröge
a8dcb63616 libs: Fix some merge mistakes 2012-03-01 14:51:26 +01:00
Sebastian Dröge
99a8cd1048 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstcollectpads2.c
	libs/gst/check/gstconsistencychecker.c
2012-03-01 14:43:01 +01:00
Stefan Sauer
43a6f5a63d consitencychecker: add handling for sink-pads
Add a pad-probe for sink-pads. One can now add extra pads (belonging to the same
element) to a checker. This allows us to extend the checks.
2012-02-29 22:00:16 +01:00
Wim Taymans
e80296cf46 meta: split registration of API and implementation
Split out the registration of the metadata API and its implementation. Make a
GType for each metadata API. This allows us to store extra information with the
API type such as the tags.
Change the buffer API so that we can get the metadata using the API GType.
Change the query API so that we use the metadata API GType in the allocation
query instead of a string.
Update netaddress and unit tests
2012-02-29 17:37:09 +01:00
Stefan Sauer
ac03c328d5 consistencychecker: also check for duplicated flush_starts 2012-02-29 08:44:04 +01:00
Stefan Sauer
9fd063e404 collectpads2: add more logging 2012-02-28 20:36:59 +01:00
Wim Taymans
f0105dd81f meta: add return vale to transform
Add a boolean return value so that we can see when a transform fails.
2012-02-28 16:17:47 +01:00
Wim Taymans
166cfadb71 meta: add support to tagging the metadata
Add support for adding tags to the metadata. with some standard keys, this
should make it possible to describe what the metadata refers to. We should be
able to use this information to decide if a transformation destroys the metadata
or not.
2012-02-28 11:34:48 +01:00
Wim Taymans
eb84682e92 clock: make more stuff private
Expose methods to get and set the timeout because subclasses uses this.
2012-02-27 09:11:36 +01: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
Stefan Sauer
daa5cae78b collectpads2: rescue the annotation from collectpads 2012-02-26 23:11:23 +01:00
Stefan Sauer
6045e0f58f docs: fix a typo in comment 2012-02-26 23:10:58 +01:00
Stefan Sauer
b9a6b3fc6e collectpads2: move "MT save" tags to doc body
It is not useful to have "MT safe" tags randomly in body, returns or since paragraphs.
2012-02-26 22:57:02 +01:00
Wim Taymans
beea57dca7 basetransform: fix reconfigure methods
Rename gst_base_transform_suggest to gst_base_transform_reconfigure_sink because
that is what it does. Also remove the caps and size because that is not needed.
Rename gst_base_transform_reconfigure to gst_base_transform_reconfigure_src.
Remove some old unused code in capsfilter.
2012-02-24 11:00:21 +01:00
Wim Taymans
6b22a63f1b meta: flesh out the metadata transform
Flesh out the transform method. Add a type and extra info to the transform
function so that implementation can transform the metadata.
Remove the copy function and replace with the more generic transform.
2012-02-24 10:28:56 +01:00
Wim Taymans
d052c778af basetransform: remove transform lock
This is not needed anymore by the baseclass. subclasses should do their own
locking when needed.
2012-02-23 11:08:26 +01:00
Wim Taymans
c83e02d476 basetrans: cleanups
Clean up the setcaps function.
The passthrough variable is protected with the object lock.
2012-02-23 10:12:44 +01:00
Wim Taymans
f3ca3f89f7 basetransform: improve propose_allocation
Always call the propose_allocation method and provide a default implementation
that passes the query on in passthrough mode so that subclasses can also call
this. Also pass if the transform is in passthrough mode so that the
implementation can adjust its algorithm.
2012-02-22 15:26:05 +01:00
Wim Taymans
90a82c7e81 basetrans: improve fixate_caps function
Make it possible to also implement non-inplace fixate functions. Let the fixate
function make the caps writable when needed because some fixate functions might
not need to modify the caps.
2012-02-22 12:24:34 +01:00
Wim Taymans
7b0e4f27fb memory: make _new_wrapped take user_data and notify
Make it possible to configure a GDestroyNotify and user_data for
gst_memory_new_wrapped() this allows for more flexible wrapping of foreign
memory blocks.
2012-02-22 02:10:21 +01:00
Wim Taymans
810e67900b basetransform: copy metadata when using a pool
also copy the metadata when we allocated a new buffer from a pool
2012-02-20 11:46:36 +01:00
Matej Knopp
7b16febb0d nettimepacket: fix printf format warning in debug message
https://bugzilla.gnome.org/show_bug.cgi?id=664491
2012-02-19 12:46:21 +00:00
Edward Hervey
dc304041ed basesrc: Move variable and assignment to where it's needed 2012-02-17 15:11:38 -08:00
Edward Hervey
7f8be6935a basetransform: Handle return value of decide_allocation vmethod
If it fails, properly propagate the error
2012-02-17 15:11:38 -08:00
Mark Nauwelaerts
d95d2cfa1b baseparse: tweak some documentation 2012-02-15 17:12:09 +01:00
Mark Nauwelaerts
bfa4bb7150 baseparse: simplify and improve frame state handling
Use a frame flag to signal to subclass it should reset any retained
state w.r.t. frame parsing since the frame being passed is 'new',
i.e. not related to previously passed and processed data.
2012-02-15 17:11:54 +01:00
Wim Taymans
2609c7b452 baseparse: don't leak event
In the unlikely case where the subclass set the event function to NULL, don't
leak the event.
2012-02-15 13:15:55 +01:00
Wim Taymans
b6b239ceaa baseparse: make activation code more like other
Make the pad activation code look more like other activation code.
Only start the sinkpad task when we decide to activate in pull mode, when we
later add srcpad pullmode this will be needed.
2012-02-15 12:19:13 +01:00
Wim Taymans
49a7832499 baseparse: add some more debug 2012-02-15 11:11:11 +01:00
Mark Nauwelaerts
d148569cd4 baseparse: track consumed input size
... as used by subsequent input data rate estimation (and seeking).
2012-02-15 11:00:36 +01:00
Wim Taymans
63ba55865c baseparse: chain up to parent for defaults
Chain up to the parent instead of using the FALSE return value from the event
function (because it's otherwise impossible to return an error).
2012-02-15 10:13:37 +01:00
Mark Nauwelaerts
36cc9efa80 baseparse: Revert "baseparse: really provide upstream ts to subclass"
This reverts commit 2363490ef5.
2012-02-14 20:17:37 +01:00
Mark Nauwelaerts
a40b993bc3 baseparse: remove dead code and superfluous loop level 2012-02-14 19:33:50 +01:00
Mark Nauwelaerts
193e1cf16e baseparse: modify reverse playback handling
... so as to allow the push-mode case to provide data to subclass
on a buffer by buffer basis (as in regular forward case), rather
than all buffers of a fragment chucked together.

Also refactor buffer handling some more, and add some debug.
2012-02-14 19:33:46 +01:00
Mark Nauwelaerts
2363490ef5 baseparse: really provide upstream ts to subclass 2012-02-14 19:33:33 +01:00
Wim Taymans
ebf502d1c6 Merge branch 'master' into 0.11 2012-02-14 10:35:06 +01:00
Mark Nauwelaerts
b761f5479a baseparse: modify API to a _finish_frame based approach
... which aligns it with other baseclass in the wild, and should give
converter parsers a bit cleaner freedom.
2012-02-13 18:41:00 +01:00
Mark Nauwelaerts
c8ea9994aa baseparse: fix reverse playback
... especially for all-keyframe (audio) cases.
2012-02-13 18:14:02 +01:00
Wim Taymans
5fbdd763bb Merge branch 'master' into 0.11 2012-02-10 15:03:03 +01:00
Mark Nauwelaerts
954dd59fdd baseparse: bitrate mechanics should not deal with duration update
... since that is already handled by _update_duration, or should not be done
altogether if the duration is determined by non-estimated means.

Fixes #669502.
2012-02-10 14:47:00 +01:00
Wim Taymans
b30b397c46 basesink: implement faster ACCEPT_CAPS query 2012-02-10 11:24:28 +01:00
Wim Taymans
7ab1d62c24 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:18:04 +01:00
Mark Nauwelaerts
a306518cee baseparse: clean up a few minor extraneous tokens 2012-02-08 15:38:28 +01:00
Mark Nauwelaerts
2aaa475a4f baseparse: remove closing segment handling 2012-02-08 15:38:07 +01:00
Wim Taymans
d6dfb07692 basetransform: improve prepare_output_buffer
Clean up the prepare_output_buffer function.
Reuse the input buffer when it is writable and when doing an
in-place but non-passthrough transform.
Move the copy-metadata function call to the prepare_output_buffer default
function. If subclasses implement a custom prepare_output_buffer, they must also
copy the metadata themselves.
Remove a useless memory copy because prepare_output_buffer already did that.
2012-02-02 13:10:27 +01:00
Wim Taymans
3075b3c529 basetransform: simplify code
We already checked passthrough a few lines above.
2012-02-02 12:30:14 +01:00
Wim Taymans
18118218b1 basesrc: fix race in startup
Mark renegotiate before starting the pushing thread.
Do also check if we are starting in the get_range function.
2012-01-31 17:41:13 +01:00