public IMedia Capture(IPlayoutServerChannel channel, TimeSpan tcIn, TimeSpan tcOut, bool narrowMode, string mediaName, string fileName) { _tcFormat = channel.VideoFormat; var directory = (ServerDirectory)_ownerServer.MediaDirectory; var newMedia = new ServerMedia(directory, Guid.NewGuid(), 0, ArchiveDirectory) { FileName = fileName, MediaName = mediaName, TcStart = tcIn, TcPlay = tcIn, Duration = tcOut - tcIn, MediaStatus = TMediaStatus.Copying, LastUpdated = DateTime.UtcNow, MediaType = TMediaType.Movie }; if (_recorder?.Capture(channel.Id, tcIn.ToSMPTETimecodeString(channel.VideoFormat), tcOut.ToSMPTETimecodeString(channel.VideoFormat), narrowMode, fileName) == true) { RecordingMedia = newMedia; Logger.Debug("Started recording from {0} file {1} TcIn {2} TcOut {3}", channel.ChannelName, fileName, tcIn, tcOut); return(newMedia); } Logger.Error("Unsuccessfull recording from {0} file {1} TcIn {2} TcOut {3}", channel.ChannelName, fileName, tcIn, tcOut); return(null); }
public PreviewViewmodel(IPreview preview) { preview.PropertyChanged += this.PreviewPropertyChanged; _channelPRV = preview.PlayoutChannelPRV; if (_channelPRV != null) { _channelPRV.PropertyChanged += this.OnChannelPropertyChanged; } _preview = preview; _formatDescription = _preview.FormatDescription; CreateCommands(); }
public PreviewViewmodel(IEngine engine, IPreview preview) { preview.PropertyChanged += PreviewPropertyChanged; _channel = preview.PlayoutChannelPRV; if (_channel != null) { _channel.PropertyChanged += OnChannelPropertyChanged; } _engine = engine; _preview = preview; _formatDescription = _preview.FormatDescription; CreateCommands(); }
public IMedia Capture(IPlayoutServerChannel channel, TimeSpan timeLimit, bool narrowMode, string fileName) { _tcFormat = channel.VideoFormat; var directory = (ServerDirectory)_ownerServer.MediaDirectory; var newMedia = new ServerMedia(directory, Guid.NewGuid(), 0, ArchiveDirectory) { FileName = fileName, MediaName = fileName, TcStart = TimeSpan.Zero, TcPlay = TimeSpan.Zero, Duration = timeLimit, MediaStatus = TMediaStatus.Copying, LastUpdated = DateTime.UtcNow, MediaType = TMediaType.Movie }; if (_recorder?.Capture(channel.Id, timeLimit.ToSMPTEFrames(channel.VideoFormat), narrowMode, fileName) == true) { RecordingMedia = newMedia; CaptureFileName = fileName; CaptureTcIn = TimeSpan.Zero; CaptureTcOut = TimeSpan.Zero; CaptureTimeLimit = timeLimit; CaptureNarrowMode = narrowMode; return(newMedia); } return(null); }
public IMedia Capture(IPlayoutServerChannel channel, TimeSpan timeLimit, bool narrowMode, string fileName) { return(Query <IMedia>(parameters: new object[] { channel, timeLimit, narrowMode, fileName })); }
public IMedia Capture(IPlayoutServerChannel channel, TimeSpan tcIn, TimeSpan tcOut, bool narrowMode, string mediaName, string fileName, int[] channelMap) { return(Query <IMedia>(parameters: new object[] { channel, tcIn, tcOut, narrowMode, mediaName, fileName, channelMap })); }