[gstreamermm] Wrapped some unwrapped new functions in the C API.
- From: José Alburquerque <jaalburqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gstreamermm] Wrapped some unwrapped new functions in the C API.
- Date: Mon, 3 Aug 2009 23:20:23 +0000 (UTC)
commit 80e26856d2c4ac9c1e0ea7587c107775d33802bc
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Mon Aug 3 17:43:54 2009 -0400
Wrapped some unwrapped new functions in the C API.
ChangeLog | 16 ++++++++++++++++
gstreamer/src/element.hg | 3 +++
gstreamer/src/mixer.hg | 5 ++++-
gstreamer/src/plugin.ccg | 1 +
gstreamer/src/plugin.hg | 16 +++++++++++-----
gstreamer/src/segment.hg | 17 +++++++++--------
gstreamer/src/structure.hg | 10 +++++++++-
gstreamer/src/taglist.hg | 8 +++++---
.../extra_defs_gen/generate_plugin_gmmproc_file.cc | 2 +-
9 files changed, 59 insertions(+), 19 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index efcecc0..198cbee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2009-08-03 José Alburquerque <jaalburqu svn gnome org>
+
+ Wrapped some unwrapped new functions in the C API.
+
+ * gstreamer/src/element.hg:
+ * gstreamer/src/plugin.ccg:
+ * gstreamer/src/plugin.hg:
+ * gstreamer/src/segment.hg: Wrapped new functions in the C API for
+ these. Also removed the 'convert' prefix in the
+ Gst::Segment::convert_to*() methods as in the C API.
+
+ * gstreamer/src/mixer.hg:
+ * gstreamer/src/structure.hg:
+ * gstreamer/src/taglist.hg: Updated _IGNORE's for methods that need
+ not be wrapped.
+
2009-08-04 Murray Cumming <murrayc murrayc com>
TagList: Added ustring-based overloads, instead of requiring Tag enum.
diff --git a/gstreamer/src/element.hg b/gstreamer/src/element.hg
index d249904..19fe9af 100644
--- a/gstreamer/src/element.hg
+++ b/gstreamer/src/element.hg
@@ -218,6 +218,8 @@ public:
_WRAP_METHOD(void set_base_time(ClockTime time), gst_element_set_base_time)
_WRAP_METHOD(ClockTime get_base_time() const, gst_element_get_base_time)
+ _WRAP_METHOD(void set_start_time(Gst::ClockTime time), gst_element_set_start_time)
+ _WRAP_METHOD(Gst::ClockTime get_start_time() const, gst_element_get_start_time)
_WRAP_METHOD(void set_bus(const Glib::RefPtr<Gst::Bus>& bus), gst_element_set_bus)
_WRAP_METHOD(Glib::RefPtr<Gst::Bus> get_bus(), gst_element_get_bus)
_WRAP_METHOD(Glib::RefPtr<const Gst::Bus> get_bus() const, gst_element_get_bus, constversion)
@@ -250,6 +252,7 @@ public:
_WRAP_METHOD(void abort_state(), gst_element_abort_state)
_WRAP_METHOD(StateChangeReturn continue_state(StateChangeReturn ret), gst_element_continue_state)
_WRAP_METHOD(void lost_state(), gst_element_lost_state)
+ _WRAP_METHOD(void lost_state(bool new_base_time), gst_element_lost_state_full)
_WRAP_METHOD(bool sync_state_with_parent(), gst_element_sync_state_with_parent)
_WRAP_METHOD(StateChangeReturn change_state(StateChange transition), gst_element_change_state)
_WRAP_METHOD(void found_tags(Gst::TagList& list), gst_element_found_tags)
diff --git a/gstreamer/src/mixer.hg b/gstreamer/src/mixer.hg
index ef328e9..d9f574f 100644
--- a/gstreamer/src/mixer.hg
+++ b/gstreamer/src/mixer.hg
@@ -75,7 +75,10 @@ public:
_WRAP_METHOD(Gst::MixerType get_mixer_type() const, gst_mixer_get_mixer_type)
_WRAP_METHOD(static Gst::MixerMessageType get_message_type(const Glib::RefPtr<Gst::Message>& message), gst_mixer_message_get_type)
- // Signals were deprecated before we could wrap them (see header file).
+ // Signals were deprecated before we could wrap them (see header file). It
+ // looks like messages to the bus have replaced the signals (see the
+ // 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;
diff --git a/gstreamer/src/plugin.ccg b/gstreamer/src/plugin.ccg
index 4f14485..2c30764 100644
--- a/gstreamer/src/plugin.ccg
+++ b/gstreamer/src/plugin.ccg
@@ -18,6 +18,7 @@
*/
#include <gst/gstenumtypes.h>
+#include <gstreamermm/structure.h>
_PINCLUDE(gstreamermm/private/object_p.h)
gboolean Plugin_Init_gstreamermm_callback(GstPlugin* plugin, void* data)
diff --git a/gstreamer/src/plugin.hg b/gstreamer/src/plugin.hg
index 585420e..84fbda6 100644
--- a/gstreamer/src/plugin.hg
+++ b/gstreamer/src/plugin.hg
@@ -35,6 +35,7 @@ _WRAP_ENUM(PluginDependencyFlags, GstPluginDependencyFlags)
*/
_WRAP_GERROR(PluginError, GstPluginError, GST_PLUGIN_ERROR)
+class Structure;
/** Gst::Plugin - Container for features loaded from a shared object module.
* GStreamer is extensible, so Gst::Element instances can be loaded at runtime.
@@ -90,9 +91,18 @@ public:
//TODO: Use Glib::Module instead of GModule if possible:
_WRAP_METHOD(GModule* get_module(), gst_plugin_get_module)
_WRAP_METHOD(const GModule* get_module() const, gst_plugin_get_module, constversion)
-
_WRAP_METHOD(bool is_loaded() const, gst_plugin_is_loaded)
+// A copy is taken so that the original is not freed by the wrapper.
+#m4 _CONVERSION(`const GstStructure*',`const Gst::Structure',`Glib::wrap(const_cast<GstStructure*>($3), true)')
+ _WRAP_METHOD(const Gst::Structure get_cache_data() const, gst_plugin_get_cache_data)
+
+ _WRAP_METHOD(void set_cache_data(Gst::Structure& cache_data), gst_plugin_set_cache_data)
+
+ //gst_plugin_name_filter is a C API convenience function which tells if a
+ //plugin has a given name so ignore it.
+ _IGNORE(gst_plugin_name_filter)
+
/** @throw Gst::PluginError.
*/
_WRAP_METHOD(static Glib::RefPtr<Gst::Plugin> load_file(const Glib::ustring& filename), gst_plugin_load_file, errthrow)
@@ -110,10 +120,6 @@ public:
const Glib::ustring& license, const Glib::ustring& source,
const Glib::ustring& package, const Glib::ustring& origin);
- //gst_plugin_name_filter is a C API convenience function which tells if a
- //plugin has a given name so ignore it.
- _IGNORE(gst_plugin_name_filter)
-
_WRAP_METHOD(void add_dependency(const Glib::StringArrayHandle& env_vars,
const Glib::StringArrayHandle& paths,
const Glib::StringArrayHandle& names,
diff --git a/gstreamer/src/segment.hg b/gstreamer/src/segment.hg
index 6d0228e..b6896d6 100644
--- a/gstreamer/src/segment.hg
+++ b/gstreamer/src/segment.hg
@@ -71,14 +71,13 @@ namespace Gst
* data to the segment boundaries.
*
* For elements that want to synchronize to the pipeline clock,
- * convert_to_running_time() can be used to convert a timestamp to a value that
- * can be used to synchronize to the clock. This function takes into account
- * all accumulated segments as well as any rate or applied_rate conversions.
+ * to_running_time() can be used to convert a timestamp to a value that can be
+ * used to synchronize to the clock. This function takes into account all
+ * accumulated segments as well as any rate or applied_rate conversions.
*
* For elements that need to perform operations on media data in stream_time,
- * convert_to_stream_time() can be used to convert a timestamp and the segment
- * info to stream time (which is always between 0 and the duration of the
- * stream).
+ * to_stream_time() can be used to convert a timestamp and the segment info to
+ * stream time (which is always between 0 and the duration of the stream).
*
* Last reviewed on 2007-05-17 (0.10.13)
*/
@@ -96,8 +95,10 @@ public:
_WRAP_METHOD(void set_newsegment(bool update, double rate, double applied_rate, Format format, gint64 start, gint64 stop, gint64 time), gst_segment_set_newsegment_full)
_WRAP_METHOD_DOCS_ONLY(gst_segment_set_seek)
void set_seek(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop, bool& update);
- _WRAP_METHOD(gint64 convert_to_running_time(Format format, gint64 position) const, gst_segment_to_running_time)
- _WRAP_METHOD(gint64 convert_to_stream_time(Format format, gint64 position) const, gst_segment_to_stream_time)
+ _WRAP_METHOD(gint64 to_running_time(Format format, gint64 position) const, gst_segment_to_running_time)
+ _WRAP_METHOD(gint64 to_stream_time(Format format, gint64 position) const, gst_segment_to_stream_time)
+ _WRAP_METHOD(gint64 to_position(Format format, gint64 running_time) const, gst_segment_to_position)
+ _WRAP_METHOD(bool set_running_time(Format format, gint64 running_time), gst_segment_set_running_time)
};
} //namespace Gst
diff --git a/gstreamer/src/structure.hg b/gstreamer/src/structure.hg
index c72a5fc..3408a6b 100644
--- a/gstreamer/src/structure.hg
+++ b/gstreamer/src/structure.hg
@@ -76,7 +76,15 @@ public:
* @param value The Value class in which to store the value.
*/
void get_field(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
- _IGNORE(gst_structure_id_get_value, gst_structure_get_value)
+
+ // These are ignored because they are useful in the C API but are either
+ // variable argument functions or their functionality is already provided.
+ _IGNORE(gst_structure_id_get_value,
+ gst_structure_get_value,
+ gst_structure_id_get_valist,
+ gst_structure_get,
+ gst_structure_id_get,
+ gst_structure_get_valist)
/** Sets the field with name @a fieldname to value. If the field does not
* exist, it is created. If the field exists, the previous value is replaced
diff --git a/gstreamer/src/taglist.hg b/gstreamer/src/taglist.hg
index 0c59e03..f7b8ddb 100644
--- a/gstreamer/src/taglist.hg
+++ b/gstreamer/src/taglist.hg
@@ -489,9 +489,9 @@ dnl See .ccg implementation for how this conversion works.
gst_tag_list_get_float,
gst_tag_list_get_double,
gst_tag_list_get_string,
- gst_tag_list_get_date,
gst_tag_list_get_pointer,
- gst_tag_list_get_pointer_index)
+ gst_tag_list_get_date,
+ gst_tag_list_get_buffer)
/** Gets the value that is at the given index for the given tag.
* @param tag The tag to read out.
@@ -523,7 +523,9 @@ dnl See .ccg implementation for how this conversion works.
gst_tag_list_get_float_index,
gst_tag_list_get_double_index,
gst_tag_list_get_string_index,
- gst_tag_list_get_date_index)
+ gst_tag_list_get_date_index,
+ gst_tag_list_get_pointer_index,
+ gst_tag_list_get_buffer_index)
//Variable argument functions are ignored.
_IGNORE(gst_tag_list_add, gst_tag_list_add_values)
diff --git a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
index 0b17c5c..bb5c064 100644
--- a/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
+++ b/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
@@ -519,7 +519,7 @@ void generate_hg_file(const Glib::ustring& includeMacroCalls,
const Glib::ustring& propertyWrapStatements,
const Glib::ustring& signalWrapStatements)
{
- std::cout << "// Generated by run_generate_plugin_gmmproc_file. Don't edit this file." << std::endl << std::endl;
+ std::cout << "// Generated by generate_plugin_gmmproc_file. Don't edit this file." << std::endl << std::endl;
std::cout << "include(plugingen_base.m4)dnl" << std::endl;
std::cout << "changecom()dnl" << std::endl;
std::cout << "#include <" << parentInclude << "/" <<
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]