internal MediaStream(IntPtr ptr) { if (ptr == IntPtr.Zero) { throw new ArgumentException("Null pointer"); } this.ptr = ptr; this.stream = (AVStream *)ptr; Language = Marshal.PtrToStringAnsi(new IntPtr(this.stream->language)); CodecContext = new CodecContext((IntPtr)this.stream->codec); }
internal Codec(IntPtr ptr, CodecContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (ptr == IntPtr.Zero) { throw new ArgumentException("Null pointer"); } this.ptr = ptr; this.context = context; this.codec = (AVCodec *)ptr; Name = Marshal.PtrToStringAnsi((IntPtr)this.codec->name); }