Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > QuickTime > Transport & Delivery >

QuickTime Error -2127 qtNetworkAlreadyAllocatedErr Explained


Q: We are using the QuickTime URL Data Handlers to download media files via HTTP

(JPGs, MOVs, GIFs, etc.) and on certain machines we are receiving the error -2127 qtNetworkAlreadyAllocatedErr . What does this error mean?

A: This error occurs when the user's connection speed setting in the QuickTime System Preferences prohibits QuickTime from allocating network sessions for multiple movies at once (essentially when the connection speed setting is set to one of the modem speeds) and an entity tries to allocate a network session outside the context of the movie to which permission has been assigned for use of the network.

On machines where the "Allow multiple simultaneous streams" QuickTime System Preference setting is turned on the problem will not occur.

The workaround for avoiding this error is to use the DataHSetTimeHints function to tell the data handler to go ahead and use the network without requesting bandwidth permission from QuickTime. Here's a code snippet showing how it's done:



Listing 1. Hinting the data handler not to request network bandwidth before proceeding.


#include <QuickTime/QuickTime.h>

ComponentResult result;
            
// hint the data handler not to request network bandwidth 
// before proceeding
result = DataHSetTimeHints(dataHandler,
                     kDataHSetTimeHintsSkipBandwidthRequest,
                     kQTRealTimePriority,
                     600,         /* scale */
                     0,           /* minTime */
                     0x7fffffff); /* maxTime = indefinite */




[Mar 20, 2003]