mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-06 15:38:50 +00:00
Change GstCaps to GstStructure in navigation events. Fix x[v]imagesink to scale navigation events.
Original commit message from CVS: Change GstCaps to GstStructure in navigation events. Fix x[v]imagesink to scale navigation events.
This commit is contained in:
parent
65941aa8d9
commit
7e171f0215
2 changed files with 10 additions and 10 deletions
|
@ -61,31 +61,31 @@ gst_navigation_class_init (GstNavigationInterface *iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gst_navigation_send_event (GstNavigation *navigation, GstCaps *caps)
|
gst_navigation_send_event (GstNavigation *navigation, GstStructure *structure)
|
||||||
{
|
{
|
||||||
GstNavigationInterface *iface = GST_NAVIGATION_GET_IFACE (navigation);
|
GstNavigationInterface *iface = GST_NAVIGATION_GET_IFACE (navigation);
|
||||||
|
|
||||||
if (iface->send_event) {
|
if (iface->send_event) {
|
||||||
iface->send_event (navigation, caps);
|
iface->send_event (navigation, structure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gst_navigation_send_key_event (GstNavigation *navigation, const char *key)
|
gst_navigation_send_key_event (GstNavigation *navigation, const char *key)
|
||||||
{
|
{
|
||||||
gst_navigation_send_event (navigation, GST_CAPS_NEW ("key_event",
|
gst_navigation_send_event (navigation, gst_structure_new (
|
||||||
"application/x-gst-navigation",
|
"application/x-gst-navigation",
|
||||||
"key", GST_PROPS_STRING (key)));
|
"key", G_TYPE_STRING, key, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gst_navigation_send_mouse_event (GstNavigation *navigation, double x,
|
gst_navigation_send_mouse_event (GstNavigation *navigation, double x,
|
||||||
double y)
|
double y)
|
||||||
{
|
{
|
||||||
gst_navigation_send_event (navigation, GST_CAPS_NEW ("mouse_event",
|
gst_navigation_send_event (navigation, gst_structure_new (
|
||||||
"application/x-gst-navigation",
|
"application/x-gst-navigation",
|
||||||
"pointer_x", GST_PROPS_FLOAT (x),
|
"pointer_x", G_TYPE_DOUBLE, x,
|
||||||
"pointer_y", GST_PROPS_FLOAT (y)));
|
"pointer_y", G_TYPE_DOUBLE, y, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ typedef struct _GstNavigationInterface {
|
||||||
GTypeInterface g_iface;
|
GTypeInterface g_iface;
|
||||||
|
|
||||||
/* virtual functions */
|
/* virtual functions */
|
||||||
void (*send_event) (GstNavigation *navigation, GstCaps *caps);
|
void (*send_event) (GstNavigation *navigation, GstStructure *structure);
|
||||||
|
|
||||||
GST_CLASS_PADDING
|
GST_CLASS_PADDING
|
||||||
} GstNavigationInterface;
|
} GstNavigationInterface;
|
||||||
|
@ -50,7 +50,7 @@ typedef struct _GstNavigationInterface {
|
||||||
GType gst_navigation_get_type (void);
|
GType gst_navigation_get_type (void);
|
||||||
|
|
||||||
/* virtual class function wrappers */
|
/* virtual class function wrappers */
|
||||||
void gst_navigation_send_event (GstNavigation *navigation, GstCaps *caps);
|
void gst_navigation_send_event (GstNavigation *navigation, GstStructure *structure);
|
||||||
|
|
||||||
void gst_navigation_send_key_event (GstNavigation *navigation, const char *key);
|
void gst_navigation_send_key_event (GstNavigation *navigation, const char *key);
|
||||||
void gst_navigation_send_mouse_event (GstNavigation *navigation, double x,
|
void gst_navigation_send_mouse_event (GstNavigation *navigation, double x,
|
||||||
|
|
Loading…
Reference in a new issue