Commit graph

316 commits

Author SHA1 Message Date
Wim Taymans bcf115a620 caps: small docs update 2012-03-13 15:40:23 +01:00
Wim Taymans 272142089e caps: remove gst_caps_union()
Remove gst_caps_union(), use gst_caps_merge(). This function was not used
anymore and it is unclear what the difference is with _merge().
2012-03-13 10:04:36 +01:00
Wim Taymans 5e719a293a caps: delay _make_writable() until needed in _normalize()
Delay _make_writable() until we actually found a list and need to update the
caps.
2012-03-12 18:34:30 +01:00
Wim Taymans 4cdddd2bb1 caps: shortcut simplify earlier
A simple caps is already simplified, no need to check for fixedness.
2012-03-12 18:25:38 +01:00
Wim Taymans f4aa1b1011 caps: small cleanup, remove const 2012-03-12 18:22:05 +01:00
Wim Taymans 4bbc3b6f04 caps: small cleanups 2012-03-12 18:02:27 +01:00
Wim Taymans 1bc93bbf8f caps: small doc improvement 2012-03-12 16:40:38 +01:00
Wim Taymans 4feb6c3989 caps: fix some 0.11 FIXMEs 2012-03-12 12:35:07 +01:00
Wim Taymans 67931bfded caps: make _normalize take ownership of input
Make gst_caps_normalize() take ownership of the input so that it can more
intelligently decide when to copy or not.
2012-03-12 12:21:34 +01:00
Wim Taymans 8a76c3269a caps: _do_simplify() -> _simplify()
Rename _do_simplify() to _simplify(). The name was introduced as a replacement
method for a deprecated method but we can now rename it again.
Fix some docs.
2012-03-12 11:38:37 +01:00
Wim Taymans 9cdbffea94 caps: improve _do_simplify
Make gst_caps_do_simplify() take ownership of the input caps and produce a
simplified output caps. This removes the requirement of having writable input
caps and the method can make the caps writable only when needed.
2012-03-12 10:42:23 +01:00
Wim Taymans 43abf99a8a caps: avoid using in-place oprations
Rework some caps operations so they don't rely on writable caps but instead take
ownership of the input caps and do _make_writable() only when needed.
Remove some const from caps functions, it does not make much sense for
refcounted objects and does not allow us to return a refcount to the const input
caps.
Rework the base classes fixate vmethods to not operate on the caps in-place.
All this saves us around 30% of caps and structure copy and new operations.
2012-03-11 18:57:44 +01:00
Wim Taymans 34f770a900 gst: add some performance logging
Add some performance logging for caps copy and the slow default acceptcaps
implementation
2012-02-10 11:09:01 +01:00
Olivier Crête e234a10c63 Use macros to register boxed types thread safely 2012-01-28 16:42:38 +00:00
Andoni Morales Alastruey ded0ea049e caps: fix documenation typo 2012-01-27 18:14:50 +01:00
Wim Taymans 321ee10bd6 trace: rework alloc tracing
Remove trace, we use debug log for that
Make alloc trace simpler, removing some methods.
Activate alloc trace with a GST_TRACE=3 environment variable.
Dump leaked objects atexit.
Provide an offset in the object where the GType can be found so that more
verbose info can be given for objects.
Remove -T option from gst-launch because tracing is now triggered with the
environment variable.
2012-01-27 17:54:43 +01:00
Sebastian Dröge a7b96d0503 caps: Fix compiler warning 2012-01-26 14:57:14 +01:00
Sebastian Dröge 28f5b86637 caps: Use correct size for caps allocation 2012-01-26 14:55:30 +01:00
Sebastian Dröge b4066a6c95 caps: Make GstCaps public struct more opaque by moving the private pointer into the implementation 2012-01-26 14:45:30 +01:00
Sebastian Dröge 5d1d7d95b2 caps: Store a pointer to GstCaps in GstStaticCaps
...instead of using hackish subclass of GstCaps, which also
had some thread-safety problems.
2012-01-26 14:37:02 +01:00
Tim-Philipp Müller c721d53773 Remove GST_TYPE_DATE, our own GDate type
Which we had to add because GLib didn't have it
back in the day. Port everything to plain old
G_TYPE_DATE, which is also a boxed type. Ideally
we'd just use GDateTime for everything, but it
doesn't support not setting some of the fields
unfortuntely (which would be very useful for
tag handling in general, if we could express
2012-01 for example).

https://bugzilla.gnome.org/show_bug.cgi?id=666351
2012-01-12 20:50:53 +00:00
Wim Taymans 0a8dd0a4e7 caps: rename variable for consistency
Rename the variable for GST_CAPS_NONE to _gst_caps_none for consistency and to
hie the fact that NONE caps are also accidentally empty caps.
2011-12-21 11:10:04 +01:00
Wim Taymans 8ff059ba59 caps: add ANY and EMPTY singletons
Add a singleton for ANY and EMPTY caps and make the GST_CAPS_ANY and
GST_CAPS_NONE point to them. This makes the API more consistent now
that the macro does not magically create a ref. It also solves some leaks in
places where the macro was used to register a padtemplate.
2011-12-20 13:24:06 +01:00
Wim Taymans 5a4957eef6 caps: _CAPS_FLAGS_ -> CAPS_FLAG_ 2011-11-28 14:24:16 +01:00
Wim Taymans 9c0d8ca718 Merge branch 'master' into 0.11
Conflicts:
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
2011-11-08 12:54:15 +01:00
Tim-Philipp Müller 16dcd5e958 docs: fix Since: markers for API added after 0.10.35 2011-11-08 00:32:36 +00:00
Wim Taymans c9a4037805 Merge branch 'master' into 0.11
Conflicts:
	gst/gstvalue.c
