avformat_open_input() приватный Метод

private avformat_open_input ( [ pFormatContext, [ filename, IntPtr fmt, IntPtr options ) : Int32
pFormatContext [
filename [
fmt IntPtr
options IntPtr
Результат System.Int32
Пример #1
0
        public IAVStream GetAVStream(string fileName)
        {
            if (fileName == string.Empty)
            {
                throw new Exception("No Input file");
            }

            FileInfo info        = new FileInfo(fileName);
            string   file        = info.FullName;
            IntPtr   fileContext = IntPtr.Zero;
            int      ret         = AV.avformat_open_input(out fileContext, file, IntPtr.Zero, IntPtr.Zero);

            if (ret < 0)
            {
                throw new InvalidOperationException("can not open input file");
            }

            ret = AV.avformat_find_stream_info(fileContext, IntPtr.Zero);
            if (ret < 0)
            {
                throw new InvalidOperationException("can not find stream info");
            }

            return(new AVStream(fileContext));
        }