gstinterpolationcontrolsource.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /* GStreamer
  2. *
  3. * Copyright (C) 2007 Sebastian Dröge <slomo@circular-chaos.org>
  4. *
  5. * gstinterpolationcontrolsource.h: Control source that provides several
  6. * interpolation methods
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Library General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Library General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Library General Public
  19. * License along with this library; if not, write to the
  20. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  21. * Boston, MA 02110-1301, USA.
  22. */
  23. #ifndef __GST_INTERPOLATION_CONTROL_SOURCE_H__
  24. #define __GST_INTERPOLATION_CONTROL_SOURCE_H__
  25. #include <glib-object.h>
  26. #include <gst/gst.h>
  27. #include <gst/controller/gsttimedvaluecontrolsource.h>
  28. G_BEGIN_DECLS
  29. #define GST_TYPE_INTERPOLATION_CONTROL_SOURCE \
  30. (gst_interpolation_control_source_get_type ())
  31. #define GST_INTERPOLATION_CONTROL_SOURCE(obj) \
  32. (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSource))
  33. #define GST_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \
  34. (G_TYPE_CHECK_CLASS_CAST ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass))
  35. #define GST_IS_INTERPOLATION_CONTROL_SOURCE(obj) \
  36. (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_INTERPOLATION_CONTROL_SOURCE))
  37. #define GST_IS_INTERPOLATION_CONTROL_SOURCE_CLASS(vtable) \
  38. (G_TYPE_CHECK_CLASS_TYPE ((vtable), GST_TYPE_INTERPOLATION_CONTROL_SOURCE))
  39. #define GST_INTERPOLATION_CONTROL_SOURCE_GET_CLASS(inst) \
  40. (G_TYPE_INSTANCE_GET_CLASS ((inst), GST_TYPE_INTERPOLATION_CONTROL_SOURCE, GstInterpolationControlSourceClass))
  41. #define GST_TYPE_INTERPOLATION_MODE (gst_interpolation_mode_get_type ())
  42. typedef struct _GstInterpolationControlSource GstInterpolationControlSource;
  43. typedef struct _GstInterpolationControlSourceClass GstInterpolationControlSourceClass;
  44. typedef struct _GstInterpolationControlSourcePrivate GstInterpolationControlSourcePrivate;
  45. /**
  46. * GstInterpolationMode:
  47. * @GST_INTERPOLATION_MODE_NONE: steps-like interpolation, default
  48. * @GST_INTERPOLATION_MODE_LINEAR: linear interpolation
  49. * @GST_INTERPOLATION_MODE_CUBIC: cubic interpolation (natural), may overshoot
  50. * the min or max values set by the control point, but is more 'curvy'
  51. * @GST_INTERPOLATION_MODE_CUBIC_MONOTONIC: monotonic cubic interpolation, will not
  52. * produce any values outside of the min-max range set by the control points
  53. * (Since 1.8)
  54. *
  55. * The various interpolation modes available.
  56. */
  57. typedef enum
  58. {
  59. GST_INTERPOLATION_MODE_NONE,
  60. GST_INTERPOLATION_MODE_LINEAR,
  61. GST_INTERPOLATION_MODE_CUBIC,
  62. GST_INTERPOLATION_MODE_CUBIC_MONOTONIC,
  63. } GstInterpolationMode;
  64. /**
  65. * GstInterpolationControlSource:
  66. *
  67. * The instance structure of #GstControlSource.
  68. */
  69. struct _GstInterpolationControlSource {
  70. GstTimedValueControlSource parent;
  71. /*< private >*/
  72. GstInterpolationControlSourcePrivate *priv;
  73. gpointer _gst_reserved[GST_PADDING];
  74. };
  75. struct _GstInterpolationControlSourceClass {
  76. GstTimedValueControlSourceClass parent_class;
  77. /*< private >*/
  78. gpointer _gst_reserved[GST_PADDING];
  79. };
  80. GType gst_interpolation_control_source_get_type (void);
  81. GType gst_interpolation_mode_get_type (void);
  82. /* Functions */
  83. GstControlSource * gst_interpolation_control_source_new (void);
  84. #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
  85. G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInterpolationControlSource, gst_object_unref)
  86. #endif
  87. G_END_DECLS
  88. #endif /* __GST_INTERPOLATION_CONTROL_SOURCE_H__ */