mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
vaapisink: clean-ups (indentation, drop unused variables).
This commit is contained in:
parent
48e5bcbe7b
commit
0b6d6d956e
1 changed files with 15 additions and 19 deletions
|
@ -74,6 +74,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink);
|
|||
#define GST_CAT_DEFAULT gst_debug_vaapisink
|
||||
|
||||
/* Default template */
|
||||
/* *INDENT-OFF* */
|
||||
static const char gst_vaapisink_sink_caps_str[] =
|
||||
#if GST_CHECK_VERSION(1,1,0)
|
||||
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE,
|
||||
|
@ -89,6 +90,7 @@ static const char gst_vaapisink_sink_caps_str[] =
|
|||
#endif
|
||||
GST_VAAPI_SURFACE_CAPS;
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
||||
static GstStaticPadTemplate gst_vaapisink_sink_factory =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
|
@ -109,7 +111,7 @@ static void
|
|||
gst_vaapisink_color_balance_iface_init (GstColorBalanceInterface * iface);
|
||||
|
||||
static void
|
||||
gst_vaapisink_navigation_iface_init (GstNavigationInterface *iface);
|
||||
gst_vaapisink_navigation_iface_init (GstNavigationInterface * iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GstVaapiSink,
|
||||
gst_vaapisink,
|
||||
|
@ -354,8 +356,7 @@ gst_vaapisink_x11_handle_events (GstVaapiSink * sink)
|
|||
/* Track MousePointer interaction */
|
||||
for (;;) {
|
||||
gst_vaapi_display_lock (display);
|
||||
has_events = XCheckWindowEvent (x11_dpy, x11_win,
|
||||
PointerMotionMask, &e);
|
||||
has_events = XCheckWindowEvent (x11_dpy, x11_win, PointerMotionMask, &e);
|
||||
gst_vaapi_display_unlock (display);
|
||||
if (!has_events)
|
||||
break;
|
||||
|
@ -383,8 +384,8 @@ gst_vaapisink_x11_handle_events (GstVaapiSink * sink)
|
|||
const char *key_str = NULL;
|
||||
gst_vaapi_display_lock (display);
|
||||
has_events = XCheckWindowEvent (x11_dpy, x11_win,
|
||||
KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask
|
||||
, &e);
|
||||
KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask,
|
||||
&e);
|
||||
gst_vaapi_display_unlock (display);
|
||||
if (!has_events)
|
||||
break;
|
||||
|
@ -396,7 +397,8 @@ gst_vaapisink_x11_handle_events (GstVaapiSink * sink)
|
|||
break;
|
||||
case ButtonRelease:
|
||||
gst_navigation_send_mouse_event (GST_NAVIGATION (sink),
|
||||
"mouse-button-release", e.xbutton.button, e.xbutton.x, e.xbutton.y);
|
||||
"mouse-button-release", e.xbutton.button, e.xbutton.x,
|
||||
e.xbutton.y);
|
||||
break;
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
|
@ -449,14 +451,9 @@ gst_vaapisink_x11_pre_start_event_thread (GstVaapiSink * sink)
|
|||
{
|
||||
GstVaapiDisplayX11 *const display =
|
||||
GST_VAAPI_DISPLAY_X11 (GST_VAAPI_PLUGIN_BASE_DISPLAY (sink));
|
||||
static const int x11_event_mask =
|
||||
(KeyPressMask |
|
||||
KeyReleaseMask |
|
||||
ButtonPressMask |
|
||||
ButtonReleaseMask |
|
||||
PointerMotionMask |
|
||||
ExposureMask |
|
||||
StructureNotifyMask);
|
||||
static const int x11_event_mask = (KeyPressMask | KeyReleaseMask |
|
||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
||||
ExposureMask | StructureNotifyMask);
|
||||
|
||||
if (sink->window) {
|
||||
XSelectInput (gst_vaapi_display_x11_get_display (display),
|
||||
|
@ -846,7 +843,6 @@ gst_vaapisink_navigation_send_event (GstNavigation * navigation,
|
|||
GstStructure * structure)
|
||||
{
|
||||
GstVaapiSink *const sink = GST_VAAPISINK (navigation);
|
||||
GstVaapiDisplay *const display = GST_VAAPI_PLUGIN_BASE_DISPLAY (sink);
|
||||
GstPad *peer;
|
||||
|
||||
if ((peer = gst_pad_get_peer (GST_VAAPI_PLUGIN_BASE_SINK_PAD (sink)))) {
|
||||
|
|
Loading…
Reference in a new issue