gstvaapidisplay_wayland_priv.h 2.97 KB
Newer Older
1 2 3
/*
 *  gstvaapidisplay_wayland_priv.h - Internal VA/Wayland interface
 *
4
 *  Copyright (C) 2012-2013 Intel Corporation
5 6
 *    Author: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
 *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2.1
 *  of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free
 *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 *  Boston, MA 02110-1301 USA
 */

#ifndef GST_VAAPI_DISPLAY_WAYLAND_PRIV_H
#define GST_VAAPI_DISPLAY_WAYLAND_PRIV_H

27 28
#include "xdg-shell-client-protocol.h"

29
#include <gst/vaapi/gstvaapidisplay_wayland.h>
30
#include "gstvaapidisplay_priv.h"
31 32 33

G_BEGIN_DECLS

34
#define GST_VAAPI_IS_DISPLAY_WAYLAND(display) \
35
    (G_TYPE_CHECK_INSTANCE_TYPE ((display), GST_TYPE_VAAPI_DISPLAY_WAYLAND))
36

37 38 39
#define GST_VAAPI_DISPLAY_WAYLAND_CAST(display) \
    ((GstVaapiDisplayWayland *)(display))

40
#define GST_VAAPI_DISPLAY_WAYLAND_GET_PRIVATE(display) \
41 42 43 44
    (GST_VAAPI_DISPLAY_WAYLAND_CAST(display)->priv)

#define GST_VAAPI_DISPLAY_WAYLAND_GET_CLASS(obj) \
    (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VAAPI_DISPLAY_WAYLAND, GstVaapiDisplayWaylandClass))
45 46 47 48

typedef struct _GstVaapiDisplayWaylandPrivate   GstVaapiDisplayWaylandPrivate;
typedef struct _GstVaapiDisplayWaylandClass     GstVaapiDisplayWaylandClass;

49 50 51 52 53 54 55 56 57
/**
 * GST_VAAPI_DISPLAY_WL_DISPLAY:
 * @display: a #GstVaapiDisplay
 *
 * Macro that evaluates to the underlying Wayland #wl_display object
 * of @display
 */
#undef  GST_VAAPI_DISPLAY_WL_DISPLAY
#define GST_VAAPI_DISPLAY_WL_DISPLAY(display) \
58
    GST_VAAPI_DISPLAY_WAYLAND_GET_PRIVATE(display)->wl_display
59

60 61 62 63 64
struct _GstVaapiDisplayWaylandPrivate
{
  gchar *display_name;
  struct wl_display *wl_display;
  struct wl_compositor *compositor;
65
  struct wl_shell *wl_shell;
66
  struct xdg_wm_base *xdg_wm_base;
67
  struct wl_subcompositor *subcompositor;
68 69 70 71 72 73 74 75
  struct wl_output *output;
  struct wl_registry *registry;
  guint width;
  guint height;
  guint phys_width;
  guint phys_height;
  gint event_fd;
  guint use_foreign_display:1;
76 77 78 79 80 81 82
};

/**
 * GstVaapiDisplayWayland:
 *
 * VA/Wayland display wrapper.
 */
83 84 85 86
struct _GstVaapiDisplayWayland
{
  /*< private >*/
  GstVaapiDisplay parent_instance;
87

88
  GstVaapiDisplayWaylandPrivate *priv;
89 90 91 92 93 94 95
};

/**
 * GstVaapiDisplayWaylandClass:
 *
 * VA/Wayland display wrapper clas.
 */
96 97 98 99
struct _GstVaapiDisplayWaylandClass
{
  /*< private >*/
  GstVaapiDisplayClass parent_class;
100 101 102 103 104
};

G_END_DECLS

#endif /* GST_VAAPI_DISPLAY_WAYLAND_PRIV_H */