how do you determine if a file is a media file?

Josh Mellicker josh at dvcreators.net
Thu Sep 27 06:59:54 EDT 2007


Holy crap.

Perhaps you should set up an autoresponder so when I ask a question,  
it responds with the relevant section of Trevor's EXCELLENT QT  
External docs :-)

(I am glad I sent Trevor some $$$ for that external!)

Thanks for the reminder, the docs are going under my pillow now :-)


On Sep 27, 2007, at 12:38 AM, Klaus Major wrote:

> Hi Josh,
>
>> I am working on a handler to determine whether a file is a media  
>> file. (for OS X and Windows)
>>
>> First, I check if the file has a proper extension (.mov, .jpg,  
>> etc.) if so, I assume the extension is correct (a leap of faith  
>> perhaps)
>>
>> Second, I try to get the OS X filetype from the detailed files.  
>> Some movies properly list "Moov", some don't.
>>
>> Third, was going to try loading the file into a Player or Image  
>> object and see if there's an error, but many types of files will  
>> load into those objects fine (like text files)
>>
>> So, I'm wondering if anyone has any tips beyond these things...
>
> again this might be a case for Trevor's EXCELLENT QT External :-)
>
> From the docs:
> function qtGetMovieFileType (FilePath)
> Description:
> Returns the type of a file on disk.
> Parameters:
> FilePath: Path to movie file.
> Return:
> Type (multiframe graphic, image, qtvr, flash, video, sound,  
> unknown, unsupported)
>
> Maybe that can help you to decide to load a file into a player or not.
>
>
> Regards
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
>
> P.S.
> Perhaps you should print out the docs and put them under your  
> pillow ;-)
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list