Package rtpi

Examples of rtpi.RtpiState


                                                           // and that it is active. This is used for RTCP/I subreps
  } catch (Exception ex) {
      System.err.println("Application: Unable to add subcomponent to RTP/I - exiting!");
      System.exit(0);
  }
  RtpiState state=null;

  try {
      state = new RtpiState(localParticipant.getParticipantID(), // The participant ID of the local source
          id, // The subcomponent ID
          comp.getNextStateSequenceNumber(), // The sequence number of this state ADU
          10, // The payload type
          3, // The priority (3=max priority, this should force everyone to reset the state of the subcomponent)
          System.currentTimeMillis(), // The timestamp of the ADU
          rtpi.getCombinedHeaderSize()); // The headersize of RTP/I and the reliability service.
  } catch (Exception ex) {
      System.err.println("Application: Could not create rtpi state for transmission - exiting!");
      System.exit(0);
  }
  try {
      OutputStream os = state.getOutputStream(); // Get the output stream for this state
      os.write(comp.getNameBytes()); // this is already an UTF encoded string - see constructor of Subcomponent!
                                     // The recipient of the state should be able to derive the application level name of
                                     // the subcomponent.
      os.write(comp.getState());
  } catch(Exception e) {
      System.out.println("Application::createComponent - exception while writing packet "+e);
      System.exit(0);
  }
  state.outputComplete(); // Finish the output
  rtpi.transmitState(state); // Let RTP/I do the rest.
  return comp;
    }
View Full Code Here

TOP

Related Classes of rtpi.RtpiState

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.