Commit graph

5520 commits

Author SHA1 Message Date
Wim Taymans 4fef929ed0 memory: add API for handling memory blocks
Adds some API to handle memory blocks.
2011-03-28 20:08:45 +02:00
Wim Taymans c5983ac47c meta: fix docs 2011-03-28 20:06:35 +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
Edward Hervey 09d83e589a 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
2011-03-24 11:14:18 -03:00
Thiago Santos 2f0dab0f44 gstelement: Fix typo in the docs
GST_ELEMENT_INFO will post a INFO message, not a WARNING
2011-03-22 16:27:35 -03:00
Thiago Santos 4b322b215a tagsetter: Removing unused debug category
tagsetter's debug category had a typo and was unused. Removing it.
2011-03-22 16:27:35 -03: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
Sebastian Dröge 27c0a2b9b1 event: Add since marker to GST_EVENT_SINK_MESSAGE 2011-03-19 10:39:28 +01:00
Tim-Philipp Müller 02d27de048 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
2011-03-17 23:42:48 +00:00
Sebastian Dröge e86973bc10 utils: Remove deprecated gst_element_factory_can_{sink,src}_caps() 2011-03-17 10:54:27 +01:00
Sebastian Dröge 4e16347bfa Merge branch 'master' into 0.11
Conflicts:
	gst/gstbufferlist.c
2011-03-17 10:50:43 +01:00
Sebastian Dröge b8d83f4e01 pad: Document that pad blocks only make sense for sink pads in pull mode and src pads in push mode
See bug #644907.
2011-03-16 12:01:21 +01:00
Sebastian Dröge 256e7238b4 ghostpad: The internally linked pad of the proxypad is the ghostpad
Previously we were returning the peerpad, which is the target
of the ghostpad.
2011-03-16 11:53:53 +01:00
Jonas Holmberg c4c06a2b88 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.
2011-03-11 14:31:14 +01:00
Tim-Philipp Müller 90b4dc4869 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
2011-03-10 17:50:51 +00:00
Wim Taymans f0e3902a37 Merge branch 'master' into 0.11 2011-03-10 10:25:07 +01:00
Thijs Vermeir dbc21e0174 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
2011-03-09 15:28:05 +02:00
Wim Taymans fa0d993372 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.
2011-03-08 17:11:23 +00:00
Wim Taymans fd0fd97200 Merge branch 'master' into 0.11 2011-03-08 17:06:30 +00:00
Stefan Kost 8aa3f380a5 padtemplate: add missing ; in example (and trim whitespace) 2011-03-08 12:12:20 +02:00
Stefan Kost d963503b26 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.
2011-03-08 10:07:17 +02:00
Stefan Kost 4d9e645551 caps,structure: trim trailing whitespace 2011-03-08 10:07:03 +02:00
Jonathan Matthew 2bbfa3304c 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
2011-03-08 10:06:12 +02:00
Wim Taymans dea2351539 miniobject: remove FIXME
Now that we don't subclass buffers anymore, the FIXME about limited
functionality of the copy function is irrelevant.
2011-03-04 18:11:19 +01:00
Wim Taymans 3b916bf57c gst: add flag registration 2011-03-04 17:43:24 +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 b11ede5984 bufferpool: add more debug info 2011-03-04 12:06:11 +01:00
Wim Taymans 52a3fa9346 bufferpool: add debug 2011-03-04 10:17:06 +01:00
Wim Taymans dbcb6eee72 bufferpool: add some more debug info 2011-03-04 10:16:54 +01:00
Wim Taymans 695facd923 bufferpool: add caps to the config
Add the caps to the configuration parameters of the pool.
Initialize the private data
2011-03-04 10:16:35 +01:00
Wim Taymans 673d90fb99 buffer: release buffer to pool in dispose
Use the dispose method to release the buffer to the pool when it is configured.
2011-03-02 11:57:06 +01:00
Wim Taymans a55bc30f81 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.
2011-03-02 11:33:24 +01:00
Wim Taymans 0a89debaf7 gst: add pool flags type 2011-03-02 11:24:27 +01:00
Wim Taymans 0986f3a64a 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.
2011-03-02 11:23:21 +01:00
Wim Taymans e566910a18 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.
2011-03-02 11:23:21 +01:00
Wim Taymans 419a01af0f 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.
2011-03-02 11:23:21 +01:00
Stefan Kost 1dff415d8a bufferpool: also allow NULL params in _acquire 2011-03-02 11:23:21 +01:00
Wim Taymans 9b1cadc329 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.
2011-03-02 11:23:21 +01:00
Wim Taymans dd16af7a6c bufferpool: rename 'flushing' to 'active'
Rename the flushing variable and methods to active to better match
the other gstreamer name conventions
2011-03-02 11:23:21 +01:00
Wim Taymans 2496523b3e 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.
2011-03-02 11:23:21 +01:00
Wim Taymans 2b50d0a2f4 bufferpool: use quarks for structure fields 2011-03-02 11:23:21 +01:00
Wim Taymans 0caa41e173 bufferpool: use GstStructure to configure the pool
Use a GstStructure to provide the pool with the right configuration. Also
provide some helper methods to configure such a structure.
don't pass the config in alloc_buffer, pool implementation will already have
parsed it during set_config.
Update defs
2011-03-02 11:23:21 +01:00
Wim Taymans 8c9e3e6af3 bufferpool: add simple bufferpool helper object 2011-03-02 11:22:44 +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
Stefan Kost c7881a21b5 docs: small updates as suggested on a blog
Link from convinience api to the underlying api.
2011-02-28 16:33:22 +02:00
Wim Taymans d96cacc66c meta: add timing metadata 2011-02-28 10:05:47 +01:00
Wim Taymans 3a29d34923 miniobject: fix whitespace 2011-02-28 10:05:38 +01:00
Wim Taymans cb86bf99bc meta: simplify a bit 2011-02-27 20:54:58 +01:00
Wim Taymans 362a724cfb meta: add default memory metadata
Add a metadata implementation for normall malloced memory.
2011-02-27 20:42:15 +01:00
Wim Taymans 58060d7528 meta: separate add and get methods
Make separate api for getting and adding metadata. This allows us to pass extra
parameters to the init functions when creating metadata, which is needed for
specific API implementations.
Add beginnings of memory metadata.
2011-02-27 19:40:45 +01:00
Wim Taymans 0969106993 docs: update docs and defs 2011-02-27 12:21:32 +01:00
Wim Taymans 9a3f158c73 buffer: remove useless method
Remove the method to retrieve metadata by api. One will always use the
GstMetaInfo to get metadata.
2011-02-26 18:14:36 +01:00
Wim Taymans 23aa5508f3 buffer: remove owner_priv now that we have metadata
Now that we have metadata we can remove the owner_priv field.
2011-02-25 16:31:11 +01:00
Wim Taymans 6f4a733063 metadata: Rename to GstMeta
Rename to the shorter GstMeta
Add docs
Add api to get metadata by API
2011-02-25 13:15:25 +01:00
Philippe Normand 376089db14 buffer: fix memory corruption 2011-02-25 10:34:52 +01:00
Wim Taymans 45645a11a1 buffermeta: fix compilation 2011-02-25 10:34:52 +01:00
Wim Taymans 8e4ab802f9 updates 2011-02-25 10:34:52 +01:00
Wim Taymans 8468dadc77 buffermeta: add beginnings of buffer metadata
Add first implementation of arbitrary buffer metadata. We use a simple linked
linked of slice allocated metadata chunks. Future implementations could use
something more performant.
Add get, remove, iterate methods to handle the metadata.
2011-02-25 10:34:47 +01:00
Tim-Philipp Müller d3e7981527 uri: make win32 buildbot happy
gsturi.c:854:16: error: unused variable 'abs_clean'
gsturi.c:788:1: error: 'gst_file_utils_canonicalise_path' defined but not used
2011-02-24 17:12:00 +00:00
Tim-Philipp Müller 27027a2dd2 uri: add gst_filename_to_uri() that takes relative filenames
Add function that (unlike the GLib equivalent) also accepts paths that
aren't absolute and will clean up relative markers such as ./ and ../
before forming a URI.