2011-11-07 17:17:39 +01:00
Vincent Penquerc'h 9121a30f9a gstcaps: remove unneeded use of gint64
https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:17:35 +00:00
Wim Taymans 4fa22944e9 caps: fix compilation 2011-11-07 10:40:23 +01:00
Wim Taymans b7fac4d093 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasetransform.c
2011-11-07 10:01:27 +01:00
Sjoerd Simons 57074fc025 caps: Add gst_caps_is_strictly_equal 2011-11-04 17:49:55 +00:00
Wim Taymans e4725d9df2 structure: cleanup API
gst_structure_empty_new() -> gst_structure_new_empty()
  gst_structure_id_empty_new() -> gst_structure_new_id_empty()
  gst_structure_id_new() -> gst_structure_new_id()
2011-11-02 08:59:44 +01:00
Wim Taymans d9c8ab67a0 caps: add empty_simple variants 2011-10-27 17:09:04 +02:00
Wim Taymans 852851edab Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasetransform.c
2011-10-27 15:27:19 +02:00
Thiago Santos 27ce89812a caps: No need to require writable caps for _append/_merge second caps
The second caps ownership is transfered, no need to require it to
be writable from the caller function. Instead, _append and _merge
make it writable on their own.

Discovered because of an assertion on encoding-profile.c in
_get_input_caps using _merge but not passing writable caps.
2011-10-21 10:23:04 -03:00
René Stadler 221836f452 caps: fix race condition and memory leak in gst_static_caps_get
This was leaking the PtrArray from caps->priv, as set up by the other call to
gst_caps_init. Also, the thread safety issue presented in the comment above was
not taken care of anymore. We now zero the refcount again when publishing the
structure.

Fixes #661629.
2011-10-17 13:59:49 +02:00
Edward Hervey 10e7159cf8 Merge branch 'master' into 0.11
Conflicts:
	gst/gstcaps.c
	gst/gstpad.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesink.h
	libs/gst/base/gstbasetransform.c
2011-09-23 13:09:25 +02:00
Fabrizio (Misto) Milo 7be3899653 caps: use g_value_take_string() and gst_value_get_caps() instead of accessing internal fields 2011-09-19 09:50:11 +02:00
Tim-Philipp Müller 98ee2979d1 caps: move log messages for caps creation/freeing into TRACE category
Reduce SPAM for GST_CAPS:5.
2011-09-10 18:24:49 +01:00
Sebastian Dröge 43538e2e75 Merge branch 'master' into 0.11
Conflicts:
	docs/design/draft-buffer2.txt
	docs/design/part-TODO.txt
	docs/design/part-block.txt
	docs/design/part-bufferlist.txt
	docs/design/part-caps.txt
	docs/design/part-element-transform.txt
	docs/design/part-events.txt
	docs/design/part-negotiation.txt
	gst/gstcaps.c
	gst/gstevent.h
	gst/gstghostpad.c
	gst/gstinterface.c
	gst/gstpad.c
	gst/gstpad.h
	gst/gstutils.c
	libs/gst/base/gstbasesink.c
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gstcapsfilter.c
	plugins/elements/gsttee.c
	tests/check/generic/sinks.c
	tools/gst-launch.1.in
2011-09-08 14:28:23 +02:00
Piotr Fusik 14f5518f3d docs, gst: typo fixes
https://bugzilla.gnome.org/show_bug.cgi?id=658449
2011-09-07 18:03:17 +01:00
Wim Taymans a952de69dd miniobject: change to GST_DEFINE_MINI_OBJECT_TYPE
Append _TYPE to the macro for consistency with other similar macros.
2011-08-29 17:06:18 +02:00
Wim Taymans f3b0d3cdbe init: add _get_type() functions
Remove gst_mini_object_register() and add a GST_DEFINE_MINI_OBJECT macro to
define a _get_type() function for the boxed miniobject.
Remove a bunch of custom _get_type() functions and replace them with the
miniobject macro.
Rename some _init method to _priv_*_initialize() like the rest of them.

Inspired by patch from Johan Dahlin and see bug #657603
2011-08-29 15:34:30 +02:00
Wim Taymans 4145598972 gst: add some _priv prefixes to private methods 2011-08-29 13:27:26 +02:00
Wim Taymans 8170c34c94 Merge branch 'master' into 0.11
Conflicts:
	gst/gstbuffer.h
	gst/gstcaps.c
	gst/gstcaps.h
	gst/gstevent.c
2011-08-22 12:33:35 +02:00
Wim Taymans 405a5d2a92 value: remove our FOURCC GType
Remove our custom fourcc GValue.
2011-08-22 12:19:19 +02:00
Tim-Philipp Müller 4985d2a954 caps: fix compiler warning reported by ICC
The MAX macro expands to code that checks if an unsigned integer is < 0.

Fixes warning #186: pointless comparison of unsigned integer reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:29 +01:00
Josep Torra d99d270a69 caps: define GST_CAPS_FLAGS_NONE for consistency with other enumerations
Use them to fix warnings when building with ICC.

API: GST_CAPS_FLAGS_NONE

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:29 +01:00
Wim Taymans 49fc4249e5 caps: add fixate function
Add a fixate function and use it in gstpad.c
2011-08-15 14:40:38 +02:00
Wim Taymans 314a2b961a caps: Hide implementation details
Make the Array of structures private. This should allow us to implement
the array more efficiently or with some preallocated structures when
we want to later.
Add a new method to clean up a static structure so that we can remove some code
that pokes into the private bits of the caps.
2011-06-22 12:28:14 +02:00