title: How do I load multiple QTMovie objects and then choose which to play?
body: <p>I am new to working with Objective-C and Cocoa.</p>
  
  <p>I have followed the sample code for playing a movie with Quicktime that is on <a href="https://developer.apple.com/library/mac/#samplecode/MyMediaPlayer/Introduction/Intro.html" rel="nofollow">here</a>. I am wondering how to expand it so that I can load multiple <code>QTMovie</code>s at the beginning of the program, and then play each of them when requested with minimal latency. </p>
  
  <p>My initial strategy was to create a class that holds a <code>QTMovie</code> object and the methods for loading and playing it. Then in my main class I'd have a list of these <code>MovieContainer</code> objects.</p>
  
  <p>When I try implementing this, I get a <code>QTMovieLoadStateError</code> during the loading of each <code>QTMovie</code> with the error message</p>
  
  <pre><code>Domain=NSOSStatusErrorDomain Code=-2098 "The operation couldn’t be completed.
  (OSStatus error -2098.)" (component is not thread-safe)
  </code></pre>
  
  <p>Am I going in completely the wrong direction, or am I merely missing a few lines of code that would make this "thread-safe"?</p>
  
  <p>Thanks for any help.</p>