diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2003-02-06 22:45:31 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2003-02-06 22:45:31 +0000 |
commit | 66a454c3ae11f8ae4158fe5f914baca92bb0dc29 (patch) | |
tree | 76cfc12363e26c7bd97771821157e2fe6d7a6bc7 | |
parent | 1106b5674dca39fef9aae89b7569b47e17e97cfe (diff) |
update for 0.6.0
Original commit message from CVS:
update for 0.6.0
m--------- | common | 0 | ||||
-rw-r--r-- | gst-app/ChangeLog | 8 | ||||
-rwxr-xr-x | gst-app/autogen.sh | 6 | ||||
-rw-r--r-- | gst-app/configure.ac | 23 | ||||
-rw-r--r-- | gst-plugin/ChangeLog | 8 | ||||
-rwxr-xr-x | gst-plugin/autogen.sh | 6 | ||||
-rw-r--r-- | gst-plugin/configure.ac | 34 | ||||
-rw-r--r-- | gst-plugin/src/Makefile.am | 2 | ||||
-rw-r--r-- | gst-plugin/src/gstplugin.c | 97 |
9 files changed, 116 insertions, 68 deletions
diff --git a/common b/common -Subproject fa2e4df50fd965b1dbd3b35b87d914ff8736281 +Subproject 50879a63c4fa8f2544d4d89a9dbfa0f5720c326 diff --git a/gst-app/ChangeLog b/gst-app/ChangeLog index 02d2786..9b3fa17 100644 --- a/gst-app/ChangeLog +++ b/gst-app/ChangeLog @@ -1,3 +1,7 @@ -2002-07-17 Thomas Vander Stichele <thomas@apestaart.org> +2003-02-06 Thomas Vander Stichele <thomas at apestaart dot org> - * initial creation on a flight to New York + * updated for GStreamer 0.6.0 + +2002-07-17 Thomas Vander Stichele <thomas at apestaart dot org> + + * initial creation on a flight to New York diff --git a/gst-app/autogen.sh b/gst-app/autogen.sh index ae3d650..8765890 100755 --- a/gst-app/autogen.sh +++ b/gst-app/autogen.sh @@ -2,13 +2,13 @@ # you can either set the environment variables AUTOCONF and AUTOMAKE # to the right versions, or leave them unset and get the RedHat 7.3 defaults if test -z $AUTOMAKE; then - export AUTOMAKE=automake-1.5 - export ACLOCAL=aclocal-1.5 + export AUTOMAKE=automake + export ACLOCAL=aclocal fi # if you would want to be running autoheader as well, you will have to do # something similar as above for it -if test -z $AUTOCONF; then export AUTOCONF=autoconf-2.53; fi +if test -z $AUTOCONF; then export AUTOCONF=autoconf; fi set -x # if any of these steps fails, the others will not execute, which is good diff --git a/gst-app/configure.ac b/gst-app/configure.ac index c7f21cb..89f4e65 100644 --- a/gst-app/configure.ac +++ b/gst-app/configure.ac @@ -2,7 +2,7 @@ AC_INIT dnl Fill in your package name and version here PACKAGE=gst-app -VERSION=0.1.0 +VERSION=0.1.1 dnl these AC_DEFINE_UNQUOTED's are necessary for make dist to work AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") @@ -27,8 +27,25 @@ fi dnl Now we're ready to ask for gstreamer libs and cflags dnl And we can also ask for the right version of gstreamer -PKG_CHECK_MODULES(GST, gstreamer >= 0.4.0, HAVE_GST=yes, HAVE_GST=no) +GST_REQUIRED=0.6.0 + +dnl start with 0.6 +GST_MAJORMINOR=0.6 +PKG_CHECK_MODULES(GST, \ + gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED \ + gstreamer-control-$GST_MAJORMINOR >= $GST_REQUIRED, + HAVE_GST=yes,HAVE_GST=no) + +dnl fail back to 0.7 +if test "x$HAVE_GST" = "xno"; then + GST_MAJORMINOR=0.7 + PKG_CHECK_MODULES(GST, \ + gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED \ + gstreamer-control-$GST_MAJORMINOR >= $GST_REQUIRED, + HAVE_GST=yes,HAVE_GST=no) +fi + dnl Give error and exit if we don't have gstreamer if test "x$HAVE_GST" = "xno"; then AC_MSG_ERROR(you need gstreamer development packages installed !) @@ -39,7 +56,7 @@ AC_SUBST(GST_CFLAGS) AC_SUBST(GST_LIBS) dnl If we need them, we can also use the plugin libraries -PKG_CHECK_MODULES(GST_LIBS, gstreamer-libs >= 0.4.0, +PKG_CHECK_MODULES(GST_LIBS, gstreamer-libs-$GST_MAJORMINOR >= $GST_REQUIRED, HAVE_GST_LIBS=yes, HAVE_GST_LIBS=no) dnl Give a warning if we don't have gstreamer libs diff --git a/gst-plugin/ChangeLog b/gst-plugin/ChangeLog index 02d2786..9b3fa17 100644 --- a/gst-plugin/ChangeLog +++ b/gst-plugin/ChangeLog @@ -1,3 +1,7 @@ -2002-07-17 Thomas Vander Stichele <thomas@apestaart.org> +2003-02-06 Thomas Vander Stichele <thomas at apestaart dot org> - * initial creation on a flight to New York + * updated for GStreamer 0.6.0 + +2002-07-17 Thomas Vander Stichele <thomas at apestaart dot org> + + * initial creation on a flight to New York diff --git a/gst-plugin/autogen.sh b/gst-plugin/autogen.sh index ae3d650..8765890 100755 --- a/gst-plugin/autogen.sh +++ b/gst-plugin/autogen.sh @@ -2,13 +2,13 @@ # you can either set the environment variables AUTOCONF and AUTOMAKE # to the right versions, or leave them unset and get the RedHat 7.3 defaults if test -z $AUTOMAKE; then - export AUTOMAKE=automake-1.5 - export ACLOCAL=aclocal-1.5 + export AUTOMAKE=automake + export ACLOCAL=aclocal fi # if you would want to be running autoheader as well, you will have to do # something similar as above for it -if test -z $AUTOCONF; then export AUTOCONF=autoconf-2.53; fi +if test -z $AUTOCONF; then export AUTOCONF=autoconf; fi set -x # if any of these steps fails, the others will not execute, which is good diff --git a/gst-plugin/configure.ac b/gst-plugin/configure.ac index 0130e7e..26467d3 100644 --- a/gst-plugin/configure.ac +++ b/gst-plugin/configure.ac @@ -2,7 +2,7 @@ AC_INIT dnl Fill in your package name and version here PACKAGE=gst-plugin -VERSION=0.1.0 +VERSION=0.1.1 dnl these AC_DEFINE_UNQUOTED's are necessary for make dist to work AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") @@ -27,26 +27,46 @@ fi dnl Now we're ready to ask for gstreamer libs and cflags dnl And we can also ask for the right version of gstreamer -PKG_CHECK_MODULES(GST, gstreamer >= 0.4.0, HAVE_GST=yes, HAVE_GST=no) - + +GST_REQUIRED=0.6.0 + +dnl start with 0.6 +GST_MAJORMINOR=0.6 +PKG_CHECK_MODULES(GST, \ + gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED \ + gstreamer-control-$GST_MAJORMINOR >= $GST_REQUIRED, + HAVE_GST=yes,HAVE_GST=no) + +dnl fail back to 0.7 +if test "x$HAVE_GST" = "xno"; then + GST_MAJORMINOR=0.7 + PKG_CHECK_MODULES(GST, \ + gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED \ + gstreamer-control-$GST_MAJORMINOR >= $GST_REQUIRED, + HAVE_GST=yes,HAVE_GST=no) +fi + dnl Give error and exit if we don't have gstreamer if test "x$HAVE_GST" = "xno"; then AC_MSG_ERROR(you need gstreamer development packages installed !) fi - + dnl make GST_CFLAGS and GST_LIBS available AC_SUBST(GST_CFLAGS) AC_SUBST(GST_LIBS) + +dnl make GST_MAJORMINOR available in Makefile.am +AC_SUBST(GST_MAJORMINOR) dnl If we need them, we can also use the plugin libraries -PKG_CHECK_MODULES(GST_LIBS, gstreamer-libs >= 0.4.0, +PKG_CHECK_MODULES(GST_LIBS, gstreamer-libs-$GST_MAJORMINOR >= $GST_REQUIRED, HAVE_GST_LIBS=yes, HAVE_GST_LIBS=no) - + dnl Give a warning if we don't have gstreamer libs if test "x$HAVE_GST_LIBS" = "xno"; then AC_MSG_NOTICE(no GStreamer plugin libs found) fi - + dnl make GST_LIBS_CFLAGS and GST_LIBS_LIBS available AC_SUBST(GST_LIBS_CFLAGS) AC_SUBST(GST_LIBS_LIBS) diff --git a/gst-plugin/src/Makefile.am b/gst-plugin/src/Makefile.am index 0f1f6f4..f3d5322 100644 --- a/gst-plugin/src/Makefile.am +++ b/gst-plugin/src/Makefile.am @@ -1,5 +1,5 @@ # location where plug-in will be installed -plugindir= $(libdir)/gst +plugindir= $(libdir)/gstreamer-@GST_MAJORMINOR@ # change libgstplugin.la to something more suitable plugin_LTLIBRARIES = libgstplugin.la diff --git a/gst-plugin/src/gstplugin.c b/gst-plugin/src/gstplugin.c index 970145f..7357191 100644 --- a/gst-plugin/src/gstplugin.c +++ b/gst-plugin/src/gstplugin.c @@ -1,5 +1,5 @@ -/* - * +/* + * * GStreamer * Copyright (C) 1999-2001 Erik Walthinsen <omega@cse.ogi.edu> * @@ -30,10 +30,11 @@ static GstElementDetails plugin_details = { "PluginTemplate", "Generic/PluginTemplate", + "LGPL", "Generic Template Plugin", VERSION, "Thomas Vander Stichele <thomas@apestaart.org>", - "(C) 2002" + "(C) 2002, 2003" }; /* Filter signals and args */ @@ -62,58 +63,60 @@ GST_PAD_TEMPLATE_FACTORY (gst_plugin_template_src_factory, ); static void gst_plugin_template_class_init (GstPluginTemplateClass *klass); -static void gst_plugin_template_init (GstPluginTemplate *filter); +static void gst_plugin_template_init (GstPluginTemplate *filter); -static void gst_plugin_template_set_property (GObject *object, guint prop_id, - const GValue *value, +static void gst_plugin_template_set_property(GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec); -static void gst_plugin_template_get_property (GObject *object, guint prop_id, - GValue *value, +static void gst_plugin_template_get_property(GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec); -static void gst_plugin_template_update_plugin (const GValue *value, gpointer data); -static void gst_plugin_template_update_mute (const GValue *value, gpointer data); +static void gst_plugin_template_update_plugin(const GValue *value, + gpointer data); +static void gst_plugin_template_update_mute (const GValue *value, + gpointer data); -static void gst_plugin_template_chain (GstPad *pad, GstBuffer *buf); +static void gst_plugin_template_chain (GstPad *pad, GstBuffer *buf); static GstElementClass *parent_class = NULL; -/* this function handles the connection with other plug-ins */ -static GstPadConnectReturn -gst_plugin_template_connect (GstPad *pad, GstCaps *caps) +/* this function handles the link with other plug-ins */ +static GstPadLinkReturn +gst_plugin_template_link (GstPad *pad, GstCaps *caps) { GstPluginTemplate *filter; GstPad *otherpad; - + filter = GST_PLUGIN_TEMPLATE (gst_pad_get_parent (pad)); - g_return_val_if_fail (filter != NULL, GST_PAD_CONNECT_REFUSED); - g_return_val_if_fail (GST_IS_PLUGIN_TEMPLATE (filter), - GST_PAD_CONNECT_REFUSED); + g_return_val_if_fail (filter != NULL, GST_PAD_LINK_REFUSED); + g_return_val_if_fail (GST_IS_PLUGIN_TEMPLATE (filter), + GST_PAD_LINK_REFUSED); otherpad = (pad == filter->srcpad ? filter->sinkpad : filter->srcpad); - - if (GST_CAPS_IS_FIXED (caps)) + + if (GST_CAPS_IS_FIXED (caps)) { - /* caps are not fixed, so try to connect on the other side and see if + /* caps are not fixed, so try to link on the other side and see if * that works */ if (!gst_pad_try_set_caps (otherpad, caps)) - return GST_PAD_CONNECT_REFUSED; + return GST_PAD_LINK_REFUSED; /* caps on other side were accepted, so we're ok */ - return GST_PAD_CONNECT_OK; + return GST_PAD_LINK_OK; } - /* not enough information yet, delay negotation */ - return GST_PAD_CONNECT_DELAYED; + /* not enough information yet, delay negotation */ + return GST_PAD_LINK_DELAYED; } GType -gst_gst_plugin_template_get_type (void) +gst_gst_plugin_template_get_type (void) { static GType plugin_type = 0; - if (!plugin_type) + if (!plugin_type) { - static const GTypeInfo plugin_info = + static const GTypeInfo plugin_info = { sizeof (GstPluginTemplateClass), NULL, @@ -125,8 +128,8 @@ gst_gst_plugin_template_get_type (void) 0, (GInstanceInitFunc) gst_plugin_template_init, }; - plugin_type = g_type_register_static (GST_TYPE_ELEMENT, - "GstPluginTemplate", + plugin_type = g_type_register_static (GST_TYPE_ELEMENT, + "GstPluginTemplate", &plugin_info, 0); } return plugin_type; @@ -147,7 +150,7 @@ gst_plugin_template_class_init (GstPluginTemplateClass *klass) g_object_class_install_property (gobject_class, ARG_SILENT, g_param_spec_boolean ("silent", "Silent", "Produce verbose output ?", FALSE, G_PARAM_READWRITE)); - + gobject_class->set_property = gst_plugin_template_set_property; gobject_class->get_property = gst_plugin_template_get_property; } @@ -160,13 +163,13 @@ gst_plugin_template_class_init (GstPluginTemplateClass *klass) static void gst_plugin_template_init (GstPluginTemplate *filter) { - filter->sinkpad = gst_pad_new_from_template (gst_plugin_template_sink_factory (), + filter->sinkpad = gst_pad_new_from_template (gst_plugin_template_sink_factory (), "sink"); - gst_pad_set_connect_function (filter->sinkpad, gst_plugin_template_connect); - filter->srcpad = gst_pad_new_from_template (gst_plugin_template_src_factory (), + gst_pad_set_link_function (filter->sinkpad, gst_plugin_template_link); + filter->srcpad = gst_pad_new_from_template (gst_plugin_template_src_factory (), "src"); - gst_pad_set_connect_function (filter->srcpad, gst_plugin_template_connect); - + gst_pad_set_link_function (filter->srcpad, gst_plugin_template_link); + gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); gst_pad_set_chain_function (filter->sinkpad, gst_plugin_template_chain); @@ -188,7 +191,7 @@ gst_plugin_template_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (GST_IS_PAD (pad)); g_return_if_fail (buf != NULL); - + filter = GST_PLUGIN_TEMPLATE (GST_OBJECT_PARENT (pad)); g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (filter)); @@ -200,15 +203,15 @@ gst_plugin_template_chain (GstPad *pad, GstBuffer *buf) } static void -gst_plugin_template_set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) +gst_plugin_template_set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) { GstPluginTemplate *filter; g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (object)); filter = GST_PLUGIN_TEMPLATE (object); - switch (prop_id) + switch (prop_id) { case ARG_SILENT: filter->silent = g_value_get_boolean (value); @@ -220,14 +223,14 @@ gst_plugin_template_set_property (GObject *object, guint prop_id, } static void -gst_plugin_template_get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) +gst_plugin_template_get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) { GstPluginTemplate *filter; g_return_if_fail (GST_IS_PLUGIN_TEMPLATE (object)); filter = GST_PLUGIN_TEMPLATE (object); - + switch (prop_id) { case ARG_SILENT: g_value_set_boolean (value, filter->silent); @@ -241,7 +244,7 @@ gst_plugin_template_get_property (GObject *object, guint prop_id, /* entry point to initialize the plug-in * initialize the plug-in itself * register the element factories and pad templates - * register the features + * register the features */ static gboolean plugin_init (GModule *module, GstPlugin *plugin) @@ -251,10 +254,10 @@ plugin_init (GModule *module, GstPlugin *plugin) factory = gst_element_factory_new ("plugin", GST_TYPE_PLUGIN_TEMPLATE, &plugin_details); g_return_val_if_fail (factory != NULL, FALSE); - - gst_element_factory_add_pad_template (factory, + + gst_element_factory_add_pad_template (factory, gst_plugin_template_src_factory ()); - gst_element_factory_add_pad_template (factory, + gst_element_factory_add_pad_template (factory, gst_plugin_template_sink_factory ()); gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); |