From 9bc5f785d770e06ab056e6acfaf0975a8d7ee666 Mon Sep 17 00:00:00 2001 From: Erik Walthinsen Date: Fri, 4 May 2001 22:14:35 +0000 Subject: [PATCH] Add the GST_ELEMENT_NO_ENTRY flag, which when set will force the scheduler to skip over an element as an option for t... Original commit message from CVS: Add the GST_ELEMENT_NO_ENTRY flag, which when set will force the scheduler to skip over an element as an option for the first cothread jump. This is needed because libraries like mad don't ever seem to want to quit. Thus they ignore COTHREAD_STOPPING and can't be trusted to be the entry. --- gst/gstelement.h | 5 ++++- gst/gstscheduler.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/gstelement.h b/gst/gstelement.h index 366cdee82c..d3f97bee48 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -106,6 +106,9 @@ typedef enum { /***** !!!!! need to have a flag that says that an element must *not* be an entry into a scheduling chain !!!!! *****/ + /* this element for some reason doesn't obey COTHREAD_STOPPING, or + has some other reason why it can't be the entry */ + GST_ELEMENT_NO_ENTRY, /* there is a new loopfunction ready for placement */ GST_ELEMENT_NEW_LOOPFUNC, @@ -118,7 +121,7 @@ typedef enum { GST_ELEMENT_EOS, /* use some padding for future expansion */ - GST_ELEMENT_FLAG_LAST = GST_OBJECT_FLAG_LAST + 8, + GST_ELEMENT_FLAG_LAST = GST_OBJECT_FLAG_LAST + 12, } GstElementFlags; #define GST_ELEMENT_IS_THREAD_SUGGESTED(obj) (GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED)) diff --git a/gst/gstscheduler.c b/gst/gstscheduler.c index 5afb15ce1a..511e86eee3 100644 --- a/gst/gstscheduler.c +++ b/gst/gstscheduler.c @@ -1310,6 +1310,8 @@ GST_DEBUG(GST_CAT_SCHEDULING,"there are %d elements in this chain\n",chain->num_ elements = g_list_next(elements); if (GST_FLAG_IS_SET(entry,GST_ELEMENT_DECOUPLED)) GST_DEBUG(GST_CAT_SCHEDULING,"entry \"%s\" is DECOUPLED, skipping\n",GST_ELEMENT_NAME(entry)); + else if (GST_FLAG_IS_SET(entry,GST_ELEMENT_NO_ENTRY)) + GST_DEBUG(GST_CAT_SCHEDULING,"entry \"%s\" is not valid, skipping\n",GST_ELEMENT_NAME(entry)); else break; }