Commit graph

413 commits

Author SHA1 Message Date
Edward Hervey
ca2ba294d7 gstbuffer: Add transfer annotations for gst_buffer_join() 2011-10-14 09:35:09 +02:00
Tim-Philipp Müller
56e27b0546 utils: catch invalid instance sizes in gst_type_register_static_full()
Add guards to catch overly large instance sizes.

https://bugzilla.gnome.org/show_bug.cgi?id=660955
2011-10-10 19:41:33 +01:00
Tim-Philipp Müller
01c11ebf08 utils: remove gst_type_register_static_full()
It was only really used by GST_BOILERPLATE, and that is no more.

https://bugzilla.gnome.org/show_bug.cgi?id=660955
2011-10-10 19:30:34 +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
5cf8e68944 Merge branch 'master' into 0.11
Conflicts:
	gst/gstmessage.c
	gst/gstquery.c
	gst/gstregistrychunks.c
	gst/gstsegment.c
	libs/gst/base/gstbasetransform.c
	libs/gst/base/gstbasetransform.h
	libs/gst/base/gsttypefindhelper.c
	plugins/elements/gsttypefindelement.c
2011-08-26 14:37:54 +02:00
Josep Torra
b57683d258 utils: minor changes related to enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Tim-Philipp Müller
ef8ca3549e gst: fix awkward dest_format inout parameter in query utility functions
The idea was originally that if one passed &dest_fmt with
dest_fmt=GST_FORMAT_DEFAULT, then the code answering the query
could change dest_fmt to the actual default format used. However,
in more than half a decade of GStreamer 0.10 no piece of code in
GStreamer has ever used that feature, nor are there that many
users of this API that actually check whether the format returned
is the original format passed before using the values returned.
Also, it's just annoying-to-use API in its own right.

For all these reasons, make it so that the destination format is
passed directly and can't be changed by the element queried.
2011-07-28 11:23:15 +01:00
Wim Taymans
6da2a33b7a tags: Remove crazy tag messages
Don't mix messages and pads and tags.
Make the sink post tag messages when a tag event is received.
Since tags are sticky on pads now, they can be retrieved from there
when needed.
2011-06-22 16:16:56 +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
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
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
Tim-Philipp Müller
5a8273e527 Merge branch 'master' into 0.11 2011-06-05 15:48:51 +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
Wim Taymans
589499c07e utils: use g_printerr() as stated in the FIXME 2011-06-02 15:38:04 +02:00
Wim Taymans
8abc457a3b pad: implement pad block with probes 2011-06-01 19:39:16 +02:00
Wim Taymans
a5bbf7f369 utils: remove _full variants of probes
Remove the _full variants and add the destroy notify to the regular methods.
2011-06-01 19:39:11 +02:00
Wim Taymans
118e325a03 pad: remove pad cache
Remove the pad cache as this is going to be reworked for new pad blocking and
probes.
2011-05-26 17:08:03 +02:00
Sebastian Dröge
c7789694fb gst: Update for caps/pad template related API changes 2011-05-17 13:14:04 +02:00
Sebastian Dröge
3d2127f865 Revert "query: allow _make_writable on query handlers"
This reverts commit cf4fbc005c.

This change did not improve the situation for bindings because
queries are usually created, then directly passed to a function
and not stored elsewhere, and the writability problem with
miniobjects usually happens with buffers or caps instead.
2011-05-17 11:21:41 +02:00
Sebastian Dröge
3fa1594aaf gst: Add a filter caps parameter to all get_caps() functions
This is used to pass the possible caps and preferences to
the pad and to allow better negotiation decisions.
2011-05-16 15:33:10 +02:00
Wim Taymans
cf4fbc005c query: allow _make_writable on query handlers
Pass a GstQuery ** to the query handlers so that they can make the query
writable before using a setter on it.
Port code to new API.
2011-05-10 18:36:33 +02:00
Wim Taymans
22d64af104 tools: avoid using pad caps
Avoid directly accessing the pad caps, use gst_pad_get_current_caps() instead.
2011-05-09 10:54:10 +02:00
Wim Taymans
b35a700d3e pad: implement fixed caps with an object flag
Implement fixed caps with an object flag instead of a custom getcaps function.
2011-05-06 17:59:33 +02:00
Sebastian Dröge
98d1ee4a8f gst: Update everything for the new GstIterator API 2011-05-05 15:36:03 +02:00
Josep Torra
5ccda2f8f4 Small cosmetic cleanups
Make sure the return values from g_return_* are of the right type.
2011-04-25 11:10:47 +02:00
Wim Taymans
070cdaab7c Merge branch 'master' into 0.11 2011-04-25 10:30:41 +02:00
David Schleef
36fc7179cb minor inline documentation fix 2011-04-24 18:31:12 -07:00
Sebastian Dröge
f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Sebastian Dröge
bf6c3ea6df gst: Add some more gobject-introspection annotations 2011-04-14 16:14:01 +02:00
Sebastian Dröge
151b7264e8 utils: Fix caps leaks in gst_element_factory_can_accept_{any,all}_caps_in_direction() 2011-04-14 09:00:44 +02:00
Wim Taymans
d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02: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
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
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
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
Stefan Kost
5e35837402 utils: tell also what pad a pad is already linked against 2011-02-16 15:15:26 +02:00
Chen Rui
b164a8232a utils: return real error in compatible link check
We need to ensure we call gst_pad_check_link() with the two pads in the correct
order. The order depends on wheter we iterate src or sink pads.

