[gstreamermm] Event,Query: Handwrap their *Type enums.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm] Event,Query: Handwrap their *Type enums.
- Date: Fri, 19 Jul 2013 18:33:36 +0000 (UTC)
commit afcc7c18c676da02035ba7b8caf592d31fb659d3
Author: José Alburquerque <jaalburquerque gmail com>
Date: Tue Jul 16 16:51:11 2013 -0400
Event,Query: Handwrap their *Type enums.
* gstreamer/src/event.hg: Handwrap the EventType enum because it can't
be parsed by glibmm's enum.pl because it uses a C macro to define its
values. Use _WRAP_ENUM_DOCS_ONLY() to get the docs from the C API.
* gstreamer/src/query.{hg,ccg}: Do the same as above with the
QueryType enum for the same reason.
(QueryTypeDefinition): Remove the QueryTypeDefinition class because
it's been removed in the C API.
(get_details):
(iterate_definitions): Also remove the methods dealing with the
removed class.
gstreamer/src/event.hg | 20 +++++++++++---
gstreamer/src/query.ccg | 32 -----------------------
gstreamer/src/query.hg | 64 +++++++++++++++-------------------------------
3 files changed, 37 insertions(+), 79 deletions(-)
---
diff --git a/gstreamer/src/event.hg b/gstreamer/src/event.hg
index 89ac1a1..19b96f3 100644
--- a/gstreamer/src/event.hg
+++ b/gstreamer/src/event.hg
@@ -28,6 +28,7 @@ _DEFS(gstreamermm,gst)
namespace Gst
{
+_WRAP_ENUM_DOCS_ONLY(EventType, GstEventType)
enum EventType
{
EVENT_UNKNOWN = GST_EVENT_UNKNOWN,
@@ -35,27 +36,38 @@ enum EventType
EVENT_FLUSH_START = GST_EVENT_FLUSH_START,
EVENT_FLUSH_STOP = GST_EVENT_FLUSH_STOP,
/* downstream serialized events */
- EVENT_EOS = GST_EVENT_EOS,
- EVENT_NEWSEGMENT = GST_EVENT_NEWSEGMENT,
+ EVENT_STREAM_START = GST_EVENT_STREAM_START,
+ EVENT_CAPS = GST_EVENT_CAPS,
+ EVENT_SEGMENT = GST_EVENT_SEGMENT,
EVENT_TAG = GST_EVENT_TAG,
EVENT_BUFFERSIZE = GST_EVENT_BUFFERSIZE,
+ EVENT_SINK_MESSAGE = GST_EVENT_SINK_MESSAGE,
+ EVENT_EOS = GST_EVENT_EOS,
+ EVENT_TOC = GST_EVENT_TOC,
+ EVENT_CONTEXT = GST_EVENT_CONTEXT,
+ /* non-sticky downstream serialized */
+ EVENT_SEGMENT_DONE = GST_EVENT_SEGMENT_DONE,
+ EVENT_GAP = GST_EVENT_GAP,
/* upstream events */
EVENT_QOS = GST_EVENT_QOS,
EVENT_SEEK = GST_EVENT_SEEK,
EVENT_NAVIGATION = GST_EVENT_NAVIGATION,
EVENT_LATENCY = GST_EVENT_LATENCY,
-
+ EVENT_STEP = GST_EVENT_STEP,
+ EVENT_RECONFIGURE = GST_EVENT_RECONFIGURE,
+ EVENT_TOC_SELECT = GST_EVENT_TOC_SELECT,
/* custom events start here */
EVENT_CUSTOM_UPSTREAM = GST_EVENT_CUSTOM_UPSTREAM,
EVENT_CUSTOM_DOWNSTREAM = GST_EVENT_CUSTOM_DOWNSTREAM,
EVENT_CUSTOM_DOWNSTREAM_OOB = GST_EVENT_CUSTOM_DOWNSTREAM_OOB,
+ EVENT_CUSTOM_DOWNSTREAM_STICKY = GST_EVENT_CUSTOM_DOWNSTREAM_STICKY,
EVENT_CUSTOM_BOTH = GST_EVENT_CUSTOM_BOTH,
EVENT_CUSTOM_BOTH_OOB = GST_EVENT_CUSTOM_BOTH_OOB
};
+_WRAP_ENUM(EventTypeFlags, GstEventTypeFlags)
_WRAP_ENUM(SeekType, GstSeekType)
_WRAP_ENUM(SeekFlags, GstSeekFlags)
-_WRAP_ENUM(EventTypeFlags, GstEventTypeFlags)
class Message;
class Structure;
diff --git a/gstreamer/src/query.ccg b/gstreamer/src/query.ccg
index c0532d4..dcfcc66 100644
--- a/gstreamer/src/query.ccg
+++ b/gstreamer/src/query.ccg
@@ -44,23 +44,6 @@ static void Query_gstreamermm_callback_destroy(void* data,
namespace Gst
{
-QueryTypeDefinition::QueryTypeDefinition()
-: value(Gst::QUERY_NONE),
- quark(static_cast<GQuark>(0))
-{}
-
-QueryTypeDefinition::QueryTypeDefinition(const GstQueryTypeDefinition* castitem)
-: value(Gst::QUERY_NONE),
- quark((castitem) ? castitem->quark : 0)
-{
- if(castitem)
- {
- value = static_cast<QueryType>(castitem->value);
- nick = castitem->nick;
- description = castitem->description;
- }
-}
-
namespace Enums
{
@@ -81,21 +64,6 @@ Glib::RefPtr<Gst::Query> Query::create_writable()
return Gst::wrap(gst_query_make_writable(gobj()));
}
-bool get_details(QueryType type, QueryTypeDefinition &def)
-{
- const GstQueryTypeDefinition* gstdef = gst_query_type_get_details(GstQueryType(type));
-
- if(!gstdef)
- return false;
-
- def.value = static_cast<QueryType>(gstdef->value);
- def.nick = gstdef->nick;
- def.description = gstdef->description;
- def.quark = gstdef->quark;
-
- return true;
-}
-
QueryApplication::QueryApplication(GstQuery* castitem) :
Query(castitem)
{}
diff --git a/gstreamer/src/query.hg b/gstreamer/src/query.hg
index 9fb3416..ecb66cb 100644
--- a/gstreamer/src/query.hg
+++ b/gstreamer/src/query.hg
@@ -29,41 +29,30 @@ _DEFS(gstreamermm,gst)
namespace Gst
{
-//Gst::IteratorBasic<> forward declaration.
-template <class CppType>
-class IteratorBasic;
-
-_WRAP_ENUM(QueryType, GstQueryType)
_WRAP_ENUM(BufferingMode, GstBufferingMode)
-/** A class to store the details of a Gst::Query retrieved by
- * Gst::Query::get_details().
- */
-class QueryTypeDefinition
+_WRAP_ENUM_DOCS_ONLY(QueryType, GstQueryType)
+enum QueryType
{
- _CLASS_GENERIC(QueryTypeDefinition, GstQueryTypeDefinition)
-
-public:
- /// Default constructor.
- QueryTypeDefinition();
-
- /** Constructs a Gst::QueryTypeDefinition from a C GstQueryTypeDefinition
- * type. The @a castitem is left unaffected; its contents are simply copied.
- * @param castitem The GstQueryTypeDefinition to copy contents from.
- */
- explicit QueryTypeDefinition(const GstQueryTypeDefinition* castitem);
-
- /// The unique id of the Query type.
- QueryType value;
-
- /// A short nickname for the query type.
- Glib::ustring nick;
-
- /// A longer description of the query type.
- Glib::ustring description;
-
- /// The quark for the nick.
- Glib::QueryQuark quark;
+ QUERY_UNKNOWN = GST_QUERY_UNKNOWN,
+ QUERY_POSITION = GST_QUERY_POSITION,
+ QUERY_DURATION = GST_QUERY_DURATION,
+ QUERY_LATENCY = GST_QUERY_LATENCY,
+ QUERY_JITTER = GST_QUERY_JITTER,
+ QUERY_RATE = GST_QUERY_RATE,
+ QUERY_SEEKING = GST_QUERY_SEEKING,
+ QUERY_SEGMENT = GST_QUERY_SEGMENT,
+ QUERY_CONVERT = GST_QUERY_CONVERT,
+ QUERY_FORMATS = GST_QUERY_FORMATS,
+ QUERY_BUFFERING = GST_QUERY_BUFFERING,
+ QUERY_CUSTOM = GST_QUERY_CUSTOM,
+ QUERY_URI = GST_QUERY_URI,
+ QUERY_ALLOCATION = GST_QUERY_ALLOCATION,
+ QUERY_SCHEDULING = GST_QUERY_SCHEDULING,
+ QUERY_ACCEPT_CAPS = GST_QUERY_ACCEPT_CAPS,
+ QUERY_CAPS = GST_QUERY_CAPS,
+ QUERY_DRAIN = GST_QUERY_DRAIN,
+ QUERY_CONTEXT = GST_QUERY_CONTEXT
};
namespace Enums
@@ -142,17 +131,6 @@ public:
#m4 _CONVERSION(`const Glib::ArrayHandle<const QueryType>&',`GstQueryType*',`(GstQueryType*)(($3).data())')
_WRAP_METHOD(static bool query_types_contain(const Glib::ArrayHandle<const QueryType>& types, QueryType
type), gst_query_types_contains)
- /** Get details about the given Gst::QueryType.
- *
- * @param type A Gst::QueryType.
- * @param def A Gst::QueryTypeDefinition in which to store the details.
- * @return true if successful, false otherwise.
- */
- bool get_details(QueryType type, QueryTypeDefinition& def) const;
- _IGNORE(gst_query_type_get_details)
-
- _WRAP_METHOD(static Gst::IteratorBasic<const Gst::QueryTypeDefinition> iterate_definitions(),
gst_query_type_iterate_definitions)
-
/** Virtual function called when the Gst::Query needs to be copied.
*/
virtual Glib::RefPtr<Gst::MiniObject> copy_vfunc() const;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]