dfbvideosink: Fix compile error
authorekwange <ekwange@gmail.com>
Mon, 2 Jan 2023 09:34:59 +0000 (18:34 +0900)
committerkwange e <ekwange@gmail.com>
Sun, 8 Jan 2023 03:49:03 +0000 (03:49 +0000)
Fix some compile errors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3670>

subprojects/gst-plugins-bad/ext/directfb/dfbvideosink.c
subprojects/gst-plugins-bad/ext/directfb/dfbvideosink.h

index 7b88930..b81f17f 100644 (file)
@@ -606,7 +606,8 @@ gst_dfbvideosink_event_thread (GstDfbVideoSink * dfbvideosink)
               GST_DEBUG_OBJECT (dfbvideosink, "key press event %c !",
                   event.input.key_symbol);
               gst_dfbvideosink_navigation_send_event
-                  (gst_navigation_event_new_key_press ("prout",
+                  (GST_NAVIGATION (dfbvideosink),
+                  gst_navigation_event_new_key_press ("prout",
                       GST_NAVIGATION_MODIFIER_NONE));
           }
         } else if (event.input.type == DIET_BUTTONPRESS) {
@@ -618,7 +619,8 @@ gst_dfbvideosink_event_thread (GstDfbVideoSink * dfbvideosink)
               event.input.button, x, y);
 
           gst_dfbvideosink_navigation_send_event
-              (gst_navigation_event_new_mouse_button_press (event.input.button,
+              (GST_NAVIGATION (dfbvideosink),
+              gst_navigation_event_new_mouse_button_press (event.input.button,
                   x, y, GST_NAVIGATION_MODIFIER_NONE));
         } else if (event.input.type == DIET_BUTTONRELEASE) {
           gint x, y;
@@ -629,14 +631,16 @@ gst_dfbvideosink_event_thread (GstDfbVideoSink * dfbvideosink)
               event.input.button, x, y);
 
           gst_dfbvideosink_navigation_send_event
-              (gst_navigation_event_new_mouse_button_release
-              (event.input.button, x, y, GST_NAVIGATION_MODIFIER_NONE));
+              (GST_NAVIGATION (dfbvideosink),
+              gst_navigation_event_new_mouse_button_release (event.input.button,
+                  x, y, GST_NAVIGATION_MODIFIER_NONE));
         } else if (event.input.type == DIET_AXISMOTION) {
           gint x, y;
 
           dfbvideosink->layer->GetCursorPosition (dfbvideosink->layer, &x, &y);
           gst_dfbvideosink_navigation_send_event
-              (gst_navigation_event_new_mouse_move (x, y,
+              (GST_NAVIGATION (dfbvideosink),
+              gst_navigation_event_new_mouse_move (x, y,
                   GST_NAVIGATION_MODIFIER_NONE));
         } else {
           GST_WARNING_OBJECT (dfbvideosink, "unhandled event type %d",
@@ -2007,8 +2011,7 @@ gst_dfbvideosink_navigation_send_event (GstNavigation * navigation,
   /* Our coordinates can be wrong here if we centered the video */
 
   /* Converting pointer coordinates to the non scaled geometry */
-  if gst_navigation_event_get_coordinates
-    (event, &old_x, &old_y) {
+  if (gst_navigation_event_get_coordinates (event, &old_x, &old_y)) {
     x = old_x;
     y = old_y;
 
@@ -2032,7 +2035,7 @@ gst_dfbvideosink_navigation_send_event (GstNavigation * navigation,
     GST_DEBUG_OBJECT (dfbvideosink, "translated navigation event y "
         "coordinate from %fd to %fd", old_y, y);
     gst_navigation_event_set_coordinates (event, x, y);
-    }
+  }
 
   pad = gst_pad_get_peer (GST_VIDEO_SINK_PAD (dfbvideosink));
 
index 647cf7a..1eb3877 100644 (file)
@@ -156,6 +156,10 @@ struct _GstDfbVideoSinkClass {
 GType gst_dfbvideosink_get_type (void);
 GType gst_dfb_buffer_pool_get_type (void);
 
+static void
+gst_dfbvideosink_navigation_send_event (GstNavigation * navigation,
+    GstEvent * event);
+
 GST_ELEMENT_REGISTER_DECLARE (dfbvideosink);
 
 G_END_DECLS