Exemplo n.º 1
0
        public void Initialize()
        {
            if (this.context != null)
            {
                throw new Exception("Already Initialized");
            }

            this.context = new CodecContext(this);
        }
Exemplo n.º 2
0
        public void Initialize(MediaStream stream)
        {
            if (this.context != null)
            {
                throw new Exception("Already Initialized");
            }

            Stream = stream ?? throw new ArgumentNullException(nameof(stream));

            this.context = new CodecContext(stream.Pointer->codec);

            //  context.Pointer->codec = this.pointer
        }
Exemplo n.º 3
0
        protected Codec(AVCodecContext *context, CodecType type)
        {
            Id   = (context->codec_id).ToCodecId();
            Type = type;

            this.pointer = context->codec;

            if (pointer == null)
            {
                pointer = Get(Id, Type);
            }

            this.context = new CodecContext(context);
        }