platform/upstream/gstreamer.git
13 years agodefs: fix defs
Wim Taymans [Mon, 28 Mar 2011 18:20:39 +0000 (20:20 +0200)]
defs: fix defs

13 years agoMerge branch 'master' into 0.11-fdo
Wim Taymans [Mon, 28 Mar 2011 18:11:20 +0000 (20:11 +0200)]
Merge branch 'master' into 0.11-fdo

Conflicts:
gst/gst.c
libs/gst/base/gstcollectpads.c

13 years agobuffer: fix subbuffers
Wim Taymans [Mon, 28 Mar 2011 17:19:44 +0000 (19:19 +0200)]
buffer: fix subbuffers

13 years agobuffer: implemet trim and set_size
Wim Taymans [Mon, 28 Mar 2011 14:40:24 +0000 (16:40 +0200)]
buffer: implemet trim and set_size

13 years agobuffer: more fixes
Wim Taymans [Mon, 28 Mar 2011 13:52:17 +0000 (15:52 +0200)]
buffer: more fixes

13 years agobuffer: add more methods
Wim Taymans [Mon, 28 Mar 2011 08:28:02 +0000 (10:28 +0200)]
buffer: add more methods

13 years agogst: add class init
Wim Taymans [Thu, 24 Mar 2011 20:21:00 +0000 (21:21 +0100)]
gst: add class init

13 years agobuffer: fix remaining unit tests
Wim Taymans [Thu, 24 Mar 2011 20:18:52 +0000 (21:18 +0100)]
buffer: fix remaining unit tests

13 years agobuffer: fix unit test
Wim Taymans [Thu, 24 Mar 2011 19:09:02 +0000 (20:09 +0100)]
buffer: fix unit test

13 years agomemory: remove memory metadata again
Wim Taymans [Thu, 24 Mar 2011 12:01:00 +0000 (13:01 +0100)]
memory: remove memory metadata again

13 years agomemory: more fixes
Wim Taymans [Thu, 24 Mar 2011 10:49:46 +0000 (11:49 +0100)]
memory: more fixes

Automatically make the memory of a buffer writable when the buffer is writable
and the memory is asked to mapped WRITE.
Add docs

13 years agomemory: more work on implementing buffer memory
Wim Taymans [Wed, 23 Mar 2011 19:52:27 +0000 (20:52 +0100)]
memory: more work on implementing buffer memory

13 years agomemory: more work on porting the unit tests
Wim Taymans [Tue, 22 Mar 2011 19:51:06 +0000 (20:51 +0100)]
memory: more work on porting the unit tests

13 years agotests: make some tests compile
Wim Taymans [Mon, 21 Mar 2011 18:15:27 +0000 (19:15 +0100)]
tests: make some tests compile

13 years agomemory: port code to new buffer data API
Wim Taymans [Mon, 21 Mar 2011 17:13:55 +0000 (18:13 +0100)]
memory: port code to new buffer data API

13 years agomemory: more fixes
Wim Taymans [Mon, 21 Mar 2011 12:07:42 +0000 (13:07 +0100)]
memory: more fixes

Fix span and is_span
Implement buffer memory

13 years agoWIP use memory in buffer
Wim Taymans [Mon, 21 Mar 2011 08:51:53 +0000 (09:51 +0100)]
WIP use memory in buffer

13 years agomemory: more improvements
Wim Taymans [Sun, 20 Mar 2011 10:42:39 +0000 (11:42 +0100)]
memory: more improvements

13 years agomemory: more memory improvements
Wim Taymans [Sat, 19 Mar 2011 09:45:37 +0000 (10:45 +0100)]
memory: more memory improvements

13 years agomemory: add more memory operations
Wim Taymans [Fri, 18 Mar 2011 20:45:39 +0000 (21:45 +0100)]
memory: add more memory operations

13 years agomemory: add memory implementation
Wim Taymans [Fri, 18 Mar 2011 18:28:17 +0000 (19:28 +0100)]
memory: add memory implementation

13 years agomemory: add API for handling memory blocks
Wim Taymans [Fri, 18 Mar 2011 17:35:42 +0000 (18:35 +0100)]
memory: add API for handling memory blocks

Adds some API to handle memory blocks.

