예제 #1
0
 /// <summary>
 /// Execute external command. <paramref name="srf"/> must implement <see cref="ISourceRef"/>.
 /// </summary>
 /// <param name="srf">Target media file. Must implement <see cref="ISourceRef"/></param>
 public virtual void Execute(ISourceRef srf, Func <string, string> getValue = null)
 {
     if (srf != null)
     {
         this.Execute(TemplParams.EnumerateStdSourceParams(srf), getValue);
     }
 }
예제 #2
0
        public void Process(MediaTrackSource msrc)
        {
            this.Status.Clear();
            ExternalCommand xcmd;

            if (msrc.Targets.Count > 0)
            {
                List <CodeValuePair> srcPrms = new List <CodeValuePair>(TemplParams.EnumerateStdSourceParams(msrc));
                foreach (var t in msrc.Targets)
                {
                    t.Source = msrc;
                    xcmd     = t.XCmd;
                    if ((xcmd != null) && xcmd.CanExecute(msrc))
                    {
                        var pQ = srcPrms.Union(EnumerateTrgParams(t));
                        xcmd.Execute(pQ);
                    }
                }
            }
        }