colorbalance.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* GStreamer Color Balance
  2. * Copyright (C) 2003 Ronald Bultje <[email protected]>
  3. *
  4. * color-balance.h: image color balance interface design
  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_COLOR_BALANCE_H__
  22. #define __GST_COLOR_BALANCE_H__
  23. #include <gst/gst.h>
  24. #include <gst/video/colorbalancechannel.h>
  25. G_BEGIN_DECLS
  26. #define GST_TYPE_COLOR_BALANCE \
  27. (gst_color_balance_get_type ())
  28. #define GST_COLOR_BALANCE(obj) \
  29. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE, GstColorBalance))
  30. #define GST_IS_COLOR_BALANCE(obj) \
  31. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE))
  32. #define GST_COLOR_BALANCE_GET_INTERFACE(inst) \
  33. (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceInterface))
  34. typedef struct _GstColorBalance GstColorBalance;
  35. typedef struct _GstColorBalanceInterface GstColorBalanceInterface;
  36. /**
  37. * GstColorBalanceType:
  38. * @GST_COLOR_BALANCE_HARDWARE: Color balance is implemented with dedicated
  39. * hardware.
  40. * @GST_COLOR_BALANCE_SOFTWARE: Color balance is implemented via software
  41. * processing.
  42. *
  43. * An enumeration indicating whether an element implements color balancing
  44. * operations in software or in dedicated hardware. In general, dedicated
  45. * hardware implementations (such as those provided by xvimagesink) are
  46. * preferred.
  47. */
  48. typedef enum
  49. {
  50. GST_COLOR_BALANCE_HARDWARE,
  51. GST_COLOR_BALANCE_SOFTWARE
  52. } GstColorBalanceType;
  53. /**
  54. * GstColorBalanceInterface:
  55. * @iface: the parent interface
  56. * @balance_type: implementation type
  57. * @list_channels: list handled channels
  58. * @set_value: set a channel value
  59. * @get_value: get a channel value
  60. * @value_changed: default handler for value changed notification
  61. *
  62. * Color-balance interface.
  63. */
  64. struct _GstColorBalanceInterface {
  65. GTypeInterface iface;
  66. /* virtual functions */
  67. const GList * (* list_channels) (GstColorBalance *balance);
  68. void (* set_value) (GstColorBalance *balance,
  69. GstColorBalanceChannel *channel,
  70. gint value);
  71. gint (* get_value) (GstColorBalance *balance,
  72. GstColorBalanceChannel *channel);
  73. GstColorBalanceType (*get_balance_type) (GstColorBalance *balance);
  74. /* signals */
  75. void (* value_changed) (GstColorBalance *balance,
  76. GstColorBalanceChannel *channel,
  77. gint value);
  78. /*< private >*/
  79. gpointer _gst_reserved[GST_PADDING];
  80. };
  81. GType gst_color_balance_get_type (void);
  82. /* virtual class function wrappers */
  83. const GList *
  84. gst_color_balance_list_channels (GstColorBalance *balance);
  85. void gst_color_balance_set_value (GstColorBalance *balance,
  86. GstColorBalanceChannel *channel,
  87. gint value);
  88. gint gst_color_balance_get_value (GstColorBalance *balance,
  89. GstColorBalanceChannel *channel);
  90. GstColorBalanceType
  91. gst_color_balance_get_balance_type (GstColorBalance *balance);
  92. /* trigger signal */
  93. void gst_color_balance_value_changed (GstColorBalance *balance,
  94. GstColorBalanceChannel *channel,
  95. gint value);
  96. G_END_DECLS
  97. #endif /* __GST_COLOR_BALANCE_H__ */