13 years agometa: fix docs
Wim Taymans [Tue, 8 Mar 2011 18:18:24 +0000 (18:18 +0000)]
meta: fix docs

13 years agobasesrc: Return FALSE if we don't handle an event
Arun Raghavan [Mon, 28 Mar 2011 15:51:00 +0000 (21:21 +0530)]
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)

13 years agoAutomatic update of common submodule
Sebastian Dröge [Fri, 25 Mar 2011 21:08:41 +0000 (22:08 +0100)]
Automatic update of common submodule

From 193b717 to 1ccbe09

13 years agoAutomatic update of common submodule
Stefan Kost [Fri, 25 Mar 2011 12:55:39 +0000 (14:55 +0200)]
Automatic update of common submodule

From b77e2bf to 193b717

13 years agoAutomatic update of common submodule
Sebastian Dröge [Fri, 25 Mar 2011 08:27:58 +0000 (09:27 +0100)]
Automatic update of common submodule

From d8814b6 to b77e2bf

13 years agoAutomatic update of common submodule
Sebastian Dröge [Fri, 25 Mar 2011 07:59:37 +0000 (08:59 +0100)]
Automatic update of common submodule

From 6aaa286 to d8814b6

13 years agoAutomatic update of common submodule
Stefan Kost [Thu, 24 Mar 2011 16:48:41 +0000 (18:48 +0200)]
Automatic update of common submodule

From 6aec6b9 to 6aaa286

13 years agodocs: fix some gtk-doc warnings
Stefan Kost [Thu, 24 Mar 2011 16:27:09 +0000 (18:27 +0200)]
docs: fix some gtk-doc warnings

Document the queue leaky enums.

13 years agoqueue2: set max value for to the matching one for the datatype
Stefan Kost [Thu, 24 Mar 2011 16:25:08 +0000 (18:25 +0200)]
queue2: set max value for to the matching one for the datatype

The property is guint64, so use G_MAXUINT64 instead of G_MAXUINT.

13 years agodocs: cleanup and xref fixes
Stefan Kost [Thu, 24 Mar 2011 11:22:57 +0000 (13:22 +0200)]
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.

13 years agobasesink: print flow return as a name in debug log
Stefan Kost [Wed, 23 Mar 2011 14:42:24 +0000 (16:42 +0200)]
basesink: print flow return as a name in debug log

13 years agodocs: do xrefs for non installed books too
Stefan Kost [Wed, 23 Mar 2011 15:13:58 +0000 (17:13 +0200)]
docs: do xrefs for non installed books too

Get the xrefs from the builddir for the books in the same packages. This fixes
the cross references if one does not have the docs already installed.

13 years agobasesrc: Keep downstream caps order when fixating
Edward Hervey [Mon, 19 Apr 2010 18:39:53 +0000 (20:39 +0200)]
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

13 years agobasetransform: Retain caps order when getting caps
Edward Hervey [Mon, 19 Apr 2010 18:40:56 +0000 (20:40 +0200)]
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

13 years agotests: caps: Tests for the new caps intersection mode
Thiago Santos [Fri, 25 Feb 2011 13:25:26 +0000 (10:25 -0300)]
tests: caps: Tests for the new caps intersection mode

Adds test cases for the caps 'first' intersect mode
Adds another test for the 'zigzag' mode

Fixes #617045

13 years agogstcaps: new API : gst_caps_intersect_full
Edward Hervey [Fri, 25 Feb 2011 11:50:12 +0000 (08:50 -0300)]
gstcaps: new API : gst_caps_intersect_full

Just like gst_caps_intersect, but adds a new parameter 'mode'
that allows selecting the intersection algorithm to use.

Currently we have GST_CAPS_INTERSECT_MODE_ZIG_ZAG (default) and
GST_CAPS_INTERSECT_MODE_FIRST.

API: gst_caps_intersect_full
API: GstCapsIntersectMode
API: GST_CAPS_INTERSECT_MODE_ZIG_ZAG
API: GST_CAPS_INTERSECT_MODE_FIRST

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

13 years agotests: add libscpp unit test to make sure g++ likes our library headers
Tim-Philipp Müller [Sat, 12 Mar 2011 17:01:39 +0000 (17:01 +0000)]
tests: add libscpp unit test to make sure g++ likes our library headers

