gnomemm r1806 - in gstreamermm/trunk: . build_shared gstreamer/gstreamermm gstreamer/gstreamermm/private gstreamer/src gstreamerbase/gstreamerbasemm gstreamerbase/gstreamerbasemm/private gstreamerbase/src tools/extra_defs_gen
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1806 - in gstreamermm/trunk: . build_shared gstreamer/gstreamermm gstreamer/gstreamermm/private gstreamer/src gstreamerbase/gstreamerbasemm gstreamerbase/gstreamerbasemm/private gstreamerbase/src tools/extra_defs_gen
- Date: Fri, 21 Nov 2008 03:05:13 +0000 (UTC)
Author: jaalburqu
Date: Fri Nov 21 03:05:12 2008
New Revision: 1806
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1806&view=rev
Log:
2008-11-20 Josà Alburquerque <jaalburqu svn gnome org>
* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc: Modified
plug-in generation tool to prepend namespaces to parent types and use
correct include roots in cases where parent types are from
gstreamermm. Added --sugest-hg option that outputs what the name of
the .hg file should if the plug-in exists (nothing otherwise) while
building gstreamermm. Modified it to output a comment warning in the
.hg file if a plug-in is not available.
* build_shared/Makefile_build_gensrc.am_fragment:
* build_shared/Makefile_gensrc.am_fragment:
* gstreamer/gstreamermm/Makefile.am:
* gstreamer/gstreamermm/private/Makefile.am:
* gstreamerbase/gstreamerbasemm/Makefile.am:
* gstreamerbase/gstreamerbasemm/private/Makefile.am: Modified build
process so that all plug-ins are generated and compiled, but only
included in wrap_init() if they exist during the build.
* gstreamer/src/Makefile_list_of_hg.am_fragment: Added dvbsrc
plug-in[1] from gst-plugins-ugly to list of plug-ins to build (which
will not exist in jhbuild environment) to test compilation of a
plug-in that is not available. Also added fakesink from the core
plugins[2].
* gstreamerbase/src/Makefile_list_of_hg.am_fragment: Added
audioconvert plug-in[3] from gst-plugins-base to list of plug-ins to
build for gstreamerbasemm. These plug-in additions are just tests to
ensure build process works.
[1] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-dvbsrc.html
[2] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-fakesink.html
[3] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-audioconvert.html
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/build_shared/Makefile_build_gensrc.am_fragment
gstreamermm/trunk/build_shared/Makefile_gensrc.am_fragment
gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am
gstreamermm/trunk/gstreamer/gstreamermm/private/Makefile.am
gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am
gstreamermm/trunk/gstreamerbase/gstreamerbasemm/private/Makefile.am
gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment
gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
Modified: gstreamermm/trunk/build_shared/Makefile_build_gensrc.am_fragment
==============================================================================
--- gstreamermm/trunk/build_shared/Makefile_build_gensrc.am_fragment (original)
+++ gstreamermm/trunk/build_shared/Makefile_build_gensrc.am_fragment Fri Nov 21 03:05:12 2008
@@ -39,15 +39,12 @@
$(files_posix_hg) \
$(files_win32_hg) \
$(files_general_hg) \
- $(files_plugin_hg) \
$(files_general_deprecated_hg)
if OS_WIN32
-files_hg = $(files_general_hg) $(files_win32_hg) $(files_plugin_hg) \
- $(files_general_deprecated_hg)
+files_hg = $(files_general_hg) $(files_win32_hg) $(files_general_deprecated_hg)
else
-files_hg = $(files_general_hg) $(files_posix_hg) $(files_plugin_hg) \
- $(files_general_deprecated_hg)
+files_hg = $(files_general_hg) $(files_posix_hg) $(files_general_deprecated_hg)
endif
files_built_cc = $(files_hg:.hg=.cc) wrap_init.cc
Modified: gstreamermm/trunk/build_shared/Makefile_gensrc.am_fragment
==============================================================================
--- gstreamermm/trunk/build_shared/Makefile_gensrc.am_fragment (original)
+++ gstreamermm/trunk/build_shared/Makefile_gensrc.am_fragment Fri Nov 21 03:05:12 2008
@@ -27,6 +27,7 @@
files_h = $(files_all_hg:%.hg=$(gensrc_destdir)/%.h)
files_cc = $(files_all_hg:%.hg=$(gensrc_destdir)/%.cc)
files_stamp = $(files_all_hg:%.hg=$(stamp_dir)/stamp-%)
+files_stamp += $(files_plugin_hg:%.hg=$(stamp_dir)/stamp-%)
#Installed gmmproc stuff, from glibmm:
gmmproc_path = $(GMMPROC)
@@ -73,9 +74,14 @@
sublib_srcdir = $(srcdir)/../src
files_hg_with_path = $(patsubst %.hg,$(sublib_srcdir)/%.hg,$(files_all_hg))
+files_plugin_hg_with_path = $(patsubst %.hg,$(sublib_srcdir)/%.hg,$(files_plugin_hg))
-$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_path) $(files_hg_with_path) Makefile
- $(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) >$@
+$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_path) $(files_hg_with_path) \
+ $(files_plugin_hg_with_path) Makefile
+ $(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) \
+ $(filter %.hg,$(foreach plugin,$(subst .hg,,$(files_plugin_hg)), \
+ ./$(shell $(run_generate_plugin_gmmproc_file) \
+ --suggest-hg $(plugin)))) >$@
$(gensrc_destdir)/gst_wrap_init.cc: $(gen_gst_wrap_init_in) $(files_hg_with_path) Makefile
$(run_gen_gst_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) >$@
Modified: gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/Makefile.am Fri Nov 21 03:05:12 2008
@@ -24,7 +24,7 @@
include $(top_srcdir)/build_shared/Makefile_build.am_fragment
lib_LTLIBRARIES = libgstreamermm-0.10.la
-libgstreamermm_0_10_la_SOURCES = $(files_built_cc) $(files_extra_cc)
+libgstreamermm_0_10_la_SOURCES = $(files_built_cc) $(files_extra_cc) $(files_plugin_built_cc)
libgstreamermm_0_10_la_LDFLAGS = $(common_ldflags)
libgstreamermm_0_10_la_LIBADD = $(GSTREAMERMM_LIBS)
Modified: gstreamermm/trunk/gstreamer/gstreamermm/private/Makefile.am
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/private/Makefile.am (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/private/Makefile.am Fri Nov 21 03:05:12 2008
@@ -5,18 +5,18 @@
files_built_p_h = $(files_hg:.hg=_p.h)
files_built_all_p_h = $(files_all_hg:.hg=_p.h)
+files_built_plugin_p_h = $(files_plugin_hg:.hg=_p.h)
files_extra_p_h = object_p.h miniobject_p.h taglist_p.h
files_extra_all_p_h = object_p.h miniobject_p.h taglist_p.h
-dist_sources = $(files_built_all_p_h) $(files_extra_all_p_h)
+dist_sources = $(files_built_all_p_h) $(files_extra_all_p_h) \
+ $(files_built_plugin_p_h)
DISTFILES = $(DIST_COMMON) $(dist_sources)
+CLEANFILES = $(files_built_plugin_p_h)
+
private_includedir = $(includedir)/gstreamermm-0.10/gstreamermm/private
private_include_HEADERS = $(files_built_p_h) $(files_extra_p_h)
maintainer-clean-local:
- (cd $(srcdir) && rm -f $(files_built_p_h))
-
-
-
-
+ (cd $(srcdir) && rm -f $(files_built_p_h) $(files_built_plugin_p_h))
Modified: gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment (original)
+++ gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment Fri Nov 21 03:05:12 2008
@@ -17,6 +17,6 @@
files_general_deprecated_hg =
-files_plugin_hg = fakesrc.hg
+files_plugin_hg = fakesrc.hg dvbsrc.hg fakesink.hg
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
Modified: gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am
==============================================================================
--- gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am (original)
+++ gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am Fri Nov 21 03:05:12 2008
@@ -24,7 +24,6 @@
include $(top_srcdir)/build_shared/Makefile_build.am_fragment
lib_LTLIBRARIES = libgstreamerbasemm-0.10.la
-libgstreamerbasemm_0_10_la_SOURCES = $(files_built_cc) $(files_extra_cc)
+libgstreamerbasemm_0_10_la_SOURCES = $(files_built_cc) $(files_extra_cc) $(files_plugin_built_cc)
libgstreamerbasemm_0_10_la_LDFLAGS = $(common_ldflags)
libgstreamerbasemm_0_10_la_LIBADD = $(GSTREAMERBASEMM_LIBS) $(top_builddir)/gstreamer/gstreamermm/libgstreamermm-0.10.la
-
Modified: gstreamermm/trunk/gstreamerbase/gstreamerbasemm/private/Makefile.am
==============================================================================
--- gstreamermm/trunk/gstreamerbase/gstreamerbasemm/private/Makefile.am (original)
+++ gstreamermm/trunk/gstreamerbase/gstreamerbasemm/private/Makefile.am Fri Nov 21 03:05:12 2008
@@ -2,10 +2,21 @@
## The gstreamermm development team.
include $(srcdir)/../../src/Makefile_list_of_hg.am_fragment
-files_built_p_h = $(files_all_hg:.hg=_p.h)
+
+files_built_p_h = $(files_hg:.hg=_p.h)
+files_built_all_p_h = $(files_all_hg:.hg=_p.h)
+files_built_plugin_p_h = $(files_plugin_hg:.hg=_p.h)
+files_extra_p_h =
+files_extra_all_p_h =
+
+dist_sources = $(files_built_all_p_h) $(files_extra_all_p_h) \
+ $(files_built_plugin_p_h)
+DISTFILES = $(DIST_COMMON) $(dist_sources)
+
+CLEANFILES = $(files_built_plugin_p_h)
private_includedir = $(includedir)/gstreamerbasemm-0.10/gstreamerbasemm/private
-private_include_HEADERS = $(files_built_p_h)
+private_include_HEADERS = $(files_built_p_h) $(files_extra_p_h)
maintainer-clean-local:
- (cd $(srcdir) && rm -f $(files_built_p_h))
+ (cd $(srcdir) && rm -f $(files_built_p_h) $(files_built_plugin_p_h))
Modified: gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment (original)
+++ gstreamermm/trunk/gstreamerbase/src/Makefile_list_of_hg.am_fragment Fri Nov 21 03:05:12 2008
@@ -8,6 +8,6 @@
files_general_deprecated_hg =
-files_plugin_hg =
+files_plugin_hg = audioconvert.hg
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc (original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc Fri Nov 21 03:05:12 2008
@@ -34,6 +34,8 @@
static Glib::ustring cppTypeName;
static Glib::ustring cppParentTypeName;
static Glib::ustring castMacro;
+static Glib::ustring includeRoot;
+static Glib::ustring parentNameSpace;
Glib::ustring get_cast_macro(const Glib::ustring& typeName)
{
@@ -58,7 +60,7 @@
void generate_hg_file()
{
- std::cout << "#include <" << target << "/" <<
+ std::cout << "#include <" << includeRoot << "/" <<
cppParentTypeName.lowercase() << ".h>" << std::endl << std::endl;
std::cout << "_DEFS(" << target << "," << defsFile << ")" << std::endl <<
@@ -71,11 +73,13 @@
std::cout << " * Please include <" << target << "/" << cppTypeName.lowercase() << ".h> to use." << std::endl;
std::cout << " */" << std::endl;
std::cout << "class " << cppTypeName << std::endl;
- std::cout << ": public " << cppParentTypeName << std::endl;
+ std::cout << ": public " << parentNameSpace << "::" << cppParentTypeName <<
+ std::endl;
std::cout << "{" << std::endl;
std::cout << " _CLASS_GOBJECT(" << cppTypeName << ", " << cTypeName <<
- ", " << castMacro << ", " << cppParentTypeName <<
- ", " << cParentTypeName << ")" << std::endl << std::endl;
+ ", " << castMacro << ", " << parentNameSpace << "::" <<
+ cppParentTypeName << ", " << cParentTypeName << ")" << std::endl <<
+ std::endl;
std::cout << "protected:" << std::endl;
std::cout << " " << cppTypeName << "();" << std::endl;
@@ -96,7 +100,7 @@
void generate_ccg_file()
{
- std::cout << "_PINCLUDE(" << target << "/private/" <<
+ std::cout << "_PINCLUDE(" << includeRoot << "/private/" <<
cppParentTypeName.lowercase() << "_p.h)" << std::endl;
std::cout << "#include <glib/gprintf.h>" << std::endl << std::endl;
@@ -146,17 +150,19 @@
{
gboolean hgFile = false;
gboolean ccgFile = false;
+ gboolean suggestHg = false;
if (!g_thread_supported())
g_thread_init(NULL);
GOptionEntry optionEntries[] =
{
- {"hg", 'h', 0, G_OPTION_ARG_NONE, &hgFile, "Generate .hg file", NULL },
- {"ccg", 'c', 0, G_OPTION_ARG_NONE, &ccgFile, "Generate .ccg file", NULL },
- {"namespace", 'n', 0, G_OPTION_ARG_STRING, &nmspace, "The namespace of the plugin", "namespace" },
- {"main-defs", 'm', 0, G_OPTION_ARG_STRING, &defsFile, "The main .defs file without .defs extension (used in _DEFS() directive)", "def" },
- {"target", 't', 0, G_OPTION_ARG_STRING, &target, "The target directory of the generated .h and .cc files (used in _DEFS() directive)", "directory" },
+ {"hg", 'h', 0, G_OPTION_ARG_NONE, &hgFile, "Generate .hg file.", NULL },
+ {"ccg", 'c', 0, G_OPTION_ARG_NONE, &ccgFile, "Generate .ccg file.", NULL },
+ {"suggest-hg", 's', 0, G_OPTION_ARG_NONE, &suggestHg, "If the plugin exists, output the suggested .hg filename.", NULL },
+ {"namespace", 'n', 0, G_OPTION_ARG_STRING, &nmspace, "The namespace of the plugin.", "namespace" },
+ {"main-defs", 'm', 0, G_OPTION_ARG_STRING, &defsFile, "The main .defs file without .defs extension (used in _DEFS() directive).", "def" },
+ {"target", 't', 0, G_OPTION_ARG_STRING, &target, "The target directory of the generated .h and .cc files (used in _DEFS() directive).", "directory" },
{ NULL }
};
@@ -215,13 +221,43 @@
cppParentTypeName = cParentTypeName.substr(3);
castMacro = get_cast_macro(cTypeName);
+ if (cppParentTypeName.compare("BaseSsrc") == 0 ||
+ cppParentTypeName.compare("BaseSink") == 0 ||
+ cppParentTypeName.compare("BaseTransform") == 0 ||
+ cppParentTypeName.compare("PushSrc") == 0 ||
+ cppParentTypeName.compare("Element") == 0)
+ {
+ includeRoot = "gstreamermm";
+ parentNameSpace = "Gst";
+ }
+ else
+ {
+ includeRoot = target;
+ parentNameSpace = nmspace;
+ }
+
if (hgFile)
generate_hg_file();
else if (ccgFile)
generate_ccg_file();
+ else if (suggestHg)
+ std::cout << pluginName << ".hg" << std::endl;
g_object_unref(factory);
}
+ else
+ {
+ if (hgFile)
+ {
+ std::cout << "_DEFS(" << target << "," << defsFile << ")" <<
+ std::endl << std::endl;
+
+ std::cout << "// The build system does not have a plugin named " <<
+ argv[1] << "." << std::endl;
+ std::cout << "// A wrapper class for it was not generated." <<
+ std::endl;
+ }
+ }
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]