[gstreamermm] Remove the optional API #ifdefs.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Remove the optional API #ifdefs.
- Date: Mon, 7 Jun 2010 05:17:13 +0000 (UTC)
commit 24ab23049d69291435e4f3cc9b79acd70affeefe
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Sun Jun 6 23:41:38 2010 -0400
Remove the optional API #ifdefs.
As in gtkmm, remove the #ifdefs related to optional API like
exceptions, virtual functions, etc. because now the API is not
optional.
ChangeLog | 8 +++
examples/element_link/element_link.cc | 8 ---
examples/media_player_gtkmm/main.cc | 4 -
examples/media_player_gtkmm/player_window.cc | 4 -
examples/ogg_player/main.cc | 8 ---
examples/ogg_player_gtkmm/main.cc | 8 ---
examples/optiongroup/main.cc | 10 ---
examples/typefind/main.cc | 12 ----
gstreamer/gstreamermm/handle_error.cc | 4 -
gstreamer/gstreamermm/handle_error.h | 3 -
gstreamer/gstreamermm/init.cc | 18 ------
gstreamer/gstreamermm/init.h | 8 ---
gstreamer/gstreamermm/miniobject.cc | 4 -
gstreamer/gstreamermm/miniobject.h | 2 -
gstreamer/gstreamermm/private/miniobject_p.h | 2 -
gstreamer/src/audioclock.ccg | 4 -
gstreamer/src/audiofilter.ccg | 6 --
gstreamer/src/audiofilter.hg | 2 -
gstreamer/src/audiosink.ccg | 10 ---
gstreamer/src/audiosink.hg | 4 -
gstreamer/src/audiosrc.ccg | 10 ---
gstreamer/src/audiosrc.hg | 4 -
gstreamer/src/basesink.ccg | 7 +--
gstreamer/src/basesink.hg | 2 -
gstreamer/src/basesrc.ccg | 14 -----
gstreamer/src/basesrc.hg | 6 --
gstreamer/src/basetransform.ccg | 6 --
gstreamer/src/basetransform.hg | 2 -
gstreamer/src/bus.ccg | 8 ---
gstreamer/src/cddabasesrc.ccg | 10 ---
gstreamer/src/cddabasesrc.hg | 4 -
gstreamer/src/clock.ccg | 4 -
gstreamer/src/colorbalance.ccg | 6 --
gstreamer/src/colorbalance.hg | 2 -
gstreamer/src/element.ccg | 10 ---
gstreamer/src/element.hg | 2 -
gstreamer/src/event.ccg | 2 -
gstreamer/src/event.hg | 4 -
gstreamer/src/filter.ccg | 4 -
gstreamer/src/index.ccg | 14 -----
gstreamer/src/index.hg | 2 -
gstreamer/src/message.ccg | 2 -
gstreamer/src/message.hg | 4 -
gstreamer/src/mixer.ccg | 10 ---
gstreamer/src/mixer.hg | 2 -
gstreamer/src/navigation.ccg | 6 --
gstreamer/src/navigation.hg | 2 -
gstreamer/src/object.ccg | 10 ---
gstreamer/src/object.hg | 2 -
gstreamer/src/pad.ccg | 8 ---
gstreamer/src/parse.ccg | 27 ---------
gstreamer/src/parse.hg | 12 ----
gstreamer/src/plugin.ccg | 4 -
gstreamer/src/preset.ccg | 14 -----
gstreamer/src/preset.hg | 4 -
gstreamer/src/query.ccg | 2 -
gstreamer/src/query.hg | 4 -
gstreamer/src/registry.ccg | 8 ---
gstreamer/src/ringbuffer.ccg | 14 -----
gstreamer/src/ringbuffer.hg | 4 -
gstreamer/src/structure.ccg | 8 ---
gstreamer/src/taglist.ccg | 4 -
gstreamer/src/task.ccg | 12 ----
gstreamer/src/taskpool.ccg | 59 +-------------------
gstreamer/src/taskpool.hg | 17 ------
gstreamer/src/tuner.ccg | 10 ---
gstreamer/src/tuner.hg | 4 -
gstreamer/src/typefind.ccg | 4 -
gstreamer/src/videoorientation.ccg | 10 ---
gstreamer/src/videoorientation.hg | 2 -
tests/test-caps.cc | 4 -
tests/test-init-check-noargs.cc | 11 ----
tests/test-init-check.cc | 11 ----
tests/test-iterator.cc | 12 ----
tests/test-plugin-signals.cc | 12 ----
.../extra_defs_gen/generate_plugin_gmmproc_file.cc | 10 ---
tools/m4/class_gstminiobject.m4 | 2 -
77 files changed, 10 insertions(+), 573 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e6fb04f..39f2c6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-06 José Alburquerque <jaalburqu svn gnome org>
+
+ Remove the optional API #ifdefs.
+
+ As in gtkmm, remove the #ifdefs related to optional API like
+ exceptions, virtual functions, etc. because now the API is not
+ optional.
+
0.10.7.3:
2010-05-30 José Alburquerque <jaalburqu svn gnome org>
diff --git a/examples/element_link/element_link.cc b/examples/element_link/element_link.cc
index a14e751..98af2aa 100644
--- a/examples/element_link/element_link.cc
+++ b/examples/element_link/element_link.cc
@@ -36,32 +36,24 @@ int main(int argc, char** argv)
element_sink = Gst::ElementFactory::create_element("fakesink");
// We must add the elements to the pipeline before linking them:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
pipeline->add(element_source)->add(element_filter)->add(element_sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch (std::runtime_error& ex)
{
std::cerr << "Exception while adding: " << ex.what() << std::endl;
return 1;
}
-#endif
// Link the elements together:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
element_source->link(element_filter)->link(element_sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const std::runtime_error& error)
{
std::cerr << "Exception while linking: " << error.what() << std::endl;
}
-#endif
return 0;
}
diff --git a/examples/media_player_gtkmm/main.cc b/examples/media_player_gtkmm/main.cc
index fde681d..b52b9fa 100644
--- a/examples/media_player_gtkmm/main.cc
+++ b/examples/media_player_gtkmm/main.cc
@@ -57,11 +57,7 @@ int main(int argc, char** argv)
// Set the playbin's video-sink property so that our video sink is used
// for video display:
-#ifdef GLIBMM_PROPERTIES_ENABLED
playbin->property_video_sink() = video_sink;
-#else
- playbin->set_property("video_sink", video_sink);
-#endif
//Create our player window and give it the pipeline and video sink:
PlayerWindow mainWindow(playbin, video_sink);
diff --git a/examples/media_player_gtkmm/player_window.cc b/examples/media_player_gtkmm/player_window.cc
index 61d4621..cc7fea8 100644
--- a/examples/media_player_gtkmm/player_window.cc
+++ b/examples/media_player_gtkmm/player_window.cc
@@ -373,11 +373,7 @@ void PlayerWindow::on_button_open()
working_dir = chooser.get_current_folder();
// Set uri property on the playbin.
-#ifdef GLIBMM_PROPERTIES_ENABLED
m_play_bin->property_uri() = chooser.get_uri();
-#else
- m_play_bin->set_property("uri", chooser.get_uri());
-#endif
// Resize m_video_area and window to minimum when opening a file
m_video_area.set_size_request(0, 0);
diff --git a/examples/ogg_player/main.cc b/examples/ogg_player/main.cc
index 842d9b4..31b317e 100644
--- a/examples/ogg_player/main.cc
+++ b/examples/ogg_player/main.cc
@@ -188,25 +188,19 @@ int main(int argc, char** argv)
// Put all the elements in a pipeline:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
pipeline->add(source)->add(parser)->add(decoder)->add(conv)->add(sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const Glib::Error& ex)
{
std::cerr << "Error while adding elements to the pipeline: " << ex.what() << std::endl;
return 1;
}
-#endif
// Link the elements together:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
source->link(parser);
// We cannot link the parser and decoder yet,
@@ -215,13 +209,11 @@ int main(int argc, char** argv)
parser->signal_pad_added().connect( sigc::ptr_fun(&on_parser_pad_added) );
decoder->link(conv)->link(sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const std::runtime_error& ex)
{
std::cout << "Exception while linking elements: " << ex.what() << std::endl;
}
-#endif
// Call on_timeout function at a 200ms
// interval to regularly print the position of the stream
diff --git a/examples/ogg_player_gtkmm/main.cc b/examples/ogg_player_gtkmm/main.cc
index e641f71..90a91fa 100644
--- a/examples/ogg_player_gtkmm/main.cc
+++ b/examples/ogg_player_gtkmm/main.cc
@@ -100,25 +100,19 @@ int main(int argc, char** argv)
// Put all elements in a pipeline:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
pipeline->add(source)->add(parser)->add(decoder)->add(conv)->add(sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const std::runtime_error& ex)
{
std::cerr << "Error while adding elements to the pipeline: " << ex.what() << std::endl;
return 1;
}
-#endif
// Link the elements together:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
source->link(parser);
// We cannot link the parser and decoder yet,
@@ -127,13 +121,11 @@ int main(int argc, char** argv)
parser->signal_pad_added().connect( sigc::ptr_fun(&on_parser_pad_added) );
decoder->link(conv)->link(sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const std::runtime_error& ex)
{
std::cout << "Exception while linking elements: " << ex.what() << std::endl;
}
-#endif
// Create our window and show it:
PlayerWindow mainWindow(source, pipeline);
diff --git a/examples/optiongroup/main.cc b/examples/optiongroup/main.cc
index 171eeb4..f6cd306 100644
--- a/examples/optiongroup/main.cc
+++ b/examples/optiongroup/main.cc
@@ -54,7 +54,6 @@ int main(int argc, char** argv)
Glib::OptionGroup m_GstOptiongroup = Gst::get_option_group();
m_OptionContext.add_group(m_GstOptiongroup);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
m_OptionContext.parse(argc, argv);
@@ -64,15 +63,6 @@ int main(int argc, char** argv)
std::cout << "Failed to initialize: " << error.what() << std::endl;
return 1;
}
-#else
- std::auto_ptr<Glib::Error> ex;
- m_OptionContext.parse(argc, argv, ex);
- if (ex.get())
- {
- std::cout << "Failed to initialize" << ex->what() << std::endl;
- return 1;
- }
-#endif
std::cout << "Run me with --help to see the Application options appended.\n";
return 0;
diff --git a/examples/typefind/main.cc b/examples/typefind/main.cc
index 5e7975e..76c2c32 100644
--- a/examples/typefind/main.cc
+++ b/examples/typefind/main.cc
@@ -81,11 +81,7 @@ int main(int argc, char** argv)
// Create elements:
Glib::RefPtr<Gst::FileSrc> element_source = Gst::FileSrc::create();
-#ifdef GLIBMM_PROPERTIES_ENABLED
element_source->property_location() = filename;
-#else
- element_source->set_property("location", filename);
-#endif /* GLIBMM_PROPERTIES_ENABLED */
//If using an MP3 file, this should provide more Caps information from typefind.
//Glib::RefPtr<Gst::Element> element_id3demux = Gst::ElementFactory::create_element("id3demux");
@@ -97,36 +93,28 @@ int main(int argc, char** argv)
Glib::RefPtr<Gst::Element> element_sink = Gst::FakeSink::create();
// We must add the elements to the pipeline before linking them:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
pipeline->add(element_source)->add(element_typefind)->add(element_sink);
//pipeline->add(element_source)->add(element_id3demux)->add(element_typefind)->add(element_sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch (std::runtime_error& ex)
{
std::cerr << "Exception while adding: " << ex.what() << std::endl;
return 1;
}
-#endif
// Link the elements together:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
//element_source->link(element_id3demux)->link(element_typefind)->link(element_sink);
element_source->link(element_typefind)->link(element_sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const std::runtime_error& error)
{
std::cerr << "Exception while linking: " << error.what() << std::endl;
return 1;
}
-#endif
// Now set the whole pipeline to playing and start the main loop:
std::cout << "Setting pipeline to PLAYING." << std::endl;
diff --git a/gstreamer/gstreamermm/handle_error.cc b/gstreamer/gstreamermm/handle_error.cc
index b4c8f05..b05ba0c 100644
--- a/gstreamer/gstreamermm/handle_error.cc
+++ b/gstreamer/gstreamermm/handle_error.cc
@@ -24,11 +24,7 @@ namespace Gst
void gstreamermm_handle_error(const Glib::ustring& message)
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
throw std::runtime_error(message);
-#else
- std::cerr << "gstreamermm: " << message << std::endl;
-#endif
}
}
diff --git a/gstreamer/gstreamermm/handle_error.h b/gstreamer/gstreamermm/handle_error.h
index d240d8d..c59c049 100644
--- a/gstreamer/gstreamermm/handle_error.h
+++ b/gstreamer/gstreamermm/handle_error.h
@@ -22,9 +22,6 @@
#include <glibmm/ustring.h>
#include <stdexcept>
-#ifndef GLIBMM_EXCEPTIONS_ENABLED
-#include <iostream>
-#endif
namespace Gst
{
diff --git a/gstreamer/gstreamermm/init.cc b/gstreamer/gstreamermm/init.cc
index 6bfc46d..0205428 100644
--- a/gstreamer/gstreamermm/init.cc
+++ b/gstreamer/gstreamermm/init.cc
@@ -69,11 +69,7 @@ void init()
}
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool init_check(int& argc, char**& argv)
-#else
-bool init_check(int& argc, char**& argv, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
static bool s_init = false;
static bool result = false;
@@ -85,13 +81,8 @@ bool init_check(int& argc, char**& argv, std::auto_ptr<Glib::Error>& error)
GError* gerror = 0;
result = gst_init_check(&argc, &argv, &gerror);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
initialize_wrap_system();
s_init = true;
@@ -100,11 +91,7 @@ bool init_check(int& argc, char**& argv, std::auto_ptr<Glib::Error>& error)
return result;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool init_check()
-#else
-bool init_check(std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
static bool s_init = false;
static bool result = false;
@@ -116,13 +103,8 @@ bool init_check(std::auto_ptr<Glib::Error>& error)
GError* gerror = 0;
result = gst_init_check(0, 0, &gerror);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
initialize_wrap_system();
s_init = true;
diff --git a/gstreamer/gstreamermm/init.h b/gstreamer/gstreamermm/init.h
index 89a0696..5e53c20 100644
--- a/gstreamer/gstreamermm/init.h
+++ b/gstreamer/gstreamermm/init.h
@@ -105,11 +105,7 @@ void init();
* @return true if GStreamer could be initialized.
* @throw Glib::Error
*/
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool init_check(int& argc, char**& argv);
-#else
- bool init_check(int& argc, char**& argv, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
/** Initializes gstreamermm gracefully without parsing command line arguments.
*
@@ -134,11 +130,7 @@ void init();
* @return true if GStreamer could be initialized.
* @throw Glib::Error
*/
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
bool init_check();
-#else
- bool init_check(std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
/** Returns a Glib::OptionGroup with GStreamer's argument specifications. The
* group is set up to use standard GOption callbacks, so when using this group
diff --git a/gstreamer/gstreamermm/miniobject.cc b/gstreamer/gstreamermm/miniobject.cc
index 50177da..d06ec97 100644
--- a/gstreamer/gstreamermm/miniobject.cc
+++ b/gstreamer/gstreamermm/miniobject.cc
@@ -41,10 +41,8 @@ void MiniObject_Class::class_init_function(void* g_class, void* /*class_data*/)
{
BaseClassType* const klass = static_cast<BaseClassType*>(g_class);
-#ifdef GLIBMM_VFUNCS_ENABLED
klass->copy = ©_vfunc_callback;
klass->finalize = &finalize_vfunc_callback;
-#endif //GLIBMM_VFUNCS_ENABLED
}
MiniObject* MiniObject_Class::wrap_new(GstMiniObject* object)
@@ -144,7 +142,6 @@ Glib::RefPtr<Gst::MiniObject> MiniObject::create_writable()
return Gst::wrap(gst_mini_object_make_writable(gobject_));
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstMiniObject* MiniObject_Class::copy_vfunc_callback(const GstMiniObject* self)
{
BaseClassType *const base = static_cast<BaseClassType*>(
@@ -188,7 +185,6 @@ void Gst::MiniObject::finalize_vfunc()
if(base && base->finalize)
(*base->finalize)(gobj());
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/gstreamermm/miniobject.h b/gstreamer/gstreamermm/miniobject.h
index dea74b3..e46368f 100644
--- a/gstreamer/gstreamermm/miniobject.h
+++ b/gstreamer/gstreamermm/miniobject.h
@@ -128,7 +128,6 @@ public:
// static void replace(Glib::RefPtr<Gst::MiniObject> & olddata, Glib::RefPtr<Gst::MiniObject> & newdata);
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::MiniObject needs to be copied.
*/
virtual Glib::RefPtr<Gst::MiniObject> copy_vfunc() const;
@@ -137,7 +136,6 @@ public:
* finalized.
*/
virtual void finalize_vfunc();
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
diff --git a/gstreamer/gstreamermm/private/miniobject_p.h b/gstreamer/gstreamermm/private/miniobject_p.h
index c9f6097..6e6902a 100644
--- a/gstreamer/gstreamermm/private/miniobject_p.h
+++ b/gstreamer/gstreamermm/private/miniobject_p.h
@@ -42,10 +42,8 @@ public:
protected:
-#ifdef GLIBMM_VFUNCS_ENABLED
static GstMiniObject* copy_vfunc_callback(const GstMiniObject* self);
static void finalize_vfunc_callback(GstMiniObject* self);
-#endif //GLIBMM_VFUNCS_ENABLED
};
diff --git a/gstreamer/src/audioclock.ccg b/gstreamer/src/audioclock.ccg
index 2b6b169..5a30e16 100644
--- a/gstreamer/src/audioclock.ccg
+++ b/gstreamer/src/audioclock.ccg
@@ -31,18 +31,14 @@ static GstClockTime AudioClock_GetTime_gstreamermm_callback(GstClock* clock, voi
{
Gst::AudioClock::SlotGetTime* the_slot = static_cast<Gst::AudioClock::SlotGetTime*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return (*the_slot)(Glib::wrap(clock, true));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return 0; // arbitrary value
}
diff --git a/gstreamer/src/audiofilter.ccg b/gstreamer/src/audiofilter.ccg
index df61cf5..395c50b 100644
--- a/gstreamer/src/audiofilter.ccg
+++ b/gstreamer/src/audiofilter.ccg
@@ -24,7 +24,6 @@ _PINCLUDE(gstreamermm/private/basetransform_p.h)
namespace Gst
{
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean AudioFilter_Class::setup_vfunc_callback(GstAudioFilter* self, GstRingBufferSpec* format)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -40,21 +39,17 @@ gboolean AudioFilter_Class::setup_vfunc_callback(GstAudioFilter* self, GstRingBu
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Gst::RingBufferSpec spec(*format);
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->setup_vfunc(spec));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -82,6 +77,5 @@ bool Gst::AudioFilter::setup_vfunc(Gst::RingBufferSpec& format)
typedef bool RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/audiofilter.hg b/gstreamer/src/audiofilter.hg
index 6133f37..b63c871 100644
--- a/gstreamer/src/audiofilter.hg
+++ b/gstreamer/src/audiofilter.hg
@@ -46,11 +46,9 @@ class AudioFilter : public Gst::BaseTransform
_CLASS_GOBJECT(AudioFilter, GstAudioFilter, GST_AUDIO_FILTER, Gst::BaseTransform, GstBaseTransform)
public:
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function, called whenever the format changes.
*/
virtual bool setup_vfunc(Gst::RingBufferSpec& format);
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/audiosink.ccg b/gstreamer/src/audiosink.ccg
index 15bf7d4..00ce6b6 100644
--- a/gstreamer/src/audiosink.ccg
+++ b/gstreamer/src/audiosink.ccg
@@ -23,7 +23,6 @@ _PINCLUDE(gstreamermm/private/baseaudiosink_p.h)
namespace Gst
{
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean AudioSink_Class::prepare_vfunc_callback(GstAudioSink* self, GstRingBufferSpec* spec)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -39,21 +38,17 @@ gboolean AudioSink_Class::prepare_vfunc_callback(GstAudioSink* self, GstRingBuff
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Gst::RingBufferSpec cpp_spec(*spec);
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->prepare_vfunc(cpp_spec));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -96,19 +91,15 @@ guint AudioSink_Class::write_vfunc_callback(GstAudioSink* self, gpointer data, g
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return obj->write_vfunc(data, length);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -136,6 +127,5 @@ guint Gst::AudioSink::write_vfunc(const void* data, guint length)
typedef guint RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/audiosink.hg b/gstreamer/src/audiosink.hg
index 09518dd..7da5291 100644
--- a/gstreamer/src/audiosink.hg
+++ b/gstreamer/src/audiosink.hg
@@ -60,11 +60,9 @@ public:
//*/
//_WRAP_VFUNC(bool open(), "open")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** vfunc to prepare the device to operate with the specified parameters.
*/
virtual bool prepare_vfunc(Gst::RingBufferSpec& spec);
-#endif //GLIBMM_VFUNCS_ENABLED
//TODO: Some boolean vfuncs cause strange incorrect functionality when their
//callbacks return false with the last "return RType()" line. Make sure this
@@ -80,11 +78,9 @@ public:
//*/
//_WRAP_VFUNC(bool close(), "close")
- #ifdef GLIBMM_VFUNCS_ENABLED
/** vfunc to write data to the device.
*/
virtual guint write_vfunc(const void* data, guint length);
-#endif //GLIBMM_VFUNCS_ENABLED
/** vfunc to return how many samples are still in the device. This is used to
* drive the synchronisation.
diff --git a/gstreamer/src/audiosrc.ccg b/gstreamer/src/audiosrc.ccg
index e3fb5fd..a635b5f 100644
--- a/gstreamer/src/audiosrc.ccg
+++ b/gstreamer/src/audiosrc.ccg
@@ -23,7 +23,6 @@ _PINCLUDE(gstreamermm/private/baseaudiosrc_p.h)
namespace Gst
{
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean AudioSrc_Class::prepare_vfunc_callback(GstAudioSrc* self, GstRingBufferSpec* spec)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -39,21 +38,17 @@ gboolean AudioSrc_Class::prepare_vfunc_callback(GstAudioSrc* self, GstRingBuffer
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Gst::RingBufferSpec cpp_spec(*spec);
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->prepare_vfunc(cpp_spec));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -96,19 +91,15 @@ guint AudioSrc_Class::read_vfunc_callback(GstAudioSrc* self, gpointer data, guin
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return obj->read_vfunc(data, length);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -136,6 +127,5 @@ guint Gst::AudioSrc::read_vfunc(const void* data, guint length)
typedef guint RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/audiosrc.hg b/gstreamer/src/audiosrc.hg
index befa47d..2edcfbd 100644
--- a/gstreamer/src/audiosrc.hg
+++ b/gstreamer/src/audiosrc.hg
@@ -59,11 +59,9 @@ public:
//*/
//_WRAP_VFUNC(bool open(), "open")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** vfunc to configure device with spec.
*/
virtual bool prepare_vfunc(Gst::RingBufferSpec& spec);
-#endif //GLIBMM_VFUNCS_ENABLED
//TODO: Some boolean vfuncs cause strange incorrect functionality when their
//callbacks return false with the last "return RType()" line. Make sure this
@@ -79,11 +77,9 @@ public:
//*/
//_WRAP_VFUNC(bool close(), "close")
- #ifdef GLIBMM_VFUNCS_ENABLED
/** vfunc to read samples to the audio device.
*/
virtual guint read_vfunc(const void* data, guint length);
-#endif //GLIBMM_VFUNCS_ENABLED
/** vfunc to get the number of samples queued in the device.
*/
diff --git a/gstreamer/src/basesink.ccg b/gstreamer/src/basesink.ccg
index b4aa3a5..9b513de 100644
--- a/gstreamer/src/basesink.ccg
+++ b/gstreamer/src/basesink.ccg
@@ -50,7 +50,6 @@ FlowReturn BaseSink::wait_eos(ClockTime time)
return static_cast<FlowReturn>(gst_base_sink_wait_eos(const_cast<GstBaseSink*>(gobj()), static_cast<GstClockTime>(time), 0));
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstFlowReturn BaseSink_Class::buffer_alloc_vfunc_callback(GstBaseSink* self, guint64 offset, guint size, GstCaps* caps, GstBuffer** buf)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -66,10 +65,8 @@ GstFlowReturn BaseSink_Class::buffer_alloc_vfunc_callback(GstBaseSink* self, gui
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gst::Buffer> cpp_buffer;
// Call the virtual member method, which derived classes might override.
const GstFlowReturn result =
@@ -77,13 +74,11 @@ GstFlowReturn BaseSink_Class::buffer_alloc_vfunc_callback(GstBaseSink* self, gui
Glib::wrap(caps, true), cpp_buffer));
*buf = cpp_buffer->gobj_copy();
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -117,5 +112,5 @@ FlowReturn Gst::BaseSink::buffer_alloc_vfunc(guint64 offset, guint size, const G
typedef FlowReturn RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
+
} // namespace Gst
diff --git a/gstreamer/src/basesink.hg b/gstreamer/src/basesink.hg
index 7236d96..57c841a 100644
--- a/gstreamer/src/basesink.hg
+++ b/gstreamer/src/basesink.hg
@@ -228,10 +228,8 @@ public:
//*/
//_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Allocate a new buffer with given caps. */
virtual FlowReturn buffer_alloc_vfunc(guint64 offset, guint size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>& buffer);
-#endif //GLIBMM_VFUNCS_ENABLED
#m4 _CONVERSION(`GstBuffer*', `const Glib::RefPtr<Gst::Buffer>&', `Gst::wrap($3, true)')
#m4 _CONVERSION(`GstClockTime*', `ClockTime&', `*($3)')
diff --git a/gstreamer/src/basesrc.ccg b/gstreamer/src/basesrc.ccg
index 95d3409..736dd7a 100644
--- a/gstreamer/src/basesrc.ccg
+++ b/gstreamer/src/basesrc.ccg
@@ -38,7 +38,6 @@ bool BaseSrc::query_latency(bool& live, ClockTime& min_latency,
return result;
}
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean BaseSrc_Class::do_seek_vfunc_callback(GstBaseSrc* self, GstSegment* segment)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -54,20 +53,16 @@ gboolean BaseSrc_Class::do_seek_vfunc_callback(GstBaseSrc* self, GstSegment* seg
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Gst::Segment cpp_segment(segment, true);
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->do_seek_vfunc(cpp_segment));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -110,20 +105,16 @@ gboolean BaseSrc_Class::prepare_seek_segment_vfunc_callback(GstBaseSrc* self, Gs
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
Gst::Segment cpp_segment(segment, true);
return static_cast<int>(obj->prepare_seek_segment_vfunc(Gst::wrap(seek, true) , cpp_segment));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -166,22 +157,18 @@ GstFlowReturn BaseSrc_Class::create_vfunc_callback(GstBaseSrc* self, guint64 off
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gst::Buffer> cpp_buffer;
// Call the virtual member method, which derived classes might override.
GstFlowReturn const result = static_cast<GstFlowReturn>(obj->create_vfunc(offset, size, cpp_buffer));
*buf = cpp_buffer->gobj_copy();
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -215,6 +202,5 @@ FlowReturn Gst::BaseSrc::create_vfunc(guint64 offset, guint size, Glib::RefPtr<G
typedef FlowReturn RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/basesrc.hg b/gstreamer/src/basesrc.hg
index b494c0a..76dffaf 100644
--- a/gstreamer/src/basesrc.hg
+++ b/gstreamer/src/basesrc.hg
@@ -249,15 +249,11 @@ public:
//*/
//_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual FlowReturn create_vfunc(guint64 offset, guint size, Glib::RefPtr<Gst::Buffer>& buffer);
-#endif //GLIBMM_VFUNCS_ENABLED
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Perform seeking on the resource to the indicated segment.
*/
virtual bool do_seek_vfunc(Gst::Segment& segment);
-#endif //GLIBMM_VFUNCS_ENABLED
#m4 _CONVERSION(`GstQuery*', `const Glib::RefPtr<Gst::Query>&', `Gst::wrap($3, true)')
//TODO: Some boolean vfuncs cause strange incorrect functionality when their
@@ -291,7 +287,6 @@ public:
//*/
//_WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Prepare the Gst::Segment that will be passed to the do_seek_vfunc()
* vmethod for executing a seek request. Sub-classes should override this if
* they support seeking in formats other than the configured native format.
@@ -299,7 +294,6 @@ public:
* native format and prepare a segment in that format.
*/
virtual bool prepare_seek_segment_vfunc(const Glib::RefPtr<Gst::Event>& seek, Gst::Segment& segment);
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/basetransform.ccg b/gstreamer/src/basetransform.ccg
index 1a509b6..d823685 100644
--- a/gstreamer/src/basetransform.ccg
+++ b/gstreamer/src/basetransform.ccg
@@ -39,7 +39,6 @@ void BaseTransform::unlock()
GST_BASE_TRANSFORM_UNLOCK(gobj());
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstFlowReturn BaseTransform_Class::prepare_output_buffer_vfunc_callback(GstBaseTransform* self, GstBuffer* input, gint size, GstCaps* caps, GstBuffer** buffer)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -55,10 +54,8 @@ GstFlowReturn BaseTransform_Class::prepare_output_buffer_vfunc_callback(GstBaseT
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gst::Buffer> cpp_buffer;
// Call the virtual member method, which derived classes might override.
const GstFlowReturn result =
@@ -66,13 +63,11 @@ GstFlowReturn BaseTransform_Class::prepare_output_buffer_vfunc_callback(GstBaseT
Gst::wrap(input, true), size , Glib::wrap(caps, true), cpp_buffer));
*buffer = cpp_buffer->gobj_copy();
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -107,6 +102,5 @@ FlowReturn Gst::BaseTransform::prepare_output_buffer_vfunc(const Glib::RefPtr<Gs
typedef FlowReturn RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/src/basetransform.hg b/gstreamer/src/basetransform.hg
index a7f6990..f02e2a3 100644
--- a/gstreamer/src/basetransform.hg
+++ b/gstreamer/src/basetransform.hg
@@ -243,14 +243,12 @@ public:
*/
_WRAP_VFUNC(FlowReturn transform_ip(const Glib::RefPtr<Gst::Buffer>& buf), "transform_ip")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Optional. Subclasses can override this to do their own allocation of
* output buffers. Elements that only do analysis can return a subbuffer or
* even just increment the reference to the input buffer (if in passthrough
* mode).
*/
virtual FlowReturn prepare_output_buffer_vfunc(const Glib::RefPtr<Gst::Buffer>& input, int size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>& buffer);
-#endif //GLIBMM_VFUNCS_ENABLED
//TODO: Some boolean vfuncs cause strange incorrect functionality when their
//callbacks return false with the last "return RType()" line. Make sure this
diff --git a/gstreamer/src/bus.ccg b/gstreamer/src/bus.ccg
index 26a389b..d2d0ed6 100644
--- a/gstreamer/src/bus.ccg
+++ b/gstreamer/src/bus.ccg
@@ -31,18 +31,14 @@ static gboolean Bus_Message_gstreamermm_callback(GstBus* bus, GstMessage* messag
{
Gst::Bus::SlotMessage* the_slot = static_cast<Gst::Bus::SlotMessage*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return (*the_slot)(Glib::wrap(bus, true), Gst::Message::wrap(message, true));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
@@ -56,18 +52,14 @@ static GstBusSyncReply Bus_Message_Sync_gstreamermm_callback(GstBus* bus, GstMes
{
Gst::Bus::SlotMessageSync* the_slot = static_cast<Gst::Bus::SlotMessageSync*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return static_cast<GstBusSyncReply>((*the_slot)(Glib::wrap(bus, true), Gst::Message::wrap(message, true)));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return GST_BUS_PASS;
}
diff --git a/gstreamer/src/cddabasesrc.ccg b/gstreamer/src/cddabasesrc.ccg
index 795175b..ff02289 100644
--- a/gstreamer/src/cddabasesrc.ccg
+++ b/gstreamer/src/cddabasesrc.ccg
@@ -40,7 +40,6 @@ bool CddaBaseSrc::add_track(guint num, guint start, guint end, bool is_audio,
return gst_cdda_base_src_add_track(gobj(), &track);
}
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean CddaBaseSrc_Class::open_vfunc_callback(GstCddaBaseSrc* self, const gchar* device)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -56,20 +55,16 @@ gboolean CddaBaseSrc_Class::open_vfunc_callback(GstCddaBaseSrc* self, const gcha
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
std::string cpp_device(device);
return static_cast<int>(obj->open_vfunc(cpp_device));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -112,19 +107,15 @@ gchar** CddaBaseSrc_Class::probe_devices_vfunc_callback(GstCddaBaseSrc* self)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return const_cast<gchar**>(obj->probe_devices_vfunc().data());
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -152,6 +143,5 @@ Glib::ArrayHandle<std::string> Gst::CddaBaseSrc::probe_devices_vfunc()
typedef Glib::ArrayHandle<std::string> RType;
return RType(0, Glib::OWNERSHIP_NONE);
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/cddabasesrc.hg b/gstreamer/src/cddabasesrc.hg
index 523338b..e40764d 100644
--- a/gstreamer/src/cddabasesrc.hg
+++ b/gstreamer/src/cddabasesrc.hg
@@ -84,11 +84,9 @@ public:
_WRAP_PROPERTY("mode", CddaBaseSrcMode)
_WRAP_PROPERTY("track", guint)
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function to open a CD device.
*/
virtual bool open_vfunc(std::string& device);
-#endif //GLIBMM_VFUNCS_ENABLED
/** Virtual function to close the device.
*/
@@ -103,12 +101,10 @@ public:
*/
_WRAP_VFUNC(std::string get_default_device(), "get_default_device")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function to return array of CD devices. It is optional and may
* return an empty array.
*/
virtual Glib::ArrayHandle<std::string> probe_devices_vfunc();
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/clock.ccg b/gstreamer/src/clock.ccg
index 45cb8ac..27cbaf5 100644
--- a/gstreamer/src/clock.ccg
+++ b/gstreamer/src/clock.ccg
@@ -31,10 +31,8 @@ static gboolean ClockID_Clock_gstreamermm_callback(GstClock* clock, GstClockTime
{
Gst::ClockID::SlotClock* the_slot = static_cast<Gst::ClockID::SlotClock*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
bool result = (*the_slot)(Glib::wrap(clock, true), time,
Glib::wrap(reinterpret_cast<GstClockEntry*>(id), true));
@@ -42,13 +40,11 @@ static gboolean ClockID_Clock_gstreamermm_callback(GstClock* clock, GstClockTime
delete the_slot;
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
diff --git a/gstreamer/src/colorbalance.ccg b/gstreamer/src/colorbalance.ccg
index 30986e9..ef5722e 100644
--- a/gstreamer/src/colorbalance.ccg
+++ b/gstreamer/src/colorbalance.ccg
@@ -22,7 +22,6 @@
namespace Gst
{
-#ifdef GLIBMM_VFUNCS_ENABLED
const GList* ColorBalance_Class::list_channels_vfunc_callback(GstColorBalance* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -38,19 +37,15 @@ const GList* ColorBalance_Class::list_channels_vfunc_callback(GstColorBalance* s
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return (obj->list_channels_vfunc()).data();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -80,6 +75,5 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
typedef Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> > RType;
return RType(0, Glib::OWNERSHIP_NONE);
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/colorbalance.hg b/gstreamer/src/colorbalance.hg
index 1e23a1d..63ef6a8 100644
--- a/gstreamer/src/colorbalance.hg
+++ b/gstreamer/src/colorbalance.hg
@@ -55,11 +55,9 @@ public:
#m4 _CONVERSION(`Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> >', `const GList*', `($3).data()')
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Lists the channels of the Gst::ColorBalance.
*/
virtual Glib::ListHandle< Glib::RefPtr<ColorBalanceChannel> > list_channels_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
/** Sets the value of a Gst::ColorBalanceChannel of the Gst::ColorBalance.
*/
diff --git a/gstreamer/src/element.ccg b/gstreamer/src/element.ccg
index 8f82a90..5100c95 100644
--- a/gstreamer/src/element.ccg
+++ b/gstreamer/src/element.ccg
@@ -127,7 +127,6 @@ bool Element::send_event(const Glib::RefPtr<Gst::Event>& event)
return gst_element_send_event(gobj(), Gst::unwrap(event));
}
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean Element_Class::set_clock_vfunc_callback(GstElement* self, GstClock* clock)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -143,20 +142,16 @@ gboolean Element_Class::set_clock_vfunc_callback(GstElement* self, GstClock* clo
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->set_clock_vfunc(Glib::wrap(clock, true)
));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -200,19 +195,15 @@ const GstQueryType* Element_Class::get_query_types_vfunc_callback(GstElement* se
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return reinterpret_cast<const GstQueryType*>((obj->get_query_types_vfunc()).data());
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -240,6 +231,5 @@ Glib::ArrayHandle<QueryType> Gst::Element::get_query_types_vfunc() const
typedef Glib::ArrayHandle<QueryType> RType;
return RType(0, 0, Glib::OWNERSHIP_NONE);
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/src/element.hg b/gstreamer/src/element.hg
index 8bbe32a..4af02a1 100644
--- a/gstreamer/src/element.hg
+++ b/gstreamer/src/element.hg
@@ -379,7 +379,6 @@ public:
*/
_WRAP_VFUNC(Glib::RefPtr<Gst::Clock> provide_clock(), "provide_clock")
-#ifdef GLIBMM_VFUNCS_ENABLED
// This vfunc is hand-coded because it is necessary for the callback to
// return true instead of false (as would happen with the default gmmproc
// callback) because GstElement does not set its set_clock() vfunc
@@ -397,7 +396,6 @@ public:
/** Get the supported Gst::QueryType of this element.
*/
virtual Glib::ArrayHandle<QueryType> get_query_types_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
/** Get a Gst::Index on the element.
*/
diff --git a/gstreamer/src/event.ccg b/gstreamer/src/event.ccg
index fd83531..bb0e324 100644
--- a/gstreamer/src/event.ccg
+++ b/gstreamer/src/event.ccg
@@ -541,7 +541,6 @@ Gst::MiniObject* Event_Class::wrap_new(GstMiniObject* object)
return Gst::Event::wrap((GstEvent*)object, true).operator->();
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstMiniObject* Event_Class::copy_vfunc_callback(const GstMiniObject* self)
{
BaseClassType *const base = static_cast<BaseClassType*>(
@@ -587,6 +586,5 @@ void Event::finalize_vfunc()
if(base && GST_MINI_OBJECT_CLASS(base)->finalize)
(*GST_MINI_OBJECT_CLASS(base)->finalize)(GST_MINI_OBJECT(gobj()));
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/src/event.hg b/gstreamer/src/event.hg
index b0caf02..daf3329 100644
--- a/gstreamer/src/event.hg
+++ b/gstreamer/src/event.hg
@@ -169,17 +169,13 @@ public:
*/
_MEMBER_GET_GOBJECT(source, src, Gst::Object, GstObject*)
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::Event needs to be copied.
*/
virtual Glib::RefPtr<Gst::MiniObject> copy_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::Event is about to be finalized.
*/
virtual void finalize_vfunc();
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/filter.ccg b/gstreamer/src/filter.ccg
index 2edadca..298f344 100644
--- a/gstreamer/src/filter.ccg
+++ b/gstreamer/src/filter.ccg
@@ -29,19 +29,15 @@ static gboolean Filter_Filter_gstreamermm_callback(void* obj, void* data)
{
Gst::Filter::SlotFilter* the_slot = static_cast<Gst::Filter::SlotFilter*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
bool result = (*the_slot)(Glib::wrap((GObject*)(obj), true));
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
diff --git a/gstreamer/src/index.ccg b/gstreamer/src/index.ccg
index 7b7b04d..d3d133b 100644
--- a/gstreamer/src/index.ccg
+++ b/gstreamer/src/index.ccg
@@ -31,18 +31,14 @@ static gboolean Index_Filter_gstreamermm_callback(GstIndex* index, GstIndexEntry
Gst::Index::SlotFilter * the_slot =
static_cast<Gst::Index::SlotFilter*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return (*the_slot)(Glib::wrap(index, true), Glib::wrap(entry, true));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
@@ -59,10 +55,8 @@ static gboolean Index_Resolver_gstreamermm_callback(GstIndex *index, GstObject *
Gst::Index::SlotResolver * the_slot =
static_cast<Gst::Index::SlotResolver*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::ustring cpp_writer_string;
const gboolean result =
@@ -73,13 +67,11 @@ static gboolean Index_Resolver_gstreamermm_callback(GstIndex *index, GstObject *
*writer_string = g_strdup(cpp_writer_string.c_str());
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
@@ -141,7 +133,6 @@ void Index::set_resolver(const SlotResolver& slot)
gst_index_set_resolver_full(gobj(), &Index_Resolver_gstreamermm_callback, slot_copy, &Index_Resolver_gstreamermm_callback_destroy);
}
-#ifdef GLIBMM_VFUNCS_ENABLED
void Index_Class::add_entry_vfunc_callback(GstIndex* self, GstIndexEntry* entry)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -157,21 +148,17 @@ void Index_Class::add_entry_vfunc_callback(GstIndex* self, GstIndexEntry* entry)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Gst::IndexEntry wrappedEntry(entry, true);
// Call the virtual member method, which derived classes might override.
obj->add_entry_vfunc(wrappedEntry);
return;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -193,6 +180,5 @@ void Gst::Index::add_entry_vfunc(Gst::IndexEntry& entry)
if(base && base->add_entry)
(*base->add_entry)(gobj(),(entry).gobj_copy()); // use gobj_copy() so the copy is permanent to the GstIndex.
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/src/index.hg b/gstreamer/src/index.hg
index 759c108..856374a 100644
--- a/gstreamer/src/index.hg
+++ b/gstreamer/src/index.hg
@@ -163,9 +163,7 @@ public:
_WRAP_VFUNC(void commit(gint id), "commit")
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual void add_entry_vfunc(Gst::IndexEntry& entry);
-#endif //GLIBMM_VFUNCS_ENABLED
//TODO: Leave this vfunc for later because it is not absolutely necessary
//right now.
diff --git a/gstreamer/src/message.ccg b/gstreamer/src/message.ccg
index 8f3bb65..31f1aa6 100644
--- a/gstreamer/src/message.ccg
+++ b/gstreamer/src/message.ccg
@@ -1098,7 +1098,6 @@ Gst::MiniObject* Message_Class::wrap_new(GstMiniObject* object)
return Gst::Message::wrap((GstMessage*)object, true).operator->();
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstMiniObject* Message_Class::copy_vfunc_callback(const GstMiniObject* self)
{
BaseClassType *const base = static_cast<BaseClassType*>(
@@ -1145,6 +1144,5 @@ void Message::finalize_vfunc()
if(base && GST_MINI_OBJECT_CLASS(base)->finalize)
(*GST_MINI_OBJECT_CLASS(base)->finalize)(GST_MINI_OBJECT(gobj()));
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/src/message.hg b/gstreamer/src/message.hg
index f3f1bd1..7358f0c 100644
--- a/gstreamer/src/message.hg
+++ b/gstreamer/src/message.hg
@@ -111,17 +111,13 @@ public:
*/
_MEMBER_GET_GOBJECT(source, src, Gst::Object, GstObject*)
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::Message needs to be copied.
*/
virtual Glib::RefPtr<Gst::MiniObject> copy_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::Message is about to be finalized.
*/
virtual void finalize_vfunc();
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/mixer.ccg b/gstreamer/src/mixer.ccg
index fafb550..8796016 100644
--- a/gstreamer/src/mixer.ccg
+++ b/gstreamer/src/mixer.ccg
@@ -205,7 +205,6 @@ Glib::ArrayHandle<int> Mixer::get_volume(const Glib::RefPtr<const Gst::MixerTrac
Glib::OWNERSHIP_DEEP);
}
-#ifdef GLIBMM_VFUNCS_ENABLED
// This vfunc wrapper is manually written, because we want the C++ vfunc to
// return the result instead of passing in a pointer in which to store it.
@@ -221,10 +220,8 @@ void Mixer_Class::get_volume_vfunc_callback(GstMixer* self, GstMixerTrack* track
// being overridden:
if(obj && obj->is_derived_())
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
Glib::ArrayHandle<int> result = obj->get_volume_vfunc(Glib::wrap(track, true));
const int* result_data = result.data();
@@ -232,13 +229,11 @@ void Mixer_Class::get_volume_vfunc_callback(GstMixer* self, GstMixerTrack* track
{
volumes[i] = result_data[i];
}
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
else
{
@@ -286,19 +281,15 @@ const GList* Mixer_Class::list_tracks_vfunc_callback(GstMixer* self)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return (obj->list_tracks_vfunc()).data();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -328,6 +319,5 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
typedef Glib::ListHandle< Glib::RefPtr<Gst::MixerTrack> > RType;
return RType(0, Glib::OWNERSHIP_NONE);
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/mixer.hg b/gstreamer/src/mixer.hg
index deb6190..bb4e53c 100644
--- a/gstreamer/src/mixer.hg
+++ b/gstreamer/src/mixer.hg
@@ -94,10 +94,8 @@ public:
// Gst::MessageMixer* classes):
_IGNORE_SIGNAL(mute_toggled, record_toggled, volume_changed, option_changed)
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual Glib::ArrayHandle<int> get_volume_vfunc(const Glib::RefPtr<const Gst::MixerTrack>& track) const;
virtual Glib::ListHandle< Glib::RefPtr<Gst::MixerTrack> > list_tracks_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
#m4 _CONVERSION(`GstMixerTrack*',`const Glib::RefPtr<Gst::MixerTrack>&', `Glib::wrap(($3), true)')
diff --git a/gstreamer/src/navigation.ccg b/gstreamer/src/navigation.ccg
index 3c4831c..0e651b7 100644
--- a/gstreamer/src/navigation.ccg
+++ b/gstreamer/src/navigation.ccg
@@ -23,7 +23,6 @@
namespace Gst
{
-#ifdef GLIBMM_VFUNCS_ENABLED
void Navigation_Class::send_event_vfunc_callback(GstNavigation* self, GstStructure* structure)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -39,21 +38,17 @@ void Navigation_Class::send_event_vfunc_callback(GstNavigation* self, GstStructu
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
Gst::Structure wrapped_structure(structure);
obj->send_event_vfunc(wrapped_structure);
return;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -77,6 +72,5 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
if(base && base->send_event)
(*base->send_event)(gobj(),(structure).gobj());
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/navigation.hg b/gstreamer/src/navigation.hg
index 9f4514e..3bfe214 100644
--- a/gstreamer/src/navigation.hg
+++ b/gstreamer/src/navigation.hg
@@ -42,11 +42,9 @@ public:
_WRAP_METHOD(void send_mouse_event(const Glib::ustring& event, int button, double x, double y), gst_navigation_send_mouse_event)
_WRAP_METHOD(void send_command(Gst::NavigationCommand command), gst_navigation_send_command)
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Called when an event has been sent to the Gst::Navigation.
*/
virtual void send_event_vfunc(Gst::Structure& structure);
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/object.ccg b/gstreamer/src/object.ccg
index f1fd105..994454d 100644
--- a/gstreamer/src/object.ccg
+++ b/gstreamer/src/object.ccg
@@ -62,7 +62,6 @@ const xmlpp::Node* Object::save(const xmlpp::Node* parent) const
return parent;
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstXmlNodePtr Object_Class::save_thyself_vfunc_callback(GstObject* self, GstXmlNodePtr parent)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -78,21 +77,17 @@ GstXmlNodePtr Object_Class::save_thyself_vfunc_callback(GstObject* self, GstXmlN
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
xmlpp::Node xmlpp_parent(parent);
// Call the virtual member method, which derived classes might override.
(void) obj->save_vfunc(&xmlpp_parent);
return parent;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -123,21 +118,17 @@ void Object_Class::restore_thyself_vfunc_callback(GstObject* self, GstXmlNodePtr
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
xmlpp::Node xmlpp_node(self_node);
obj->restore_vfunc(&xmlpp_node);
return;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -173,6 +164,5 @@ void Gst::Object::restore_vfunc(xmlpp::Node* self_node)
if(base && base->restore_thyself)
(*base->restore_thyself)(gobj(),self_node->cobj());
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/object.hg b/gstreamer/src/object.hg
index 37361f7..4b320ee 100644
--- a/gstreamer/src/object.hg
+++ b/gstreamer/src/object.hg
@@ -123,10 +123,8 @@ public:
*/
_WRAP_SIGNAL(void parent_unset(const Glib::RefPtr<Object>& parent), "parent-unset")
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual xmlpp::Node* save_vfunc(xmlpp::Node* parent);
virtual void restore_vfunc(xmlpp::Node* self_node);
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/pad.ccg b/gstreamer/src/pad.ccg
index 019439e..c4c0346 100644
--- a/gstreamer/src/pad.ccg
+++ b/gstreamer/src/pad.ccg
@@ -39,19 +39,15 @@ static void Pad_Block_gstreamermm_callback(GstPad* pad, gboolean blocked, void*
{
Gst::Pad::SlotBlock * the_slot = static_cast<Gst::Pad::SlotBlock*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
(*the_slot)(Glib::wrap(pad), blocked);
delete the_slot;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
static void Pad_Block_gstreamermm_callback_destroy(void* data)
@@ -63,18 +59,14 @@ static gboolean Pad_Data_gstreamermm_callback(GstPad* pad, GstMiniObject* mini_o
{
Gst::Pad::SlotData* the_slot = static_cast<Gst::Pad::SlotData*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return (*the_slot)(Glib::wrap(pad, true), Gst::wrap(mini_obj, true));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
diff --git a/gstreamer/src/parse.ccg b/gstreamer/src/parse.ccg
index 24f764d..c567bae 100644
--- a/gstreamer/src/parse.ccg
+++ b/gstreamer/src/parse.ccg
@@ -24,62 +24,35 @@
namespace Gst
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gst::Element> Parse::launch(const Glib::ustring& pipeline_description)
-#else
-Glib::RefPtr<Gst::Element> Parse::launch(const Glib::ustring& pipeline_description, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
Glib::RefPtr<Gst::Element> retvalue = Glib::wrap(gst_parse_launch(pipeline_description.c_str(), &gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gst::Element> Parse::launchv(const gchar *argv[])
-#else
-Glib::RefPtr<Gst::Element> Parse::launchv(const gchar *argv[], std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
Glib::RefPtr<Gst::Element> retvalue = Glib::wrap(gst_parse_launchv(argv, &gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Gst::Element> Parse::create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads)
-#else
-Glib::RefPtr<Gst::Element> Parse::create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
Glib::RefPtr<Gst::Element> retvalue = Glib::wrap(gst_parse_bin_from_description(bin_description.c_str(), ghost_unconnected_pads, &gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
diff --git a/gstreamer/src/parse.hg b/gstreamer/src/parse.hg
index 69dc142..9d3a92f 100644
--- a/gstreamer/src/parse.hg
+++ b/gstreamer/src/parse.hg
@@ -62,11 +62,7 @@ public:
* @throw Gst::CoreError
* @throw Gst::ParseError
*/
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
static Glib::RefPtr<Gst::Element> launch(const Glib::ustring& pipeline_description);
-#else
- static Glib::RefPtr<Gst::Element> launch(const Glib::ustring& pipeline_description, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
/** Create a new element based on command line syntax. An error does not
* mean that the pipeline could not be constructed.
@@ -77,11 +73,7 @@ public:
* @throw Gst::CoreError
* @throw Gst::ParseError
*/
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
static Glib::RefPtr<Gst::Element> launchv(const gchar *argv[]);
-#else
- static Glib::RefPtr<Gst::Element> launchv(const gchar *argv[], std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
/** This is a convenience wrapper around launch() to create a Gst::Bin from a
* gst-launch-style pipeline description. See launch() and the gst-launch man
@@ -100,11 +92,7 @@ public:
* @throw Gst::CoreError
* @throw Gst::ParseError
*/
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
static Glib::RefPtr<Gst::Element> create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads);
-#else
- static Glib::RefPtr<Gst::Element> create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
};
} // namespace Gst
diff --git a/gstreamer/src/plugin.ccg b/gstreamer/src/plugin.ccg
index 1c8713a..a01ed6d 100644
--- a/gstreamer/src/plugin.ccg
+++ b/gstreamer/src/plugin.ccg
@@ -32,20 +32,16 @@ gboolean Plugin_Init_gstreamermm_callback(GstPlugin* plugin, void* data)
Gst::Plugin::SlotInit* the_slot = static_cast<Gst::Plugin::SlotInit*>(data);
bool result = false;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
result = (*the_slot)(Glib::wrap(plugin, true));
delete the_slot;
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
diff --git a/gstreamer/src/preset.ccg b/gstreamer/src/preset.ccg
index 42fdfe4..5d69683 100644
--- a/gstreamer/src/preset.ccg
+++ b/gstreamer/src/preset.ccg
@@ -32,7 +32,6 @@ bool Preset::get_meta(const Glib::ustring& name, const Glib::ustring& tag,
return result;
}
-#ifdef GLIBMM_VFUNCS_ENABLED
gchar** Preset_Class::get_preset_names_vfunc_callback(GstPreset* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -48,19 +47,15 @@ gchar** Preset_Class::get_preset_names_vfunc_callback(GstPreset* self)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return const_cast<gchar**>((obj->get_preset_names_vfunc()).data());
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -92,19 +87,15 @@ gchar** Preset_Class::get_property_names_vfunc_callback(GstPreset* self)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return const_cast<gchar**>((obj->get_property_names_vfunc()).data());
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -136,23 +127,19 @@ gboolean Preset_Class::get_meta_vfunc_callback(GstPreset* self, const gchar* nam
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::ustring cpp_value;
// Call the virtual member method, which derived classes might override.
const gboolean result = static_cast<int>(obj->get_meta_vfunc(Glib::convert_const_gchar_ptr_to_ustring(name)
, Glib::convert_const_gchar_ptr_to_ustring(tag) , cpp_value));
*value = g_strdup(cpp_value.c_str());
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -214,6 +201,5 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
typedef bool RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
}
diff --git a/gstreamer/src/preset.hg b/gstreamer/src/preset.hg
index f24c39f..3e129d9 100644
--- a/gstreamer/src/preset.hg
+++ b/gstreamer/src/preset.hg
@@ -59,10 +59,8 @@ public:
#m4 _CONVERSION(`Glib::StringArrayHandle', `gchar**', `const_cast<gchar**>(($3).data())')
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual Glib::StringArrayHandle get_preset_names_vfunc() const;
virtual Glib::StringArrayHandle get_property_names_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
_WRAP_VFUNC(bool load_preset(const Glib::ustring& name), "load_preset")
_WRAP_VFUNC(bool save_preset(const Glib::ustring& name) const, "save_preset")
@@ -70,10 +68,8 @@ public:
_WRAP_VFUNC(bool delete_preset(const Glib::ustring& name), "delete_preset")
_WRAP_VFUNC(bool set_meta(const Glib::ustring& name, const Glib::ustring& tag, const Glib::ustring& value), "set_meta")
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual bool get_meta_vfunc(const Glib::ustring& name,
const Glib::ustring& tag, Glib::ustring& value);
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/query.ccg b/gstreamer/src/query.ccg
index 3ff7d75..ca98258 100644
--- a/gstreamer/src/query.ccg
+++ b/gstreamer/src/query.ccg
@@ -605,7 +605,6 @@ Gst::MiniObject* Query_Class::wrap_new(GstMiniObject* object)
return Gst::Query::wrap((GstQuery*)object, true).operator->();
}
-#ifdef GLIBMM_VFUNCS_ENABLED
GstMiniObject* Query_Class::copy_vfunc_callback(const GstMiniObject* self)
{
BaseClassType *const base = static_cast<BaseClassType*>(
@@ -651,6 +650,5 @@ void Query::finalize_vfunc()
if(base && GST_MINI_OBJECT_CLASS(base)->finalize)
(*GST_MINI_OBJECT_CLASS(base)->finalize)(GST_MINI_OBJECT(gobj()));
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namesapce Gst
diff --git a/gstreamer/src/query.hg b/gstreamer/src/query.hg
index 1a70f37..55f1c89 100644
--- a/gstreamer/src/query.hg
+++ b/gstreamer/src/query.hg
@@ -152,17 +152,13 @@ public:
_WRAP_METHOD(static Gst::IteratorBasic<const Gst::QueryTypeDefinition> iterate_definitions(), gst_query_type_iterate_definitions)
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::Query needs to be copied.
*/
virtual Glib::RefPtr<Gst::MiniObject> copy_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function called when the Gst::Query is about to be finalized.
*/
virtual void finalize_vfunc();
-#endif //GLIBMM_VFUNCS_ENABLED
protected:
#m4begin
diff --git a/gstreamer/src/registry.ccg b/gstreamer/src/registry.ccg
index 8f0e83b..39ddac8 100644
--- a/gstreamer/src/registry.ccg
+++ b/gstreamer/src/registry.ccg
@@ -32,19 +32,15 @@ static gboolean Registry_Plugin_Filter_gstreamermm_callback(GstPlugin* plugin, v
{
Gst::Plugin::SlotFilter* the_slot = static_cast<Gst::Plugin::SlotFilter*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
bool result = (*the_slot)(Glib::wrap(plugin, true));
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
@@ -53,19 +49,15 @@ static gboolean Registry_PluginFeature_Filter_gstreamermm_callback(GstPluginFeat
{
Gst::PluginFeature::SlotFilter* the_slot = static_cast<Gst::PluginFeature::SlotFilter*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
bool result = (*the_slot)(Glib::wrap(feature, true));
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
diff --git a/gstreamer/src/ringbuffer.ccg b/gstreamer/src/ringbuffer.ccg
index b8a10c2..91a740b 100644
--- a/gstreamer/src/ringbuffer.ccg
+++ b/gstreamer/src/ringbuffer.ccg
@@ -32,19 +32,15 @@ static void RingBuffer_Fill_gstreamermm_callback(GstRingBuffer*, guint8* data, g
{
Gst::RingBuffer::SlotFill& slot_fill = *static_cast<Gst::RingBuffer::SlotFill*>(user_data);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
-#endif
{
Glib::ArrayHandle<guint8> cpp_data(data, len, Glib::OWNERSHIP_NONE);
slot_fill(cpp_data, len);
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch (...)
{
Glib::exception_handlers_invoke();
}
-#endif
}
} // extern "C"
@@ -212,7 +208,6 @@ bool RingBuffer::prepare_read(int& segment, std::vector<guint8>& readptr,
return result;
}
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean RingBuffer_Class::acquire_vfunc_callback(GstRingBuffer* self, GstRingBufferSpec* spec)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -228,22 +223,18 @@ gboolean RingBuffer_Class::acquire_vfunc_callback(GstRingBuffer* self, GstRingBu
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
Gst::RingBufferSpec cpp_spec(*spec);
// Call the virtual member method, which derived classes might override.
return static_cast<int>(obj->acquire_vfunc(cpp_spec));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -286,10 +277,8 @@ guint RingBuffer_Class::commit_vfunc_callback(GstRingBuffer* self, guint64* samp
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// This formula is obtained from the definition of the data_end
// variable in the default_commit() function of the C API
// gstringbuffer.c file.
@@ -300,13 +289,11 @@ guint RingBuffer_Class::commit_vfunc_callback(GstRingBuffer* self, guint64* samp
// Call the virtual member method, which derived classes might override.
return obj->commit_vfunc(*(sample), cpp_data, in_samples, out_samples,
*(accum));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -334,6 +321,5 @@ guint Gst::RingBuffer::commit_vfunc(guint64& sample, const Glib::ArrayHandle<guc
typedef guint RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/ringbuffer.hg b/gstreamer/src/ringbuffer.hg
index 2cd2583..577846c 100644
--- a/gstreamer/src/ringbuffer.hg
+++ b/gstreamer/src/ringbuffer.hg
@@ -326,12 +326,10 @@ public:
*/
_WRAP_VFUNC(bool open_device(), "open_device")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function to allocate the resources for the ring buffer using the
* given spec.
*/
virtual bool acquire_vfunc(Gst::RingBufferSpec& spec);
-#endif //GLIBMM_VFUNCS_ENABLED
/** Virtual function to free resources of the ring buffer.
*/
@@ -366,11 +364,9 @@ public:
*/
_WRAP_VFUNC(bool activate(bool active), "activate")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function to write samples into the ring buffer.
*/
virtual guint commit_vfunc(guint64& sample, const Glib::ArrayHandle<guchar>& data, int in_samples, int out_samples, int& accum);
-#endif //GLIBMM_VFUNCS_ENABLED
/** Virtual function to clear the entire ringbuffer Since 0.10.24.
*/
diff --git a/gstreamer/src/structure.ccg b/gstreamer/src/structure.ccg
index 4177cae..da8ece8 100644
--- a/gstreamer/src/structure.ccg
+++ b/gstreamer/src/structure.ccg
@@ -43,18 +43,14 @@ Structure_Foreach_gstreamermm_callback(GQuark field_id, const GValue *value, voi
{
Gst::Structure::SlotForeach* slot = static_cast<Gst::Structure::SlotForeach*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return (*slot)(quark_to_ustring(field_id), *reinterpret_cast<const Glib::ValueBase*>(value));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
@@ -64,19 +60,15 @@ Structure_Map_gstreamermm_callback(GQuark field_id, GValue *value, void* data)
{
Gst::Structure::SlotMap* slot = static_cast<Gst::Structure::SlotMap*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
bool result = (*slot)(quark_to_ustring(field_id), *reinterpret_cast<Glib::ValueBase*>(value));
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return false;
}
diff --git a/gstreamer/src/taglist.ccg b/gstreamer/src/taglist.ccg
index 28a4ea3..b4a3a2e 100644
--- a/gstreamer/src/taglist.ccg
+++ b/gstreamer/src/taglist.ccg
@@ -29,18 +29,14 @@ static void TagList_foreach_gstreamermm_callback(const GstTagList*, const char *
{
Gst::TagList::SlotForeach& slot_foreach = *static_cast<Gst::TagList::SlotForeach*>(data);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
-#endif
{
slot_foreach(Glib::convert_const_gchar_ptr_to_ustring(tag));
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch (...)
{
Glib::exception_handlers_invoke();
}
-#endif
}
} // extern "C"
diff --git a/gstreamer/src/task.ccg b/gstreamer/src/task.ccg
index dce9068..bd97f92 100644
--- a/gstreamer/src/task.ccg
+++ b/gstreamer/src/task.ccg
@@ -39,18 +39,14 @@ static void Task_Task_gstreamermm_callback(void* data)
{
Gst::Task::SlotTask* the_slot = static_cast<Gst::Task::SlotTask*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
(*the_slot)();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
static void Task_Enter_gstreamermm_callback(GstTask* task, GThread* thread, gpointer user_data)
@@ -58,18 +54,14 @@ static void Task_Enter_gstreamermm_callback(GstTask* task, GThread* thread, gpoi
TaskThreadCallbacks* callbacks = static_cast<TaskThreadCallbacks*>(user_data);
Gst::Task::SlotEnter* the_slot = callbacks->slot_enter;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
(*the_slot)(Glib::wrap(task, true), Glib::wrap(thread));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
static void Task_Leave_gstreamermm_callback(GstTask *task, GThread *thread, gpointer user_data)
@@ -77,18 +69,14 @@ static void Task_Leave_gstreamermm_callback(GstTask *task, GThread *thread, gpoi
TaskThreadCallbacks* callbacks = static_cast<TaskThreadCallbacks*>(user_data);
Gst::Task::SlotLeave* the_slot = callbacks->slot_leave;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
(*the_slot)(Glib::wrap(task, true), Glib::wrap(thread));
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
static void Task_Callbacks_gstreamermm_callback_destroy(void* data)
diff --git a/gstreamer/src/taskpool.ccg b/gstreamer/src/taskpool.ccg
index b6a6a6e..e7502dc 100644
--- a/gstreamer/src/taskpool.ccg
+++ b/gstreamer/src/taskpool.ccg
@@ -30,19 +30,15 @@ static void TaskPool_Push_gstreamermm_callback(void* data)
{
Gst::TaskPool::SlotPush* the_slot = static_cast<Gst::TaskPool::SlotPush*>(data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
(*the_slot)();
delete the_slot;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
} // extern "C"
@@ -52,11 +48,7 @@ static void TaskPool_Push_gstreamermm_callback(void* data)
namespace Gst
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gpointer TaskPool::push(const SlotPush& slot)
-#else
-gpointer TaskPool::push(const SlotPush& slot, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
SlotPush* slot_copy = new SlotPush(slot);
@@ -64,18 +56,12 @@ gpointer TaskPool::push(const SlotPush& slot, std::auto_ptr<Glib::Error>& error)
gpointer ret_val = gst_task_pool_push(gobj(),
&TaskPool_Push_gstreamermm_callback, slot_copy, &gerror);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return ret_val;
}
-#ifdef GLIBMM_VFUNCS_ENABLED
void TaskPool_Class::prepare_vfunc_callback(GstTaskPool* self, GError** error)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -91,28 +77,17 @@ void TaskPool_Class::prepare_vfunc_callback(GstTaskPool* self, GError** error)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
obj->prepare_vfunc();
- #else
- std::auto_ptr<Glib::Error> cpp_error(0);
- obj->prepare_vfunc(cpp_error);
- if (cpp_error.get())
- *error = g_error_copy(cpp_error->gobj());
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -125,11 +100,7 @@ void TaskPool_Class::prepare_vfunc_callback(GstTaskPool* self, GError** error)
(*base->prepare)(self, error);
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
void Gst::TaskPool::prepare_vfunc()
-#else
-void Gst::TaskPool::prepare_vfunc(std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
@@ -140,13 +111,8 @@ void Gst::TaskPool::prepare_vfunc(std::auto_ptr<Glib::Error>& error)
GError* gerror = 0;
(*base->prepare)(gobj(),&gerror);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
- #else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
gpointer TaskPool_Class::push_vfunc_callback(GstTaskPool* self, GstTaskPoolFunction func, gpointer user_data, GError** error)
@@ -164,31 +130,19 @@ gpointer TaskPool_Class::push_vfunc_callback(GstTaskPool* self, GstTaskPoolFunct
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
Gst::TaskPool::SlotPush* slot =
static_cast<Gst::TaskPool::SlotPush*>(user_data);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
return obj->push_vfunc(*slot);
- #else
- std::auto_ptr<Glib::Error> cpp_error(0);
- gpointer result = obj->push_vfunc(*slot, cpp_error);
- if (cpp_error.get())
- *error = g_error_copy(cpp_error->gobj());
- return result;
- #endif //GLIBMM_EXCEPTIONS_ENABLED
-
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
+
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -204,12 +158,7 @@ gpointer TaskPool_Class::push_vfunc_callback(GstTaskPool* self, GstTaskPoolFunct
typedef gpointer RType;
return RType();
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gpointer Gst::TaskPool::push_vfunc(const SlotPush& slot)
-#else
-gpointer Gst::TaskPool::push_vfunc(const SlotPush& slot,
- std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
@@ -222,13 +171,8 @@ gpointer Gst::TaskPool::push_vfunc(const SlotPush& slot,
&TaskPool_Push_gstreamermm_callback, const_cast<SlotPush*>(&slot),
&gerror);
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
- #else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
- #endif //GLIBMM_EXCEPTIONS_ENABLED
return result;
}
@@ -236,6 +180,5 @@ gpointer Gst::TaskPool::push_vfunc(const SlotPush& slot,
typedef gpointer RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} //namespace Gst
diff --git a/gstreamer/src/taskpool.hg b/gstreamer/src/taskpool.hg
index b22463f..568b8e6 100644
--- a/gstreamer/src/taskpool.hg
+++ b/gstreamer/src/taskpool.hg
@@ -64,42 +64,25 @@ public:
* can be 0, you must check error to detect errors.
* @throw Glib::Error.
*/
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gpointer push(const SlotPush& slot);
-#else
- gpointer push(const SlotPush& slot, std::auto_ptr<Glib::Error>& error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
_IGNORE(gst_task_pool_push)
_WRAP_METHOD(void join(gpointer id), gst_task_pool_join)
_WRAP_METHOD(void cleanup(), gst_task_pool_cleanup)
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function which prepares the thread pool.
* @throw Glib::Error.
*/
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
virtual void prepare_vfunc();
- #else
- virtual void prepare_vfunc(std::auto_ptr<Glib::Error>& error);
- #endif //GLIBMM_EXCEPTIONS_ENABLED
-#endif //GLIBMM_VFUNCS_ENABLED
/** Virtual function to cleanup the thread pool.
*/
_WRAP_VFUNC(void cleanup(), "cleanup")
-#ifdef GLIBMM_VFUNCS_ENABLED
/** Virtual function which starts a new thread.
* @throw Glib::Error.
*/
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
virtual gpointer push_vfunc(const SlotPush& slot);
- #else
- virtual gpointer push_vfunc(const SlotPush& slot,
- std::auto_ptr<Glib::Error>& error);
- #endif //GLIBMM_EXCEPTIONS_ENABLED
-#endif //GLIBMM_VFUNCS_ENABLED
/** Virtual function to join a thread.
*/
diff --git a/gstreamer/src/tuner.ccg b/gstreamer/src/tuner.ccg
index 29bf7a3..e89b745 100644
--- a/gstreamer/src/tuner.ccg
+++ b/gstreamer/src/tuner.ccg
@@ -24,7 +24,6 @@
namespace Gst
{
-#ifdef GLIBMM_VFUNCS_ENABLED
const GList* Tuner_Class::list_channels_vfunc_callback(GstTuner* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -40,19 +39,15 @@ const GList* Tuner_Class::list_channels_vfunc_callback(GstTuner* self)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return (obj->list_channels_vfunc()).data();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -97,19 +92,15 @@ const GList* Tuner_Class::list_norms_vfunc_callback(GstTuner* self)
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return (obj->list_norms_vfunc()).data();
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -139,6 +130,5 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
typedef Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> > RType;
return RType(0, Glib::OWNERSHIP_NONE);
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/tuner.hg b/gstreamer/src/tuner.hg
index 973e303..e48039e 100644
--- a/gstreamer/src/tuner.hg
+++ b/gstreamer/src/tuner.hg
@@ -92,16 +92,12 @@ public:
*/
_WRAP_SIGNAL(void signal_changed(const Glib::RefPtr<Gst::TunerChannel>& channel, int signal), "signal-changed")
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual Glib::ListHandle< Glib::RefPtr<Gst::TunerChannel> > list_channels_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
_WRAP_VFUNC(void set_channel(const Glib::RefPtr<Gst::TunerChannel>& channel), "set_channel")
_WRAP_VFUNC(Glib::RefPtr<Gst::TunerChannel> get_channel() const, "get_channel")
-#ifdef GLIBMM_VFUNCS_ENABLED
virtual Glib::ListHandle< Glib::RefPtr<Gst::TunerNorm> > list_norms_vfunc() const;
-#endif //GLIBMM_VFUNCS_ENABLED
_WRAP_VFUNC(void set_norm(const Glib::RefPtr<Gst::TunerNorm>& norm), "set_norm")
_WRAP_VFUNC(Glib::RefPtr<Gst::TunerNorm> get_norm() const, "get_norm")
diff --git a/gstreamer/src/typefind.ccg b/gstreamer/src/typefind.ccg
index 6d08e84..f3bcb4e 100644
--- a/gstreamer/src/typefind.ccg
+++ b/gstreamer/src/typefind.ccg
@@ -32,18 +32,14 @@ static void TypeFind_Find_gstreamermm_callback(GstTypeFind*, void* data)
{
Gst::TypeFind::SlotFind& slot_find = *static_cast<Gst::TypeFind::SlotFind*>(data);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
-#endif
{
slot_find();
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch (...)
{
Glib::exception_handlers_invoke();
}
-#endif
}
static void TypeFind_Find_gstreamermm_callback_destroy(void* data)
diff --git a/gstreamer/src/videoorientation.ccg b/gstreamer/src/videoorientation.ccg
index a2953ff..7653319 100644
--- a/gstreamer/src/videoorientation.ccg
+++ b/gstreamer/src/videoorientation.ccg
@@ -41,7 +41,6 @@ bool VideoOrientation::get_vflip(bool& flip) const
return result;
}
-#ifdef GLIBMM_VFUNCS_ENABLED
gboolean VideoOrientation_Class::get_hflip_vfunc_callback(GstVideoOrientation* self, gboolean* flip)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
@@ -57,23 +56,19 @@ gboolean VideoOrientation_Class::get_hflip_vfunc_callback(GstVideoOrientation* s
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
bool cpp_flip = false;
const gboolean result =
static_cast<int>(obj->get_hflip_vfunc(cpp_flip));
*flip = cpp_flip;
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -125,23 +120,19 @@ gboolean VideoOrientation_Class::get_vflip_vfunc_callback(GstVideoOrientation* s
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
- #endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
bool cpp_flip = false;
const gboolean result =
static_cast<int>(obj->get_vflip_vfunc(cpp_flip));
*flip = cpp_flip;
return result;
- #ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
- #endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
@@ -178,5 +169,4 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
typedef bool RType;
return RType();
}
-#endif //GLIBMM_VFUNCS_ENABLED
} // namespace Gst
diff --git a/gstreamer/src/videoorientation.hg b/gstreamer/src/videoorientation.hg
index c10e43a..6e1337e 100644
--- a/gstreamer/src/videoorientation.hg
+++ b/gstreamer/src/videoorientation.hg
@@ -46,10 +46,8 @@ public:
_WRAP_METHOD(bool set_vcenter(int center), gst_video_orientation_set_vcenter)
_WRAP_METHOD(bool set_vflip(bool flip), gst_video_orientation_set_vflip)
- #ifdef GLIBMM_VFUNCS_ENABLED
virtual bool get_hflip_vfunc(bool& flip) const;
virtual bool get_vflip_vfunc(bool& flip) const;
-#endif //GLIBMM_VFUNCS_ENABLED
_WRAP_VFUNC(bool get_hcenter(int& center) const, "get_hcenter")
_WRAP_VFUNC(bool get_vcenter(int& center) const, "get_vcenter")
diff --git a/tests/test-caps.cc b/tests/test-caps.cc
index 1b24b58..1594bca 100644
--- a/tests/test-caps.cc
+++ b/tests/test-caps.cc
@@ -91,19 +91,15 @@ int main(int argc, char** argv)
e1 = Gst::ElementFactory::create_element("fakesrc", "source");
e2 = Gst::ElementFactory::create_element("fakesink", "sink");
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
pipeline->add(e1)->add(e2);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch (std::runtime_error& ex)
{
std::cerr << "Exception while adding: " << ex.what() << std::endl;
return 1;
}
-#endif
if(!link_elements_with_filter(e1, e2))
std::cerr << "Falied to link e1 and e2." << std::endl;
diff --git a/tests/test-init-check-noargs.cc b/tests/test-init-check-noargs.cc
index 33b7909..ed6a8cf 100644
--- a/tests/test-init-check-noargs.cc
+++ b/tests/test-init-check-noargs.cc
@@ -22,7 +22,6 @@
int main(int, char**)
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
bool success = Gst::init_check();
@@ -39,16 +38,6 @@ int main(int, char**)
std::cout << "Error initializing gstreamermm." << std::endl;
return 1;
}
-#else
- std::auto_ptr<Glib::Error> error;
- bool success = Gst::init_check(error);
- if(!success)
- {
- std::cout << "Error initializing gstreamermm." << std::endl;
- if(error.get())
- std::cout << "Error: " << error->what() << std::endl;
- }
-#endif
Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("ximagesink", "videosink");
if(element)
diff --git a/tests/test-init-check.cc b/tests/test-init-check.cc
index 273679d..6524af7 100644
--- a/tests/test-init-check.cc
+++ b/tests/test-init-check.cc
@@ -23,7 +23,6 @@
int main(int argc, char** argv)
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
bool success = Gst::init_check(argc, argv);
@@ -39,16 +38,6 @@ int main(int argc, char** argv)
std::cout << "Error initializing gstreamermm." << std::endl;
return 1;
}
-#else
- std::auto_ptr<Glib::Error> error;
- bool success = Gst::init_check(argc, argv, error);
- if(!success)
- {
- std::cout << "Error initializing gstreamermm." << std::endl;
- if(error.get())
- std::cout << "Error: " << error->what() << std::endl;
- }
-#endif
Glib::RefPtr<Gst::Element> element = Gst::ElementFactory::create_element("ximagesink", "videosink");
if(element)
diff --git a/tests/test-iterator.cc b/tests/test-iterator.cc
index bacf55a..1234196 100644
--- a/tests/test-iterator.cc
+++ b/tests/test-iterator.cc
@@ -47,10 +47,8 @@ int main(int argc, char** argv)
Gst::Iterator<Gst::Element> elements = bin->iterate_elements();
Gst::Iterator<Gst::Element> firstIter;
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
for(elements.begin(); !elements.is_end(); ++elements, ++iterations)
{
if(!firstIter)
@@ -66,14 +64,12 @@ int main(int argc, char** argv)
if(elements)
std::cout << "elements.is_end() == true && (elements) is valid." <<
std::endl;
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(std::runtime_error& e)
{
std::cout << "Runtime error while iterating through \"" <<
bin->get_name() << "'s\" elements:" << std::endl << e.what() << std::endl;
}
-#endif
std::cout << "The loop iterated " << iterations <<
" time(s) to print bin '" << bin->get_name() << "' elements." << std::endl;
@@ -84,23 +80,19 @@ int main(int argc, char** argv)
Gst::IteratorBasic<const Gst::QueryTypeDefinition> queryTypes =
Gst::Query::iterate_definitions();
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
for(++queryTypes; !queryTypes.is_end(); ++queryTypes)
{
std::cout << queryTypes->nick << " -- " << queryTypes->description <<
"." << std::endl;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(std::runtime_error& e)
{
std::cout << "Runtime error while iterating through query types." <<
std::endl << e.what() << std::endl;
}
-#endif
std::cout << std::endl <<
"The following are standard GStreamer formats:" << std::endl;
@@ -108,23 +100,19 @@ int main(int argc, char** argv)
Gst::IteratorBasic<const Gst::FormatDefinition> formats =
Gst::iterate_format_definitions();
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
for(++formats; !formats.is_end(); ++formats)
{
std::cout << formats->nick << " -- " << formats->description <<
"." << std::endl;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(std::runtime_error& e)
{
std::cout << "Runtime error while iterating through formats." <<
std::endl << e.what() << std::endl;
}
-#endif
return 0;
}
diff --git a/tests/test-plugin-signals.cc b/tests/test-plugin-signals.cc
index b732f99..519dc48 100644
--- a/tests/test-plugin-signals.cc
+++ b/tests/test-plugin-signals.cc
@@ -82,12 +82,9 @@ int main(int argc, char** argv)
}
// Put all elements in a bin:
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
-#endif
pipeline->add(source)->add(sink);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const Glib::Error& ex)
{
@@ -96,7 +93,6 @@ int main(int argc, char** argv)
return 1;
}
-#endif
// Link together:
source->link(sink);
@@ -105,18 +101,10 @@ int main(int argc, char** argv)
pipeline->get_bus()->add_watch(sigc::ptr_fun(&on_bus_message));
// Set number of buffers fakesink creates to low number:
-#ifdef GLIBMM_PROPERTIES_ENABLED
source->property_num_buffers() = 5;
-#else
- source->set_property("num_buffers", 5);
-#endif
// Enable the fakesink handoff signal emition and connect slot:
-#ifdef GLIBMM_PROPERTIES_ENABLED
sink->property_signal_handoffs() = true;
-#else
- sink->set_property("signal_handoffs", true);
-#endif
sink->signal_handoff().connect(sigc::ptr_fun(on_handoff));
// Now set to playing and iterate:
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index 1f6d511..39d8397 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -822,27 +822,17 @@ int main(int argc, char** argv)
Glib::OptionContext optionContext(gContext, true);
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
if(!optionContext.parse(argc, argv))
-#else
- std::auto_ptr<Glib::Error> error;
- if (!optionContext.parse(argc, argv, error))
-#endif
{
std::cout << "Error parsing options and initializing. Sorry." <<
std::endl;
return 1;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(Glib::OptionError& error)
{
-#else
- if (error.get())
- {
-#endif
std::cout << "Error parsing options and initializing GStreamer." <<
std::endl << "Run `" << argv[0] << " -?' for a list of options." <<
std::endl;
diff --git a/tools/m4/class_gstminiobject.m4 b/tools/m4/class_gstminiobject.m4
index 19c45b3..1125828 100644
--- a/tools/m4/class_gstminiobject.m4
+++ b/tools/m4/class_gstminiobject.m4
@@ -146,9 +146,7 @@ ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl
protected:
//Callbacks (virtual functions):
-#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PH_VFUNCS)
-#endif //GLIBMM_VFUNCS_ENABLED
};
')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]