Examples of ByteBufferDescriptor


Examples of com.limelight.nvstream.av.ByteBufferDescriptor

    int filled = 0;
   
    ByteBuffer bb = ByteBuffer.wrap(data);
    bb.position(offset);
    while (length > 0 && !bufferList.isEmpty()) {
      ByteBufferDescriptor buff = bufferList.getFirst();
     
      if (buff.length > length) {
        break;
      }
     
View Full Code Here

Examples of com.limelight.nvstream.av.ByteBufferDescriptor

   * @param length the length of data to be rendered
   */
  public void playDecodedAudio(byte[] pcmData, int offset, int length) {
    if (soundLine != null) {
      // Queue the decoded samples into the staging sound buffer
      soundBuffer.queue(new ByteBufferDescriptor(pcmData, offset, length));
     
      int available = soundLine.available();
      if (reallocateLines) {
        // Kinda jank. If the queued is larger than available, we are going to have a delay
        // so we increase the buffer size
View Full Code Here

Examples of com.limelight.nvstream.av.ByteBufferDescriptor

  public void decodeUnit(DecodeUnit decodeUnit) {
    List<ByteBufferDescriptor> units = decodeUnit.getBufferList();
   
    boolean ok = true;
    for (int i=0;i<units.size();i++) {
      ByteBufferDescriptor bbd = units.get(i);
      if (ok) {
        int ret = ImxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1));
        if (ret != 0) {
          LimeLog.severe("Error code during decode: " + ret);
          ok = false;
View Full Code Here

Examples of com.limelight.nvstream.av.ByteBufferDescriptor

  @Override
  public void decodeUnit(DecodeUnit decodeUnit) {
    List<ByteBufferDescriptor> units = decodeUnit.getBufferList();
   
    ByteBufferDescriptor header = units.get(0);
    if (header.data[header.offset+4] == 0x67) {
      byte last = header.data[header.length+header.offset-1];
   
      //Set number of reference frames back to 1 as it's the minimum for bitstream restrictions
      this.replace(header, 80, 9, new byte[] {0x40}, 3);

      //Set bitstream restrictions to only buffer single frame (starts 9 bits before stop bit and 6 bits earlier because of the shortening above)
      this.replace(header, header.length*8+Integer.numberOfLeadingZeros(last & - last)%8-9-6, 2, BITSTREAM_RESTRICTIONS, 3*8);
    }
   
    boolean ok = true;
    for (int i=0;i<units.size();i++) {
      ByteBufferDescriptor bbd = units.get(i);
      if (ok) {
        int ret = OmxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1));
        if (ret != 0) {
          LimeLog.severe("Error code during decode: " + ret);
          ok = false;
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.