Package javax.media.control

Examples of javax.media.control.TrackControl


      // TODO:
     
         
          // TODO: if the users changes the combo, we need to change the tracks.
         
          final TrackControl trackControls[] = result.processor.getTrackControls();
          if (trackControls == null || trackControls.length < 1)
          {  showError("No tracks available");
            return false;
          }
         
View Full Code Here


  public void step3_setTrackConfigs(ProcessorWizardConfig config) throws WizardStepException
  {
    TrackConfig[] trackConfigs = config.trackConfigs;
   
    // forward transition
        final TrackControl trackControls[] = processor.getTrackControls();
       
        for (int i = 0; i < trackControls.length; i++)
        {
          final boolean enabled = trackConfigs[i].enabled;
          trackControls[i].setEnabled(enabled);
View Full Code Here

    else
      outputFormats = null;
   
    if (outputFormats != null && outputFormats.length > 0)
    {
      final TrackControl trackControl[] = processor.getTrackControls();
     
      final boolean[] trackConfigured = new boolean[trackControl.length]// which tracks have been either configured or disabled
      final boolean[] outputFormatUsed = new boolean[outputFormats.length]// which output formats we have found a track for.

      // assign specified formats to compatible tracks:
View Full Code Here

     * Transcode the MPEG audio to linear and video to JPEG so
     * we can do the cutting.
     */
    void checkTrackFormats(Processor p) {

  TrackControl tc[] = p.getTrackControls();
  VideoFormat mpgVideo = new VideoFormat(VideoFormat.MPEG);
  AudioFormat rawAudio = new AudioFormat(AudioFormat.LINEAR);

  for (int i = 0; i < tc.length; i++) {
      Format preferred = null;
View Full Code Here

     * Transcode the MPEG audio to linear and video to JPEG so
     * we can do the splitting.
     */
    void transcodeMPEGToRaw(Processor p) {

  TrackControl tc[] = p.getTrackControls();
  AudioFormat afmt;

  for (int i = 0; i < tc.length; i++) {
      if (tc[i].getFormat() instanceof VideoFormat)
    tc[i].setFormat(new VideoFormat(VideoFormat.JPEG));
View Full Code Here

      long start[], long end[]) {
      this.p = p;
      this.ml = ml;
      this.ds = (PushBufferDataSource)p.getDataOutput();

      TrackControl tcs[] = p.getTrackControls();
      PushBufferStream pbs[] = ds.getStreams();

      streams = new SuperCutStream[pbs.length];
      for (int i = 0; i < pbs.length; i++) {
    streams[i] = new SuperCutStream(tcs[i], pbs[i], start, end);
View Full Code Here

      }
    }

    processor.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW_RTP));

    TrackControl track[] = processor.getTrackControls();

    boolean encodingOk = false;

    // Go through the tracks and try to program one of them to
    // output gsm data.
View Full Code Here

  // So I can use it as a player.
  p.setContentDescriptor(null);

  // Obtain the track controls.
  TrackControl tc[] = p.getTrackControls();

  if (tc == null) {
      System.err.println("Failed to obtain track controls from the processor.");
      return false;
  }

  // Search for the track control for the video track.
  TrackControl videoTrack = null;

  for (int i = 0; i < tc.length; i++) {
      if (tc[i].getFormat() instanceof VideoFormat) {
    videoTrack = tc[i];
    break;
      }
  }

  if (videoTrack == null) {
      System.err.println("The input media does not contain a video track.");
      return false;
  }

  System.err.println("Video format: " + videoTrack.getFormat());

  // Instantiate and set the frame access codec to the data flow path.
  try {
      Codec codec[] = { new PreAccessCodec(),
        new PostAccessCodec()};
      videoTrack.setCodecChain(codec);
  } catch (UnsupportedPlugInException e) {
      System.err.println("The process does not support effects.");
  }

  // Realize the processor.
View Full Code Here

  // So I can use it as a player.
  p.setContentDescriptor(null);

  // Obtain the track controls.
  TrackControl tc[] = p.getTrackControls();

  if (tc == null) {
      System.err.println("Failed to obtain track controls from the processor.");
      return false;
  }

  // Search for the track control for the video track.
  TrackControl videoTrack = null;

  for (int i = 0; i < tc.length; i++) {
      if (tc[i].getFormat() instanceof VideoFormat) {
    videoTrack = tc[i];
    break;
      }
  }

  if (videoTrack == null) {
      System.err.println("The input media does not contain a video track.");
      return false;
  }

  System.err.println("Video format: " + videoTrack.getFormat());

  // Instantiate and set the frame access codec to the data flow path.
  try {
      Codec codec[] = { new RotationEffect() };
      videoTrack.setCodecChain(codec);
  } catch (UnsupportedPlugInException e) {
      System.err.println("The processor does not support effects.");
  }

  // Realize the processor.
View Full Code Here

    boolean setTrackFormats(Processor p, Format fmts[]) {

  if (fmts.length == 0)
      return true;

  TrackControl tcs[];

  if ((tcs = p.getTrackControls()) == null) {
      // The processor does not support any track control.
      System.err.println("The Processor cannot transcode the tracks to the given formats");
      return false;
View Full Code Here

TOP

Related Classes of javax.media.control.TrackControl

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.