Exemplo n.º 1
0
  /**
   * Set the content of this node to the given object. The object is then cast by the internal
   * representation to the form it needs. This assumes at least some amount of intelligence on the
   * part of the caller, but we also know that we should not pass something dumb to it when we can
   * check what sort of content types it likes to handle. We assume the loader thread is operating
   * in the same context as the one that created the node in the first place and thus knows the
   * general types of items to pass through.
   *
   * @param mimetype The mime type of this object if known
   * @param content The content of the object
   * @throws IllegalArguementException The content object is not supported
   */
  public void setContent(String mimetype, Object content) throws IllegalArgumentException {

    // REVISIT - we ignore the content object and use
    // URL[0] directly.  This is very wrong, but we haven't
    // been able to get agreement on how to update the content
    // loader yet, so this will have to do in the meantime.
    String url = vfURL[0];
    if (movieDecoder != null) {
      movieDecoder.init(url);
    } else {
      throw new IllegalArgumentException("JMF not available");
    }
  }
Exemplo n.º 2
0
 /**
  * Set the relative speed of a stopped movie
  *
  * @param speed - new relative rate factor.
  */
 private void movieSetSpeed(float speed) {
   if (movieDecoder != null) {
     movieDecoder.setRate(speed);
   }
 }
Exemplo n.º 3
0
 /** Stop a running movie */
 private void movieStop() {
   if (movieDecoder != null) {
     movieDecoder.stop();
   }
 }
Exemplo n.º 4
0
 /** Rewinds a stopped movie and leaves it stopped. */
 private void movieRewind() {
   if (movieDecoder != null) {
     movieDecoder.rewind();
   }
 }