- some fixes to int2float making automake 1.5 happy (gst now requires automake1.5). It's still not perfect but it bui...
Original commit message from CVS:
- added playondemand plugin by Leif Morgan Johnson <lmjohns3@eos.ncsu.edu>
- some fixes to int2float
- aplied a patch from wrobell <wrobell@ite.pl> that is a first attempt at
making automake 1.5 happy (gst now requires automake1.5). It's still not
perfect but it builds.
- Made the schedulers plugable. The default scheduler now lives inside a
plugin.
- Added a new mpeg1/2 parser/demuxer.
- Fixed some compiler warnings in the core libs.
- substantial work to GstThread (hopefully less race conditions). simplified
the code in GstThread a bit. A state change can now also happen in the
thread context.
- reworked the state semantics of a bin. it'll now automatically get the
highest state of its children.
- the autoplugger now nests the threads so that a state change failure of
one thread doesn't make its upstream thread lock.
- GstQueue refuses to go to PLAYING if the sinkpad is not connected. This
way the queue will not wedge in the _get lock.
- GstQueue unlocks its mutexes when going to PAUSED.
- make sure that when all elements in a bin/thread go to PAUSED, the bin
is set to PAUSED too.
- make a parent bin wait for its children to PAUSE before ending the
iteration with FALSE (EOS)
- Some changes to GstPlay to deal with EOS.
- aplied the latest patch from Zeenix to gstrtp.
end result: GstPlay doesn't crash on EOS and the pipeline is now shut down
properly.
diff --git a/gst/gstelement.h b/gst/gstelement.h
index 9748e9b..41197eb 100644
--- a/gst/gstelement.h
+++ b/gst/gstelement.h
@@ -35,6 +35,7 @@
extern "C" {
#endif /* __cplusplus */
+#define GST_NUM_STATES 4
typedef enum {
GST_STATE_VOID_PENDING = 0,
@@ -106,9 +107,6 @@
/* the element has to be scheduled as a cothread for any sanity */
GST_ELEMENT_USE_COTHREAD,
- /* if this element is in EOS */
- GST_ELEMENT_EOS,
-
/* if this element can handle events */
GST_ELEMENT_EVENT_AWARE,
@@ -141,7 +139,7 @@
guint8 current_state;
guint8 pending_state;
GstElement *manager;
- GstSchedule *sched;
+ GstScheduler *sched;
GstElementLoopFunction loopfunc;
cothread_state *threadstate;
@@ -163,12 +161,10 @@
gint numpadtemplates;
/* signal callbacks */
- void (*state_change) (GstElement *element,GstElementState state);
- void (*new_pad) (GstElement *element,GstPad *pad);
- void (*pad_removed) (GstElement *element,GstPad *pad);
- void (*new_ghost_pad) (GstElement *element,GstPad *pad);
- void (*ghost_pad_removed) (GstElement *element,GstPad *pad);
- void (*error) (GstElement *element,gchar *error);
+ void (*state_change) (GstElement *element, GstElementState old, GstElementState state);
+ void (*new_pad) (GstElement *element, GstPad *pad);
+ void (*pad_removed) (GstElement *element, GstPad *pad);
+ void (*error) (GstElement *element, gchar *error);
void (*eos) (GstElement *element);
/* local pointers for get/set */
@@ -195,8 +191,8 @@
void gst_element_set_parent (GstElement *element, GstObject *parent);
GstObject* gst_element_get_parent (GstElement *element);
-void gst_element_set_sched (GstElement *element, GstSchedule *sched);
-GstSchedule* gst_element_get_sched (GstElement *element);
+void gst_element_set_sched (GstElement *element, GstScheduler *sched);
+GstScheduler* gst_element_get_sched (GstElement *element);
void gst_element_add_pad (GstElement *element, GstPad *pad);
void gst_element_remove_pad (GstElement *element, GstPad *pad);
@@ -219,9 +215,11 @@
GstElementState gst_element_get_state (GstElement *element);
-/* called by the app to set the state of the element */
gint gst_element_set_state (GstElement *element, GstElementState state);
-const gchar * gst_element_statename (GstElementState state);
+
+void gst_element_wait_state_change (GstElement *element);
+
+const gchar* gst_element_statename (GstElementState state);
void gst_element_error (GstElement *element, const gchar *error);