Exemplo n.º 1
0
/*********************************************************
	Thread waiting for and process incoming request packets
*/
void avcUnitNotifyThread(void *dummy)
{
    HRESULT					hResult = NO_ERROR;
    NOTIFY_CHANGE_CALLBACK	notifyChange = NULL;

    UNUSED_ARG(dummy);

    DO_FOREVER
    {
        // get a valid notify from the queue
        hResult = aqmQueueReceive(avcUnitNotifyQueueID, &notifyChange, TC_WAIT_FOREVER);
        if (hResult == NO_ERROR)
        {
            hResult = (* notifyChange) ();
        }
    }
}
Exemplo n.º 2
0
void avcHandlerThread(void *dummy)
{
	HRESULT				hResult = NO_ERROR;	
	PB*					packetBlock;

	UNUSED_ARG(dummy);

	DO_FOREVER
	{
		// get a valid PB from the queue
		hResult = aqmQueueReceive(avcHandlerQueueID, &packetBlock, TC_WAIT_FOREVER);
		
		if (hResult == NO_ERROR)
		{
			hResult = avcHandlePacketBlock(packetBlock);

			if (pbIsSelfDestruct(packetBlock) == TRUE)
			{
				pbPacketDoneSelfDestruct(packetBlock, PB_DONE_AVC_HANDLE_THREAD);
			}
		}
	}
}