Commit graph

5974 commits

Author SHA1 Message Date
Tim-Philipp Müller 9eee73dcc6 Revert "utils: remove some macros now in glib"
This reverts commit de29ae7b92.

Re-adds GFLOAT_TO_LE, GFLOAT_TO_BE, GDOUBLE_TO_LE, and GDOUBLE_TO_BE.
Turns out these aren't in GLib yet afer all (since we didn't
actually open a bug to get them added..)
2011-06-16 10:55:15 +01:00
Wim Taymans 54fd50bfe1 buffer: add index to _take_memory()
Add an index to gst_buffer_take_memory() so that we can also insert memory at a
certain offset. This is mostly interesting to prepend a header memory block to
the buffer.
2011-06-13 16:31:53 +02:00
Wim Taymans a59defb90f pad: don't forward scheduling query
The scheduling query should not be forwarded, because elements need to implement
special code to handle different scheduling methods.
2011-06-13 16:30:22 +02:00
Wim Taymans d837268a77 buffer: add more debug 2011-06-13 12:04:28 +02:00
Wim Taymans 9b9b758688 bufferpool: small indentation fix 2011-06-13 11:51:08 +02:00
Wim Taymans 468dbbbaaf buffer: pass the allocator as const 2011-06-13 11:50:42 +02:00
Wim Taymans a14623f925 query: add some more checks
Make sure that the alignment is valid.
When we have a 0 size (variable buffer size), we can't have a bufferpool.
2011-06-11 20:45:42 +02:00
Wim Taymans bb2d7241fa query: set all default values
Fill all query values with good defaults.
2011-06-11 19:54:47 +02:00
Wim Taymans 6ca5d44704 bufferpool: remove postfix parameter
Remove the postfix parameter, it's not used and can be done differently.
2011-06-11 18:52:42 +02:00
Wim Taymans 2b071ea395 bufferpool: use same alignment values as GstMemory
Use the same alignment values for the bufferpool as we use for the GstMemory
API.
2011-06-10 17:50:27 +02:00
Wim Taymans 2d6a59aa83 pad: add _check_reconfigure() method
Add a method to check and clear the RECONFIGURE flag on a pad.
2011-06-10 17:32:20 +02:00
Wim Taymans eeb07b3f3d buffer: add support for buffer in memory
Fix the code to support allocating the buffer and memory in one memory block.
Add an extra variable to store the memory of the buffer.
This code is disabled still because of complications.
2011-06-10 16:47:29 +02:00
Wim Taymans 3e5c5fb034 memory: expose default alignment
Export the gst_memory_alignment variable so that others can know the default
configured alignment of the system.
2011-06-10 16:46:12 +02:00
Wim Taymans 7c475cc60f memory: fix is_span
Subtract the offset of the parent from is_span.
2011-06-10 16:19:46 +02:00
Wim Taymans 17ff81fc7d memory: respect configured alignment
Move the alignment from GstBuffer to GstMemory.
make sure memory is at least aligned to the configured values.
2011-06-10 13:59:31 +02:00
Wim Taymans b27ee30a35 buffer: make new _buffer_allocate method
Make a new method to allocate a buffer + memory that takes the allocator and the
alignment as parameters. Provide a macro for the old method but prefer to use
the new method to encourage plugins to negotiate the allocator properly.
2011-06-10 13:49:23 +02:00
Wim Taymans 2d28891528 Merge branch 'master' into 0.11
Conflicts:
	gst/gstelementfactory.c
	gst/gstelementfactory.h
	gst/gstpad.h
	gst/gstpluginfeature.c
	gst/gstpluginfeature.h
2011-06-10 12:09:49 +02:00
Wim Taymans bbfec45ecc event: add reset_time boolean to flush_stop event
Add a boolean to the flush_stop event to make it possible to implement flushes
that don't reset_time.
Make basesink post async_done with the reset_time property from the flush stop
event.
Fix some unit tests
2011-06-10 11:55:08 +02:00
Javier Jardón 5d25e4a204 Use "const" instead G_CONST_RETURN
G_CONST_RETURN will be deprecated soon.

https://bugzilla.gnome.org/show_bug.cgi?id=652211
2011-06-09 17:54:27 +01:00
Wim Taymans ab0ab2fbca pad: use new event methods to replace events
Using the new event methods, we can atomically transfer the event from the
pending list to the active list.
2011-06-09 13:37:28 +02:00
Wim Taymans 1b21f2af8f event: make macros for new miniobject methods 2011-06-09 13:36:52 +02:00
Wim Taymans 1b98eb34d7 miniobject: add new methods to manage miniobject pointers
Add a new method to steal the miniobject stored at a location.
Add a new method to store a miniobject in a location and taking ownership
of the miniobject.
2011-06-09 13:35:08 +02:00
Wim Taymans 9d2953288c pad: fix header 2011-06-09 13:34:19 +02:00
Wim Taymans 98fdfa1815 pad: fix spurious include 2011-06-09 12:31:47 +02:00
Wim Taymans d8212d941c pad: forward events by default
Always forward all events in the default handler. Previously it used to not
forward caps events by default. It makes more sense to forward the caps events,
if the element is interested in the caps, it will implement an event handler to
retrieve the caps and then it can decide to forward or not. If the element has
no event handler, it probably just doesn't care about caps and it probably is
also not going to modify the data in a way that needs a caps change.
2011-06-09 11:49:20 +02:00
Wim Taymans 4a424c379f buffer: fix typo in docs 2011-06-09 11:13:55 +02:00
Wim Taymans b0a827cc6b message: rename variable
Rename the new_base_time variable to reset_time, which looks better.
2011-06-08 17:25:43 +02:00
Wim Taymans 3798b5fe5b segment: separate the seek and segment flags
Separate the seek flags and segment flags as separate enums because we might
want to have different flags for both.
2011-06-08 16:41:05 +02:00
Wim Taymans 3cb8b33935 message: move the new_base_time flag to async_done
Move the flag to indicate that a new_base_time should be distributed to the
pipeline, from the async_start to the async_done message. This would allow us to
decide when to reset the pipeline time based on other reasons than the
FLUSH_START event.

