Пример #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());
            }
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #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;
        }
Пример #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);
        }
Пример #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)
                {
                }
            }
        }
Пример #8
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;
        }
Пример #9
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;
        }