Signed-off-by: Chen Rui <rui.chen@tieto.com>
2011-02-14 22:45:50 +02:00
Edward Hervey
04ebbc9f5a GstElement: Add a more flexible way to get request pads.
The new request_new_pad_full vmethod provides an additional caps field,
which allows elements to take better decision process.

Also, add a gst_element_request_pad() function to allow developers to be
able to specify which pad template they want a pad of.

Convert gstutils to use that new method instead of the old one when more
efficient.

This is useful for being able to request pads in a more flexible way,
especially when the element can provide pads whose caps depend on
runtime configuration and therefore can't provide pre-registered
pad templates.

API: GstElement::request_new_pad_full
API: gst_element_request_pad

https://bugzilla.gnome.org/show_bug.cgi?id=637300
2011-01-05 19:46:47 +01:00
Tim-Philipp Müller
8a7fc1d8c9 Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
This reverts commit 6aa8ca37ee.

See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00
Edward Hervey
3efb73c121 gst: documentation fixups and annotation
Reported by enabling the --warn-all option of g-ir-scanner
2010-12-17 19:14:41 +01:00
Tim-Philipp Müller
cc55b9772b utils: remove some dead code, GST_DEBUG_COLOR is never defined 2010-12-07 19:35:55 +00:00
Tim-Philipp Müller
7b0e3356eb utils: const-ify arguments to gst_object_default_error() 2010-12-07 19:35:24 +00:00
Tim-Philipp Müller
3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Wim Taymans
b2ab72b916 pad: remove get_caps_reffed variants
Make the _get_caps functions behave like the _get_caps_reffed variants and
remove the _reffed variants. This means that _get_caps doesn't return a writable
caps anymore and an explicit _make_writable() is needed before modifying the
caps.
2010-12-07 18:14:38 +01:00
Wim Taymans
993eda5004 remove deprecated symbols and methods 2010-12-06 19:18:31 +01:00
Edward Hervey
6aa8ca37ee micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers 2010-12-03 12:03:42 +01:00
Wim Taymans
d3630379da pad: clear pad cache when installing probes
Move the method to clear the pad cache into _private.h
Clear the pad cache when installing pad probes.
2010-12-03 11:28:52 +01:00
Wim Taymans
a0cb088284 utils: return immediately for -1 conversion
When we are asked to convert -1, we can return immediately with a -1 return
value.
2010-12-02 19:10:45 +01:00
Wim Taymans
e84d563033 utils: a convert query can have a -1 input value
It is allowed to pass -1 to the src_val for a convert.
2010-12-02 19:10:45 +01:00
Sebastian Dröge
c857047be7 utils: Fix inverted assertion logic in gst_util_fraction_compare() 2010-08-28 09:35:01 +02:00
Sebastian Dröge
8ca48752fb utils: Add gst_util_fraction_compare() to compare fractions
And use it for the fraction comparisons in gstvalue.c instead
of using comparisons by first converting the fractions to double.
Should fix bug #628174.

API: gst_util_fraction_compare()
2010-08-28 09:31:59 +02:00
Thiago Santos
706f0f657b element: link_many should activate pads if needed
gst_element_link_many does some magic and creates ghostpads
if needed, but it didn't set the newly created ghostpad to
active if needed. This patch fixes it.

https://bugzilla.gnome.org/show_bug.cgi?id=626784
2010-08-19 07:33:08 -03:00
Tim-Philipp Müller
18ecca6331 utils: speed up pad linking utility functions by not trying pads that will never work
In gst_element_get_compatible_pad(), when trying to find a compatible pad on an
element for a given pad, there's no point in checking the element's sink pads
if the pad to link is a sink pad as well, or the element's source pads if the
given pad is a source pad already, since those would never be able to link
anyway. Should speed up linking using the convenience functions a little bit,
or at least reduce debug log output.
2010-08-05 10:16:16 +01:00
Stefan Kost
8d9688f84c utils: better error logging in link_pads_filtered 2010-08-05 09:40:02 +03:00
Olivier Crête
37e2fb1054 gstutils: Make gst_pad_proxy_getcaps() return empty caps if it's what the other side has
gst_pad_proxy_getcaps() would return the pad template caps if the other side
returned empty caps or if the intersection of all the caps on the other side
was empty.

