gstinsertbin.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * GStreamer
  3. *
  4. * Copyright 2013 Collabora Ltd
  5. * @author: Olivier Crete <olivier.crete@collabora.com>
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Library General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Library General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Library General Public
  18. * License along with this library; if not, write to the
  19. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20. * Boston, MA 02111-1307, USA.
  21. *
  22. */
  23. #ifndef __GST_INSERT_BIN_H__
  24. #define __GST_INSERT_BIN_H__
  25. #ifndef GST_USE_UNSTABLE_API
  26. #warning "The GStreamer insertbin library is unstable API and may change in future."
  27. #warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
  28. #endif
  29. #include <gst/gst.h>
  30. G_BEGIN_DECLS
  31. #define GST_TYPE_INSERT_BIN (gst_insert_bin_get_type())
  32. #define GST_INSERT_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_INSERT_BIN,GstInsertBin))
  33. #define GST_IS_INSERT_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_INSERT_BIN))
  34. #define GST_INSERT_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass) ,GST_TYPE_INSERT_BIN,GstInsertBinClass))
  35. #define GST_IS_INSERT_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass) ,GST_TYPE_INSERT_BIN))
  36. #define GST_INSERT_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj) ,GST_TYPE_INSERT_BIN,GstInsertBinClass))
  37. typedef struct _GstInsertBin GstInsertBin;
  38. typedef struct _GstInsertBinClass GstInsertBinClass;
  39. typedef struct _GstInsertBinPrivate GstInsertBinPrivate;
  40. /**
  41. * GstInsertBinCallback:
  42. * @insertbin: A #GstInsertBin
  43. * @element: The #GstElement on which the operation was performed
  44. * @success: %TRUE if the operation was successful
  45. * @user_data: The user data passed
  46. *
  47. * This is the prototype of callbacks to be called when the operation completes.
  48. * It could be called at any time, including as a re-entrant call while the
  49. * operation is requested.
  50. */
  51. typedef void (*GstInsertBinCallback) (GstInsertBin *insertbin,
  52. GstElement *element,
  53. gboolean success,
  54. gpointer user_data);
  55. /**
  56. * GstInsertBin:
  57. *
  58. * The object structure.
  59. */
  60. struct _GstInsertBin
  61. {
  62. GstBin parent;
  63. /*< private >*/
  64. GstInsertBinPrivate *priv;
  65. };
  66. /**
  67. * GstInsertBinClass:
  68. *
  69. * The object class structure.
  70. */
  71. struct _GstInsertBinClass
  72. {
  73. GstBinClass parent_class;
  74. };
  75. GType gst_insert_bin_get_type (void);
  76. GstElement *gst_insert_bin_new (const gchar * name);
  77. void gst_insert_bin_prepend (GstInsertBin * self, GstElement * element,
  78. GstInsertBinCallback callback, gpointer user_data);
  79. void gst_insert_bin_append (GstInsertBin * self, GstElement * element,
  80. GstInsertBinCallback callback, gpointer user_data);
  81. void gst_insert_bin_insert_before (GstInsertBin * self,
  82. GstElement * element, GstElement * sibling,
  83. GstInsertBinCallback callback, gpointer user_data);
  84. void gst_insert_bin_insert_after (GstInsertBin * self,
  85. GstElement * element, GstElement * sibling,
  86. GstInsertBinCallback callback, gpointer user_data);
  87. void gst_insert_bin_remove (GstInsertBin * self, GstElement * element,
  88. GstInsertBinCallback callback, gpointer user_data);
  89. #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
  90. G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInsertBin, gst_object_unref)
  91. #endif
  92. G_END_DECLS
  93. #endif /* __GST_INSERT_BIN_H__ */