using System; using System.Runtime.InteropServices; namespace NAudio.MediaFoundation { /// /// IMFMediaBuffer /// http://msdn.microsoft.com/en-gb/library/windows/desktop/ms696261%28v=vs.85%29.aspx /// [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("045FA593-8799-42b8-BC8D-8968C6453507")] public interface IMFMediaBuffer { /// /// Gives the caller access to the memory in the buffer. /// void Lock(out IntPtr ppbBuffer, out int pcbMaxLength, out int pcbCurrentLength); /// /// Unlocks a buffer that was previously locked. /// void Unlock(); /// /// Retrieves the length of the valid data in the buffer. /// void GetCurrentLength(out int pcbCurrentLength); /// /// Sets the length of the valid data in the buffer. /// void SetCurrentLength(int cbCurrentLength); /// /// Retrieves the allocated size of the buffer. /// void GetMaxLength(out int pcbMaxLength); } }