Example #1
0
        void VsICoreEncoderDescription.SaveConfiguration(System.Xml.XmlTextWriter writer, object config)
        {
            VsWmvEncoderConfiguration cfg = (VsWmvEncoderConfiguration)config;

            if (cfg != null)
            {
                writer.WriteAttributeString("ImageWidth", cfg.ImageWidth.ToString());
                writer.WriteAttributeString("ImageHeight", cfg.ImageHeight.ToString());
                writer.WriteAttributeString("CodecsName", cfg.CodecsName);
                writer.WriteAttributeString("Quality", cfg.Quality.ToString());
            }
        }
Example #2
0
        VsICoreEncoder VsICoreEncoderDescription.CreateEncoder(long syncTimer, object config)
        {
            VsWmvEncoderConfiguration cfg = (VsWmvEncoderConfiguration)config;

            if (cfg != null)
            {
                VsWmvEncoder encoder = new VsWmvEncoder(syncTimer);

                encoder.EncoderName = cfg.CodecsName;

                return((VsWmvEncoder)encoder);
            }
            return(null);
        }
Example #3
0
        object VsICoreEncoderDescription.LoadConfiguration(Hashtable reader)
        {
            VsWmvEncoderConfiguration config = new VsWmvEncoderConfiguration();

            try
            {
                config.ImageWidth  = int.Parse((string)reader["ImageWidth"]);
                config.ImageHeight = int.Parse((string)reader["ImageHeight"]);
                config.CodecsName  = (string)reader["CodecsName"];
                config.Quality     = int.Parse((string)reader["Quality"]);
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
Example #4
0
        object VsICoreEncoderDescription.LoadConfiguration(System.Xml.XmlTextReader reader)
        {
            VsWmvEncoderConfiguration config = new VsWmvEncoderConfiguration();

            try
            {
                config.ImageWidth  = int.Parse(reader.GetAttribute("ImageWidth"));
                config.ImageHeight = int.Parse(reader.GetAttribute("ImageHeight"));
                config.CodecsName  = reader.GetAttribute("CodecsName");
                config.Quality     = int.Parse(reader.GetAttribute("Quality"));
            }
            catch (Exception)
            {
            }
            return((object)config);
        }
Example #5
0
        object VsICoreEncoderPage.GetConfiguration()
        {
            VsWmvEncoderConfiguration cfg = new VsWmvEncoderConfiguration();

            try
            {
                cfg.ImageWidth = int.Parse(imageWidth.Text);
                cfg.ImageHeight = int.Parse(imageHeight.Text);
                cfg.CodecsName = codecsName.Text;
                cfg.Quality = int.Parse(quality.Text);
            }
            catch(Exception)
            {
            }

            return (object)cfg;
        }
Example #6
0
        object VsICoreEncoderPage.GetConfiguration()
        {
            VsWmvEncoderConfiguration cfg = new VsWmvEncoderConfiguration();

            try
            {
                cfg.ImageWidth  = int.Parse(imageWidth.Text);
                cfg.ImageHeight = int.Parse(imageHeight.Text);
                cfg.CodecsName  = codecsName.Text;
                cfg.Quality     = int.Parse(quality.Text);
            }
            catch (Exception)
            {
            }

            return((object)cfg);
        }
Example #7
0
        void VsICoreEncoderPage.SetConfiguration(object config)
        {
            VsWmvEncoderConfiguration cfg = (VsWmvEncoderConfiguration)config;

            if (cfg != null)
            {
                try
                {
                    imageWidth.Text  = cfg.ImageWidth.ToString();
                    imageHeight.Text = cfg.ImageHeight.ToString();
                    codecsName.Text  = cfg.CodecsName;
                    quality.Text     = cfg.Quality.ToString();
                }
                catch (Exception)
                {
                }
            }
        }
        object VsICoreEncoderDescription.LoadConfiguration(System.Xml.XmlTextReader reader)
        {
            VsWmvEncoderConfiguration config = new VsWmvEncoderConfiguration();

            try
            {
                config.ImageWidth = int.Parse(reader.GetAttribute("ImageWidth"));
                config.ImageHeight = int.Parse(reader.GetAttribute("ImageHeight"));
                config.CodecsName = reader.GetAttribute("CodecsName");
                config.Quality = int.Parse(reader.GetAttribute("Quality"));
            }
            catch (Exception)
            {
            }
            return (object)config;
        }
        object VsICoreEncoderDescription.LoadConfiguration(Hashtable reader)
        {
            VsWmvEncoderConfiguration config = new VsWmvEncoderConfiguration();

            try
            {
                config.ImageWidth = int.Parse((string)reader["ImageWidth"]);
                config.ImageHeight = int.Parse((string)reader["ImageHeight"]);
                config.CodecsName = (string)reader["CodecsName"];
                config.Quality = int.Parse((string)reader["Quality"]);
            }
            catch (Exception)
            {
            }
            return (object)config;
        }