gstpipeline.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* GStreamer
  2. * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
  3. * 2000 Wim Taymans <[email protected]>
  4. *
  5. * gstpipeline.h: Header for GstPipeline element
  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., 51 Franklin St, Fifth Floor,
  20. * Boston, MA 02110-1301, USA.
  21. */
  22. #ifndef __GST_PIPELINE_H__
  23. #define __GST_PIPELINE_H__
  24. #include <gst/gstbin.h>
  25. G_BEGIN_DECLS
  26. #define GST_TYPE_PIPELINE (gst_pipeline_get_type ())
  27. #define GST_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PIPELINE, GstPipeline))
  28. #define GST_IS_PIPELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PIPELINE))
  29. #define GST_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PIPELINE, GstPipelineClass))
  30. #define GST_IS_PIPELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PIPELINE))
  31. #define GST_PIPELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PIPELINE, GstPipelineClass))
  32. #define GST_PIPELINE_CAST(obj) ((GstPipeline*)(obj))
  33. typedef struct _GstPipeline GstPipeline;
  34. typedef struct _GstPipelineClass GstPipelineClass;
  35. typedef struct _GstPipelinePrivate GstPipelinePrivate;
  36. /**
  37. * GstPipelineFlags:
  38. * @GST_PIPELINE_FLAG_FIXED_CLOCK: this pipeline works with a fixed clock
  39. * @GST_PIPELINE_FLAG_LAST: offset to define more flags
  40. *
  41. * Pipeline flags
  42. */
  43. typedef enum {
  44. GST_PIPELINE_FLAG_FIXED_CLOCK = (GST_BIN_FLAG_LAST << 0),
  45. /* padding */
  46. GST_PIPELINE_FLAG_LAST = (GST_BIN_FLAG_LAST << 4)
  47. } GstPipelineFlags;
  48. /**
  49. * GstPipeline:
  50. * @fixed_clock: The fixed clock of the pipeline, used when
  51. * GST_PIPELINE_FLAG_FIXED_CLOCK is set.
  52. * @stream_time: The stream time of the pipeline. A better name for this
  53. * property would be the running_time, the total time spent in the
  54. * PLAYING state without being flushed. (deprecated, use the start_time
  55. * on GstElement).
  56. * @delay: Extra delay added to base_time to compensate for computing delays
  57. * when setting elements to PLAYING.
  58. *
  59. * The #GstPipeline structure.
  60. */
  61. struct _GstPipeline {
  62. GstBin bin;
  63. /*< public >*/ /* with LOCK */
  64. GstClock *fixed_clock;
  65. GstClockTime stream_time;
  66. GstClockTime delay;
  67. /*< private >*/
  68. GstPipelinePrivate *priv;
  69. gpointer _gst_reserved[GST_PADDING];
  70. };
  71. struct _GstPipelineClass {
  72. GstBinClass parent_class;
  73. /*< private >*/
  74. gpointer _gst_reserved[GST_PADDING];
  75. };
  76. GType gst_pipeline_get_type (void);
  77. GstElement* gst_pipeline_new (const gchar *name) G_GNUC_MALLOC;
  78. GstBus* gst_pipeline_get_bus (GstPipeline *pipeline);
  79. void gst_pipeline_use_clock (GstPipeline *pipeline, GstClock *clock);
  80. gboolean gst_pipeline_set_clock (GstPipeline *pipeline, GstClock *clock);
  81. GstClock* gst_pipeline_get_clock (GstPipeline *pipeline);
  82. void gst_pipeline_auto_clock (GstPipeline *pipeline);
  83. void gst_pipeline_set_delay (GstPipeline *pipeline, GstClockTime delay);
  84. GstClockTime gst_pipeline_get_delay (GstPipeline *pipeline);
  85. void gst_pipeline_set_auto_flush_bus (GstPipeline *pipeline, gboolean auto_flush);
  86. gboolean gst_pipeline_get_auto_flush_bus (GstPipeline *pipeline);
  87. G_END_DECLS
  88. #endif /* __GST_PIPELINE_H__ */