Esempio n. 1
0
        public static object SubmitJob(string directoryId, string authToken, MediaClient mediaClient, MediaJob mediaJob, MediaJobInput[] jobInputs)
        {
            IJob         job         = null;
            IJobTemplate jobTemplate = null;

            if (mediaJob.Tasks != null)
            {
                mediaJob = MediaClient.GetJob(authToken, mediaClient, mediaJob, jobInputs);
            }
            if (mediaJob.Tasks != null || !string.IsNullOrEmpty(mediaJob.TemplateId))
            {
                job = mediaClient.CreateJob(mediaJob, jobInputs, out jobTemplate);
            }
            if (job != null && !string.IsNullOrEmpty(job.Id))
            {
                TrackJob(directoryId, authToken, job, mediaJob.Tasks);
            }
            return(GetJobOutput(job, jobTemplate, jobInputs));
        }