videoorientation.h 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* GStreamer
  2. * Copyright (C) 2006 Nokia <[email protected]
  3. *
  4. * videoorientation.h: video flipping and centering interface
  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_ORIENTATION_H__
  22. #define __GST_VIDEO_ORIENTATION_H__
  23. #include <gst/gst.h>
  24. G_BEGIN_DECLS
  25. #define GST_TYPE_VIDEO_ORIENTATION \
  26. (gst_video_orientation_get_type ())
  27. #define GST_VIDEO_ORIENTATION(obj) \
  28. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientation))
  29. #define GST_IS_VIDEO_ORIENTATION(obj) \
  30. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_ORIENTATION))
  31. #define GST_VIDEO_ORIENTATION_GET_INTERFACE(inst) \
  32. (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientationInterface))
  33. /**
  34. * GstVideoOrientation:
  35. *
  36. * Opaque #GstVideoOrientation data structure.
  37. */
  38. typedef struct _GstVideoOrientation GstVideoOrientation;
  39. typedef struct _GstVideoOrientationInterface GstVideoOrientationInterface;
  40. /**
  41. * GstVideoOrientationInterface:
  42. * @iface: parent interface type.
  43. * @get_hflip: virtual method to get horizontal flipping state
  44. * @get_vflip: virtual method to get vertical flipping state
  45. * @get_hcenter: virtual method to get horizontal centering state
  46. * @get_vcenter: virtual method to get vertical centering state
  47. * @set_hflip: virtual method to set horizontal flipping state
  48. * @set_vflip: virtual method to set vertical flipping state
  49. * @set_hcenter: virtual method to set horizontal centering state
  50. * @set_vcenter: virtual method to set vertical centering state
  51. *
  52. * #GstVideoOrientationInterface interface.
  53. */
  54. struct _GstVideoOrientationInterface {
  55. GTypeInterface iface;
  56. /* FIXME 0.11: fix awkward API? add some kind of get_supported flags thing
  57. * and then just return booleans/int from all vfuncs requiring the caller
  58. * to check the flags first */
  59. /* virtual functions */
  60. gboolean (* get_hflip) (GstVideoOrientation *video_orientation, gboolean *flip);
  61. gboolean (* get_vflip) (GstVideoOrientation *video_orientation, gboolean *flip);
  62. gboolean (* get_hcenter) (GstVideoOrientation *video_orientation, gint *center);
  63. gboolean (* get_vcenter) (GstVideoOrientation *video_orientation, gint *center);
  64. gboolean (* set_hflip) (GstVideoOrientation *video_orientation, gboolean flip);
  65. gboolean (* set_vflip) (GstVideoOrientation *video_orientation, gboolean flip);
  66. gboolean (* set_hcenter) (GstVideoOrientation *video_orientation, gint center);
  67. gboolean (* set_vcenter) (GstVideoOrientation *video_orientation, gint center);
  68. };
  69. GType gst_video_orientation_get_type (void);
  70. /* virtual class function wrappers */
  71. gboolean gst_video_orientation_get_hflip (GstVideoOrientation *video_orientation, gboolean *flip);
  72. gboolean gst_video_orientation_get_vflip (GstVideoOrientation *video_orientation, gboolean *flip);
  73. gboolean gst_video_orientation_get_hcenter (GstVideoOrientation *video_orientation, gint *center);
  74. gboolean gst_video_orientation_get_vcenter (GstVideoOrientation *video_orientation, gint *center);
  75. gboolean gst_video_orientation_set_hflip (GstVideoOrientation *video_orientation, gboolean flip);
  76. gboolean gst_video_orientation_set_vflip (GstVideoOrientation *video_orientation, gboolean flip);
  77. gboolean gst_video_orientation_set_hcenter (GstVideoOrientation *video_orientation, gint center);
  78. gboolean gst_video_orientation_set_vcenter (GstVideoOrientation *video_orientation, gint center);
  79. G_END_DECLS
  80. #endif /* __GST_VIDEO_ORIENTATION_H__ */