The main goal eventually is to make the FLUSH events not reset time at all but
reset the time based on the first buffer or segment that prerolls the pipeline
again.
2011-06-08 13:45:19 +02:00
Edward Hervey d0b30f01b0 gstbuffer: Remove deprecated GST_BUFFER_* macros
data, size, mallocdata and free_func no longer exist.
2011-06-08 13:30:49 +02:00
Wim Taymans 14a0e31e69 pad: remove setcaps function
Remove the setcaps function, elements should use the caps event to be informed
of the format.
2011-06-08 12:58:29 +02:00
Wim Taymans b84fff07ea memory: Require implementation to implement _share
Require the memory implementations to implement a share operation. This allows
us to remove the fallback share implementation which uses a different allocator
implementation and complicates things too much.
Update design doc a bit.
2011-06-08 12:04:49 +02:00
Wim Taymans f6dc8eba34 memory: cleanups and improve docs
Make the fallback copy use the same memory allocator as the original object.
Improve some docs.
Require an alloc function when registering an allocator.
Remove gst_memory_allocator_get_default() and merge the feature in
gst_memory_allocator_find()
Fix locks on the hashtable.
Remove defined but not-implemented gst_memory_span() method.
2011-06-08 11:03:50 +02:00
Wim Taymans cfd3faef5a memory: pass user_data to the alloc function
Pass the user data that was passed to _register to the alloc function of an
allocator.
2011-06-07 17:54:33 +02:00
Wim Taymans 70e799c8fc memory: fix some typos 2011-06-07 17:34:17 +02:00
Wim Taymans 78ea732149 query: add methods to query allocators
Add API to add and query allocator implementations to/from the ALLOCATION query.
2011-06-07 16:35:07 +02:00
Wim Taymans acb3ee9b2c memory: use allocators to allocate memory
Rename the GstMemoryImpl to GstMemoryAllocator because that's really what it is.
Add an alloc vmethod to the allocator members.
Improve registration of allocators.
Add methods to get and set the default allocator
Always use an allocator to allocate memory, use the default allocator when NULL
is passed.
Add user_data to the allocator Info so that we can pass extra info to the
allocator new method.
2011-06-07 16:19:33 +02:00
Wim Taymans b5976339e2 event: move some more defines on top 2011-06-07 13:38:35 +02:00
Wim Taymans 44b4312d96 fix some circular includes
typedef some structs before including other files to avoid circular dependencies
in the header files.
2011-06-07 13:25:26 +02:00
Wim Taymans 016e750a41 utils: remove proxy_setcaps
Remove proxy_setcaps, elements should use the caps event and forward caps
themselves.
2011-06-07 10:52:02 +02:00
Wim Taymans b5351dadcd pad: Improve pad event forward code
Return TRUE when the pad has no parent or when there are no internally linked
pads.
2011-06-07 10:49:34 +02:00
Wim Taymans 9058499eeb pad: Rename and rework the dispatcher function
Rename gst_pad_dispatcher() to gst_pad_forward() and make it more useful by
iterating the internal links of a pad and handling resync properly.
Add a method gst_pad_event_forward() that unconditionally forwards an event to
all internally linked pads.
Update some pad code to use the new forward function.
2011-06-07 10:02:06 +02:00
Wim Taymans a767bf2bf9 caps: use the caps event
Use the caps event instead of gst_pad_set_caps() and the setcaps function
2011-06-07 09:43:20 +02:00
Edward Hervey ba8c8bb2c8 gst: Add enum/flags (de)registration in gst_(de)init 2011-06-06 11:21:23 +02:00
Tim-Philipp Müller 4b920eb5d2 docs: update for API changes
Also remove GST_PAD_CHECKGETRANGEFUNC macro
2011-06-05 18:57:56 +01:00
Tim-Philipp Müller 5a8273e527 Merge branch 'master' into 0.11 2011-06-05 15:48:51 +01:00
Tim-Philipp Müller 6d374e54b9 parse: add prototypes for unused functions to avoid compiler warning
The warning is never fatal, because we don't use -Werror for the
parser helper library build, but the warnings are annoying anyway.
2011-06-05 15:27:19 +01:00
Tim-Philipp Müller bc69efa7cc info: remove GST_XML debug category as well 2011-06-04 15:23:56 +01:00
Tim-Philipp Müller a4092cd5c4 Remove everything libxml2- and loadsave-related 2011-06-04 15:22:06 +01:00
David Schleef f3eac7de22 Work around changes in g_atomic API
See #651514 for details.  It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new.  Thus, macros and a version check.
2011-06-04 00:36:26 -07:00