public AudioStream(int filePtr, IntPtr streamPtr) : base(filePtr, streamPtr) { int size = Marshal.SizeOf(waveFormat); AviInterop.AVIStreamReadFormat(StreamPointer, 0, ref waveFormat, ref size); }
public VideoStream(int filePtr, IntPtr streamPtr) : base(filePtr, streamPtr) { var bih = new AviInterop.BitmapInfoHeader(); int size = Marshal.SizeOf(bih); AviInterop.AVIStreamReadFormat(StreamPointer, 0, ref bih, ref size); AviInterop.StreamInfo streamInfo = GetStreamInfo(); FrameRate = streamInfo.dwRate / (float)streamInfo.dwScale; Width = streamInfo.rcFrame.right; Height = streamInfo.rcFrame.bottom; FrameSize = bih.biSizeImage; CountBitsPerPixel = CalculateBitsPerPixel(bih.biBitCount); FirstFrame = AviInterop.AVIStreamStart(StreamPointer); CountFrames = AviInterop.AVIStreamLength(StreamPointer); }