13 years agobytereader, bytewriter: fix up inline functions to make g++ happy
Tim-Philipp Müller [Sat, 12 Mar 2011 16:58:01 +0000 (16:58 +0000)]
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

13 years agogstelement: Fix typo in the docs
Thiago Santos [Tue, 22 Mar 2011 19:26:56 +0000 (16:26 -0300)]
gstelement: Fix typo in the docs

GST_ELEMENT_INFO will post a INFO message, not a WARNING

13 years agotagsetter: Removing unused debug category
Thiago Santos [Fri, 18 Mar 2011 11:22:23 +0000 (08:22 -0300)]
tagsetter: Removing unused debug category

tagsetter's debug category had a typo and was unused. Removing it.

13 years agoautogen: wingo signed comment
Luis de Bethencourt [Fri, 18 Mar 2011 18:34:57 +0000 (19:34 +0100)]
autogen: wingo signed comment

13 years agomultiqueue: Don't leak objects when flushing after dequeueing and before pushing...
Sebastian Dröge [Tue, 22 Mar 2011 10:04:20 +0000 (11:04 +0100)]
multiqueue: Don't leak objects when flushing after dequeueing and before pushing the object

13 years agomultiqueue: Really remove unused variable
Sebastian Dröge [Mon, 21 Mar 2011 16:54:10 +0000 (17:54 +0100)]
multiqueue: Really remove unused variable

13 years agomultiqueue: Increment unique item counter with atomic operations
Sebastian Dröge [Mon, 21 Mar 2011 16:52:13 +0000 (17:52 +0100)]
multiqueue: Increment unique item counter with atomic operations

Before it was only protected by the stream lock but every pad
has its own stream lock, making the protection rather useless.

13 years agomultiqueue: Unblock all waiting pads when shutting down
Sebastian Dröge [Mon, 21 Mar 2011 16:17:22 +0000 (17:17 +0100)]
multiqueue: Unblock all waiting pads when shutting down

13 years agomultiqueue: Remove unused variable
Sebastian Dröge [Mon, 21 Mar 2011 11:39:34 +0000 (12:39 +0100)]
multiqueue: Remove unused variable

13 years agomultiqueue: Exit loop function if the pad is flushing
Sebastian Dröge [Mon, 21 Mar 2011 15:28:37 +0000 (16:28 +0100)]
multiqueue: Exit loop function if the pad is flushing

Fixes possible deadlocks when flushing an unlinked pad that waits
for other pads to advance.

13 years agobuild: fix build with -Werror with GCC 4.6.0
Jason D. Clinton [Sat, 19 Mar 2011 22:06:12 +0000 (17:06 -0500)]
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

13 years agoevent: Add since marker to GST_EVENT_SINK_MESSAGE
Sebastian Dröge [Sat, 19 Mar 2011 09:39:28 +0000 (10:39 +0100)]
event: Add since marker to GST_EVENT_SINK_MESSAGE

13 years agoinputselector: Stop waiting for a pad switch when the pad is flushing
Sebastian Dröge [Sat, 19 Mar 2011 07:55:57 +0000 (08:55 +0100)]
inputselector: Stop waiting for a pad switch when the pad is flushing

13 years agoinputselector: Move locking and signalling macros from the header to the source file
Sebastian Dröge [Sat, 19 Mar 2011 07:50:06 +0000 (08:50 +0100)]
inputselector: Move locking and signalling macros from the header to the source file

13 years agotask: fix GST_TASK_BROADCAST
Tim-Philipp Müller [Thu, 17 Mar 2011 23:42:48 +0000 (23:42 +0000)]
task: fix GST_TASK_BROADCAST

Surprisingly enough, you can't "breadcast" on a GCond.

Spotted by Rune Sætre.

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

13 years agoinputselector: Hold the selector lock while reading properties of the active pad
Sebastian Dröge [Thu, 17 Mar 2011 13:21:17 +0000 (14:21 +0100)]
inputselector: Hold the selector lock while reading properties of the active pad

13 years agoinputselector: Make sure that EOS is always sent downstream for the active pad
Sebastian Dröge [Thu, 17 Mar 2011 13:10:49 +0000 (14:10 +0100)]
inputselector: Make sure that EOS is always sent downstream for the active pad