Fixes warnings with e.g. filesrc location=foo ! typefind caused by the
recent switch to g_filename_to_uri(), but also actually creates valid
URIs for the first time.

Windows code paths could need some more work, e.g. we don't clean up
the relative markers there for now (because path could have \ and /
as separators).

API: gst_filename_to_uri()
2011-02-24 15:36:52 +00:00
Wim Taymans 39d486e526 buffer: add owner private as intermediate solution
Add an owner private field where the owner of a buffer can store some extra
information. We can use this to implement most of the subclassing that happens
now. Later this will be removed and replaced by arbitrary buffer metadata.
2011-02-24 13:55:35 +01:00
Wim Taymans 7e769a32b8 caps: remove poisoning 2011-02-24 10:28:20 +01:00
Wim Taymans b108e3b999 miniobject: cleanups
Use the stored size in the miniobject to free the miniobject.
Refactor some init methods.
2011-02-23 16:48:00 +01:00
Wim Taymans 97be4713ea caps: warn when make_writable result is ignored 2011-02-23 12:44:54 +01:00
Wim Taymans f78ceed43a gst: fix type registration
We need to have the types of the miniobjects before registering the
tranforms.
2011-02-23 12:01:55 +01:00
Wim Taymans 293ddfc5aa elementfactory: improve caps string management 2011-02-23 12:01:16 +01:00
Wim Taymans be21f9cf42 miniobject: clear flags in init 2011-02-23 12:00:42 +01:00
Wim Taymans fd59a2cead miniobject: fix flags 2011-02-23 10:35:36 +01:00
Wim Taymans 43b8ade170 fix compilation after rebase 2011-02-23 10:35:36 +01:00
Wim Taymans 70be8d8d95 improve type registration 2011-02-23 10:35:36 +01:00
Wim Taymans cdde34f0ee fix compilation 2011-02-23 10:35:36 +01:00
Wim Taymans b82a0f5050 fix macros 2011-02-23 10:35:36 +01:00
Wim Taymans 509abb2162 pad: set boxed type correctly 2011-02-23 10:35:36 +01:00
Wim Taymans d62ca7c063 miniobject: small fixes
Make dataflow happen.
2011-02-23 10:35:22 +01: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 317af67bc4 miniobject: make queries a boxed type
More minionject stuff.
2011-02-23 10:34:45 +01:00
Wim Taymans 56a3364183 messages: make message a simple boxed type 2011-02-23 10:34:27 +01:00
Wim Taymans fda9686b35 miniobject: work on making caps a boxed type
More work on making miniobject a simple allocated struct.
2011-02-23 10:34:08 +01:00
Wim Taymans 086aac764d miniobject: make miniobject a boxed type
First attempt at making miniobject a simple boxed type.
2011-02-23 10:33:44 +01:00
Wim Taymans 5dd9ab1cab cleanups
Fix padding, remove deprecated symbols.
2011-02-22 16:04:12 +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
Philip Jägenstedt 9cb1dec018 docs: fix typo in gst_index_new() docs
https://bugzilla.gnome.org/show_bug.cgi?id=642869
2011-02-21 13:05:11 +00:00
Robert Swain 2edb4fef54 miniobject, buffer: steal miniobject flag for use as MEDIA4 buffer flag
This was required to add a new MEDIA4 buffer flag for indicating
progressive/mixed telecine video buffers. There is no space for
additional flags in GstBuffer, so steal one from GstMiniObject.