https://bugzilla.gnome.org/show_bug.cgi?id=624203
2010-08-05 01:14:18 +01:00
Edward Hervey
5b40ebbceb utils: Add more details about gst_element_get_compatible_pad 2010-07-16 15:30:22 +02:00
Stefan Kost
8df1fdab57 docs: improve the api docs for new GstPadLinkChecks and its use 2010-07-05 17:53:42 +03:00
Edward Hervey
5faf5620f3 gstutils: New gst_element_link_pads_full method
Links the elements with the specified pad linking checks.

API:gst_element_link_pads_full

https://bugzilla.gnome.org/show_bug.cgi?id=622504
2010-06-23 18:42:40 +02:00
Sebastian Dröge
2d5b1bbc1d utils: Use G_PARAM_STATIC_STRINGS for standard properties 2010-06-04 17:10:05 +02:00
Sebastian Dröge
beb24d05af utils: Simplify fractions before doing calculations that could cause overflows
... to prevent some unnecessary overflows from happenening.
2010-05-13 08:21:37 +02:00
Sebastian Dröge
ee21479eab utils: GCD is 0 if both parameters are 0, don't divide by zero
And turn overflow checks from assertions into simple checks to
return FALSE.
2010-05-13 08:01:14 +02:00
Sebastian Dröge
2c5d3d1761 utils: Simplify result of gst_fraction_multiply() 2010-05-13 08:01:14 +02:00
Wim Taymans
72c512a87d utils: use reffed _get_caps() version
We don't need to have a writable copy so we can use the _reffed
version instead.
2010-05-04 11:44:27 +02:00
Sebastian Dröge
fbbb671e54 utils: Handle iterator resyncs in gst_pad_proxy_setcaps()
Fixes bug #612881.
2010-03-15 14:52:40 +01:00
Edward Hervey
d60a3b8a59 gstreamer: remove unneeded casts
G_PARAM_SPEC_VALUE_TYPE does an expensive type check, whereas the
value_type field is a public field, so we can just use it directly.
2010-03-11 11:46:28 +01:00
Benjamin Otte
7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Jeremy Huddleston
fa0d218e4c utils: Use mulq instead of mul as some assemblers can't guess the size of the operands
Fixes bug #612370.
2010-03-10 07:17:07 +00:00
Stefan Kost
3c09381cef utils: defer getting the classes until we actualy need them
This function has a lot of early returns. Give them soem more benefit.
2010-01-10 21:49:25 +02:00
Stefan Kost
5fa9d942e3 utils: avoid extra hop in gst_element_link
No need to call gst_element_link_pads_filtered with filter=NULL, which would
call gst_element_link_pads() in that way. Call it directly to save a call and
expensive gobject type checks.
2010-01-10 21:44:34 +02:00
Sebastian Dröge
1c66f306d6 utils: Fix proxy_setcaps to only iterate pads of other direction 2009-12-08 16:40:57 +01:00
Wim Taymans
c6f2a94777 utils: fix proxy_getcaps
Make it return the padtemplate caps on errors and no parent.
Only intersect pads of the oposite direction of the source pad.
2009-12-08 16:30:51 +01:00
Sebastian Dröge
6bff920ba0 utils: Rename proxy iterator fold functions to have a more meaningful name 2009-12-08 16:24:20 +01:00
Sebastian Dröge
d6492c2958 utils: If one intersection gave empty caps don't continue iterating over the other pads 2009-12-08 16:09:02 +01:00
Stefan Kost
f43f2bf960 docs: fix more bogus xrefs 2009-11-27 14:18:38 +02:00
Stefan Kost
23da3639f0 docs: fix xrefs in docs
Fix typos in xrefs, links to non existing functions and rework plural forms.
2009-11-25 16:59:50 +02:00
Stefan Kost
7ff832d36e docs: fix gtk-doc syntax for doc-blob start 2009-11-25 14:18:14 +02:00
Sebastian Dröge
0ed24bc50e utils: API: Add multiplication and addition functions for fractions
gst_util_fraction_add()
gst_util_fraction_multiply()

