Bool16 StillFlushing(QTSS_Filter_Params* inParams,Bool16 flushing) { QTSS_Error err = QTSS_NoErr; if (flushing) { err = QTSS_Flush(inParams->inRTSPRequest); //qtss_printf("Flushing session=%"_U32BITARG_" QTSS_Flush err =%"_S32BITARG_"\n",sSessID,err); } if (err == QTSS_WouldBlock) // more to flush later { sFlushing = true; (void) QTSS_SetValue(inParams->inRTSPRequest, sFlushingID, 0, (void*)&sFlushing, sFlushingLen); err = QTSS_RequestEvent(inParams->inRTSPRequest, QTSS_WriteableEvent); KeepSession(inParams->inRTSPRequest,true); //qtss_printf("Flushing session=%"_U32BITARG_" QTSS_RequestEvent err =%"_S32BITARG_"\n",sSessID,err); } else { sFlushing = false; (void) QTSS_SetValue(inParams->inRTSPRequest, sFlushingID, 0, (void*)&sFlushing, sFlushingLen); KeepSession(inParams->inRTSPRequest,false); if (flushing) // we were flushing so reset the LastRequestTime { sLastRequestTime = QTSS_Milliseconds(); //qtss_printf("Done Flushing session=%"_U32BITARG_"\n",sSessID); return true; } } return sFlushing; }
void RequestSocketEvent(QTSS_StreamRef inStream, UInt32 inEventMask) { // // Job of this function is to convert a CommonUtilitiesLib event mask to a QTSS Event mask QTSS_EventType theEvent = 0; if (inEventMask & EV_RE) theEvent |= QTSS_ReadableEvent; if (inEventMask & EV_WR) theEvent |= QTSS_WriteableEvent; QTSS_Error theErr = QTSS_RequestEvent(inStream, theEvent); Assert(theErr == QTSS_NoErr); }