private avformat_open_input ( [ pFormatContext, [ filename, IntPtr fmt, IntPtr options ) : |
||
pFormatContext | [ | |
filename | [ | |
fmt | IntPtr | |
options | IntPtr | |
Résultat |
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)); }