Package javax.media.protocol

Examples of javax.media.protocol.ContentDescriptor


    public FTPSourceStream(InputStream in)
    {
       this.dataIn = in;
       eofMarker = false;
       cd = new ContentDescriptor("unknown");
    }
View Full Code Here


      String mimeType = null;
      // we look for an encoder with same name and add mime_type of this
      AVOutputFormat avOutputFormat = AVFORMAT.guess_format(avInputFormat.name, null,null);
      if (avOutputFormat != null && avOutputFormat.mime_type != null && avOutputFormat.mime_type.length() > 0) {
        mimeType = avOutputFormat.mime_type;
        mimeTypes.put(mimeType, new ContentDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType)));
        logger.log(Level.FINEST, i + ". " + avInputFormat.long_name + " : " + mimeType);
      }
      String[] additionalMimeTypes = (String[])additionalFormatMimeTypes.get(avInputFormat.name);
      if (additionalMimeTypes != null) {
        if (additionalMimeTypes == NOT_SUPPORTED_FORMAT) {
          logger.log(Level.FINE, "Ignoring input format: " + avInputFormat.name + " (" + avInputFormat.long_name + ")");
        } else {
          for (int j = 0; j < additionalMimeTypes.length; j++) {
            mimeType = additionalMimeTypes[j];
            mimeTypes.put(mimeType, new ContentDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType)));
            logger.log(Level.FINEST, i + ". " + avInputFormat.long_name + " : " + additionalMimeTypes[j]);
          }
        }
      }
      if (mimeType == null && additionalMimeTypes == null){
        mimeType = "ffmpeg/"+avInputFormat.name;
        mimeTypes.put(mimeType, new ContentDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType)));
      }
      i++;
      if (avInputFormat.next != null /*&& avInputFormat.next.isValid()*/) {
        avInputFormat = new AVInputFormat(avInputFormat.next);
      }else{
View Full Code Here

public class RTPTransmitWizardConfig extends ProcessorWizardConfig
{

  public RTPTransmitWizardConfig()
  {
    contentDescriptor = new ContentDescriptor(ContentDescriptor.RAW_RTP);
  }
View Full Code Here

      return false;
    }

    public ContentDescriptor getContentDescriptor()
    {
      return new ContentDescriptor(ContentDescriptor.RAW)// It confuses me that we provide both this, and the correct format below (getFormat)
    }
View Full Code Here

    public boolean isCompatible(ContentDescriptor d)
    {
        //if (d.equals(new ContentDescriptor(ContentDescriptor.RAW)))  // TODO: we want RAW_RTP only
        //  return true;
        if (d.equals(new ContentDescriptor(ContentDescriptor.RAW_RTP)))
          return true;
       
        return false;
      }
View Full Code Here

     // TODO: if we aren't performing any transcoding, just serve the file up directly.
     // TODO: capture sources need to be treated as singletons, with some kind of broadcasting/cloning to ensure
     // that multiple connections can be made.
    
     final String serverSideUrlStr = mediaPath; //URLUtils.createUrlStr(new File(mediaPath)); // TODO: enforce that we can't just serve up anything anywhere
     final ContentDescriptor outputContentDescriptor = new FileTypeDescriptor(ContentDescriptor.mimeTypeToPackageName(mimeType));
   
    final Format outputFormat;
    if (outputFormatStr == null)
    {  outputFormat = null;
    }
View Full Code Here

    //
    ////////////////////////////////////////////////////////////

    public ContentDescriptor getContentDescriptor() {
        if( content == null ) {
            content = new ContentDescriptor("text/plain"); // kenlars99: TODO: this should really be text.plain, according to ContentDescriptor.mimeTypeToPackageName
        }
        return content;
    }
View Full Code Here

      return false;
    }
   
    public ContentDescriptor getContentDescriptor()
    {
      return new ContentDescriptor(ContentDescriptor.RAW)// It confuses me that we provide both this, and the correct format below (getFormat)
    }
View Full Code Here

        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }

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

    TrackControl track[] = processor.getTrackControls();

    boolean encodingOk = false;
View Full Code Here

      System.err.println("Failed to configure the processor.");
      return false;
  }

  // Get the raw output from the processor.
  p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));

  p.realize();
  if (!waitForState(Controller.Realized)) {
      System.err.println("Failed to realize the processor.");
      return false;
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.