Commit graph

82 commits

Author SHA1 Message Date
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
Andy Wingo 2f46ef713d Remove memchunk benchmark stuff, this is taken over by GLib bug 118439.
Original commit message from CVS:
2005-09-26  Andy Wingo  <wingo@pobox.com>

* configure.ac:
* tests/Makefile.am:
* tests/memchunk: Remove memchunk benchmark stuff, this is taken
over by GLib bug 118439.

* gst/base/gstbasesink.c (gst_base_sink_wait): Factor out the wait
routines to a function.

* docs/libs/gstreamer-libs-sections.txt: I am a good person today.

* libs/gst/controller/gsthelper.c:
* libs/gst/controller/gstcontroller.h (gst_controller_sync_values)
(gst_object_sync_values): Renamed from sink_values. Ugh.

* libs/gst/controller/gsthelper.c: Update for __gst_controller_key.

* libs/gst/controller/gstcontroller.c (__gst_controller_key):
Renamed from controller_key, as it is exported.

* gst/gstvalue.c (_gst_value_initialize): Fake out the compiler.
2005-09-26 15:43:30 +00:00
Thomas Vander Stichele f74399ea55 fix docs
Original commit message from CVS:
fix docs
2005-09-23 16:35:43 +00:00
Tim-Philipp Müller 7390d68eee Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual bunch of utility functions along with a hack that che...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gststructure.c: (gst_structure_set_valist),
(gst_structure_get_date):
* gst/gststructure.h:
* gst/gstvalue.c: (gst_value_set_date), (gst_value_get_date),
(gst_date_copy), (gst_value_compare_date),
(gst_value_serialize_date), (gst_value_deserialize_date),
(gst_value_transform_date_string),
(gst_value_transform_string_date), (_gst_value_initialize):
* gst/gstvalue.h:
Add GST_TYPE_DATE, a boxed type that wraps GDate, and the usual
bunch of utility functions along with a hack that checks that
developers don't accidentally use G_TYPE_DATE where GST_TYPE_DATE
is required. Part of the grand scheme in #170777.
2005-09-22 15:08:02 +00:00
Stefan Kost d13c1a7b10 inlied another one and added some obvious docs
Original commit message from CVS:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstvalue.sgml:
* gst/gstvalue.c:
* gst/gstvalue.h:
inlied another one and added  some obvious docs
2005-09-21 09:48:40 +00:00
Thomas Vander Stichele ff783ad5fa docs/gst/: rearrange gstvalue section
Original commit message from CVS:

* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/gstvalue.sgml:
rearrange gstvalue section
* gst/gstutils.c: (gst_element_state_get_name):
NONE -> VOID
* gst/gstvalue.c: (_gst_value_initialize):
* gst/gstvalue.h:
doc updates
2005-09-11 12:01:12 +00:00
Wim Taymans 01ace6b592 check/gst/gstvalue.c: Added subtract checks.
Original commit message from CVS:
* check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Added subtract checks.

* docs/design/part-events.txt:
Some more docs about newsegment

* gst/gstbin.c: (gst_bin_change_state), (bin_bus_handler):
Fix FIXME

* gst/gstcaps.c: (gst_caps_to_string):
Add comments, cleanups.

* gst/gstelement.c: (gst_element_save_thyself):
cleanups