These work on plain integers instead of GValues to
keep the overhead as low as possible.
2009-11-16 09:56:32 +01:00
Sebastian Dröge
e4257e8d5f gstutils: API: Add fraction helper functions
gst_util_greatest_common_divisor()
gst_util_double_to_fraction()
gst_util_fraction_to_double()

Using these instead of going over GValue has much lower overhead.

Also add float<->fraction transform functions for GValue.
2009-11-16 09:56:32 +01:00
Stefan Kost
4d17d331bf whitespace: remove blanks in doc-comment 2009-11-12 17:02:40 +02:00
Stefan Kost
f63ecd04a8 pad: rename new api from _refed to _reffed.
Due to popular demand rename the new api as we still can.
API: gst_pad_get_caps_reffed(), gst_pad_peer_get_caps_reffed()
2009-11-05 12:54:32 +02:00
Stefan Kost
fcc5d783df pad: add variants of gst_pad_get_caps() that don't copy caps. Fixes #590941
In most places in core and baseclasses we just need the caps to do caps-
intersections. In that case ref'ed caps are enough (no need to copy).
This patch also switches the code to use the new functions.
API: gst_pad_get_caps_refed(), gst_pad_peer_get_caps_refed()
2009-10-07 22:41:30 +03:00
Stefan Kost
201cbbdce0 pad: flip the G_UNLIKELY
Its likely that we have caps and unlikely (error) otherwise.
2009-10-07 11:12:57 +03:00
Stefan Kost
82526701f0 pad: don't intersect with any in proxy_pad_get_caps
We initialize the caps with any and if a pad has NULL caps, just skip it instead
of intersecting with any. Also add branch prediction here.
2009-10-07 10:59:54 +03:00
Stefan Kost
b1f88b3f1f docs: rename aggregator to adder in the docs. 2009-10-07 10:59:54 +03:00
Johan Bilien
920e9b569d introspection: Add annotations for gst_element_query_{duration,position}
Fixes bug #595511.
2009-10-07 07:18:04 +02:00
Sebastian Dröge
c4f76d5d22 utils: Add a comment to the scaling functions to explain why the rounding is correct 2009-09-09 18:38:29 +02:00
Sebastian Dröge
8d1aeeb2af utils: Use gcc's __uint128_t for 64bit unsigned integer scaling
This is available in newer gcc releases and it should only exist
on platforms that provide some native 128bit integer arithmetic
instructions.

The x86-64 assembly for this is still kept for non-gcc compilers
that don't provide __uint128_t magic.
2009-09-09 14:59:39 +02:00
Wim Taymans
b0c1ebbd08 utils: use 128bits division on x86_64 2009-08-31 11:45:17 +02:00
Wim Taymans
378b1e30e7 utils: use shift instead of division
We can use a shift for scaling the denominator instead of a divide since the
denom is always positive. This avoids having the compiler generate code for the
different rounding rules when scaling negative values.
2009-08-28 15:32:26 +02:00
Wim Taymans
6cf8948663 utils: make inlining explicit 2009-08-28 13:45:38 +02:00
Wim Taymans
d8911f269f utils: optimize for x86_64 with some inline asm
64bit x86 has native 64x64->128 bit multiply that we can use with some inline
assembler to speed up large multiplications.
Use bsr to find the number of leading zeros more efficiently.
2009-08-28 12:43:43 +02:00
Wim Taymans
0ef7a5af52 utils: factor out the leading zero count code 2009-08-28 12:33:37 +02:00
Wim Taymans
2b8d7a54cc utils: pass correction factor around
Pass the correction factor around to get rid of the enum, some code
and some branches.
2009-08-28 12:30:41 +02:00
Wim Taymans
75e8e9eb42 utils: whitespace fixes 2009-08-28 12:21:28 +02:00
Wim Taymans
2b66b29355 utils: move common correction code in a macro 2009-08-28 12:19:34 +02:00
Kipp Cannon
9cfd9f9374 gstutils: API: Add rounding to nearest and next integer versions of the 64 bit integer scaling functions
The new functions are
gst_util_uint64_scale_int_round()
gst_util_uint64_scale_int_ceil()
gst_util_uint64_scale_round()
gst_util_uint64_scale_ceil()

Fixes bug #590919.
2009-08-13 16:32:28 +02:00
Kipp Cannon
61481c1b79 gstutils: Revert parts of last change to optimize the scaling functions again
Partially fixes bug #590919.
2009-08-13 16:32:28 +02:00
Sebastian Dröge
6a84be95be gstutils: Fix violations of strict-aliasing rules in gst_util_uint64_scale() 2009-08-13 16:32:27 +02:00
Kipp Cannon
3d359729af gstutils: Refactor gst_util_uint64_scale()
This will later make it possible to provide rounding versions
of it without much code duplication.

