コード例 #1
0
 public void DownloadControl(DownloadControlCode code, byte[] buffer)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         PacketBase.WriteBytes(ms, (int)code);
         PacketBase.WriteBytes(ms, buffer);
         Send((int)ParamCode.DownloadControl, ms.ToArray());
     }
 }
コード例 #2
0
 public static byte[] Encode(UniviewHeaderPacket packet)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         PacketBase.WriteBytes(ms, (int)VideoType.Uniview);
         PacketBase.WriteBytes(ms, packet.StreamId);
         PacketBase.WriteBytes(ms, packet.StreamName);
         PacketBase.WriteBytes(ms, packet.StreamUrl);
         return(ms.ToArray());
     }
 }
コード例 #3
0
 public static byte[] Encode(UniviewStreamPacket data)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         PacketBase.WriteBytes(ms, data.Time);
         PacketBase.WriteBytes(ms, (int)data.Type);
         PacketBase.WriteBytes(ms, data.DecodeTag);
         PacketBase.WriteBytes(ms, data.Buffer.Length);
         PacketBase.WriteBytes(ms, data.Buffer);
         return(ms.ToArray());
     }
 }