It can happen that the currently active pad got the EOS event
before it was activated and the previously active pad got the
EOS event after it was deactivated. In that case we have to
send the EOS event from an inactive pad downstream.

13 years agoinputselector: Return GST_FLOW_OK until the selected pad pushed something downstream
Sebastian Dröge [Wed, 16 Mar 2011 17:19:11 +0000 (18:19 +0100)]
inputselector: Return GST_FLOW_OK until the selected pad pushed something downstream

This makes sure that during switches at no point in time all pads
have returned not-linked, which can happen when playing an audio-only
file with playbin2 and switching between the streams for example.

Fixes bug #644935.

13 years agoutils: Remove deprecated gst_element_factory_can_{sink,src}_caps()
Sebastian Dröge [Thu, 17 Mar 2011 09:53:49 +0000 (10:53 +0100)]
utils: Remove deprecated gst_element_factory_can_{sink,src}_caps()

13 years agoMerge branch 'master' into 0.11
Sebastian Dröge [Thu, 17 Mar 2011 09:50:43 +0000 (10:50 +0100)]
Merge branch 'master' into 0.11

Conflicts:
gst/gstbufferlist.c

13 years agopad: Document that pad blocks only make sense for sink pads in pull mode and src...
Sebastian Dröge [Wed, 16 Mar 2011 11:01:21 +0000 (12:01 +0100)]
pad: Document that pad blocks only make sense for sink pads in pull mode and src pads in push mode

See bug #644907.

13 years agoghostpad: The internally linked pad of the proxypad is the ghostpad
Sebastian Dröge [Wed, 16 Mar 2011 10:53:53 +0000 (11:53 +0100)]
ghostpad: The internally linked pad of the proxypad is the ghostpad

Previously we were returning the peerpad, which is the target
of the ghostpad.

13 years agobufferlist: Use a GQueue instead of a GList
Jonas Holmberg [Fri, 25 Feb 2011 15:20:49 +0000 (16:20 +0100)]
bufferlist: Use a GQueue instead of a GList

Adding a buffer to the end of a GstBufferList is supposed to be a fast
operation, but it was not since the iterator does not advance its
nextpointer when adding buffers and GList does not have a tail pointer.
Using a GQueue to store the buffers makes it easier to add buffers to
the end of the list and this operation will now be much more efficient.

Adding an entire GList of buffers using
gst_buffer_list_iterator_add_list() will however have to iterate over
the list being added to be able to update the tail pointer in the
GQueue.

13 years agoutils: fix ABI break when compiling gstreamer with -DGST_DISABLE_DEPRECATED
Tim-Philipp Müller [Thu, 10 Mar 2011 17:48:26 +0000 (17:48 +0000)]
utils: fix ABI break when compiling gstreamer with -DGST_DISABLE_DEPRECATED

GST_DISABLE_DEPRECATED should only affect visibility of declarations in headers,
not actually remove symbols. See GitDeveloperGuidelines and DeprecatingAPI
pages in wiki.

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

13 years agowin32: Update .def file for API addition
Edward Hervey [Thu, 10 Mar 2011 15:46:04 +0000 (16:46 +0100)]
win32: Update .def file for API addition

13 years agoMerge branch 'master' into 0.11
Wim Taymans [Thu, 10 Mar 2011 09:25:07 +0000 (10:25 +0100)]
Merge branch 'master' into 0.11

13 years agopwg: fix element name "videodrop" to "videorate"
Stefan Kost [Wed, 9 Mar 2011 14:15:33 +0000 (16:15 +0200)]
pwg: fix element name "videodrop" to "videorate"

13 years agotest: add tests for new element_factory api.
Stefan Kost [Tue, 8 Mar 2011 10:11:08 +0000 (12:11 +0200)]
test: add tests for new element_factory api.

13 years agogstutils: replace gst_element_factory_can_{sink,src}_caps
Thijs Vermeir [Wed, 23 Jun 2010 20:00:04 +0000 (22:00 +0200)]
gstutils: replace gst_element_factory_can_{sink,src}_caps

Add new functions to clarify how the caps are compared to the template caps of
the element factory. Improve the docs to point out the difference.

