public void Remove(string RecordingIdentifier) { int RecordingCount = 0; if (m_mbsi.CurrentRecordings != null) { RecordingCount = m_mbsi.CurrentRecordings.GetLength(0); } if (RecordingCount == 0) { m_mbsi.CurrentRecordings = null; m_mbsi.CurrentRecordingCount = 0; return; } if (RecordingCount == 1) { m_mbsi.CurrentRecordings = null; m_mbsi.CurrentRecordingCount = 0; return; } MediaBufferServiceInfo.Recording[] recordings = new MediaBufferServiceInfo.Recording[RecordingCount - 1]; int j = 0; for (int i = 0; i < RecordingCount; i++) { if (m_mbsi.CurrentRecordings[i].UniqueIdentifier != RecordingIdentifier) { recordings[j++] = m_mbsi.CurrentRecordings[i]; } } m_mbsi.CurrentRecordings = recordings; m_mbsi.CurrentRecordingCount = RecordingCount; }
public MediaBufferServiceInfo.Recording CreateRecording(int RoomId, string RoomName, int UserId, string UserName, string CardNumber) { MediaBufferServiceInfo.Recording recording = new MediaBufferServiceInfo.Recording(); recording.RoomId = RoomId; recording.RoomName = RoomName; recording.UserId = UserId; recording.UserName = UserName; recording.CardNumber = CardNumber; recording.UniqueIdentifier = System.Guid.NewGuid().ToString(); recording.Started = DateTime.Now; return recording; }