Examples of readFrame()


Examples of com.confluenity.jaylen.io.JsrcFile.readFrame()

    }
    Rectangle rectangle = ((Canvas) event.widget).getBounds();
    event.gc.setForeground(event.display.getSystemColor(SWT.COLOR_DARK_GRAY));
    event.gc.drawFocus(5, 5, rectangle.width - 15, rectangle.height - 15);
    try {
      JsrcFile.Frame frame = jsrc.readFrame(f);
      double size = Double.parseDouble(jsrc.getHeader().getItem("size"));
      double halfSize = size*0.5;
      for (JsrcFile.Frame.Particle particle : frame.getParticles()) {
        int x = (int)(((particle.getRx() + halfSize) / size) * (double)(rectangle.width - 20));
        int y = (int)(((halfSize - particle.getRy()) / size) * (double)(rectangle.height - 20));
View Full Code Here

Examples of com.confluenity.jaylen.io.JsrcFile.readFrame()

  private JsrcFile.Frame getFrame() throws IOException {
    final JsrcFile jsrc = context.getJsrcFile(context.getSelectedFile());
    if (jsrc == null) {
      return null;
    }
    return jsrc.readFrame(context.getSelectedFrame(jsrc.getUuid()));
  }

  private void exportToXlsx(final FileAssistant.FileDescriptor fileName) {
    final Long start = System.currentTimeMillis();
    short rowNum = 0;
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.readFrame()

    public void testCorrectProtocolHeader() throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        SocketFrameHandler fh = new SocketFrameHandler(factory.getSocketFactory().createSocket("localhost", AMQP.PROTOCOL.PORT));
        fh.sendHeader();
        AMQCommand command = new AMQCommand();
        while (!command.handleFrame(fh.readFrame())) { }
        Method m = command.getMethod();
        //    System.out.println(m.getClass());
        assertTrue("First command must be Connection.start",
                m instanceof AMQP.Connection.Start);
        AMQP.Connection.Start start = (AMQP.Connection.Start) m;
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.readFrame()

        // gives an error.
        if (!fhSocket.isClosed()) {
            fh.setTimeout(500);
            // NB the frame handler will return null if the socket times out
            try {
                fh.readFrame();
                fail("Expected socket read to fail due to socket being closed");
            } catch (MalformedFrameException mfe) {
                fail("Expected nothing, rather than a badly-formed something");
            } catch (IOException ioe) {
                return;
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.readFrame()

    public void testCorrectProtocolHeader() throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        SocketFrameHandler fh = new SocketFrameHandler(factory.getSocketFactory().createSocket("localhost", AMQP.PROTOCOL.PORT));
        fh.sendHeader();
        AMQCommand command = new AMQCommand();
        while (!command.handleFrame(fh.readFrame())) { }
        Method m = command.getMethod();
        //    System.out.println(m.getClass());
        assertTrue("First command must be Connection.start",
                m instanceof AMQP.Connection.Start);
        AMQP.Connection.Start start = (AMQP.Connection.Start) m;
View Full Code Here

Examples of com.rabbitmq.client.impl.SocketFrameHandler.readFrame()

        // gives an error.
        if (!fhSocket.isClosed()) {
            fh.setTimeout(500);
            // NB the frame handler will return null if the socket times out
            try {
                fh.readFrame();
                fail("Expected socket read to fail due to socket being closed");
            } catch (MalformedFrameException mfe) {
                fail("Expected nothing, rather than a badly-formed something");
            } catch (IOException ioe) {
                return;
View Full Code Here

Examples of de.sciss.eisenkraut.io.DecimatedWaveTrail.readFrame()

      case DecimatedTrail.MODEL_FULLWAVE_PEAKRMS:
        dt      = doc.getDecimatedWaveTrail();
        if( dt == null ) return;
        frame    = new float[ dt.getNumModelChannels() ];
        try {
          dt.readFrame( Math.min( dt.getNumDecimations() - 1, info.idx + 1 ), pos, ch, frame );
        }
        catch( IOException e1 ) { return; }
        f1      = Math.max( frame[ 0 ], -frame[ 1 ] )// peak pos/neg
        argsCsr[4= new Float( f1 );
        argsCsr[5= new Float( Math.log( f1 ) * TWENTYDIVLOG10 );
View Full Code Here

Examples of javazoom.jl.decoder.Bitstream.readFrame()

        try
        {
            Bitstream m_bitstream = new Bitstream(pis);
            int streamPos = m_bitstream.header_pos();
            aff_properties.put("mp3.header.pos", new Integer(streamPos));
            Header m_header = m_bitstream.readFrame();
            // nVersion = 0 => MPEG2-LSF (Including MPEG2.5), nVersion = 1 => MPEG1
            nVersion = m_header.version();
            if (nVersion == 2) aff_properties.put("mp3.version.mpeg", Float.toString(2.5f));
            else aff_properties.put("mp3.version.mpeg", Integer.toString(2 - nVersion));
            // nLayer = 1,2,3
View Full Code Here

Examples of javazoom.jl.decoder.Bitstream.readFrame()

      {
        for (; frame<frameCount; frame++)
        {
          try
          {
            Header header = stream.readFrame();
            if (header==null)
              break;

            progressListener.readFrame(frame, header);
View Full Code Here

Examples of javazoom.jl.decoder.Bitstream.readFrame()

      try {
        OutputBuffer outputBuffer = null;
        int sampleRate = -1, channels = -1;
        while (true) {
          Header header = bitstream.readFrame();
          if (header == null) break;
          if (outputBuffer == null) {
            channels = header.mode() == Header.SINGLE_CHANNEL ? 1 : 2;
            outputBuffer = new OutputBuffer(channels, false);
            decoder.setOutputBuffer(outputBuffer);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.