2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2000 Wim Taymans <wtay@chello.be>
5 * gstschedulerr.h: Header for default schedulerr code
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.
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.
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.
24 #ifndef __GST_SCHEDULER_H__
25 #define __GST_SCHEDULER_H__
28 #include <gst/gstelement.h>
29 #include <gst/gstbin.h>
33 #endif /* __cplusplus */
36 #define GST_TYPE_SCHEDULER \
37 (gst_scheduler_get_type())
38 #define GST_SCHEDULER(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SCHEDULER,GstScheduler))
40 #define GST_SCHEDULER_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SCHEDULER,GstSchedulerClass))
42 #define GST_IS_SCHEDULER(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SCHEDULER))
44 #define GST_IS_SCHEDULER_CLASS(obj) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SCHEDULER))
48 #define GST_SCHED_PARENT(sched) ((sched)->parent)
50 //typedef struct _GstScheduler GstScheduler;
51 //typedef struct _GstSchedulerClass GstSchedulerClass;
53 struct _GstScheduler {
65 struct _GstSchedulerClass {
66 GstObjectClass parent_class;
68 void (*add_element) (GstScheduler *sched, GstElement *element);
69 void (*remove_element) (GstScheduler *sched, GstElement *element);
70 void (*enable_element) (GstScheduler *sched, GstElement *element);
71 void (*disable_element) (GstScheduler *sched, GstElement *element);
72 void (*lock_element) (GstScheduler *sched, GstElement *element);
73 void (*unlock_element) (GstScheduler *sched, GstElement *element);
74 void (*pad_connect) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
75 void (*pad_disconnect) (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
76 void (*pad_select) (GstScheduler *sched, GList *padlist);
77 gboolean (*iterate) (GstScheduler *sched);
80 void (*show) (GstScheduler *sched);
83 GType gst_scheduler_get_type (void);
85 void gst_scheduler_add_element (GstScheduler *sched, GstElement *element);
86 void gst_scheduler_remove_element (GstScheduler *sched, GstElement *element);
87 void gst_scheduler_enable_element (GstScheduler *sched, GstElement *element);
88 void gst_scheduler_disable_element (GstScheduler *sched, GstElement *element);
89 void gst_scheduler_lock_element (GstScheduler *sched, GstElement *element);
90 void gst_scheduler_unlock_element (GstScheduler *sched, GstElement *element);
91 void gst_scheduler_pad_connect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
92 void gst_scheduler_pad_disconnect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad);
93 GstPad* gst_scheduler_pad_select (GstScheduler *sched, GList *padlist);
94 gboolean gst_scheduler_iterate (GstScheduler *sched);
96 void gst_scheduler_show (GstScheduler *sched);
102 #define GST_TYPE_SCHEDULERFACTORY \
103 (gst_schedulerfactory_get_type ())
104 #define GST_SCHEDULERFACTORY(obj) \
105 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SCHEDULERFACTORY, GstSchedulerFactory))
106 #define GST_SCHEDULERFACTORY_CLASS(klass) \
107 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SCHEDULERFACTORY, GstSchedulerFactoryClass))
108 #define GST_IS_SCHEDULERFACTORY(obj) \
109 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SCHEDULERFACTORY))
110 #define GST_IS_SCHEDULERFACTORY_CLASS(obj) \
111 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULERFACTORY))
113 typedef struct _GstSchedulerFactory GstSchedulerFactory;
114 typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;
116 struct _GstSchedulerFactory {
117 GstPluginFeature feature;
119 gchar *longdesc; /* long description of the scheduler (well, don't overdo it..) */
120 GType type; /* unique GType of the scheduler */
123 struct _GstSchedulerFactoryClass {
124 GstPluginFeatureClass parent;
127 GType gst_schedulerfactory_get_type (void);
129 GstSchedulerFactory* gst_schedulerfactory_new (const gchar *name, const gchar *longdesc, GType type);
130 void gst_schedulerfactory_destroy (GstSchedulerFactory *factory);
132 GstSchedulerFactory* gst_schedulerfactory_find (const gchar *name);
133 GList* gst_schedulerfactory_get_list (void);
135 GstScheduler* gst_schedulerfactory_create (GstSchedulerFactory *factory, GstElement *parent);
136 GstScheduler* gst_schedulerfactory_make (const gchar *name, GstElement *parent);
141 #endif /* __cplusplus */
143 #endif /* __GST_SCHEDULER_H__ */