Partially fixes bug #590919.
2009-08-13 16:32:27 +02:00
Stefan Kost
50fbc34f3f utils: use new _caps_can_intersect() 2009-08-06 15:30:34 +03:00
Tim-Philipp Müller
470e561216 gstxml: fix (de)serialisation of properties of type GstStructure
souphttpsrc has a property of type GstStructure, which causes an
assertion when serialising it to xml. Fixes #585137.
2009-06-16 08:55:17 +01:00
Tim-Philipp Müller
f44204c8fa utils: gst_util_uint64_scale*() micro-optimisations
Sprinkle G_LIKELY/G_UNLIKELY; add inlined _scale_int_unchecked()
so we don't do some checks twice when calling it from _scale().
2009-06-08 17:13:17 +01:00
Sebastian Dröge
4e8f547f98 API: Add gst_message_{new,parse}_tag_full() to get/set the source pad
Fixes bug #582588.
2009-05-27 14:32:51 +02:00
Sebastian Dröge
db6f445620 Revert "element: Set the originating pad as message source in gst_element_found_tags_for_pad ()"
This reverts commit bebfde7502.

This change shouldn't be done in a stable release series as
applications are actually expecting the sender to be an
GstElement. One example is totem.
2009-05-27 14:06:13 +02:00
Sebastian Dröge
bebfde7502 element: Set the originating pad as message source in gst_element_found_tags_for_pad ()
Fixes bug #582588.
2009-05-14 12:25:20 +02:00
Jan Schmidt
d50044dc2f docs: remove errant gtk-doc comment marker triggering a warning 2009-04-16 00:48:12 +01:00
Stefan Kost
c9917a1a84 tests: remove the hacks to workaround the pad-leak 2009-04-08 17:49:18 +03:00
Wim Taymans
1bd7f96497 gstutils: improve property set and convert code
Use string deserialisation instead of custom parsing code to allow for all
supported ways of specifying property values.
fixes #576582.
2009-03-24 19:33:56 +01:00
Zeeshan Ali (Khattak)
8af9d58ea7 gstpad: fix gst_pad_can_link()
Move the gst_pad_can_link() implementation from gstutils to gstpad and use
gst_pad_link_prepare() to make it work correctly and also check the caps.

Make the broken implementation in gstutils static.

Small cleanups in the _get_fixed_caps() function.

Fixes #575682.
2009-03-18 17:01:16 +01:00
Sebastian Dröge
3c6448c64e API: Add gst_util_array_binary_search() for binary searchs on a sorted array
This will be mostly useful in all elements that have some kind of internal
seek/index table. Currently almost all of them (or even all of them)
are using a linear search although the used array is already sorted,
wasting some CPU time without good reason.

Fixes bug #573623.
2009-03-02 16:17:45 +01:00
Stefan Kost
09eb9d797d leak: don't return without calling va_end 2009-02-04 15:41:24 +02:00
Stefan Kost
24635e7f5a Add more debug logging for failure cases. 2009-01-25 22:17:31 +02:00
Edward Hervey
334ad4c328 gst/: Assign debug statements to relevant categories instead of the 'default' category so they don't get lost in debu...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_message_full),
(gst_element_pads_activate):
* gst/gstobject.c: (gst_object_dispatch_properties_changed):
* gst/gstutils.c: (gst_pad_proxy_getcaps), (gst_pad_proxy_setcaps),
(gst_pad_add_data_probe_full), (gst_pad_add_event_probe_full),
(gst_pad_add_buffer_probe_full), (gst_pad_remove_data_probe),
(gst_pad_remove_event_probe), (gst_pad_remove_buffer_probe):
Assign debug statements to relevant categories instead of the 'default'
category so they don't get lost in debugging.
2009-01-03 18:10:08 +00:00
Stefan Kost
7dd8b92448 gst/gstdebugutils.c: Add some ideas, how to make the graph smaller.
Original commit message from CVS:
* gst/gstdebugutils.c:
Add some ideas, how to make the graph smaller.
* gst/gstutils.c:
Add a comment from a debug session.
* libs/gst/base/gstbasetransform.c:
Log more context.
* libs/gst/controller/gstinterpolationcontrolsource.c:
Indet.
* plugins/elements/gstcapsfilter.c:
Fix typo in docs.
2009-01-01 21:27:06 +00:00
Sebastian Dröge
33239dded7 gst/gstutils.c: Add FIXME for 0.11 to set the pad as message source and not the element. Otherwise it's impossible to...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_found_tags_for_pad):
Add FIXME for 0.11 to set the pad as message source and not
the element. Otherwise it's impossible to detect for which
pad the tags were found without adding an event probe
or something similar to the pad.
2008-12-17 09:37:47 +00:00
Sebastian Dröge
4a19260c75 gst/gstutils.c: Fix a caps memory leak introduced by the last change.
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Fix a caps memory leak introduced by the last change.
2008-12-09 16:23:58 +00:00
Sebastian Dröge
629b2a910b gst/gstutils.c: Check if the caps of the pads are compatible before returning a pad and claiming it is compatible. Th...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Check if the caps of the pads are compatible before returning
a pad and claiming it is compatible. This, among other things,
fixes a bug with gst-launch where an incompatible pad is chosen
and linking fails. Fixes bug #544003.
2008-12-09 15:45:36 +00:00
Andy Wingo
1f1d642981 gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.

