videooverlay.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* GStreamer Video Overlay Interface
  2. * Copyright (C) 2003 Ronald Bultje <[email protected]>
  3. * Copyright (C) 2003 Julien Moutte <[email protected]>
  4. * Copyright (C) 2011 Tim-Philipp Müller <[email protected]>
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Library General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Library General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Library General Public
  17. * License along with this library; if not, write to the
  18. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  19. * Boston, MA 02110-1301, USA.
  20. */
  21. #ifndef __GST_VIDEO_OVERLAY_H__
  22. #define __GST_VIDEO_OVERLAY_H__
  23. #include <gst/gst.h>
  24. G_BEGIN_DECLS
  25. #define GST_TYPE_VIDEO_OVERLAY \
  26. (gst_video_overlay_get_type ())
  27. #define GST_VIDEO_OVERLAY(obj) \
  28. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_OVERLAY, GstVideoOverlay))
  29. #define GST_IS_VIDEO_OVERLAY(obj) \
  30. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_OVERLAY))
  31. #define GST_VIDEO_OVERLAY_GET_INTERFACE(inst) \
  32. (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_VIDEO_OVERLAY, GstVideoOverlayInterface))
  33. /**
  34. * GstVideoOverlay:
  35. *
  36. * Opaque #GstVideoOverlay interface structure
  37. */
  38. typedef struct _GstVideoOverlay GstVideoOverlay;
  39. typedef struct _GstVideoOverlayInterface GstVideoOverlayInterface;
  40. /**
  41. * GstVideoOverlayInterface:
  42. * @iface: parent interface type.
  43. * @expose: virtual method to handle expose events
  44. * @handle_events: virtual method to handle events
  45. * @set_render_rectangle: virtual method to set the render rectangle
  46. * @set_window_handle: virtual method to configure the window handle
  47. *
  48. * #GstVideoOverlay interface
  49. */
  50. struct _GstVideoOverlayInterface {
  51. GTypeInterface iface;
  52. /* virtual functions */
  53. void (*expose) (GstVideoOverlay *overlay);
  54. void (*handle_events) (GstVideoOverlay *overlay, gboolean handle_events);
  55. void (*set_render_rectangle) (GstVideoOverlay *overlay,
  56. gint x, gint y,
  57. gint width, gint height);
  58. void (*set_window_handle) (GstVideoOverlay *overlay, guintptr handle);
  59. };
  60. GType gst_video_overlay_get_type (void);
  61. /* virtual function wrappers */
  62. gboolean gst_video_overlay_set_render_rectangle (GstVideoOverlay * overlay,
  63. gint x,
  64. gint y,
  65. gint width,
  66. gint height);
  67. void gst_video_overlay_expose (GstVideoOverlay * overlay);
  68. void gst_video_overlay_handle_events (GstVideoOverlay * overlay,
  69. gboolean handle_events);
  70. void gst_video_overlay_set_window_handle (GstVideoOverlay * overlay,
  71. guintptr handle);
  72. /* public methods to dispatch bus messages */
  73. void gst_video_overlay_got_window_handle (GstVideoOverlay * overlay,
  74. guintptr handle);
  75. void gst_video_overlay_prepare_window_handle (GstVideoOverlay * overlay);
  76. gboolean gst_is_video_overlay_prepare_window_handle_message (GstMessage * msg);
  77. G_END_DECLS
  78. #endif /* __GST_VIDEO_OVERLAY_H__ */