public EncoderWrapper(Stream mediaStream, EncoderConfig encCfg)
 {
   this.filename = "";
   this.mediaStream = mediaStream;
   this.encCfg = encCfg;
   if (!encCfg.useTranscoding)
     return;
   SetupPipes();
   Start();
 }
 public EncoderWrapper(string filename, EncoderConfig encCfg)
 {
   this.filename = filename;
   this.mediaStream = null;
   this.encCfg = encCfg;
   if (!encCfg.useTranscoding)
     return;
   SetupPipes();
   Start();
 }
Beispiel #3
0
 public EncoderWrapper(Stream mediaStream, EncoderConfig encCfg)
 {
     this.filename    = "";
     this.mediaStream = mediaStream;
     this.encCfg      = encCfg;
     if (!encCfg.useTranscoding)
     {
         return;
     }
     SetupPipes();
     Start();
 }
Beispiel #4
0
 public EncoderWrapper(string filename, EncoderConfig encCfg)
 {
     this.filename    = filename;
     this.mediaStream = null;
     this.encCfg      = encCfg;
     if (!encCfg.useTranscoding)
     {
         return;
     }
     SetupPipes();
     Start();
 }
Beispiel #5
0
 public EncoderWrapper(Stream mediaStream, EncoderConfig encCfg)
 {
     _filename    = "";
     _mediaStream = mediaStream;
     this.encCfg  = encCfg;
     if (!encCfg.useTranscoding)
     {
         return;
     }
     SetupPipes();
     Log.Info("iPiMPWeb - Pipes setup for mediaStream");
     Start();
     Log.Info("iPiMPWeb - Copy started for mediaStream");
 }
Beispiel #6
0
 public EncoderWrapper(string filename, EncoderConfig encCfg)
 {
     _filename    = filename;
     _mediaStream = null;
     this.encCfg  = encCfg;
     if (!encCfg.useTranscoding)
     {
         return;
     }
     SetupPipes();
     Log.Info("iPiMPWeb - Pipes setup for filename");
     Start();
     Log.Info("iPiMPWeb - Copy started for filename");
 }
Beispiel #7
0
 public static List<EncoderConfig> LoadConfig()
 {
   List<EncoderConfig> encCfgs = new List<EncoderConfig>();
   XmlDocument doc = new XmlDocument();
   doc.Load(AppDomain.CurrentDomain.BaseDirectory + "config.xml");
   XmlNodeList nodes = doc.SelectNodes("/appconfig/transcoders/transcoder");
   encCfgs = new List<EncoderConfig>();
   foreach (XmlNode node in nodes)
   {
     EncoderConfig cfg = new EncoderConfig(node.Attributes["name"].Value, (node.Attributes["usetranscoding"].Value == "1"), node.Attributes["filename"].Value, node.Attributes["args"].Value, (TransportMethod)Int32.Parse(node.Attributes["inputmethod"].Value), (TransportMethod)Int32.Parse(node.Attributes["outputmethod"].Value));
     encCfgs.Add(cfg);
   }
   return encCfgs;
 }
Beispiel #8
0
        public static List <EncoderConfig> LoadConfig()
        {
            List <EncoderConfig> encCfgs = new List <EncoderConfig>();
            XmlDocument          doc     = new XmlDocument();

            doc.Load(AppDomain.CurrentDomain.BaseDirectory + "config.xml");
            XmlNodeList nodes = doc.SelectNodes("/appconfig/transcoders/transcoder");

            encCfgs = new List <EncoderConfig>();
            foreach (XmlNode node in nodes)
            {
                EncoderConfig cfg = new EncoderConfig(node.Attributes["name"].Value, (node.Attributes["usetranscoding"].Value == "1"), node.Attributes["filename"].Value, node.Attributes["args"].Value, (TransportMethod)Int32.Parse(node.Attributes["inputmethod"].Value), (TransportMethod)Int32.Parse(node.Attributes["outputmethod"].Value));
                encCfgs.Add(cfg);
            }
            return(encCfgs);
        }