Also add API: to previous changelog entry.
2008-11-04 13:56:37 +00:00
Andy Wingo
5f5fbbdd7d Add sequence numbers to events and messages. See #559250.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

Add sequence numbers to events and messages. See #559250.

* gst/gstutils.c (gst_util_seqnum_next, gst_util_seqnum_compare):
New functions.

* gst/gstevent.h:
* gst/gstevent.c (_gst_event_copy, gst_event_new): Initialize new
events with a new sequence number, and copy it when copying.
(gst_event_get_seqnum, gst_event_set_seqnum): Accessors for an
event's sequence number.

* gst/gstmessage.h:
* gst/gstmessage.c (_gst_message_copy, gst_message_new_custom):
(gst_event_get_seqnum, gst_event_set_seqnum): As with events, so
with messages.

* docs/gst/gstreamer-sections.txt: Add new functions to the docs.
2008-11-04 12:22:53 +00:00
Stefan Kost
5b29f0a1cc gst/gstpreset.c: Use g_unlink instead of unlink.
Original commit message from CVS:
* gst/gstpreset.c:
Use g_unlink instead of unlink.
* gst/gststructure.c:
Use glib type.
* gst/gstutils.c:
Add a FIXME:.
* gst/gsttaglist.c:
* gst/gsttypefind.c:
* gst/gstvalue.c:
Formatting & whitespaces.
2008-10-31 14:24:49 +00:00
Edward Hervey
dd80b2030c Fix all leaks due to the bug in gst_pad_template_new() by which it does not steal the refcount of the given caps as s...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpad.c: (name_is_valid), (GST_START_TEST):
Fix all leaks due to the bug in gst_pad_template_new() by which it does
not steal the refcount of the given caps as stated.
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
2008-08-30 11:55:59 +00:00
David Schleef
34087e8b17 gst/gstutils.c: Remove check in gst_pad_query_convert() that src_val must be positive, because that's not a requirement.
Original commit message from CVS:
* gst/gstutils.c: Remove check in gst_pad_query_convert() that
src_val must be positive, because that's not a requirement.
This causes problems with converting negative granulepos
values for Dirac.
2008-08-27 02:59:59 +00:00
Murray Cumming
976b9750ea gst/gstutils.c: Mention that this is just like gst_buffer_merge() but with extra unreffing for C coders. Advise langu...
Original commit message from CVS:
patch by: Murray Cumming <murrayc@murrayc.com>
* gst/gstutils.c:
Mention that this is just like gst_buffer_merge() but with extra
unreffing for C coders. Advise language bindings not to wrap it.
Fixes Bug #533856.
Also fix file comment.
2008-08-20 07:22:11 +00:00
Tim-Philipp Müller
b05a18fcfc API: add gst_bin_find_unlinked_pad()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.c: (element_find_unlinked_pad),
(gst_bin_find_unlinked_pad), (gst_bin_find_unconnected_pad),
* gst/gstutils.h:
API: add gst_bin_find_unlinked_pad()
API: deprecate gst_bin_find_unconnected_pad() (#401456)
2008-05-27 10:50:49 +00:00
Tim-Philipp Müller
aed9ed88ac gst/: 'unconnected pad' -> 'unlinked pad' for consistency (#401456).
Original commit message from CVS:
* gst/gstpad.h:
* gst/gstutils.c: (gst_element_unlink), (element_find_unlinked_pad),
(gst_bin_find_unconnected_pad), (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
'unconnected pad' -> 'unlinked pad' for consistency (#401456).
2008-05-25 16:34:32 +00:00
Tim-Philipp Müller
ebc08ddfb9 API: gst_parse_launch_full()
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gst.c: (init_post):
* gst/gst_private.h: (_GstParseContext):
* gst/gstparse.c: (gst_parse_error_quark), (gst_parse_context_new),
(gst_parse_context_free), (gst_parse_context_get_missing_elements),
(gst_parse_launchv), (gst_parse_launchv_full), (gst_parse_launch),
(gst_parse_launch_full):
* gst/gstparse.h: (GST_PARSE_FLAG_NONE), (GST_PARSE_FLAG_FATAL_ERRORS),
(GstParseFlags), (GstParseContext):
* gst/gstutils.c: (gst_parse_bin_from_description),
(gst_parse_bin_from_description_full):
* gst/gstutils.h:
* gst/parse/grammar.y:
* gst/parse/types.h:
* win32/common/libgstreamer.def:
Add new gst_parse_*_full API (#528178):
API: gst_parse_launch_full()
API: gst_parse_launchv_full()
API: gst_parse_bin_from_description_full()
API: gst_parse_context_new()
API: gst_parse_context_free()
API: gst_parse_context_get_missing_elements()
2008-05-24 15:33:53 +00:00
Tim-Philipp Müller
479a58ebfe gst/: More guards against bad input; typo fix; some minor clean-ups.
Original commit message from CVS:
* gst/gstparse.c: (_gst_parse_escape), (gst_parse_launchv):
* gst/gstutils.c: (gst_parse_bin_from_description):
* gst/parse/grammar.y: (graph):
More guards against bad input; typo fix; some minor clean-ups.
2008-05-22 15:38:54 +00:00
Wim Taymans
cc8334905c Don't use gst_element_get_pad().
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_load_and_link):
* gst/gstutils.c: (gst_element_link_pads),
(gst_element_unlink_pads):
* libs/gst/check/gstcheck.c: (gst_check_setup_src_pad),
(gst_check_teardown_src_pad), (gst_check_setup_sink_pad),
(gst_check_teardown_sink_pad),
(gst_check_element_push_buffer_list):
* tests/check/elements/fakesink.c: (GST_START_TEST):
* tests/check/elements/filesink.c:
* tests/check/elements/filesrc.c: (GST_START_TEST):
* tests/check/elements/multiqueue.c: (setup_multiqueue),
(mq_sinkpad_to_srcpad):
* tests/check/elements/tee.c: (GST_START_TEST):
* tests/check/generic/sinks.c: (GST_START_TEST):
* tests/check/gst/gstbin.c: (GST_START_TEST):
* tests/check/gst/gstevent.c: (GST_START_TEST):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpipeline.c: (GST_START_TEST):
* tests/check/gst/gstquery.c: (GST_START_TEST):
* tests/check/gst/gstutils.c: (GST_START_TEST):
* tests/check/libs/basesrc.c: (GST_START_TEST):
* tests/check/pipelines/parse-launch.c: (run_delayed_test),
(gst_parse_test_element_change_state):
Don't use gst_element_get_pad().
2008-05-21 15:57:52 +00:00
Stefan Kost
f6b8cf77d9 gst/gstinfo.c: Explain why we copy the list.
Original commit message from CVS:
* gst/gstinfo.c:
Explain why we copy the list.
* gst/gstpipeline.c:
Improve docs.
* gst/gstutils.c:
Add one debug-log statement to help tracing probelms with linking pads.
2008-05-14 18:17:34 +00:00
Sebastian Dröge
1479f03d7f gst/gstutils.c: Use g_atomic_int_set() here too instead of assignment + g_atomic_int_get().
Original commit message from CVS:
* gst/gstutils.c: (gst_atomic_int_set):
Use g_atomic_int_set() here too instead of assignment +
g_atomic_int_get().
2008-04-17 08:34:14 +00:00
Sebastian Dröge
3e914a83b3 gst/gstutils.*: API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used now that we depend on new enou...
Original commit message from CVS:
* gst/gstutils.c:
* gst/gstutils.h:
API: Deprecate gst_atomic_int_set(), g_atomic_int_set() should be used
now that we depend on new enough GLib.
* gst/gstcaps.c: (gst_static_caps_get):
* gst/gstclock.c: (gst_clock_entry_new):
* gst/gstinfo.c: (_gst_debug_init), (gst_debug_set_colored),
(gst_debug_set_default_threshold), (_gst_debug_category_new),
(gst_debug_category_set_threshold):
* libs/gst/base/gstbasesink.c: (gst_base_sink_init),
(gst_base_sink_set_qos_enabled):
* libs/gst/net/gstnettimeprovider.c:
(gst_net_time_provider_set_property):
Use g_atomic_int_set() instead of gst_atomic_int_set().
2008-04-17 07:14:46 +00:00
José Alburquerque
f273ee8c4b Add gst_pad_add_*_probe_full() functions with a notify callback that lets the caller free the data it passes to the p...
Original commit message from CVS:
Based on patch by: José Alburquerque <jaalburqu at svn dot gnome dot org>
* gst/gstutils.c: (gst_pad_add_data_probe),
(gst_pad_add_data_probe_full), (gst_pad_add_event_probe),
(gst_pad_add_event_probe_full), (gst_pad_add_buffer_probe),
(gst_pad_add_buffer_probe_full):
* gst/gstutils.h:
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstreamer.def:
Add gst_pad_add_*_probe_full() functions with a notify callback that
lets the caller free the data it passes to the probe functions. This
is useful for bindings such as gst-python or gstreamermm (#526814).
API: gst_pad_add_data_probe_full
API: gst_pad_add_buffer_probe_full
API: gst_pad_add_event_probe_full
* tests/check/gst/gstutils.c:
Add minimal unit test to make sure freeing the data actually works
as expected.
* tests/benchmarks/.cvsignore:
Random cvsignore addendum.
2008-04-10 20:46:51 +00:00
Stefan Kost
502337a510 gst/gstconfig.h.in: Add 'id' for example.
Original commit message from CVS:
* gst/gstconfig.h.in:
Add 'id' for example.
* gst/gstpad.c:
* gst/gstutils.c:
* plugins/elements/gstfdsink.c:
Link to signals. Doc and comment fixes.
2008-02-06 12:21:05 +00:00
Thijs Vermeir
c595a566d9 gst/gstutils.c: Check if caps are not NULL (fix bug #510194)
Original commit message from CVS:
* gst/gstutils.c:
Check if caps are not NULL (fix bug #510194)
2008-02-01 11:27:32 +00:00
Jan Schmidt
410af4fe50 gst/gstutils.c: Check if caps are not NULL (fix bug #510194)
Original commit message from CVS:
* gst/gstutils.c:
Check if caps are not NULL (fix bug #510194)
2008-01-30 13:12:24 +00:00
Thijs Vermeir
127256b59a gst/gstutils.c: Check if caps are not NULL (fix bug #510194)
Original commit message from CVS:
* gst/gstutils.c:
Check if caps are not NULL (fix bug #510194)
2008-01-30 12:55:42 +00:00
Cygwin Ports maintainer
d0bc121de5 gst/gstutils.c: Fix compilation on systems that have posix timers but no monotonic clock.
Original commit message from CVS:
* gst/gstutils.c:
Fix compilation on systems that have posix timers but no
monotonic clock.
Fixes: #512715
Patch By: Cygwin Ports maintainer <yselkowitz at users dot sourceforge
dot net>
2008-01-30 12:44:13 +00:00
Tim-Philipp Müller
5cb869bfdf gst/: Bunch of gratuitous nano-optimisations.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_to_string):
* gst/gstinfo.c: (gst_debug_construct_term_color):
* gst/gstparse.c: (gst_parse_launchv):
* gst/gstutils.c: (gst_util_dump_mem):
* gst/gstvalue.c: (gst_value_serialize_any_list),
(gst_value_transform_any_list_string):
Bunch of gratuitous nano-optimisations.
2007-12-28 14:15:53 +00:00
Tim-Philipp Müller
988e0b2da8 gst/gstutils.c: Fix possible compiler warning (#503417).
Original commit message from CVS:
* gst/gstutils.c: (element_find_unconnected_pad):
Fix possible compiler warning (#503417).
2007-12-13 13:59:04 +00:00
Stefan Kost
12f0269d48 gst/gstutils.c: Add mising "Since:" to docs.
Original commit message from CVS:
* gst/gstutils.c:
Add mising "Since:" to docs.
2007-12-12 06:58:56 +00:00
Stefan Kost
321db79821 gst/gstutils.*: Actually its not PURE as it gets the time from elsewhere.
Original commit message from CVS:
* gst/gstutils.c:
* gst/gstutils.h:
Actually its not PURE as it gets the time from elsewhere.
2007-12-11 20:32:29 +00:00
Stefan Kost
428a4e9669 Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all uses as we don't have HAVE_POSIX_TIMERS in publi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstclock.h:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
* gst/gstutils.c:
* gst/gstutils.h:
* libs/gst/base/gstbasesink.c:
* tools/gst-launch.c:
Change GST_GET_TIMESTAMP into gst_util_get_timestamp and replace all
uses as we don't have HAVE_POSIX_TIMERS in public headers.
Thanks Tim for spotting.
2007-12-11 20:23:58 +00:00
Wim Taymans
da899be6d5 gst/gstutils.c: Clarify gst_element_get_compatible_pad() documentation.
Original commit message from CVS:
* gst/gstutils.c:
Clarify gst_element_get_compatible_pad() documentation.
Fixes #500919.
2007-12-03 11:04:09 +00:00