Problem with Quicktime using UNC paths
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi
Soem one else reported this some time via mail to apple but i would like for it to be looked at here and if apple are looking into fixing this issue
Hi,
I'm working for two different companies who have both run into the same issue with QuickTime on Windows. If you try to open an image using a UNC path, firstly, it takes a very long time, and secondly, it tends to crash if you open the same image more than once, sometime getting the machine into a bad state where you have to reboot. Opening the same file via a mapped drive works fine. I'd be very grateful if anyone has any knowledge or a workround (other than mapping the drive) for this.
I've a test program below which shows the problem. Typically, on about the fifth iteration round the loop, the program will hang and have to be killed. Sometimes calls will just return error -36. Sometimes it never gets past the first iteration. I've included three modes which open the file using different APIs because I've been told that using FSSpecs cures the problem. It doesn't for me though.
I'm using Windows XP and QuickTime 7.2. I have a report that reverting to QuickTime 6.5 cures the problem. I'm just about to summon up the courage to try this for myself.
Jerry
#include "stdafx.h"
#include <stdio.h>
#include <QTML.h>
#include <Movies.h>
#include <QuickTimeComponents.h>
#include <Script.h>
#include <TextUtils.h>
#include <Sound.h>
#include <FixMath.h>
#include <MacTypes.h>
#include <Endian.h>
#include <Gestalt.h>
#include <CoreFoundation.h>
#include <ImageCompression.h>
static char *modes[] = {
"Using GetGraphicsImporterForFile",
"Using GetGraphicsImporterForDataRef with FSSpec",
"Using GetGraphicsImporterForDataRef with CFString",
};
int main (int argc, const char * argv[]) {
Handle data_ref = NULL;
OSType data
reftype;
int mode = 1;
int i;
char *path = "\\server\image.jpg";
InitializeQTML(0);
EnterMovies();
printf("%sn", modes[mode]);
for ( i = 0; i < 20; i++ ) {
GraphicsImportComponent importer = NULL;
OSStatus status;
FSSpec fsSpec;
printf("%dn", i);
if ( mode == 0 || mode == 1 ) {
status = NativePathNameToFSSpec( path, &fsSpec, 0 );
printf("NativePathNameToFSSpec returns %dn", status);
if ( status != noErr )
break;
}
if ( mode == 0 ) {
status = GetGraphicsImporterForFile( &fsSpec, &importer );
printf("GetGraphicsImporterForFile returns %dn", status);
if ( status != noErr )
break;
}
if ( mode == 1 ) {
AliasHandle alias;
status = NewAlias( NULL, &fsSpec, &alias );
printf("NewAlias returns %dn", status);
if ( status != noErr )
break;
data_ref = (Handle)alias;
data
reftype = rAliasType;
}
if ( mode == 1 || mode == 2 ) {
status = GetGraphicsImporterForDataRef ( data_ref, data
reftype, &importer );
printf("GetGraphicsImporterForDataRef returns %dn", status);
if ( status != noErr )
break;
}
Rect bounds;
GraphicsImportGetNaturalBounds ( importer, &bounds );
printf( "Image: %d %dn", bounds.right, bounds.bottom );
CloseComponent( importer );
if ( mode == 1 || mode == 2 )
DisposeHandle( data_ref );
}
getchar();
return 0;
}
_____________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden
This email sent to email@hidden
0 replies
Sign in or join Beachball Help to reply.