Package javax.media.protocol

Examples of javax.media.protocol.ContentDescriptor


    PullSourceStream sts[] = s.getStreams();
    assertEquals(sts.length, 1);
   
    PullSourceStream st = sts[0];
    assertEquals(st.getControls().length, 0);
    ContentDescriptor cd = st.getContentDescriptor();
    assertEquals(cd.getContentType(), "video.quicktime");
    assertEquals(cd.getEncoding(), "video.quicktime");
    assertTrue(cd.getDataType() == byte[].class);
   
   
    assertFalse(st.endOfStream());
    assertEquals(st.getContentLength(), 3547908L);
    assertEquals(s.getDuration().getNanoseconds(), 9223372036854775806L);
View Full Code Here


    /**
     * Returns the content descriptor of this stream.
     * @return the content descriptor of this stream - the RAW_RTP content descriptor
     */
    public ContentDescriptor getContentDescriptor() {
        return new ContentDescriptor(ContentDescriptor.RAW_RTP);
    }
View Full Code Here

      if (!waitForState(processor, Processor.Configured)) {
        throw new IOException("Failed to configure the processor.");
      }

      // Set the output content descriptor to QuickTime.
      processor.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));

      // Query for the processor for supported formats.
      // Then set it on the processor.
      TrackControl trackControls[] = processor.getTrackControls();
      Format format[] = trackControls [0].getSupportedFormats();
View Full Code Here

    public Format getFormat() {
      return this.format;
    }

    public ContentDescriptor getContentDescriptor() {
      return new ContentDescriptor(ContentDescriptor.RAW);
    }
View Full Code Here

          return "Couldn't find tracks in processor";
      }
      // Set the output content descriptor to RAW_RTP
      // This will limit the supported formats reported from
      // Track.getSupportedFormats to only valid RTP formats.
      ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
     
      processor.setContentDescriptor(cd);

      Format supported[];
      Format chosen;
View Full Code Here

  public Format getFormat() {
      return format;
  }

  public ContentDescriptor getContentDescriptor() {
      return new ContentDescriptor(ContentDescriptor.RAW);
  }
View Full Code Here

        }

        // Set the output content descriptor to RAW_RTP
        // This will limit the supported formats reported from
        // Track.getSupportedFormats to only valid RTP formats.
        ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
        processor.setContentDescriptor(cd);

        Format supported[];
        Format chosen = null;
        boolean atLeastOneTrack = false;
View Full Code Here

        }

        // Set the output content descriptor to RAW_RTP
        // This will limit the supported formats reported from
        // Track.getSupportedFormats to only valid RTP formats.
        ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
        processor.setContentDescriptor(cd);

        Format supported[];
        Format chosen = null;
        boolean atLeastOneTrack = false;
View Full Code Here

                throw new IllegalActionException(
                        "Failed to configure processor.");
            }

            if (_fileType == _QUICKTIME) {
                processor.setContentDescriptor(new ContentDescriptor(
                        FileTypeDescriptor.QUICKTIME));
            } else if (_fileType == _AVI) {
                processor.setContentDescriptor(new ContentDescriptor(
                        FileTypeDescriptor.MSVIDEO));
            } else if (_fileType == _MPEG) {
                processor.setContentDescriptor(new ContentDescriptor(
                        FileTypeDescriptor.MPEG));
            } else {
                throw new InternalErrorException("type = " + _fileType
                        + ", which is not one of " + _QUICKTIME
                        + "(QUICKTIME), " + _AVI + "(AVI) or " + _MPEG
View Full Code Here

        public boolean endOfStream() {
            return _ended;
        }

        public ContentDescriptor getContentDescriptor() {
            return new ContentDescriptor(ContentDescriptor.RAW);
        }
View Full Code Here

TOP

Related Classes of javax.media.protocol.ContentDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.