Deprecate: gst_element_factory_can_{src|sink}_caps
API: add gst_element_factory_can_{src|sink}_{any|all}_capps

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

13 years agotests: add a unit test for gst_caps_new_simple
Stefan Kost [Mon, 7 Mar 2011 21:13:56 +0000 (23:13 +0200)]
tests: add a unit test for gst_caps_new_simple

Add a test for the crash in bug #642271.

13 years agodocs: rename draft to official doc
Wim Taymans [Tue, 8 Mar 2011 18:05:42 +0000 (18:05 +0000)]
docs: rename draft to official doc

13 years agometa: implement transform function
Wim Taymans [Tue, 8 Mar 2011 16:58:49 +0000 (16:58 +0000)]
meta: implement transform function

Replace subbuffer and copy vmethods by a more generic transform function that
can then be parametrised by transform specific data. This should allow us to
implement make-writable and more future transform functions.

13 years agoMerge branch 'master' into 0.11
Wim Taymans [Tue, 8 Mar 2011 17:06:30 +0000 (17:06 +0000)]
Merge branch 'master' into 0.11

13 years agotests: add test to create a factory
Stefan Kost [Tue, 8 Mar 2011 09:55:29 +0000 (11:55 +0200)]
tests: add test to create a factory

13 years agotests: start a new test suite for element factories
Stefan Kost [Tue, 8 Mar 2011 08:36:30 +0000 (10:36 +0200)]
tests: start a new test suite for element factories

Move one test from gstelement suite.

13 years agopadtemplate: add missing ; in example (and trim whitespace)
Stefan Kost [Tue, 8 Mar 2011 09:34:19 +0000 (11:34 +0200)]
padtemplate: add missing ; in example (and trim whitespace)

13 years agostructure: gst_structure_empty_new() does better error checking
Stefan Kost [Tue, 8 Mar 2011 07:58:55 +0000 (09:58 +0200)]
structure: gst_structure_empty_new() does better error checking

No need to check for media_type!=NULL as the function we call that actual create
the structure does a full check anyway.

13 years agocaps,structure: trim trailing whitespace
Stefan Kost [Tue, 8 Mar 2011 08:06:23 +0000 (10:06 +0200)]
caps,structure: trim trailing whitespace

13 years agocaps: don't create broken caps for invalid media types
Jonathan Matthew [Thu, 3 Mar 2011 22:28:25 +0000 (08:28 +1000)]
caps: don't create broken caps for invalid media types

Check if structure has been created before appending it to the caps. Free the
caps in the case of an error to not conceal it be returning empty caps.

Fixes #642271

13 years agoexamples: update hello world example
Stefan Kost [Mon, 7 Mar 2011 14:21:47 +0000 (16:21 +0200)]
examples: update hello world example

Our helloworld example thatw e reference from the manual has been a bit
complicated to serve a first contact with gstreamer. Since we have and
promote playbin2 as a playback api use it here.

Based on work from Mathias Hasselmann <mathias.hasselmann@gmx.de>

Fixes #424143

13 years agodocs: update metadata draft
Wim Taymans [Fri, 4 Mar 2011 18:02:33 +0000 (19:02 +0100)]
docs: update metadata draft

13 years agominiobject: remove FIXME
Wim Taymans [Fri, 4 Mar 2011 17:11:19 +0000 (18:11 +0100)]
miniobject: remove FIXME

Now that we don't subclass buffers anymore, the FIXME about limited
functionality of the copy function is irrelevant.

13 years agogst: add flag registration
Wim Taymans [Fri, 4 Mar 2011 16:43:24 +0000 (17:43 +0100)]
gst: add flag registration

13 years agopad: more preroll lock to basesink
Wim Taymans [Fri, 4 Mar 2011 16:25:02 +0000 (17:25 +0100)]
pad: more preroll lock to basesink

Move the preroll lock to basesink where it belongs.

13 years agodocs: update bufferpool draft
Wim Taymans [Fri, 4 Mar 2011 15:05:44 +0000 (16:05 +0100)]
docs: update bufferpool draft

13 years agobufferpool: add more debug info
Wim Taymans [Fri, 4 Mar 2011 11:06:11 +0000 (12:06 +0100)]
bufferpool: add more debug info

