Exemplo n.º 1
0
 public EncoderWrapper(Stream mediaStream, EncoderConfig encCfg)
 {
   this.filename = "";
   this.mediaStream = mediaStream;
   this.encCfg = encCfg;
   if (!encCfg.useTranscoding)
     return;
   SetupPipes();
   Start();
 }
Exemplo n.º 2
0
 public EncoderWrapper(string filename, EncoderConfig encCfg)
 {
   this.filename = filename;
   this.mediaStream = null;
   this.encCfg = encCfg;
   if (!encCfg.useTranscoding)
     return;
   SetupPipes();
   Start();
 }
Exemplo n.º 3
0
 public EncoderWrapper(Stream mediaStream, EncoderConfig encCfg)
 {
     this.filename    = "";
     this.mediaStream = mediaStream;
     this.encCfg      = encCfg;
     if (!encCfg.useTranscoding)
     {
         return;
     }
     SetupPipes();
     Start();
 }
Exemplo n.º 4
0
 public EncoderWrapper(string filename, EncoderConfig encCfg)
 {
     this.filename    = filename;
     this.mediaStream = null;
     this.encCfg      = encCfg;
     if (!encCfg.useTranscoding)
     {
         return;
     }
     SetupPipes();
     Start();
 }
Exemplo n.º 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");
 }
Exemplo n.º 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");
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
        }