Commit graph

324 commits

Author SHA1 Message Date
Edward Hervey 60be53fabf gstvalue: Remove useless assignment 2012-02-17 15:11:38 -08:00
Edward Hervey 963267643e gstvalue: Gracefully handle NULL Gvalue
Avoids unreferencing NULL pointer
2012-02-17 15:11:38 -08:00
Wim Taymans 39c5f0b28a don't do logic in g_assert... 2012-01-31 12:10:21 +01:00
Olivier Crête e234a10c63 Use macros to register boxed types thread safely 2012-01-28 16:42:38 +00:00
Wim Taymans a521252845 Add new GstMapInfo
Use a structure to hold info about the mapping. The application then keeps track
of this state and we can use it to unmap the memory again later.
2012-01-25 11:54:23 +01:00
Vincent Penquerc'h fc1fab8a15 gstvalue: handle NULL dest in bitmask/bitmask intersection 2012-01-24 14:40:33 +00:00
Vincent Penquerc'h 39533f4364 gstvalue: add stepped ranges
int and int64 ranges can now have an optional step (defaulting to 1).
Members of the range are those values within the min and max bounds
which are a multiple of this step.

https://bugzilla.gnome.org/show_bug.cgi?id=665294
2012-01-24 12:11:44 +00:00
Vincent Penquerc'h b6abb9794c gstvalue: enforce identical basic types in lists, arrays
https://bugzilla.gnome.org/show_bug.cgi?id=322587
2012-01-24 12:11:44 +00: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
Edward Hervey 77506a82b0 gstvalue: Allow NULL dest when subtracting bitmask
Happens when checking for subsets of caps
2012-01-06 15:01:24 +01:00
Sebastian Dröge 4294b88e35 value: Add 64-bit bitmask type 2012-01-05 10:24:14 +01:00
Edward Hervey e136cc334f Merge remote-tracking branch 'origin/master' into 0.11 2011-12-29 16:49:39 +01:00
Tim-Philipp Müller ee7f9f4228 value: micro-optimisation: avoid some unnecessary g_value_unset()
We know there's nothing to do here and can save us the function
calls and GValueTable lookups.
2011-12-26 11:27:07 +00:00
Wim Taymans a22c2716cd Merge branch 'master' into 0.11 2011-11-09 12:03:28 +01:00
Vincent Penquerc'h d9e5c529ba gstvalue: consider lists and ranges equal if they hold the same set
This fixes caps operations when different elements advertise some
of their caps' properties differently (eg, for audio channels, either
a range from 1 to 2, or a list of 1 and 2).

https://bugzilla.gnome.org/show_bug.cgi?id=663643
2011-11-09 11:24:55 +01: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 b37d06aed8 gstvalue: quicker version of intersection when we do not need the result
https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:17:19 +00:00
Vincent Penquerc'h 29c97fe780 gstvalue: quicker test for substraction emptiness
When we do not care about the actual resulting set,
but only whether it is empty of not, we can skip a fair bit
of GValue juggling.

Add a function that does so, since we cannot just pass NULL
to the existing API as it may be part of the API contract.

https://bugzilla.gnome.org/show_bug.cgi?id=662777
2011-11-07 15:16:52 +00:00
Johan Dahlin 9200776841 introspection: Skip GType and GValue transform apis
These do not make sense to expose to language bindings

https://bugzilla.gnome.org/show_bug.cgi?id=657640
2011-10-19 10:24:11 +02:00
Edward Hervey 917bfc5df7 gst: More 'transfer' annotations 2011-10-11 13:51:37 +02: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 4145598972 gst: add some _priv prefixes to private methods 2011-08-29 13:27:26 +02: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 b26c5b99f2 value: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:14 +02:00
Wim Taymans 405a5d2a92 value: remove our FOURCC GType
Remove our custom fourcc GValue.
2011-08-22 12:19:19 +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 e2b6e88d5f value: add function to fixate a value
Add a function to fixate a GValue. This is the same function as is in GstPad.
2011-06-02 13:21:55 +02:00
Wim Taymans 272b3263aa Merge branch 'master' into 0.11
Conflicts:
	plugins/elements/gstoutputselector.c
2011-06-01 19:47:10 +02:00
Sebastian Dröge 0a80b57d74 value: Consider "1" and "{1}" as equal in gst_value_compare()
Previously this was only done in the is_subset() check but
having it only there brings us into definition-hell where
"1" and "{1}" are subset of each other but not equal.
2011-05-30 11:33:57 +02:00
Sebastian Dröge 98d1ee4a8f gst: Update everything for the new GstIterator API 2011-05-05 15:36:03 +02:00
Wim Taymans d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Wim Taymans 6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +01: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
Tim-Philipp Müller ee5b369ffd gstvalue: make new gst_value_list_merge() work properly
Fix freeing of partially-inited list value when both values
passed are equal and we want to return a single non-list
value as result. Fixes unit test. Also fix up docs a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=637776
2011-01-03 15:57:20 +00:00
Stefan Kost 373be6f14e tags: don't produce duplicated entries when merging same value twice
Add a variant of gst_value_list_concat() that skips duplicates and use that when
merging taglists.

API: gst_value_list_merge()
2011-01-02 22:35:08 +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
Tim-Philipp Müller 5b25761f29 docs: add some gtk-doc Since: markers
Add some gtk-doc Since: markers, fix one Since: marker,
fix typo.
2010-10-16 16:53:49 +01:00
Thiago Santos e9312870e5 datetime: Use seconds as double
Use seconds as double to make API similar to glib's
gdatetime. Also move timezone parameter to the
first position, just like glib's.

