From 75ba14c79bfd9bbc6d9ae4a92635c9635360e542 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 24 May 2011 20:27:02 +0300 Subject: [PATCH 1/7] preset: use guint for the version number parts Use unsigned integers for extra safety (like we do in plugin version parsing). --- gst/gstpreset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/gstpreset.c b/gst/gstpreset.c index a52cb55116..811e4d1861 100644 --- a/gst/gstpreset.c +++ b/gst/gstpreset.c @@ -255,12 +255,13 @@ wrong_name: static guint64 preset_parse_version (const gchar * str_version) { - gint major, minor, micro, nano, num; + guint major, minor, micro, nano; + gint num; major = minor = micro = nano = 0; /* parse version (e.g. 0.10.15.1) to guint64 */ - num = sscanf (str_version, "%d.%d.%d.%d", &major, &minor, µ, &nano); + num = sscanf (str_version, "%u.%u.%u.%u", &major, &minor, µ, &nano); /* make sure we have atleast "major.minor" */ if (num > 1) { guint64 version; From e0c92982e951448932246325fb664455822cbbd8 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Tue, 24 May 2011 20:28:18 +0300 Subject: [PATCH 2/7] registrybinary: small cleanups Remove unneeded braces from string define. Small doc improvement. --- gst/gstregistrybinary.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/gstregistrybinary.h b/gst/gstregistrybinary.h index a367f4100b..aa2c6d31ff 100644 --- a/gst/gstregistrybinary.h +++ b/gst/gstregistrybinary.h @@ -55,12 +55,12 @@ G_BEGIN_DECLS * This _must_ be updated whenever the registry format changes, * we currently use the core version where this change happened. */ -#define GST_MAGIC_BINARY_VERSION_STR ("0.10.30.1") +#define GST_MAGIC_BINARY_VERSION_STR "0.10.30.1" /* * GST_MAGIC_BINARY_VERSION_LEN: * - * length of the version string. + * Maximum length of the version string in the header. */ #define GST_MAGIC_BINARY_VERSION_LEN (64) From 54a9d8038dee8b3c10ec65885984c67c8a66405d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Wed, 25 May 2011 12:47:51 +0400 Subject: [PATCH 3/7] poll: Fix WAKE_EVENT() to behave posixly on Windows --- gst/gstpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/gstpoll.c b/gst/gstpoll.c index 76a7a30e6a..8bb282a92f 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -165,7 +165,7 @@ static gboolean gst_poll_add_fd_unlocked (GstPoll * set, GstPollFD * fd); #define WAKE_EVENT(s) (write ((s)->control_write_fd.fd, "W", 1) == 1) #define RELEASE_EVENT(s) (read ((s)->control_read_fd.fd, (s)->buf, 1) == 1) #else -#define WAKE_EVENT(s) (SetEvent ((s)->wakeup_event)) +#define WAKE_EVENT(s) (SetEvent ((s)->wakeup_event), errno = GetLastError () == NO_ERROR ? 0 : EACCES, errno == 0 ? 1 : 0) #define RELEASE_EVENT(s) (ResetEvent ((s)->wakeup_event)) #endif From d56b3ec5aafca838b47c527e971615246d282378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Wed, 25 May 2011 13:40:30 +0400 Subject: [PATCH 4/7] systemclock: Placate gcc by defining EWOULDBLOCK to something --- gst/gstsystemclock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c index daea19081d..c29f83022c 100644 --- a/gst/gstsystemclock.c +++ b/gst/gstsystemclock.c @@ -51,6 +51,7 @@ # define WIN32_LEAN_AND_MEAN /* prevents from including too many things */ # include /* QueryPerformance* stuff */ # undef WIN32_LEAN_AND_MEAN +# define EWOULDBLOCK EAGAIN /* This is just to placate gcc */ #endif /* G_OS_WIN32 */ #define GET_ENTRY_STATUS(e) (g_atomic_int_get(&GST_CLOCK_ENTRY_STATUS(e))) From 1347cc520f1307e11d85cb96f29809babe4a7e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 25 May 2011 15:38:30 +0100 Subject: [PATCH 5/7] docs: update release instructions for gnome change --- docs/random/release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/random/release b/docs/random/release index 6a8a3779e3..f45bf97c1b 100644 --- a/docs/random/release +++ b/docs/random/release @@ -129,7 +129,7 @@ RELEASE PROCEDURE: + e.g: scp gstreamer-0.10.42.tar.gz master.gnome.org: ssh master.gnome.org - install-module gstreamer-0.10.42.tar.gz + ftpadmin install gstreamer-0.10.42.tar.gz - Send release announcements to: gstreamer-devel@lists.sourceforge.net gstreamer-announce@lists.sourceforge.net kde-multimedia@kde.org gnome-multimedia@gnome.org From 430e98413d35d419cebe3d68c40139133aa265f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 25 May 2011 15:54:01 +0100 Subject: [PATCH 6/7] configure: bump GLib requirement to >= 2.24 http://gstreamer.freedesktop.org/wiki/ReleasePlanning/GLibRequirement --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6b29d6f90e..d216f2ec36 100644 --- a/configure.ac +++ b/configure.ac @@ -535,7 +535,7 @@ LIBS="$save_libs" dnl *** checks for dependency libraries *** dnl GLib -GLIB_REQ=2.22 +GLIB_REQ=2.24 AG_GST_GLIB_CHECK([$GLIB_REQ]) From 8a3721a1ca031f160b96a61ae88c20d5304e8840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 25 May 2011 16:02:10 +0100 Subject: [PATCH 7/7] gst: we can now use GLib 2.24 API unconditionally --- gst/gstcaps.c | 5 ----- gst/gstchildproxy.c | 6 +----- gst/gststructure.c | 5 ----- gst/gsttaglist.c | 5 ----- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/gst/gstcaps.c b/gst/gstcaps.c index a68a66a07c..3010d29d2e 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -966,12 +966,7 @@ gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs) g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n"); type = GST_TYPE_DATE; } -#if GLIB_CHECK_VERSION(2,23,3) G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err); -#else - g_value_init (&value, type); - G_VALUE_COLLECT (&value, varargs, 0, &err); -#endif if (G_UNLIKELY (err)) { g_critical ("%s", err); return; diff --git a/gst/gstchildproxy.c b/gst/gstchildproxy.c index 65e9527a4d..2054aa0298 100644 --- a/gst/gstchildproxy.c +++ b/gst/gstchildproxy.c @@ -391,13 +391,9 @@ gst_child_proxy_set_valist (GstObject * object, if (!gst_child_proxy_lookup (object, name, &target, &pspec)) goto not_found; -#if GLIB_CHECK_VERSION(2,23,3) G_VALUE_COLLECT_INIT (&value, pspec->value_type, var_args, G_VALUE_NOCOPY_CONTENTS, &error); -#else - g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec)); - G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error); -#endif + if (error) goto cant_copy; diff --git a/gst/gststructure.c b/gst/gststructure.c index 395516906c..29d91f915d 100644 --- a/gst/gststructure.c +++ b/gst/gststructure.c @@ -565,12 +565,7 @@ gst_structure_set_valist_internal (GstStructure * structure, g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n"); type = GST_TYPE_DATE; } -#if GLIB_CHECK_VERSION(2,23,3) G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err); -#else - g_value_init (&field.value, type); - G_VALUE_COLLECT (&field.value, varargs, 0, &err); -#endif if (G_UNLIKELY (err)) { g_critical ("%s", err); return; diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index 6bf596eff7..3de487632f 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -1011,12 +1011,7 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode, g_warning ("unknown tag '%s'", tag); return; } -#if GLIB_CHECK_VERSION(2,23,3) G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error); -#else - g_value_init (&value, info->type); - G_VALUE_COLLECT (&value, var_args, 0, &error); -#endif if (error) { g_warning ("%s: %s", G_STRLOC, error); g_free (error);