Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / May 2004



Tip: Looking for answers? Try searching our database.

Newbie. Converting mov files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bhavna Rohra - 25 May 2004 12:55 GMT
Hello everyone

Here is this very strange problem coming with conversion of .mov
files.

The situation is as follows .

I am writing an application in VC++
I am writing a batch media converter and accepting mov files as input.
I am able to add the mov files for the batch conversion and even
retrive its video and audio properties using QuickTime API's. Once i
start converting mov files i.e is using ConvertMovieToFile and i try
to add some other file .mov file again in the conversion list none of
the QuickTime API's return and ultimately my application hangs.
Neither does the conversion proceed nor any of the QuickTime API's
that i have used to get the properties.

Note : If i just convert the files and then try and add the same files
it works fine, but not when conversion is going on.
The conversion also works fine alone.

Where is the problem? I have initialized the QuickTime media layer and
the MovieToolBox once at the start of the application and
uninitialized it once at the end of the application. So it is not the
initialization that is causing a problem, since everything works fine
once the conversion is stopped.

Can someone plz see where the problem is.
Any help will be appreciated

Thanks in advance
Steven Woolgar - 25 May 2004 21:46 GMT
> The situation is as follows .
> I am writing an application in VC++

You might have better luck asking questions like this on a list where
people are using VC++.  This is a CodeWarrior list which is a competing
IDE to VC++.

Woolie
Toby Thain - 26 May 2004 13:16 GMT
> > The situation is as follows .
> > I am writing an application in VC++
>
> You might have better luck asking questions like this on a list where
> people are using VC++.  This is a CodeWarrior list which is a competing
> IDE to VC++.

Furthermore, this is a *Mac* CW group. :)

T

> Woolie
David Phillip Oster - 26 May 2004 05:16 GMT
> I am writing an application in VC++
> I am writing a batch media converter and accepting mov files as input.
[quoted text clipped - 15 lines]
> initialization that is causing a problem, since everything works fine
> once the conversion is stopped.

You've got re-entrancy problems. You'll need to keep your own separate
queue of files waiting to be converted, and when Quicktime finishes one,
hand it the next. If the user adds more files while this is going on,
just add them to the queue. Quicktime will see only the single thread of
work it is supposed to do, and its conversion pipeline won't get
scrambled.
Bhavna Rohra - 27 May 2004 06:21 GMT
> You've got re-entrancy problems. You'll need to keep your own separate
> queue of files waiting to be converted, and when Quicktime finishes one,
> hand it the next. If the user adds more files while this is going on,
> just add them to the queue. Quicktime will see only the single thread of
> work it is supposed to do, and its conversion pipeline won't get
> scrambled.

Hello

Can u plz tell me what u meant by re-entrancy problem exactly.
If i initialize QuickTime media layer once in my application then
can't i have two threads running simultaneously one retriving mov file
properties and the other converting mov files.
Did u mean that QuickTime can do one work at a time?

Do u know of any way where in i can have two threads running at the
same time,
one getting the mov file properties and the other converting mov
files?

Further light on this problem will help me

Thank You
Jon Summers - 28 May 2004 14:04 GMT
> If i initialize QuickTime media layer once in my application then
> can't i have two threads running simultaneously one retriving mov file
> properties and the other converting mov files.
No, you get re-entrancy problems.

> Did u mean that QuickTime can do one work at a time?
Yes

> Do u know of any way where in i can have two threads running at the
> same time,
> one getting the mov file properties and the other converting mov
> files?
Use a mutex/semaphore between your threads anywhere you call QuickTime.
Grab/release the mutex/semaphore for the ConvertMovieToFile() call
and grab/release the mutex/semaphore for retrieving mov properties

> You might have better luck asking questions like this on a list where
> people are using VC++.

Try the Apple quicktime api list
<http://www.lists.apple.com/mailman/listinfo/quicktime-api>

IMHO VC++ is the more productive debugging environment for Windows QuickTime
development. Thankfully I have no plans to do any

Signature

   jons(AT)vrtools(DOT)com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.