* gst/gstvalue.c: (gst_value_collect_int_range),
(gst_string_unwrap), (gst_value_union_int_int_range),
(gst_value_union_int_range_int_range),
(gst_value_intersect_int_int_range),
(gst_value_intersect_int_range_int_range),
(gst_value_intersect_double_double_range),
(gst_value_intersect_double_range_double_range),
(gst_value_intersect_list), (gst_value_subtract_int_int_range),
(gst_value_subtract_int_range_int),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_compare), (gst_value_compare_fraction):
Cleanups, add comments, remove unneeded asserts.
2005-08-16 09:42:50 +00:00
Ronald S. Bultje 3f62c7db23 GstElement::new-pad -> pad-added, GstElement::state-change -> state-changed, GstValueFixedList -> GstValueArray, add ...
Original commit message from CVS:
* docs/manual/advanced-autoplugging.xml:
* docs/manual/basics-helloworld.xml:
* docs/manual/basics-pads.xml:
* docs/random/ds/0.9-suggested-changes:
* gst/gstelement.c: (gst_element_class_init), (gst_element_seek):
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstformat.h:
* gst/gstquery.h:
* gst/gststructure.c: (gst_structure_value_get_generic_type),
(gst_structure_parse_array), (gst_structure_parse_value):
* gst/gstvalue.c: (gst_type_is_fixed),
(gst_value_list_prepend_value), (gst_value_list_append_value),
(gst_value_list_get_size), (gst_value_list_get_value),
(gst_value_transform_array_string), (gst_value_serialize_array),
(gst_value_deserialize_array), (gst_value_intersect_array),
(gst_value_is_fixed), (_gst_value_initialize):
* gst/gstvalue.h:
GstElement::new-pad -> pad-added, GstElement::state-change ->
state-changed, GstValueFixedList -> GstValueArray, add format and
flags as their own arguments in gst_element_seek() (should improve
"bindeability"), remove function generators since they don't work
under a whole bunch of compilers (they were deprecated already
anyway).
2005-07-20 17:16:44 +00:00
Thomas Vander Stichele 0794b693d9 check/Makefile.am: add two more tests for valgrinding
Original commit message from CVS:
* check/Makefile.am:
add two more tests for valgrinding
* check/gst/gstvalue.c: (GST_START_TEST):
test refcount of deserialized buffer, found a leak
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/tmpl/gstminiobject.sgml:
add miniobject to docs
* gst/gstminiobject.c:
add some docs
* gst/gstvalue.c: (gst_value_deserialize_buffer),
(gst_string_unwrap):
fix a hard-to-find invalid write for one of the tests
fix a leak for deserialized buffers
2005-07-11 18:41:49 +00:00
Ronald S. Bultje f05cd57bf2 gst/gstvalue.c: Fix memleak (#309125).
Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/gstvalue.c: (gst_value_intersect_list):
Fix memleak (#309125).
2005-06-30 10:10:00 +00:00
Thomas Vander Stichele e6b233bb4d remove gst_strtoll completely, since it didn't actually do anything more than what g_ascii_strtoull already does.
Original commit message from CVS:
* check/gst/gstvalue.c: (START_TEST), (gst_value_suite):
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
remove gst_strtoll completely, since it didn't actually do
anything more than what g_ascii_strtoull already does.
check for range errors when deserializing
do a cast for the unsigned cases; but further fixing needs
a decision on what the interpretation of "(int)" and
deserialization should be for values that fall outside the
type's boundaries (ie, refuse, or interpret as casting)
2005-06-23 11:25:29 +00:00
Thomas Vander Stichele c3efeeb64c check/: copy over from 0.8, and add two with bitmasks specified with (int) 0xFF...
Original commit message from CVS:
* check/Makefile.am:
* check/gst/capslist.h:
copy over from 0.8, and add two with bitmasks specified with
(int) 0xFF...
* check/gst/gstcaps.c: (START_TEST), (gst_caps_suite):
add test to parse everything from capslist.h
* check/gst/gststructure.c: (START_TEST), (gst_value_suite),
(main):
add test for structure deserialization
* check/gst/gstvalue.c: (START_TEST), (gst_value_suite):
add tests for deserialization of strings to int types
* gst/gststructure.c: (gst_structure_nth_field_name):
* gst/gststructure.h:
add a way to get the name of a field referenced by index
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
instead of checking if the resulting long long lies between
min and max, we check if the long long would fit into
a number of bytes for the final type.
This fixes cases where a string represents 2^32 - 1, which
when cast to int would be the (valid) -1, but is bigger than
G_MAXINT
2005-06-22 19:22:34 +00:00
Thomas Vander Stichele bdc643ddb9 return long long, not int, so gint64 deserialization actually works. Is there any flag that makes the compiler check...
Original commit message from CVS:

* check/gst/gstvalue.c: (START_TEST):
* gst/gstvalue.c: (gst_value_deserialize):
return long long, not int, so gint64 deserialization actually
works.  Is there any flag that makes the compiler check this ?
Fixes #308559
2005-06-22 10:52:18 +00:00
Wim Taymans 5d66b9af57 gst/gstpad.c: Small doc updates.
Original commit message from CVS:
* gst/gstpad.c:
Small doc updates.

* gst/gstvalue.c: (gst_value_compare_buffer),
(gst_value_serialize_buffer), (gst_value_deserialize_buffer),
(gst_value_compare_flags), (gst_value_serialize_flags),
(gst_value_deserialize_flags), (_gst_value_initialize):
Fix serialisation of buffers, they are not boxed types anymore
2005-06-20 15:18:17 +00:00
Wim Taymans ee4cf984cf remove stupid printf
Original commit message from CVS:
remove stupid printf
2005-05-10 14:51:49 +00:00
Wim Taymans 33992f775b gst/gstvalue.c: Added flags serialize/deserialize/compare code.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_compare_flags),
(gst_value_serialize_flags), (gst_value_deserialize_flags),
(_gst_value_initialize):
Added flags serialize/deserialize/compare code.
2005-05-10 14:50:55 +00:00
David Schleef 65dd8e9726 gst/gstpad.c: Remove handling of filtered caps. Fix/merge functions that handle filtered links.
Original commit message from CVS:
* gst/gstpad.c: Remove handling of filtered caps.  Fix/merge
functions that handle filtered links.
* gst/gstpad.h: Remove 'appfilter' field and prototypes of
removed functions.
* gst/gstutils.c: Fix/remove utility functions that handle
filtered caps.
* gst/gstutils.h:
* gst/gstvalue.c: Add serialization/deserialization of caps
* gst/parse/grammar.y: Ignore filtered caps when linking.  This
requires fixing so that the filter caps notation creates
a capsfilter element and sets the filter_caps property.  I
think everyone probably wants to keep the shorthand notation.
* docs/gst/tmpl/gstelement.sgml: updates for API changes.
* docs/gst/tmpl/gstpad.sgml:
* gst/elements/gstelements.c: Register capsfilter element.
* gst/Makefile.am: fix spacing
* docs/random/ds/0.9-suggested-changes: random
2005-04-24 21:16:45 +00:00
Wim Taymans c47dc4d853 First THREADED backport attempt, focusing on adding locks and making sure the API is threadsafe. Needs more work. Mor...
Original commit message from CVS:
First THREADED backport attempt, focusing on adding locks and
making sure the API is threadsafe. Needs more work. More docs
follow this week.
2005-03-07 18:27:42 +00:00
Ronald S. Bultje c1f7b619d3 gst/gstvalue.c: Allow NULL-strings as argument (#165365).
Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/gstvalue.c: (gst_string_wrap):
Allow NULL-strings as argument (#165365).
2005-01-28 09:37:41 +00:00
Stefan Kost 34592a842b added docs for the TAG defines
Original commit message from CVS:
added docs for the TAG defines
2005-01-18 14:15:30 +00:00
David Schleef 8508c23248 gst/gstvalue.c: Fix doc build problem.
Original commit message from CVS:
* gst/gstvalue.c: Fix doc build problem.
2005-01-06 00:45:04 +00:00
David Schleef b7f6134053 gst/gstvalue.c: Add some documentation
Original commit message from CVS:
* gst/gstvalue.c: Add some documentation
2005-01-05 23:21:18 +00:00
Stefan Kost 35441095b2 another shell oneliner for empty return value docs more doc fixes (parameters and return values)
Original commit message from CVS:
another shell oneliner for empty return value docs
more doc fixes (parameters and return values)
2005-01-05 13:17:28 +00:00
Benjamin Otte 5f22a8a6d7 gst/gstvalue.c: use deprecated g_value_set_string_take_ownership to keep compatible with glib 2.2
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_string):
use deprecated g_value_set_string_take_ownership to keep compatible
with glib 2.2
2004-12-17 03:58:13 +00:00
Benjamin Otte bdc0432ec6 gst/gstvalue.c: revert last patch, only dom a g_utf8_validate now before accepting the string - caps parsing strips "...
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_string):
revert last patch, only dom a g_utf8_validate now before accepting
the string - caps parsing strips " from strings so we can't rely on
them
* testsuite/caps/value_serialize.c: (test_string_deserialization):
disable a test that tested the above and comment it
2004-12-17 02:52:24 +00:00
Benjamin Otte 0c11c636bd gst/gstvalue.c: check that a simple string that gets deserialized does not contain invalid characters
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_string):
check that a simple string that gets deserialized does not contain
invalid characters
* testsuite/caps/value_serialize.c: (test_string_deserialization):
remove a test that tested a wring behaviour
2004-12-16 20:56:52 +00:00
Ronald S. Bultje 8d61d9045d gst/: Deprecate _type_is_fixed, use _value_is_fixed instead, since the fixedness depends on the content.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_is_fixed_foreach):
* gst/gstpad.c: (_gst_pad_default_fixate_value),
(_gst_pad_default_fixate_foreach):
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
* gst/gstvalue.h:
Deprecate _type_is_fixed, use _value_is_fixed instead, since
in some cases (arrays), the fixedness depends on the content.
* gst/gstqueue.c: (gst_queue_handle_src_query):
Check for availability before doing something.
2004-11-29 17:02:09 +00:00
Benjamin Otte a9bad8aa6e gst/gstelement.c: simplify
Original commit message from CVS:
* gst/gstelement.c: (gst_element_negotiate_pads):
simplify
* gst/gstvalue.c: (gst_string_wrap), (gst_string_unwrap),
(gst_value_serialize_string), (gst_value_deserialize_string):
add unwrapping of previously wrapped strings. Fix bug in wrapping
while at it.
* testsuite/caps/value_serialize.c: (test1),
(test_string_serialization), (test_string_deserialization), (main):
add tests for string (de)serialization
2004-11-28 18:02:48 +00:00
Stefan Kost b32ebdaabe added documentation to many items moved the GST_TYPE_XXX one to the Standart section, as they do not need docs
Original commit message from CVS:
added documentation to many items
moved the GST_TYPE_XXX one to the Standart section, as they do not need docs
2004-09-02 14:24:22 +00:00
Steve Lhomme 6730b41a8c fix a possible memory leak under Windows
Original commit message from CVS:
fix a possible memory leak under Windows
2004-08-11 18:56:39 +00:00
Steve Lhomme 6bf163742a fix a memory leak that occured under Windows
Original commit message from CVS:
fix a memory leak that occured under Windows
2004-08-10 19:23:53 +00:00
Wim Taymans 36b41f4666 Added transform functions between double and fraction.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_transform_double_fraction),
(gst_value_transform_fraction_double), (_gst_value_initialize):
* testsuite/caps/Makefile.am:
* testsuite/caps/fraction-convert.c: (check_from_double_convert),
(check_from_fraction_convert), (transform_test), (main):
Added transform functions between double and fraction.
Added testcase to verify transforms
2004-07-27 16:45:30 +00:00
Ronald S. Bultje 8b895dadce docs/random/ds/0.9-suggested-changes: Make note about renaming fixed-list to array.
Original commit message from CVS:
* docs/random/ds/0.9-suggested-changes:
Make note about renaming fixed-list to array.
* gst/gstvalue.c: (gst_value_intersect_fixed_list),
(_gst_value_initialize):
Add array intersections.
* testsuite/caps/intersect2.c: (main):
Add test for array intersections.
2004-07-20 19:35:15 +00:00
Thomas Vander Stichele 37960c1b39 fix #147707 blocker
Original commit message from CVS:
fix #147707 blocker
2004-07-16 13:31:28 +00:00
Benjamin Otte ae7fb01363 gst/gstvalue.c: use ints and return ints, fractions only use ints, too, so this avoids accidently casting multiplicat...
Original commit message from CVS:
* gst/gstvalue.c: (gst_greatest_common_divisor):
use ints and return ints, fractions only use ints, too, so this
avoids accidently casting multiplications to unsigned
(gst_value_lcopy_fraction): it's ints, not uint32
(gst_value_set_fraction): disallow minint, multiplying and negation
are broken with it
(gst_value_fraction_multiply): fix to make large numbers work and get
rid of the assumption that the multiplication of two ints fits an
int64 - dunno if that's true for all systems
* testsuite/caps/Makefile.am:
* testsuite/caps/fraction-multiply-and-zero.c:
(check_multiplication), (check_equal), (zero_test), (main):
add tests for all the stuff above
* testsuite/caps/value_compare.c: (test1):
fix comment
* tests/.cvsignore:
* testsuite/caps/.cvsignore:
* testsuite/debug/.cvsignore:
* testsuite/dlopen/.cvsignore:
* testsuite/states/.cvsignore:
get up to date
2004-07-16 01:16:53 +00:00
Thomas Vander Stichele 76f329603c adding GstFraction GValue type
Original commit message from CVS:
adding GstFraction GValue type
2004-07-15 20:27:20 +00:00
Thomas Vander Stichele 1c5150d393 debugging additions and style cleanups
Original commit message from CVS:
debugging additions and style cleanups
2004-07-15 16:20:50 +00:00
Benjamin Otte f71ec9df53 compatibility fixes for Solaris 8/gcc 2.95
Original commit message from CVS:
compatibility fixes for Solaris 8/gcc 2.95
* configure.ac:
include libintl libs in LDFLAGS
* gstvalue.c (gst_value_deserialize_buffer):
cast isxdigit stuff to int to silence compiler warning
2004-07-13 14:17:01 +00:00
Ronald S. Bultje 938884918c Fix enum serialization, deserialization, comparison in caps, add a test to ensure that this continues working in the ...
Original commit message from CVS:
* configure.ac:
* gst/gstvalue.c: (gst_value_compare_enum),
(gst_value_serialize_enum), (gst_value_deserialize_enum),
(gst_value_can_compare), (gst_value_compare):
* testsuite/Makefile.am:
Fix enum serialization, deserialization, comparison in caps, add
a test to ensure that this continues working in the future.
2004-07-07 04:22:28 +00:00
Benjamin Otte 02c304efb9 gst/gstvalue.c: test that start is smaller then end
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_set_int_range):
test that start is smaller then end
* libs/gst/bytestream/Makefile.am:
* libs/gst/bytestream/filepad.c:
* libs/gst/bytestream/filepad.h:
add GstFilePad - a pad that behaves like a FILE*
* testsuite/bytestream/.cvsignore:
* testsuite/bytestream/Makefile.am:
* testsuite/bytestream/filepadsink.c:
test for the GstFilePad
2004-06-20 17:05:40 +00:00
Benjamin Otte 7193393c18 gst/gstcaps.c: don't print error messages when there is no error
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_structure_simplify):
don't print error messages when there is no error
* gst/gstvalue.c: (gst_value_compare_int_range):
compare the second value, too
* testsuite/caps/Makefile.am:
* testsuite/caps/random.c: (assert_on_error), (main):
add tests to make sure the two things above are checked for
2004-05-25 19:52:02 +00:00
Thomas Vander Stichele 3e4573c20e add IN_CAPS buffer flag; add GST_TYPE_FIXED_LIST + functions
Original commit message from CVS:
add IN_CAPS buffer flag; add GST_TYPE_FIXED_LIST + functions
2004-05-20 17:03:02 +00:00
Benjamin Otte 182b3195cd gst/gstvalue.c: fix int variable deserialization and add a helper so we can actually debug this.
Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_int_helper):
fix int variable deserialization and add a helper so we can actually
debug this.
2004-05-19 14:20:46 +00:00