https://bugzilla.gnome.org/show_bug.cgi?id=628408
2010-10-13 11:48:57 -03:00
Thiago Santos dd53349ad2 gstdatetime: Fix string serialization
Correctly serialize tzoffset as a gstvalue
2010-09-27 20:41:52 -03:00
Philippe Normand b2e6379be8 gstvalue: Add new GstInt64Range type
new GstInt64Range to store gint64 ranges.

API: GST_TYPE_INT64_RANGE
API: gst_value_set_int64_range
API: gst_value_get_int64_range_min
API: gst_value_get_int64_range_max

Fixes bug #627826.
2010-09-01 11:07:37 +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
Shixin Zeng d41997040b gst: make _get_type() in gst/* thread safe
This is not really necessary here because everything is
initialized from gst_init() already but using G_DEFINE_TYPE()
removes some copy&paste boilerplate code.
2010-08-06 19:35:59 +02:00
Thiago Santos b4870282cb gstvalue: Adds datetime functions
Adds a datetime functions to gstvalue

Fixes #594504
2010-07-26 11:57:50 -03:00
Edward Hervey 27410f3934 gstvalue: Improve gst_value_{set|get}_caps docs 2010-07-06 11:18:32 +02:00
Sebastian Dröge 4d8320e4c6 gstvalue: Add some more assertions and checks for valid input parameters 2010-06-14 15:45:11 +02:00
Sebastian Dröge 603c04f4fa gstvalue: Don't initialize arrays from variables 2010-06-14 08:18:00 +02:00
Sebastian Dröge 48438b6cc7 gstvalue: Add some assertion guards against invalid parameters to public API 2010-06-13 18:00:22 +02:00
Martin Bisson ab0763f0e8 value: Fixed serialization for short fourccs.
"Y16 " and "Y8  " were not displayed properly because the space
character is not alnum.  A unit test is also included.

Fixes bug #621282.
2010-06-12 08:07:34 +02:00
Stefan Kost ad619a4e84 value: use glib types in more places
Do a bunch of char -> gchar, int -> gint, double -> gdouble changes.
2010-06-07 12:22:44 +03:00
Stefan Kost c95a85f6cf value: just compute strlen() once 2010-06-07 12:22:44 +03:00
Martin Bisson 28fdbee35a value: Add support for parsing short fourccs from strings
For example "Y16 " and "Y8  ".
2010-06-07 08:21:00 +02:00
Benjamin Otte a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Benjamin Otte ec10b764b9 caps: Fail when fractions are followed by random text
Previous code treated "1/1yourmom" the same as "1/1" and "1wimsmom" the
same as "1". Now the code is stricter and will fail to convert a
fraction when followed by garbage text.
2010-03-09 19:18:21 +01:00
Benjamin Otte 4743e62be8 caps: Allow 1/max as the minimal fraction value > 0
This is useful for formats that require a valid framerate (like
theoraenc).
2010-03-08 22:26:34 +01:00
Edward Hervey a5626f239a gstvalue: Use fast gst_value_list_{size|get_value} macro accessors
gst_value_list_size and gst_value_list_get_value will do a series of
extra checks due to being public methods.
When we use them from within gstvalue.c we can directly use them without
the extra checks.
2009-12-07 09:51:04 +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
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 cfb4aa4627 build: sprintf, sscanf need stdio.h 2009-10-07 10:59:54 +03:00
Benjamin Otte fceba1d6fe docs: Fix typo in gst_value_union() 2009-09-07 16:16:19 +02:00
Stefan Kost f18bee2d8a value: add explanation for shortcut 2009-07-14 12:15:05 +03:00
Stefan Kost c686053aac value: fix can_intersect to behave like intersect
Add a quick return if two types are the same. Change the check for the
intersection function to be the same as the one used in intersect(). The
later tries both directions.
2009-07-14 08:32:23 +02:00
Jan Schmidt 7bf3554228 structure: Change NULL and empty string handling
Don't forbid the empty string "" in generic structures, only in taglists.
Properly allow the NULL string by adding special cases for serialising
and deserialising it. prop1=(string)NULL is the NULL string,
prop1=(string)"NULL" is the actual string with the value "NULL"
2009-07-13 18:28:37 +01:00
Edward Hervey 923913984e Use local variables in for/while loops.
This makes the generated code faster since:
* It won't have to read an undirect value (which will most likely be
 outside of the L1/L2 cache)
* We know that value never changes (the compiler has no clue that it doesn't).
2009-06-30 16:29:50 +02:00
Tim-Philipp Müller 4530151ad2 gstvalue: more efficient value table lookup for fundamental types
Small micro-optimisation: look up value table for fundamental types
via an array dedicated to fundamental types instead of going through
a hash table lookup. Since there can be only 255 fundamental types,
the table size/efficiency trade-off should be acceptable, esp. since
the most commonly-used types are all fundamental types. The size of
the table could probably be minimised further if needed by allocating
the table dynamically and only expanding it on demand.
2009-06-11 19:02:40 +01:00
Tim-Philipp Müller e8bfd88f26 gstvalue: don't put GTypes into int variables
GTypes are not ints and as such are not guaranteed to fit into an int
(with the exception of fundamental types), so we really shouldn't put
them into int variables. Even if a rather unlikely obscure corner case,
this has actually been a problem at some point in the past, see commit
99f16655f4.
2009-06-11 18:48:50 +01:00
Tim-Philipp Müller 998b2392d3 Remove double semicolons at end of line 2009-06-08 17:13:17 +01:00
Wim Taymans 1769cc7297 gstvalue: remove type checks and redundant code 2009-06-07 17:32:35 +02:00
Wim Taymans 19f98d6418 value: fix fraction range lcopy function
This function seems to be broken for 3.5 years. Luckily nobody ever tried to
make a fraction range object property...
2009-06-07 15:43:57 +02:00
Wim Taymans 65f9b38138 gstvalue: performance improvements
Add a GType->GstValueTable hashtable mapping.
Avoid _get_type() multiple times when we can.
Use GSlice for fraction range dynamic memory
Add G_LIKELY when we can
Improve lookup of the value table using the hashtable
2009-06-07 15:35:12 +02:00
Jan Schmidt 766e7afc23 gststructure: Fix some memory leaks. Sprinkle G_LIKELY/UNLIKELY
Fix some memory leaks shown by the new serialisation/deserialisation unit
test. Split the gst_string_wrap function in gstvalue.c into components and
use them to make gst_string_take_and_wrap, which takes ownership of the
string, avoiding a strdup.

Add some G_LIKELY/UNLIKELY, and clean up some leaks in error paths.
2009-06-05 21:00:43 +01:00
Stefan Kost 47d9904eba structure: fix serialisation of nested structures.
Use string_warp/unwrap to escape delimiters, otherwise deserialisation fails.
Also move GST_ASCII_IS_STRING to private header to avoid keeping it in sync.
Also use '\0' when terminating a string for better readability.
2009-06-02 18:39:17 +03:00
Edward Hervey 971755842d Remove unused increments as detect by LLVM's CLang static analyzer. 2009-04-03 12:56:57 +02:00
Stefan Kost d27aea0391 gst/gstvalue.c: Don't crash if either of the string GValues is empty.
Original commit message from CVS:
* gst/gstvalue.c:
Don't crash if either of the string GValues is empty.
2008-11-17 21:25:39 +00:00
Wim Taymans 7f987200b5 gst/gstvalue.c: Reorganize some more, be more conservative with the GST_TYPE_ARRAY not being fixed and inline the tri...
Original commit message from CVS:
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
Reorganize some more, be more conservative with the GST_TYPE_ARRAY not
being fixed and inline the trivial check.
2008-11-06 15:37:16 +00:00
Wim Taymans 18aeb9a41e gst/gstcaps.c: Callgrind micro optimisations.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_copy), (_gst_caps_free),
(gst_caps_merge_structure), (gst_caps_get_structure),
(gst_caps_copy_nth), (gst_caps_set_simple),
(gst_caps_set_simple_valist), (gst_caps_is_fixed),
(gst_caps_is_equal_fixed), (gst_caps_intersect),
(gst_caps_subtract), (gst_caps_normalize), (gst_caps_do_simplify),
(gst_caps_to_string):
Callgrind micro optimisations.
Avoid array bounds checks and force inline of trivial function.
* gst/gstobject.c: (gst_object_set_name_default):
-1 is equivalent to letting glib to the strlen but then there is more
room for optimisations and it's not our fault.
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
no need to clear the array, we're cool.
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
The most common _is_fixed() check is done on fundamental glib base
types so we check this first instead of doing a huge amount of
useless GST_TYPE_ARRAY calls.
2008-11-06 15:09:34 +00:00
Wim Taymans 209c57085c gst/gststructure.c: No need to memset, we can clear the value ourselves.
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
No need to memset, we can clear the value ourselves.
* gst/gstvalue.c: (gst_type_is_fixed),
(gst_value_get_compare_func):
Some optimisations from a few callgrind sessions:
When checking if a type is fixed, check for trivial fundamental types
first before checking types for which we need to get the type followed
by the heavy duty type checks, this reduces the amount of
g_type_fundamental() calls a lot.
When getting the compare function, first check for our registered types.
If that fails, do the heavy duty g_type_is_a() checks, reduces the
amount of g_type_is_a() considerably.
2008-11-05 16:57:35 +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
Sebastian Dröge 14983d1810 gst/gstvalue.c: Fix typos.
Original commit message from CVS:
* gst/gstvalue.c:
Fix typos.
2008-07-22 09:24:37 +00:00
Wim Taymans 5b5be74fc5 gst/: Fix 2 caps leaks.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_caps):
* gst/parse/grammar.y:
Fix 2 caps leaks.
2008-04-17 08:45:19 +00:00
Stefan Kost 4a638e29d9 Add GST_PARAM_CONTROLLABLE and GST_PARAM_USER_SHIFT. Move paramspec docs to own section.
Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* gst/gstparamspecs.c:
* gst/gstparamspecs.h:
Add GST_PARAM_CONTROLLABLE and GST_PARAM_USER_SHIFT. Move paramspec
docs to own section.
* gst/gstvalue.c:
This now only documents GValue.
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/controller/gstcontroller.h:
Remove GST_PARAM_CONTROLLABLE.
2008-04-15 06:16:33 +00:00
Wim Taymans 28188a3e6e gst/gstvalue.c: Transform a GstObject to a more meaningfull string that includes the object type in addition to its n...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_transform_object_string):
Transform a GstObject to a more meaningfull string that includes the
object type in addition to its name.
2008-03-24 10:29:05 +00:00
Laurent Glayal c2683ff751 gst/gstvalue.c: Optimisation: bail out of the loop as early as possible (#500143).
Original commit message from CVS:
Based on patch by: Laurent Glayal  <spglegle yahoo fr>
* gst/gstvalue.c: (gst_value_is_fixed):
Optimisation: bail out of the loop as early as possible (#500143).
2007-12-28 14:34:34 +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
Stefan Kost 4fffa41e1c gst/gstvalue.*: Add more missing "Since:" tags to docs.
Original commit message from CVS:
* gst/gstvalue.c:
* gst/gstvalue.h:
Add more missing "Since:" tags to docs.
2007-12-12 14:04:14 +00:00
Tim-Philipp Müller eac0501386 gst/gstvalue.c: Remove unused and uninitialised type variables that were still exported for some reason (they were ne...
Original commit message from CVS:
* gst/gstvalue.c:
Remove unused and uninitialised type variables that were still
exported for some reason (they were never in any header files
though).
2007-11-06 11:41:32 +00:00
Edgard Lima 0e3a0fdf35 Added GstStructure to gst_value_table and its related functions.
Original commit message from CVS:

* gst/gstcaps.c: (gst_caps_to_string),
(gst_caps_from_string_inplace):
* gst/gststructure.c: (gst_structure_get_abbrs),
(gst_structure_to_string), (gst_structure_from_string):
* gst/gstvalue.c: (gst_value_set_structure),
(gst_value_get_structure), (gst_value_serialize_structure),
(gst_value_deserialize_structure), (_gst_value_initialize):
* gst/gstvalue.h:
* tests/check/gst/gststructure.c: (GST_START_TEST),
(gst_structure_suite):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Added GstStructure to gst_value_table and its related functions.
Changed gst_structure_to_string to print ';' in the end.
Changed gst_caps_to_string to not print ';' beteween its
fields (structures) anymore and remove the lastes ';' from latest
structure. Now it is possible to have nested structures.
In addition, backward compatibilty is assured by accepting '\0' as
end delimiter. Fixes: #487969.
API: add gst_value_set_structure()
API: add gst_value_get_structure()
2007-10-22 08:53:26 +00:00
Stefan Kost 68ba3b4384 gst/: Add some more comments and debug output. Quote structure name to fix deserialisation of some strings.
Original commit message from CVS:
* gst/gststructure.c:
* gst/gstvalue.c:
Add some more comments and debug output. Quote structure name to fix
deserialisation of some strings.
2007-10-15 11:19:36 +00:00
Wim Taymans e7f433f720 gst/: Fix small typos in the docs.
Original commit message from CVS:
* gst/gstobject.h:
* gst/gstvalue.c:
Fix small typos in the docs.
2007-09-24 11:46:35 +00:00
Stefan Kost d53d6fb8a8 Another conditional doc check.
Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer.types.in:
Another conditional doc check.
* gst/gstmessage.c:
* gst/gstparamspecs.h:
* gst/gstregistrybinary.c: (gst_registry_binary_read_cache):
* gst/gstvalue.c:
* gst/gstxml.h:
API-doc fixes.
2007-07-25 13:00:23 +00:00
Tim-Philipp Müller 505f3889ca API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
Tim-Philipp Müller 4e12ed7a53 gst/gstvalue.c: Make docs for gst_value_compare() mention return enums that actually exist.
Original commit message from CVS:
* gst/gstvalue.c:
Make docs for gst_value_compare() mention return enums that
actually exist.
2007-06-05 13:49:10 +00:00
Wim Taymans ebd9a6d04b gst/gstvalue.c: Implement GstObject -> string transform so we print object names when serializing GValues containing ...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_transform_object_string),
(_gst_value_initialize):
Implement GstObject -> string transform so we print object names
when serializing GValues containing GstObjects.
2007-02-28 16:57:49 +00:00
Stefan Kost ea55e1357e configure.ac: comment about refining the xml deps
Original commit message from CVS:
* configure.ac:
comment about refining the xml deps
* docs/manuals.mak:
comments about moving away from jade for docs
* gst/gst.c:
recommit the ifdefs to use the binary registry
* gst/gstbin.c: (gst_bin_change_state_func):
this break is obsolete
* gst/gstelementfactory.h:
better GST_ELEMENT_DETAILS docs, add comment about translation
* gst/gstinfo.h:
remove eol slash
* gst/gstobject.c: (gst_signal_object_get_type):
add G_UNLIKELY as usual
* gst/gstpad.c: (gst_pad_event_default):
add fall trhu comment
* gst/gstregistrybinary.c: (gst_registry_binary_write),
(gst_registry_binary_initialize_magic),
(gst_registry_binary_save_string),
(gst_registry_binary_save_pad_template),
(gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin),
(gst_registry_binary_write_cache),
(gst_registry_binary_check_magic),
(gst_registry_binary_load_pad_template),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin),
(gst_registry_binary_read_cache):
comment typo and formatting
* gst/gstutils.c: (gst_element_state_get_name),
(gst_element_state_change_return_get_name):
remove obsolete breaks
* gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize):
add FIXME 0.11 and remove cpp comment
2007-01-29 15:54:09 +00:00
Thomas Vander Stichele c254a2345b tell us what's not implemented
Original commit message from CVS:
tell us what's not implemented
2007-01-02 09:31:45 +00:00
Jan Schmidt 79703a24e6 gst/gstvalue.c: If someone is foolish enough to compare 2 fractions with denominator = 0, return UNORDERED rather tha...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_fraction):
If someone is foolish enough to compare 2 fractions with denominator =
0, return UNORDERED rather than aborting.
2006-11-29 16:39:32 +00:00
Stefan Kost d3da3ed47b gst/gstvalue.c: check for validity of dates
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_set_date), (gst_date_copy):
check for validity of dates
2006-10-18 08:54:30 +00:00
Tim-Philipp Müller f3c07d5d20 gst/gstformat.c: Fix locking order (must take lock before using n_values).
Original commit message from CVS:
* gst/gstformat.c: (gst_format_register):
Fix locking order (must take lock before using n_values).
* gst/gstvalue.c: (gst_value_serialize_enum),
(gst_value_deserialize_enum_iter_cmp),
(gst_value_deserialize_enum):
Fix serialisation/deserialisation of custom registered GstFormats.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Unit test for custom format serialisation/deserialisation.
2006-09-17 19:26:16 +00:00
Stefan Kost 6ab8345121 gst/gstvalue.*: Use these optimizations only internaly.
Original commit message from CVS:
* gst/gstvalue.c:
* gst/gstvalue.h:
Use these optimizations only internaly.
2006-08-20 15:55:12 +00:00
Stefan Kost fe851cf2e4 gst/gstvalue.*: Saves the expensive lookup of the compare function in many cases (#345444)
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_list),
(gst_value_compare_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_get_compare_func), (gst_value_compare),
(gst_value_compare_with_func):
* gst/gstvalue.h:
Saves the expensive lookup of the compare function in many cases
(#345444)
2006-08-20 14:30:20 +00:00
Wim Taymans 6487eb661e gst/gstvalue.c: Fix GstValueList comparison code. Fixes #347293.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_list):
Fix GstValueList comparison code. Fixes #347293.
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Check to test GstValueList comparison.
2006-07-31 16:34:41 +00:00
Jan Schmidt 7e61004213 Make GstValueArray comparison be order dependent as designed.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_list),
(gst_value_compare_array), (_gst_value_initialize):
* tests/check/gst/gstvalue.c: (GST_START_TEST):
Make GstValueArray comparison be order dependent as designed.
Add checks for value lists and value array comparisons.
Fixes #347221
2006-07-11 20:14:20 +00:00
Thomas Vander Stichele 5855b0ef94 gst/: remove GLib 2.6 compatibility code
Original commit message from CVS:

* gst/glib-compat-private.h:
* gst/glib-compat.c:
* gst/glib-compat.h:
* gst/gstvalue.c: (gst_value_serialize_flags):
remove GLib 2.6 compatibility code
2006-06-13 08:20:24 +00:00
Wim Taymans 7e972ee6b9 Add G_UNLIKELY in type registration.
Original commit message from CVS:
* gst/gsterror.c: (gst_g_error_get_type):
* gst/gstpadtemplate.c: (gst_pad_template_get_type),
(gst_static_pad_template_get_type):
* gst/gsttaglist.c: (gst_tag_list_get_type):
* gst/gsttagsetter.c: (gst_tag_setter_get_type):
* gst/gsttypefindfactory.c: (gst_type_find_factory_get_type):
* gst/gsturi.c: (gst_uri_handler_get_type):
* gst/gstvalue.c: (gst_date_get_type):
* gst/gstxml.c: (gst_xml_get_type):
* libs/gst/base/gstbasesink.c: (gst_base_sink_get_type),
(gst_base_sink_preroll_object), (gst_base_sink_get_position):
* libs/gst/base/gstbasesrc.c: (gst_base_src_get_type):
Add G_UNLIKELY in type registration.
2006-06-12 08:55:21 +00:00
Jan Schmidt 8bf748a28e gst/gstvalue.c: Handle NULL input and output pointers silently as a failed conversion, rather than g_warnings.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_fraction):
Handle NULL input and output pointers silently as a failed conversion,
rather than g_warnings.
2006-05-26 09:19:24 +00:00
Thomas Vander Stichele 46de58b721 gst/gstvalue.c: fix a leak if no flags are set
Original commit message from CVS:

* gst/gstvalue.c: (gst_value_serialize_flags):
fix a leak if no flags are set
* tests/check/gst/gstvalue.c: (GST_START_TEST):
fix leak in tests
2006-05-10 15:38:53 +00:00
Thomas Vander Stichele b4e05d624b gst/: make sure some essential types used by events are registered as part of gst_init()
Original commit message from CVS:
* gst/gstevent.c: (_gst_event_initialize):
* gst/gstformat.c: (_gst_format_initialize):
make sure some essential types used by events are registered
as part of gst_init()
* gst/gstvalue.c: (gst_value_serialize_flags):
if no flags are set, serialize them to a value that represents NONE
so that deserializing them works
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
add tests for serialization and deserialization of flags
2006-05-10 14:05:46 +00:00
Wim Taymans ef7f163300 gst/: Remove pre glib2.8 compatibility, fixes #340508
Original commit message from CVS:
* gst/glib-compat.c:
* gst/gst.c: (init_pre):
* gst/gstobject.c: (gst_object_init), (gst_object_ref),
(gst_object_unref), (gst_object_replace), (gst_object_dispose),
(gst_object_dispatch_properties_changed):
* gst/gstobject.h:
* gst/gstregistryxml.c: (gst_registry_xml_read_cache):
* gst/gststructure.c: (gst_structure_set_valist):
* gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize):
Remove pre glib2.8 compatibility, fixes #340508
2006-05-05 08:17:22 +00:00
Michael Smith 530851afcf gst/gstvalue.c: Avoid NULL dereference when trying to serialize flags containing invalid values.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_serialize_flags):
Avoid NULL dereference when trying to serialize flags containing
invalid values.
2006-04-28 13:51:00 +00:00
Wim Taymans 1089154f2a gst/gstvalue.c: Don't try to serialize a GValue with a NULL buffer.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_serialize_buffer),
(gst_value_deserialize_buffer):
Don't try to serialize a GValue with a NULL buffer.
Fixes #339821.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Added check for serialisation of NULL buffers.
2006-04-28 13:13:23 +00:00
Wim Taymans 37d77aaeee Small documentation fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstvalue.c:
* libs/gst/base/gstbasetransform.h:
Small documentation fixes.
2006-03-07 15:08:57 +00:00
Tim-Philipp Müller a4957224a8 gst/gstvalue.c: Document thread-unsafety of gst_value_register_foo_func() when used at the same time as gst_value_foo...
Original commit message from CVS:
* gst/gstvalue.c:
Document thread-unsafety of gst_value_register_foo_func()
when used at the same time as gst_value_foo() (#322628).
2006-03-07 11:47:24 +00:00
Wim Taymans a19398105c gst/gstbin.c: Help the compiler a bit with type registration.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_handle_message_func):
Help the compiler a bit with type registration.
Use existing forward cod path instead of duplicating it when
handling a message.

* gst/gstbus.c: (gst_bus_get_type):
* gst/gstcaps.c: (gst_caps_get_type), (gst_static_caps_get_type):
* gst/gstchildproxy.c: (gst_child_proxy_get_type):
* gst/gstclock.c: (gst_clock_get_type):
* gst/gstelement.c: (gst_element_get_type),
* gst/gstelementfactory.c: (gst_element_factory_get_type):
* gst/gstindexfactory.c: (gst_index_factory_get_type):
* gst/gstminiobject.c: (gst_mini_object_get_type):
* gst/gstpad.c: (gst_pad_get_type):
* gst/gstsegment.c: (gst_segment_get_type):
* gst/gststructure.c: (gst_structure_get_type):
* gst/gstsystemclock.c: (gst_system_clock_get_type):
* gst/gsttask.c: (gst_task_get_type), (gst_task_join):
* gst/gstvalue.c:
Help compiler with type registration.

* plugins/elements/gstqueue.c: (gst_queue_handle_sink_event):
Small doc update.
2006-02-28 10:52:02 +00:00
Stefan Kost a53172d79d doc fixes, to link to function, just write gst_cool_function(), don't prefix with '#'
Original commit message from CVS:
* gst/gstcaps.c:
* gst/gstelement.c: (gst_element_send_event):
* gst/gstevent.c:
* gst/gstinfo.c:
* gst/gstiterator.c:
* gst/gstiterator.h:
* gst/gstpad.c: (gst_pad_send_event):
* gst/gststructure.c:
* gst/gsturi.c:
* gst/gstutils.c:
* gst/gstvalue.c:
* libs/gst/base/gstadapter.c:
doc fixes, to link to function, just write gst_cool_function(), don't
prefix with '#'
2006-01-27 22:34:51 +00:00
Thomas Vander Stichele 2dedb46c7e gst/gstvalue.c: make the G_TYPE_DATE instantiation work if debug is disabled
Original commit message from CVS:

* gst/gstvalue.c: (_gst_value_initialize):
make the G_TYPE_DATE instantiation work if debug is disabled
2006-01-07 10:04:36 +00:00
Thomas Vander Stichele ef7dedbfc8 gst/gstvalue.c: floor is not needed, F is always positive; this obviates the need for adding -lm when building withou...
Original commit message from CVS:

* gst/gstvalue.c: (gst_value_transform_double_fraction):
floor is not needed, F is always positive; this obviates the
need for adding -lm when building without libxml
2005-12-12 10:59:12 +00:00
Thomas Vander Stichele 288f61d21f expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:29:15 +00:00
Thomas Vander Stichele 9055674a03 add some explicit casts update dsp files; also installs the debug build in \gstreamer\debug to separate it from the n...
Original commit message from CVS:
add some explicit casts
update dsp files; also installs the debug build in \gstreamer\debug to separate it from the non-debug build
2005-11-30 10:13:54 +00:00
Tim-Philipp Müller 676421cf07 gst/gstvalue.c: Improve documentation for gst_value_union().
Original commit message from CVS:
* gst/gstvalue.c:
Improve documentation for gst_value_union().
* gst/gstvalue.h:
Change return value for union, intersect and subtract functions
from gint to gboolean.
2005-11-27 19:52:49 +00:00
Tim-Philipp Müller abaf6b22f1 gst/gstvalue.*: Use gint, gdouble and gchar in our API instead of int, double and char (and make usage in gstvalue.c ...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_serialize_any_list),
(gst_value_transform_any_list_string),
(gst_value_deserialize_list), (gst_value_deserialize_array),
(gst_value_set_int_range), (gst_value_deserialize_int_range),
(gst_value_set_double_range), (gst_value_deserialize_double_range),
(gst_value_set_fraction_range_full),
(gst_value_deserialize_fraction_range),
(gst_value_deserialize_caps), (gst_value_deserialize_buffer),
(gst_value_deserialize_boolean),
(gst_value_deserialize_int_helper), (gst_value_deserialize_double),
(gst_value_serialize_float), (gst_value_deserialize_float),
(gst_string_wrap), (gst_value_deserialize_string),
(gst_value_deserialize_enum), (gst_value_deserialize_flags),
(gst_value_union_int_range_int_range),
(gst_value_intersect_int_range_int_range),
(gst_value_intersect_double_range_double_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double_range),
(gst_value_deserialize_fraction):
* gst/gstvalue.h:
Use gint, gdouble and gchar in our API instead of int, double and
char (and make usage in gstvalue.c more consistent).
2005-11-27 18:11:02 +00:00
Wim Taymans a9f7f7b7b6 Doc fixes.
Original commit message from CVS:
Doc fixes.
2005-11-24 09:44:07 +00:00
Wim Taymans ca6f8f5387 Doc updates.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/glib-compat.c:
* gst/gsttagsetter.c:
* gst/gstvalue.c:
* gst/net/gstnetclientclock.c:
* gst/net/gstnettimepacket.h:
Doc updates.
2005-11-23 16:10:38 +00:00
Michael Smith f1819a7a28 docs/gst/gstreamer-sections.txt: Update for new API and API changes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Update for new API and API changes.
* gst/gstobject.h:
Documentation fix: GST_TRYLOCK -> GST_OBJECT_TRYLOCK
* gst/gstvalue.c:
Documentation typo fix.
* gst/net/gstnettimepacket.c:
Documentation fixes for arguments.
2005-11-23 14:52:31 +00:00
Jan Schmidt 2e248d331c gst/gstvalue.c: If needed, allocate storage in the destination value during collection.
Original commit message from CVS:

* gst/gstvalue.c: (gst_value_collect_fraction_range):
If needed, allocate storage in the destination value during
collection.
2005-11-22 14:29:10 +00:00
Jan Schmidt ba0d715dc8 check/gst/gstcaps.c: Extend caps string tests to check that a caps to string conversion is reversible and produces th...
Original commit message from CVS:
* check/gst/gstcaps.c: (GST_START_TEST):
Extend caps string tests to check that a caps to string
conversion is reversible and produces the same caps.

* gst/gststructure.c: (gst_structure_value_get_generic_type):
Output "fraction" as the generic type fraction range, so caps
serialisation and deserialisation works.
* check/gst/capslist.h:
* gst/gstvalue.c: (gst_value_deserialize_fraction):
Support 'MIN' and 'MAX' for deserialising fractions.
2005-11-22 11:56:01 +00:00
Jan Schmidt 97d08eb1a3 Fix subtraction.
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST):
* gst/gstvalue.c: (gst_value_fraction_subtract):
Fix subtraction.
2005-11-22 09:42:17 +00:00
Jan Schmidt 506aa94ce2 Implement fraction ranges and extend GstFraction to support arithmetic subtraction, as well as deserialization from i...
Original commit message from CVS:
* check/gst/capslist.h:
* check/gst/gstcaps.c: (GST_START_TEST):
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
* gst/gststructure.c: (gst_structure_parse_range),
(gst_structure_fixate_field_nearest_fraction):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_init_fraction_range),
(gst_value_free_fraction_range), (gst_value_copy_fraction_range),
(gst_value_collect_fraction_range),
(gst_value_lcopy_fraction_range), (gst_value_set_fraction_range),
(gst_value_set_fraction_range_full),
(gst_value_get_fraction_range_min),
(gst_value_get_fraction_range_max),
(gst_value_serialize_fraction_range),
(gst_value_transform_fraction_range_string),
(gst_value_compare_fraction_range),
(gst_value_deserialize_fraction_range),
(gst_value_intersect_fraction_fraction_range),
(gst_value_intersect_fraction_range_fraction_range),
(gst_value_subtract_fraction_fraction_range),
(gst_value_subtract_fraction_range_fraction),
(gst_value_subtract_fraction_range_fraction_range),
(gst_value_collect_fraction), (gst_value_fraction_multiply),
(gst_value_fraction_subtract), (gst_value_deserialize_fraction),
(gst_value_transform_string_fraction), (_gst_value_initialize):
* gst/gstvalue.h:
Implement fraction ranges and extend GstFraction to support
arithmetic subtraction, as well as deserialization from integer
strings such as "100"
Add a testsuite as for int and double range set operations
2005-11-21 23:54:59 +00:00
Andy Wingo ef7787ed72 gst/gst.h: Include glib-compat.h.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gst.h: Include glib-compat.h.

* gst/glib-compat.h: Add G_GNUC_NULL_TERMINATED.

* gst/glib-compat.c: Include the public and the private header.

* gst/glib-compat-private.h: Copied here from glib-compat.h.

* gst/gstvalue.c:
* gst/gstpad.c:
* gst/gstregistryxml.c: s/glib-compat/glib-compat-private/.
2005-11-21 18:03:22 +00:00
Julien Moutte 9185b7092c gst/gstvalue.c: Fix wrong function calls for arrays.
Original commit message from CVS:
2005-11-21  Julien MOUTTE  <julien@moutte.net>

* gst/gstvalue.c: (gst_value_intersect_array): Fix wrong
function calls for arrays.
2005-11-21 14:52:56 +00:00
Stefan Kost b06c505f1c docs/random/ensonic/media-device-daemon.txt: wild idea, can this be done?
Original commit message from CVS:
* docs/random/ensonic/media-device-daemon.txt:
wild idea, can this be done?
* docs/gst/gstreamer-sections.txt:
* gst/gsterror.h:
* gst/gstfilter.c:
* gst/gstfilter.h:
* gst/gstplugin.h:
* gst/gstpluginfeature.c:
* gst/gsttrace.c:
* gst/gstvalue.c:
* gst/gstvalue.h:
doc fixes and additions
2005-11-21 14:50:22 +00:00
Tim-Philipp Müller d1d6357de1 gst/gstvalue.*: Drop leading '%' from GST_FOURCC_FORMAT, thus making it consistent with our other format defines (#32...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_transform_fourcc_string),
(gst_value_serialize_fourcc):
* gst/gstvalue.h:
Drop leading '%' from GST_FOURCC_FORMAT, thus making it
consistent with our other format defines (#320324).
2005-11-21 13:26:40 +00:00
Tim-Philipp Müller 5012a8fddc gst/gstvalue.c: Revert previous commit. Value lists are by definition not fixed, as they are a list of possible values.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_is_fixed):
Revert previous commit. Value lists are by definition
not fixed, as they are a list of possible values.
2005-11-21 13:12:18 +00:00
Tim-Philipp Müller 8759556717 gst/gstvalue.c: Should handle both value arrays and value lists.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_is_fixed):
Should handle both value arrays and value lists.
2005-11-21 12:42:41 +00:00
Alessandro Dessina 9dc3c08477 gst/gstvalue.c (gst_value_is_fixed): Use gst_value_array functions to access arrays. Fixes #321962.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

patch by: Alessandro Dessina <alessandro nnva org>

* gst/gstvalue.c (gst_value_is_fixed): Use gst_value_array
functions to access arrays. Fixes #321962.
2005-11-21 12:27:01 +00:00
Jan Schmidt c05ba2d666 check/gst/gstvalue.c: Add a deserialisation test for fractions
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Add a deserialisation test for fractions
* examples/metadata/read-metadata.c: (message_loop),
(make_pipeline), (main):
Fix up metadata reading sample.
* gst/base/gstbasesink.c: (gst_base_sink_do_sync):
Debug format fix
* gst/base/gstbasesrc.c: (gst_base_src_default_negotiate):
Don't try and fixate empty caps
* gst/gst_private.h:
Wrap in G_BEGIN_DECLS/G_END_DECLS
* gst/gstvalue.c: (gst_value_collect_fraction),
(gst_value_set_fraction), (gst_value_get_fraction_denominator),
(gst_value_transform_string_fraction),
(gst_value_compare_fraction):
Add some extra guards to ensure that we don't end up
with an invalid denominator of 0 in a gstfraction and
that fractions always get reduced.
2005-11-20 17:12:49 +00:00
Wim Taymans 10a32af38d Doc fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstelement.c:
* gst/gstformat.c:
* gst/gstformat.h:
* gst/gstindex.h:
* gst/gstquery.c:
* gst/gstquery.h:
* gst/gstvalue.c:
Doc fixes.
2005-11-20 14:50:43 +00:00
Andy Wingo 77d95482f6 check/gst/gstvalue.c (test_string): Add test for bug #165650.
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* check/gst/gstvalue.c (test_string): Add test for bug #165650.

* gst/gstvalue.c (gst_string_wrap): Trying to serialize a NULL
string should produce an error, given the lack of a way to
represent NULL strings. Fixes #165650.
2005-11-19 17:08:23 +00:00
Andy Wingo 0ae103aff3 gst/gstvalue.h: gst/gstvalue.c (gst_value_array_append_value) (gst_value_array_prepend_value, gst_value_array_get_size)
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gstvalue.h:
* gst/gstvalue.c (gst_value_array_append_value)
(gst_value_array_prepend_value, gst_value_array_get_size)
(gst_value_array_get_value): New API, copied from
gst_value_list_*, only operates on arrays.
(gst_value_list_append_value, gst_value_list_prepend_value)
(gst_value_list_concat, gst_value_list_get_size)
(gst_value_list_get_value): Only operate on lists. Fixes #156633.

* gst/gstvalue.c (gst_value_init_list_or_array): Renamed from
init_list, because it works on both.
(copy_garray_of_gstvalue): Renamed from gst_value_list_copy_array.
(gst_value_copy_list_or_array): Renamed from copy_list.
(gst_value_free_list_or_array): Renamed from free_list.
(gst_value_collect_list_or_array): Renamed from collect_list.
(gst_value_lcopy_list_or_array): Renamed from lcopy_list.
(gst_value_list_or_array_peek_pointer): Renamed from
list_peek_pointer.
(_gst_value_array_value_table, _gst_value_list_value_table):
Update value table functions.
(gst_value_compare_list_or_array): Renamed from compare_list.
2005-11-19 16:46:30 +00:00
Stefan Kost dff771f1b7 gst/: docs fixes
Original commit message from CVS:
* gst/gstcaps.c:
* gst/gstghostpad.c:
* gst/gsttrace.c:
* gst/gstvalue.c:
* gst/gstvalue.h:
docs fixes
2005-11-18 16:04:28 +00:00
Thomas Vander Stichele 4df2acee2e give each value a _get_type, removes the DATA exports
Original commit message from CVS:

* docs/gst/gstreamer-sections.txt:
* gst/gstvalue.c: (gst_date_get_type), (_gst_value_initialize):
* gst/gstvalue.h:
give each value a _get_type, removes the DATA exports
2005-10-15 17:59:07 +00:00
Thomas Vander Stichele 2dd1598c56 whitespace fixes
Original commit message from CVS:
whitespace fixes
2005-10-15 15:30:24 +00:00
Thomas Vander Stichele 4ba0732136 signedness/type fixes
Original commit message from CVS:
signedness/type fixes
2005-10-15 00:20:45 +00:00
Thomas Vander Stichele eecd25e78f gst/: GLib 2.6 g_flags_get_first_value has a bug that triggers an infinite loop
Original commit message from CVS:

* gst/glib-compat.c: (gst_flags_get_first_value):
* gst/glib-compat.h:
* gst/gstvalue.c: (gst_value_deserialize_int_helper),
(gst_value_compare_double), (gst_value_serialize_flags):
GLib 2.6 g_flags_get_first_value has a bug that triggers an
infinite loop
2005-10-13 15:23:51 +00:00
Thomas Vander Stichele 2b7c3ac5e5 gst/: doc updates
Original commit message from CVS:

* gst/gstcaps.c:
* gst/gstevent.c:
doc updates
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
don't use long long, it's not portable.  Replacing with
gint64 seems to work; let's hope no skeletons fall out of the closet.
2005-10-10 09:48:21 +00:00
Tim-Philipp Müller fa0afcafb4 gst/gstvalue.c: More robust fraction string parsing.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_fraction):
More robust fraction string parsing.
* docs/pwg/appendix-porting.xml:
Mention gst_pad_use_explicit_caps() => gst_pad_use_fixed_caps()
2005-09-29 12:05:51 +00:00
Andy Wingo 7e27440c9e try the fourth
Original commit message from CVS:
try the fourth
2005-09-26 16:19:27 +00:00
Andy Wingo a62823e0c9 foo
Original commit message from CVS:
foo
2005-09-26 16:12:07 +00:00
Andy Wingo eab3bde7af gst/gstvalue.c (_gst_value_initialize): Better fakeout.
Original commit message from CVS:
2005-09-26  Andy Wingo  <wingo@pobox.com>

* gst/gstvalue.c (_gst_value_initialize): Better fakeout.
2005-09-26 16:07:54 +00:00