示例#1
0
        public void Record(string sourceName, string channel, string title, string mediaName)
        {
            Debug.WriteLine("RecorderControlService.Record " + sourceName + ", " + channel + ", " + title + ", " + mediaName);
            SourceConfig source = SourcesConfig.FindSource(sourceName);

            if (source != null)
            {
                SourceRecorder sourceRecorder = new SourceRecorder(source, channel, title, mediaName);
                if (sourceRecorder != null)
                {
                    sourceRecorder.Record();
                }
            }
        }
示例#2
0
 public void Stop(string sourceName)
 {
     Debug.WriteLine("RecorderControlService.Stop " + sourceName);
     try
     {
         SourceConfig source = SourcesConfig.FindSource(sourceName);
         if (source != null)
         {
             SourceRecorder recorder = SourceRecorder.FindRecorder(source);
             if (recorder != null)
             {
                 recorder.Stop();
                 recorder.Dispose();
             }
         }
     }
     catch (Exception exc)
     {
         Debug.WriteLine("RecorderControlService.Stop Exception:");
         Debug.WriteLine(exc.Message);
     }
 }