Initial add of three projects

This commit is contained in:
2019-01-04 00:04:44 +01:00
commit c638f0cf2d
54 changed files with 549 additions and 0 deletions

38
VideoEnc/VideoEncoder.cs Normal file
View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace VideoEnc
{
public class VideoEventArgs : EventArgs
{
public Video Video { get; set; }
}
public class VideoEncoder
{
// 1- Define a delegate
// 2- Define an Event
// 3 Raise the event
public delegate void VideoEncodedEventHandler(object source, VideoEventArgs args);
public event VideoEncodedEventHandler VideoEncoded;
public void Encode(Video video)
{
Console.WriteLine("Encoding video...");
Thread.Sleep(3000);
OnVideoEncoded(video);
}
protected virtual void OnVideoEncoded(Video video)
{
if (VideoEncoded != null)
VideoEncoded(this, new VideoEventArgs() { Video =video });
}
}
}