"GstNavigationInterface.iface",
"GstNavigationInterface.send_event",
"GstNavigationInterface::send_event",
+ "GstNavigationInterface.send_event_simple",
+ "GstNavigationInterface::send_event_simple",
"GstNavigationMessageType",
"GstNavigationQueryType",
"GstNavigationtest",
G_DEFINE_INTERFACE (GstNavigation, gst_navigation, 0);
+static void
+gst_navigation_default_send_event_simple (GstNavigation * navigation,
+ GstEvent * event)
+{
+ GstNavigationInterface *iface = GST_NAVIGATION_GET_INTERFACE (navigation);
+
+ if (iface->send_event) {
+ iface->send_event (navigation,
+ gst_structure_copy (gst_event_get_structure (event)));
+ } else {
+ gst_event_unref (event);
+ }
+}
+
static void
gst_navigation_default_init (GstNavigationInterface * iface)
{
/* default virtual functions */
iface->send_event = NULL;
+ iface->send_event_simple = gst_navigation_default_send_event_simple;
}
/* The interface implementer should make sure that the object can handle
if (iface->send_event) {
iface->send_event (navigation, structure);
+ } else if (iface->send_event_simple) {
+ iface->send_event_simple (navigation, gst_event_new_navigation (structure));
} else {
gst_structure_free (structure);
}
"command", "command-code", G_TYPE_UINT, (guint) command, NULL));
}
+/**
+ * gst_navigation_send_event_simple:
+ * @navigation: The navigation interface instance
+ * @event: The event to send
+ *
+ * Sends an event to the navigation interface.
+ * Since: 1.22
+ */
+void
+gst_navigation_send_event_simple (GstNavigation * navigation, GstEvent * event)
+{
+ GstNavigationInterface *iface = GST_NAVIGATION_GET_INTERFACE (navigation);
+
+ g_return_if_fail (GST_EVENT_TYPE (event) == GST_EVENT_NAVIGATION);
+
+ if (iface->send_event_simple) {
+ iface->send_event_simple (navigation, event);
+ } else if (iface->send_event) {
+ iface->send_event (navigation,
+ gst_structure_copy (gst_event_get_structure (event)));
+ gst_event_unref (event);
+ } else {
+ gst_event_unref (event);
+ }
+}
+
/* Navigation Queries */
#define GST_NAVIGATION_QUERY_HAS_TYPE(query,query_type) \
* GstNavigationInterface:
* @iface: the parent interface
* @send_event: sending a navigation event
+ * @send_event_simple: sending a navigation event (Since: 1.22)
*
* Navigation interface.
*/
GTypeInterface iface;
/* virtual functions */
+
+ /**
+ * GstNavigationInterface::send_event:
+ *
+ * sending a navigation event.
+ *
+ * Deprecated: 1.22: Use #GstNavigationInterface.send_event_simple() instead.
+ */
void (*send_event) (GstNavigation *navigation, GstStructure *structure);
+
+ /**
+ * GstNavigationInterface::send_event_simple:
+ *
+ * sending a navigation event.
+ *
+ * Since: 1.22
+ */
+ void (*send_event_simple) (GstNavigation *navigation, GstEvent *event);
};
GST_VIDEO_API
/* interface virtual function wrappers */
-GST_VIDEO_API
-void gst_navigation_send_event (GstNavigation *navigation,
- GstStructure *structure);
+GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
+void gst_navigation_send_event (GstNavigation *navigation,
+ GstStructure *structure);
-GST_VIDEO_API
-void gst_navigation_send_key_event (GstNavigation *navigation,
- const char *event, const char *key);
+GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
+void gst_navigation_send_key_event (GstNavigation *navigation,
+ const char *event, const char *key);
-GST_VIDEO_API
-void gst_navigation_send_mouse_event (GstNavigation *navigation,
- const char *event, int button, double x, double y);
+GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
+void gst_navigation_send_mouse_event (GstNavigation *navigation,
+ const char *event, int button, double x, double y);
-GST_VIDEO_API
+GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
void gst_navigation_send_mouse_scroll_event (GstNavigation *navigation,
double x, double y, double delta_x, double delta_y);
+GST_VIDEO_DEPRECATED_FOR(gst_navigation_send_event_simple)
+void gst_navigation_send_command (GstNavigation *navigation,
+ GstNavigationCommand command);
+
GST_VIDEO_API
-void gst_navigation_send_command (GstNavigation *navigation,
- GstNavigationCommand command);
+void gst_navigation_send_event_simple (GstNavigation *navigation,
+ GstEvent *event);
G_END_DECLS
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 24},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 32},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 28},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 36},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 12},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 16},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 28},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 36},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 12},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 16},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 24},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 32},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},
{"GstFFTF64Complex", sizeof (GstFFTF64Complex), 16},
{"GstFFTS16Complex", sizeof (GstFFTS16Complex), 4},
{"GstFFTS32Complex", sizeof (GstFFTS32Complex), 8},
- {"GstNavigationInterface", sizeof (GstNavigationInterface), 24},
+ {"GstNavigationInterface", sizeof (GstNavigationInterface), 32},
{"gst_riff_acid", sizeof (gst_riff_acid), 24},
{"gst_riff_dmlh", sizeof (gst_riff_dmlh), 4},
{"gst_riff_index_entry", sizeof (gst_riff_index_entry), 16},