https://bugzilla.gnome.org/show_bug.cgi?id=642671
2011-02-21 12:37:26 +00:00
Tim-Philipp Müller 9b076246af docs: add some more Since: markers to atomic queue docs 2011-02-21 11:28:11 +00:00
Edward Hervey b39ccb5ac3 Revert "element: Call ->release_pad() to clean up pad"
This commit changes the request pad behaviour for plugins and applications.

Reopens Bug #402562

The proper fix for that bug is to keep track of created request pads.

This reverts commit a5e44ffffa.
2011-02-21 11:55:50 +01:00
Stefan Kost 2a60eea4c4 index: add FIXME-0.11: comments 2011-02-21 10:04:15 +02:00
Stefan Kost 1a53df3eef docs: improve index docs 2011-02-18 17:17:29 +02:00
David Schleef a5e44ffffa element: Call ->release_pad() to clean up pad
Fixes #636011 and #402562.
2011-02-17 19:14:19 -08:00
Stefan Kost af15626258 index: fix creation of writer id for unparented pads
Also do some cleanup in the impl.
2011-02-17 14:54:05 +02:00
Tim-Philipp Müller 3a744ca442 value: add (de)serialisation function for uchar
.. since we sadly have a plugin in -good that has a uchar property
(cmmlenc)

https://bugzilla.gnome.org/show_bug.cgi?id=642522
2011-02-17 10:55:28 +00:00
Wim Taymans cc5edeefcd atomicqueue: fix include order
atomicqueue: fix include order# Please enter the commit message for your changes. Lines starting
2011-02-16 19:54:57 +01:00
Wim Taymans 14d7db1b52 bus: make the bus almost lockfree
Use new GstPoll functionality to wakeup the mainloop.
Use an atomic queue on the writer side to post the messages.
The reader side it protected with the lock still because we don't want multiple
concurrent readers.
2011-02-16 17:56:39 +01:00
Wim Taymans 5f81eac5e1 atomicqueue: use correct array sizes 2011-02-16 17:56:39 +01:00
Wim Taymans 6b2c2a043d atomicqueue: fix docs some more 2011-02-16 17:56:39 +01:00
Wim Taymans 905fea098f atomicqueue: add refcounting and docs 2011-02-16 17:56:39 +01:00
Wim Taymans ebb37b48d8 atomicqueue: make sure a min initial_size is used 2011-02-16 17:56:38 +01:00
Wim Taymans 4c9287687b atomicqueue: add an atomic queue
Add an atomic queue. The queue can be used from multiple threads simultaneously
and without taking any locks or doing any blocking operations. This makes it
highly scalable for things like the bus, bufferpools and object recycling.
2011-02-16 17:56:38 +01:00
Wim Taymans 1037fd9919 deinit: add progress type class unref 2011-02-16 17:56:38 +01:00