private static byte[] CreateBody(long local_timestamp) { var s = new MemoryStream(); using (var writer = new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)UserControlMessageType.PingResponse); writer.WriteUInt32(local_timestamp); } return(s.ToArray()); }
private static byte[] CreateBody(long target_stream_id) { var s = new MemoryStream(); using (var writer = new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)UserControlMessageType.StreamIsRecorded); writer.WriteUInt32(target_stream_id); } return(s.ToArray()); }
private static byte[] CreateBody(UserControlMessageType message_type, byte[] payload) { var s = new MemoryStream(); using (var writer = new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)message_type); writer.Write(payload); } return(s.ToArray()); }
private static byte[] CreateBody(long target_stream_id, TimeSpan buffer_length) { var s = new MemoryStream(); using (var writer = new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)UserControlMessageType.SetBufferLength); writer.WriteUInt32(target_stream_id); writer.WriteUInt32((long)buffer_length.TotalMilliseconds); } return(s.ToArray()); }
private static byte[] CreateBody(long local_timestamp) { var s = new MemoryStream(); using (var writer=new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)UserControlMessageType.PingResponse); writer.WriteUInt32(local_timestamp); } return s.ToArray(); }
private static byte[] CreateBody(UserControlMessageType message_type, byte[] payload) { var s = new MemoryStream(); using (var writer=new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)message_type); writer.Write(payload); } return s.ToArray(); }
private static byte[] CreateBody(long target_stream_id) { var s = new MemoryStream(); using (var writer=new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)UserControlMessageType.StreamIsRecorded); writer.WriteUInt32(target_stream_id); } return s.ToArray(); }
private static byte[] CreateBody(long target_stream_id, TimeSpan buffer_length) { var s = new MemoryStream(); using (var writer=new RTMPBinaryWriter(s)) { writer.WriteUInt16((int)UserControlMessageType.SetBufferLength); writer.WriteUInt32(target_stream_id); writer.WriteUInt32((long)buffer_length.TotalMilliseconds); } return s.ToArray(); }