Package rtpi

Examples of rtpi.RtpiEvent


  if (sub==null) {
      System.err.println("Received event for non existing subcomponent - ignoring event!");
      return;
  }

  RtpiEvent event=null;

  try {
      event = new RtpiEvent(localParticipant.getParticipantID(), // The participant ID of the local source
          id, // The subcomponent ID
          sub.getNextEventSequenceNumber(), // The sequence number of this event ADU
          10, // The payload type
          System.currentTimeMillis(), // The timestamp of this event
          rtpi.getCombinedHeaderSize()); // The combined header size of the RTP/I and the relibaility service headers
  } catch (Exception ex) {
      System.err.println("Could not create rtpi event for transmission - exiting!");
      System.exit(0);
  }

  try {
      event.getOutputStream().write(1); // Write the event data
  } catch(IOException e) {
      System.out.println("Application::SendIncrEvent - exception while writing packet "+e);
      System.exit(0);
  }

  event.outputComplete(); // Finish the output to the event
  rtpi.transmitEvent(event); // Use RTP/I to transmit the event.
    }
View Full Code Here

TOP

Related Classes of rtpi.RtpiEvent

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.