예제 #1
0
 @Override
 public void DoOnOutputBuffer(
     byte[] Buffer, int BufferSize, long Timestamp, boolean flSyncFrame) throws Exception {
   Timestamp = Timestamp / 1000; // . convert to milliseconds from microseconds
   // .
   if (flSyncFrame) DestinationChannel.DoOnH264IndexAndTimestamp(Index, (int) Timestamp);
   // .
   DestinationChannel.DoOnTimestampedH264Packet((int) Timestamp, Buffer, BufferSize);
   // .
   Index += BufferSize;
 }
예제 #2
0
 @Override
 public void DoOnConfiguration(byte[] Buffer, int BufferSize) throws Exception {
   // . save a configuration for a Channel.Configuration value
   if (Configuration_SaveToFile(Buffer, BufferSize, GetFrameRate())) {
     Configuration_LoadFromConfigurationFile();
     // .
     InternalSensorsModule.SensorsModule
         .Model_PostBuildAndPublish(); // . publish the changed model
   }
   // . start a new stream session and fill the channel configuration with data
   int StreamSession = ChannelStreamConfiguration.Set(Buffer, BufferSize);
   // . send new session packet
   DestinationChannel.DoOnChannelStreamSession(StreamSession);
   // . send configuration
   DestinationChannel.DoOnTimestampedH264Packet(0 /*Timestamp*/, Buffer, BufferSize);
 }