public void SetUp()
 {
     property = new VideoProperty();
     property.BitRate = 12345;
     property.Format = VideoEncoding.H264;
     property.Height = 11111;
     property.Width = 12345;
     property.Output = null;
     property.FPS = 30;
 }
示例#2
0
        /// <summary>
        /// コピーを作成する
        /// </summary>
        /// <returns>コピーされたVideoProperty</returns>
        public VideoProperty Clone()
        {
            VideoProperty newobj = new VideoProperty();

            newobj.Output  = Output;
            newobj.Width   = Width;
            newobj.Height  = Height;
            newobj.BitRate = BitRate;
            newobj.Format  = Format;
            newobj.FPS     = FPS;
            return(newobj);
        }
示例#3
0
 private async Task Write(StorageFile file)
 {
     var stream = await file.OpenAsync(FileAccessMode.ReadWrite);
     var factory = new VideoWriteServiceFactory();
     var prop = new VideoProperty();
     prop.BitRate = 800000;
     prop.Format = VideoEncoding.WindowsMediaVideo;
     prop.FPS = 25;
     prop.Height = 480;
     prop.Width = 640;
     prop.Output = stream;
     var service = factory.Create(prop);
     UInt32[] data = new UInt32[prop.Height * prop.Width];
     for (int i = 0; i < data.Length; ++i)
     {
         data[i] = 0x0000FF00;
     }
     for (int i = 0; i < 20 * prop.FPS; ++i)
     {
         service.WriteFrame(data);
     }
     service.Close();
 }
示例#4
0
 /// <summary>
 /// コピーを作成する
 /// </summary>
 /// <returns>コピーされたVideoProperty</returns>
 public VideoProperty Clone()
 {
     VideoProperty newobj = new VideoProperty();
     newobj.Output = Output;
     newobj.Width = Width;
     newobj.Height = Height;
     newobj.BitRate = BitRate;
     newobj.Format = Format;
     newobj.FPS = FPS;
     return newobj;
 }