コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }