Commit graph

1296 commits

Author SHA1 Message Date
Wim Taymans
39c5f0b28a don't do logic in g_assert... 2012-01-31 12:10:21 +01:00
Wim Taymans
0bd5a78701 query: pass allocator in query
Place the allocator object in the ALLOCATION query instead of the name. This
allows us to exchange allocators that are not in the global pool of allocators.
Update elements for the new api
2012-01-30 16:13:31 +01:00
Wim Taymans
af2fc026fc memory: make the allocator refcounted
Add refcounting to the GstAllocator object.
Remove const from functions because the allocator is refcounted now.
Rename the vmethods for consistency
Expose the constructor for GstAllocator and add a destroy notify for the
user_data. This should make it possible to create allocators that are not
registered and shared globally along with the possibility to destroy them
properly.
Update defs with new symbols.
2012-01-30 13:20:36 +01:00
Olivier Crête
e234a10c63 Use macros to register boxed types thread safely 2012-01-28 16:42:38 +00:00
Sebastian Dröge
753a1125dd Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstcollectpads2.c
	libs/gst/base/gstcollectpads2.h
2012-01-27 15:09:35 +01:00
Sebastian Dröge
9945b2cd88 collectpads2: Move private fields from the public structs to private structs
Fixes bug #668764.
2012-01-27 15:03:46 +01:00
Wim Taymans
21455d35b1 tests: fix some more leaks 2012-01-27 12:52:01 +01:00
Wim Taymans
ae12e4f645 basetransform: avoid caps leak 2012-01-27 11:41:33 +01:00
Sebastian Dröge
34b01da26c collectpads2: Drop the stream-start and stream-config events by default 2012-01-27 10:46:02 +01:00
Sebastian Dröge
0d4081fbbb basesrc: Send the stream-start event as first event ever 2012-01-27 10:41:07 +01:00
Wim Taymans
e122bae3ad basetransform: fix typo 2012-01-26 19:28:46 +01:00
Sebastian Dröge
b6d11d844e collectpads: Remove old collectpads
Still have to rename collectpads2 to collectpads before the 1.0 release.
2012-01-26 10:48:56 +01:00
Sebastian Dröge
de576f8163 collectpads2: Don't forward CAPS event automatically 2012-01-26 10:45:45 +01:00
Sebastian Dröge
6b9280b18c collectpads2: Fix handling of the event function and document it
The event function is supposed to forward/drop the event in any case
now and takes ownership of the event.
2012-01-26 10:45:45 +01:00
Wim Taymans
a521252845 Add new GstMapInfo
Use a structure to hold info about the mapping. The application then keeps track
of this state and we can use it to unmap the memory again later.
2012-01-25 11:54:23 +01:00
Tim-Philipp Müller
13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
Wim Taymans
c6ac51e729 basesrc: handle NULL from getcaps
If the getcaps functions returns NULL, return FALSE from the CAPS query.
2012-01-19 15:17:58 +01:00
Wim Taymans
acf0d50bf1 basesink: handle lists correctly 2012-01-19 15:17:33 +01:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Sebastian Dröge
b56bef1418 basetransform: Always call ::propose_allocation vfunc
And only forward the allocation query if we're working in
passthrough mode if no ::propose_allocation is implemented.
In place buffer transformations will change the buffer
content and require explicit handling of all metas.
2012-01-18 12:07:46 +01:00
Mark Nauwelaerts
ea2f87d34e adapter: ensure automagic _unmap in some more cases 2012-01-13 14:21:27 +01:00
Vincent Penquerc'h
12757e604a adapter: automatically unmap on clearing
When _clear gets called between _map and _unmap, buffers
will be unreffed. If the adapter was mapped, memory leaks
may occur.
While calling _clear between _map and _unmap does not seem
like such a great idea, this is possible in the audio
encoder base class, as _clear may be called in _finish_frame.
Since the audio encoder relies on flushing to keep track of
timestamps, delaying flushing till after handle_frame seems
dangerous.
So, we unmap on clear, as the next unmap will do nothing.
This makes _clear safe to call between _map and _unmap,
while avoiding leaking the mapped buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=664133
2012-01-13 14:21:27 +01:00
Mark Nauwelaerts
247842eaa9 basesrc: prevent unlikely caps leak 2012-01-13 14:21:27 +01:00
Tim-Philipp Müller
66d19b65fb Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	tools/gst-inspect.c
2012-01-13 00:22:03 +00:00
Antoine Tremblay
df6de8fe0c baseparse: clear adapter in reset so baseparse is reusable
GstBaseParse was not clearing its adapter on reset causing
problems when a pipeline went for example from PLAYING to NULL
state and then back to PLAYING again. The data from the last
stream would be used in the parser.