13 years agobufferpool: add debug
Wim Taymans [Thu, 3 Mar 2011 17:38:32 +0000 (18:38 +0100)]
bufferpool: add debug

13 years agobufferpool: add some more debug info
Wim Taymans [Thu, 3 Mar 2011 17:21:31 +0000 (18:21 +0100)]
bufferpool: add some more debug info

13 years agobufferpool: add caps to the config
Wim Taymans [Thu, 3 Mar 2011 15:31:49 +0000 (16:31 +0100)]
bufferpool: add caps to the config

Add the caps to the configuration parameters of the pool.
Initialize the private data

13 years agodefs: update defs
Wim Taymans [Wed, 2 Mar 2011 10:57:40 +0000 (11:57 +0100)]
defs: update defs

13 years agobuffer: release buffer to pool in dispose
Wim Taymans [Wed, 2 Mar 2011 10:57:06 +0000 (11:57 +0100)]
buffer: release buffer to pool in dispose

Use the dispose method to release the buffer to the pool when it is configured.

13 years agobuffer: add pool to buffer structure
Wim Taymans [Tue, 22 Feb 2011 11:35:45 +0000 (12:35 +0100)]
buffer: add pool to buffer structure

Keep a pointer to the bufferpool. Release the buffer to the pool when
finalizing. Make sure the pool sets itself as the pool member of buffers that it
sends out.

13 years agogst: add pool flags type
Wim Taymans [Tue, 22 Feb 2011 11:35:06 +0000 (12:35 +0100)]
gst: add pool flags type

13 years agodocs: update bufferpool docs
Wim Taymans [Tue, 22 Feb 2011 10:05:09 +0000 (11:05 +0100)]
docs: update bufferpool docs

13 years agobufferpool: Refactor stopping of the pool
Wim Taymans [Mon, 21 Feb 2011 17:43:19 +0000 (18:43 +0100)]
bufferpool: Refactor stopping of the pool

Move some methods around.
Make sure we check for config parsing errors.
Increment the outstanding buffers before calling acquire so that we can be sure
that set_active() doesn't free the pool from under us.

13 years agobufferpool: Rework buffer management a little
Wim Taymans [Mon, 21 Feb 2011 16:33:38 +0000 (17:33 +0100)]
bufferpool: Rework buffer management a little

Add start/stop methods to allow for bulk allocation of buffers.
Free buffers only when all outstanding buffers returned.
Make things more threadsafe wrt flushing and starting/stopping by
keeping track of start and stop method calls.

13 years agobufferpool: memory management cleanups
Wim Taymans [Mon, 21 Feb 2011 11:18:41 +0000 (12:18 +0100)]
bufferpool: memory management cleanups

Use a lock to protect concurrect execution of set_config and set_active.
Start freeing the buffers when flushing and all buffers are returned to the
pool.
Make a copy of the config to avoid crashing with concurrent access.

13 years agobufferpool: also allow NULL params in _acquire
Stefan Kost [Fri, 18 Feb 2011 15:35:46 +0000 (16:35 +0100)]
bufferpool: also allow NULL params in _acquire

13 years agobufferpool: more updates
Wim Taymans [Fri, 18 Feb 2011 15:15:30 +0000 (16:15 +0100)]
bufferpool: more updates

Keep track if the buffer is configured and block activation when not configured
yet.
Keep track of outstanding buffers and disallow configuration when not all
buffers are returned to the pool. We need to do this or else we might end up
with wrong buffers in the pool.
Add return value to set_active.
Small cleanups. Fix finalize.

13 years agobufferpool: rename 'flushing' to 'active'
Wim Taymans [Fri, 18 Feb 2011 11:50:21 +0000 (12:50 +0100)]
bufferpool: rename 'flushing' to 'active'

Rename the flushing variable and methods to active to better match
the other gstreamer name conventions

13 years agobufferpool: prealloc when unset flushing
Wim Taymans [Thu, 17 Feb 2011 17:37:19 +0000 (18:37 +0100)]
bufferpool: prealloc when unset flushing

According to the design doc we need to prealloc buffers when we unset the
flushing state, not in set_config.
Set the flushing state better.