Is C# wrapper need?

Vladimir
2012-11-24
2013-04-20
  • Vladimir
    Vladimir
    2012-11-24

    Hi everybody.

    I going to write C# wrapper around MediaInfo.dll
    Details are below.

    1st iteration requirements are X86, X64 support, .NET 2.0 and above
    2nd - mono linux support.

    Is where already yet something similar?

    public class MediaInfoRequest
    {
        public MediaInfoReport Get(string fileName)
        {
            throw new NotImplementedException();
        }
    }
        
    [Serializable]
    public class MediaInfoReport
    {
        public string FileName { get; set; }
        public string Format { get; set; }
        public List<VideoMediaStream> VideoStreams { get; set; }
        public List<AudioMediaStream> AudioStreams { get; set; }
        public List<SubTitlesMediaStream> SubTitles { get; set; }
        public bool HasVideo
        {
            get { return VideoStreams != null && VideoStreams.Count > 0; }
        }
        public bool HasAudio
        {
            get { return AudioStreams != null && AudioStreams.Count > 0; }
        }
        public bool HasSubTitles
        {
            get { return SubTitles != null && SubTitles.Count > 0; }
        }
    }
    [Serializable]
    public class SubTitlesMediaStream
    {
        public string LanguageCode { get; set; }
        public string Language { get; set; }
    }
    [Serializable]
    public class VideoMediaStream
    {
        public string Format { get; set; }
        public string Profile { get; set; }
        public string CodecID { get; set; }
        public int Width { get; set; }
        public int Height { get; set; }
        public int BitRate { get; set; }
        public decimal FrameRate { get; set; }
    }
    [Serializable]
    public class AudioMediaStream
    {
        public string Format { get; set; }
        public string CodecID { get; set; }
        public int BitRate { get; set; }
        public int Channels { get; set; }
        public string LanguageCode { get; set; }
        public string Language { get; set; }
    }