https://bugzilla.gnome.org/show_bug.cgi?id=667444
2012-01-12 19:53:11 +00:00
Sebastian Dröge
148bf27ce3 Merge branch 'master' into 0.11 2012-01-10 13:00:07 +01:00
Havard Graff
bea0ed2fc1 basesink: don't compensate for render-delay twice
https://bugzilla.gnome.org/show_bug.cgi?id=667298
2012-01-05 18:04:22 +00:00
Wim Taymans
bc1974e962 GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2012-01-03 15:25:31 +01:00
Wim Taymans
9540014d2e baseparse: turn assert into a real error
Post a real error instead of just asserting.
2012-01-02 15:42:46 +01:00
Wim Taymans
63d95063a7 basesrc: handle latency event 2012-01-02 15:42:46 +01:00
Tim-Philipp Müller
c61b2ade7b index: rename GstAssocFlags to GstIndexAssociationFlags
Just in case we resurrect this later.
2011-12-30 18:32:59 +00:00
Tim-Philipp Müller
3f11fc0514 base: disable unused index API and make functions static
It's simply private helper API for now, until someone
fixes up GstBaseParse not to need it any more.
2011-12-30 18:32:58 +00:00
Tim-Philipp Müller
be04f3945c index: remove GstIndex and GstIndexFactory for now
There are many good use cases for GstIndex and we want
to add it back again in some form, but possibly not with
the current API, which is very powerful (maybe too powerful),
but also a bit confusing. At the very least we'd need to
make the API bindings-friendly.
2011-12-30 18:32:57 +00:00
Tim-Philipp Müller
b193d03c8a collectpads2: fix up compilation after merge 2011-12-25 12:13:57 +00:00
Tim-Philipp Müller
f6a4af20b2 Merge remote-tracking branch 'origin/master' into 0.11
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.
2011-12-25 11:58:12 +00:00
Sebastian Dröge
2f93cee988 basetransform: If the filtered peer caps are already empty error out early 2011-12-20 14:37:09 +01:00
Mark Nauwelaerts
28e9d735bb collectpads2: add convenience clipping function
... which also converts to running time; useful for typical muxer.
2011-12-19 17:45:25 +01:00
Mark Nauwelaerts
78565da18b basetransform: do not delay sparse stream newsegment updates 2011-12-19 17:39:11 +01:00
Mark Nauwelaerts
b3886b7935 basetransform: suggestion compatible with upstream is not much of a suggestion
... in that upstream is already complying with that suggestion.

Fixes #666174.
2011-12-19 12:34:51 +01:00
Mark Nauwelaerts
eb79c0a835 collectpads2: delay collecting buffer if a pad newly set waiting
... as commented; make code correspond to it (again).
2011-12-15 16:51:49 +01:00
Matej Knopp
f4040d3f6b baseparse: Clear queued frames with other queues 2011-12-12 13:37:25 +01:00
Wim Taymans
768e28e1c4 basesrc: say we handle RECONFIGURE event
We handle the RECONFIGURE event so return TRUE from the event handler.
2011-12-10 11:08:22 +01:00
Wim Taymans
e32fa21071 basesrc: stop when negotiation fails 2011-12-09 10:01:16 +01:00
Sebastian Dröge
a6bb6d0fc3 basetransform: Fix code path to come up with possible caps if incompatible caps are provided to buffer_alloc()
Previous code could almost never work and this should be slightly
better.
2011-12-08 18:11:43 +01:00
Sebastian Dröge
57573d8705 basetransform: Fall back to upstream provided caps if suggested caps are not supported by the sinkpad 2011-12-08 18:11:43 +01:00
Sebastian Dröge
aad7225eb5 basetransform: Fall back to upstream provided caps if fixation of suggested caps failed 2011-12-08 18:11:43 +01:00
Sebastian Dröge
26a1ac0ce7 basetransform: Refactor gst_base_transform_buffer_alloc() code
Don't check if upstream provided caps are compatible with upstream
and don't try to fixate these caps. They must be fixated in any case.
2011-12-08 18:11:42 +01:00
Tim-Philipp Müller
eaa2d81474 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstindexfactory.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstfakesink.c
	plugins/elements/gstfakesrc.c
	plugins/elements/gstidentity.c
	plugins/elements/gstinputselector.c
	plugins/elements/gstoutputselector.c

Note: did not merge any of the basetransform changes from 0.10.
2011-12-08 00:39:10 +00:00
Vincent Penquerc'h
e7b3305f70 baseparse: do not use a byte value instead of a time value when bisecting
This fixes FLAC seeking on some FLAC files.
2011-12-07 17:57:49 +00:00
Sebastian Dröge
7fb67e9d6f basetransform: If suggested caps are not compatible with upstream try to come up with compatible caps
Fixes bug #662199.
2011-12-07 09:51:42 +01:00