private string GetInputPathArgument(EncodingJob job) { //if (job.InputProtocol == MediaProtocol.File && // job.RunTimeTicks.HasValue && // job.VideoType == VideoType.VideoFile && // !string.Equals(job.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)) //{ // if (job.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks && job.IsInputVideo) // { // if (SupportsThrottleWithStream) // { // var url = "http://localhost:" + ServerConfigurationManager.Configuration.HttpServerPortNumber.ToString(UsCulture) + "/videos/" + job.Request.Id + "/stream?static=true&Throttle=true&mediaSourceId=" + job.Request.MediaSourceId; // url += "&transcodingJobId=" + transcodingJobId; // return string.Format("\"{0}\"", url); // } // } //} var protocol = job.InputProtocol; var inputPath = new[] { job.MediaPath }; if (job.IsInputVideo) { if (!(job.VideoType == VideoType.Iso && job.IsoMount == null)) { inputPath = MediaEncoderHelpers.GetInputArgument(job.MediaPath, job.InputProtocol, job.IsoMount, job.PlayableStreamFileNames); } } return(MediaEncoder.GetInputArgument(inputPath, protocol)); }
private string GetInputPathArgument(EncodingJob job) { var protocol = job.InputProtocol; var inputPath = new[] { job.MediaPath }; if (job.IsInputVideo) { if (!(job.VideoType == VideoType.Iso && job.IsoMount == null)) { inputPath = MediaEncoderHelpers.GetInputArgument(job.MediaPath, job.InputProtocol, job.IsoMount, job.PlayableStreamFileNames); } } return(MediaEncoder.GetInputArgument(inputPath, protocol)); }
private string GetInputPathArgument(EncodingJob state) { var protocol = state.InputProtocol; var mediaPath = state.MediaPath ?? string.Empty; var inputPath = new[] { mediaPath }; if (state.IsInputVideo) { if (!(state.VideoType == VideoType.Iso && state.IsoMount == null)) { inputPath = MediaEncoderHelpers.GetInputArgument(FileSystem, mediaPath, state.InputProtocol, state.IsoMount, state.PlayableStreamFileNames); } } return(MediaEncoder.GetInputArgument(inputPath, protocol)); }