From: Wim T. <wt...@us...> - 2001-11-14 21:11:08
|
Update of /cvsroot/gstreamer/gstreamer/gst In directory usw-pr-cvs1:/tmp/cvs-serv1658 Modified Files: gstscheduler.c Log Message: Direct events to the event handler for non event-ware elements. pass the event to the chain function for event aware elements. Index: gstscheduler.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstscheduler.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- gstscheduler.c 2001/10/27 20:28:30 1.35 +++ gstscheduler.c 2001/11/14 21:11:05 1.36 @@ -71,11 +71,17 @@ if (GST_RPAD_DIRECTION (realpad) == GST_PAD_SINK) { GstBuffer *buf; - GST_DEBUG (GST_CAT_DATAFLOW,"pulling a buffer from %s:%s\n", name, GST_PAD_NAME (pad)); + GST_DEBUG (GST_CAT_DATAFLOW,"pulling data from %s:%s\n", name, GST_PAD_NAME (pad)); buf = gst_pad_pull (pad); - GST_DEBUG (GST_CAT_DATAFLOW,"calling chain function of %s:%s\n", name, GST_PAD_NAME (pad)); - if (buf) - GST_RPAD_CHAINFUNC(realpad) (pad,buf); + if (buf) { + if (GST_IS_EVENT (buf) && !GST_ELEMENT_IS_EVENT_AWARE (element)) { + gst_pad_event_default (pad, GST_EVENT (buf)); + } + else { + GST_DEBUG (GST_CAT_DATAFLOW,"calling chain function of %s:%s\n", name, GST_PAD_NAME (pad)); + GST_RPAD_CHAINFUNC(realpad) (pad, buf); + } + } GST_DEBUG (GST_CAT_DATAFLOW,"calling chain function of %s:%s done\n", name, GST_PAD_NAME (pad)); } } @@ -214,6 +220,7 @@ // now grab the buffer from the pen, clear the pen, and return the buffer buf = GST_RPAD_BUFPEN(pad); GST_RPAD_BUFPEN(pad) = NULL; + return buf; } @@ -1492,6 +1499,7 @@ GST_INFO (GST_CAT_DATAFLOW,"NO ENTRY INTO CHAIN!"); gst_schedule_show(sched); //eos = TRUE; + //gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); } } else { GST_INFO (GST_CAT_DATAFLOW,"NO ENABLED ELEMENTS IN CHAIN!!"); @@ -1518,7 +1526,6 @@ pads = entry->pads; while (pads) { pad = GST_PAD (pads->data); - if (GST_RPAD_DIRECTION(pad) == GST_PAD_SRC) { GST_DEBUG (GST_CAT_DATAFLOW,"calling getfunc of %s:%s\n",GST_DEBUG_PAD_NAME(pad)); if (GST_REAL_PAD(pad)->getfunc == NULL) fprintf(stderr, "error, no getfunc in \"%s\"\n", GST_ELEMENT_NAME (entry)); |