Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QT Java open file limit?



Our QT Java application plays recorded phone calls from a list.
I sound files are stored effectively on a web server.
I open them using code like

DataRef urlMovie = new DataRef(webURL);
// create the m_movie
totalTries++;
log.debug( "Movie.fromDataRef start "+totalTries);
m_movie = Movie.fromDataRef(urlMovie,StdQTConstants.newMovieActive);
log.debug( "Movie.fromDataRef end "+totalTries);
mc = new MovieController(m_movie, StdQTConstants.mcScaleMovieToFit);

//detach the movie from its controller
mc.setAttached(false);
mc.setKeysEnabled(true);
qtPlayer = new QTPlayer(mc);



// this is followed by.. to get set up a detached controller
JPanel panel = new JPanel( new BorderLayout());
controlCanvas = new QTCanvas();
controlCanvas.setClient( qtPlayer, true );
return panel;

// to close I do..
qtPlayer.setRate( 0 );
controlCanvas.removeClient();
// lets get rid of some QT memory
quicktime.util.QTUtils.reclaimMemory();

Straight forward enough I think
If I do 256 open & closes (on unique URLs) its fine, on the 257th open (as returned by totalTries) QT seems to go into a spin using nearly 100% of the CPU and returning a failure.
Note if I Close a QTSession and restart it after say every 10 opens then this problem goes away. I don't like doing this because I think it causes me other problems. What am I missing here? Am I not closing the movie correctly or is this a QT bug?
Many thanks for your thoughts.

___________________________________________
Philip Miller
TISL




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.