Beispiel #1
0
        void VsICoreEncoderDescription.SaveConfiguration(System.Xml.XmlTextWriter writer, object config)
        {
            VsRawEncoderConfiguration cfg = (VsRawEncoderConfiguration)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());
            }
        }
Beispiel #2
0
        VsICoreEncoder VsICoreEncoderDescription.CreateEncoder(long syncTimer, object config)
        {
            VsRawEncoderConfiguration cfg = (VsRawEncoderConfiguration)config;

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

                encoder.EncoderName = cfg.CodecsName;

                return((VsRawEncoder)encoder);
            }
            return(null);
        }
Beispiel #3
0
        object VsICoreEncoderDescription.LoadConfiguration(System.Xml.XmlTextReader reader)
        {
            VsRawEncoderConfiguration config = new VsRawEncoderConfiguration();

            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);
        }
Beispiel #4
0
        object VsICoreEncoderDescription.LoadConfiguration(Hashtable reader)
        {
            VsRawEncoderConfiguration config = new VsRawEncoderConfiguration();

            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);
        }
        object VsICoreEncoderPage.GetConfiguration()
        {
            VsRawEncoderConfiguration cfg = new VsRawEncoderConfiguration();

            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);
        }
        object VsICoreEncoderPage.GetConfiguration()
        {
            VsRawEncoderConfiguration cfg = new VsRawEncoderConfiguration();

            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;
        }
        void VsICoreEncoderPage.SetConfiguration(object config)
        {
            VsRawEncoderConfiguration cfg = (VsRawEncoderConfiguration)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)
        {
            VsRawEncoderConfiguration config = new VsRawEncoderConfiguration();

            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)
        {
            VsRawEncoderConfiguration config = new VsRawEncoderConfiguration();

            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;
        }