using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SharpDX.MediaFoundation
{
public partial class SinkWriter
{
///
/// Gets statistics about the performance of the sink writer.
///
///
The zero-based index of a stream to query, or to query the media sink itself.
/// A reference to an structure. Before calling the method, set the cb member to the size of the structure in bytes. The method fills the structure with statistics from the sink writer.
/// This method can return one of these values.
| Return code | Description |
| Success. |
| Invalid stream number. |
?
///
/// This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.
///
///
/// dd374650
/// HRESULT IMFSinkWriter::GetStatistics([In] unsigned int dwStreamIndex,[Out] MF_SINK_WRITER_STATISTICS* pStats)
/// IMFSinkWriter::GetStatistics
public void GetStatistics(int dwStreamIndex, out SharpDX.MediaFoundation.SinkWriterStatistics statsRef)
{
unsafe
{
statsRef = new SharpDX.MediaFoundation.SinkWriterStatistics();
statsRef.Cb = sizeof(SharpDX.MediaFoundation.SinkWriterStatistics);
fixed (void* statsRefPtr = &statsRef)
{
GetStatistics_(dwStreamIndex, new IntPtr(statsRefPtr));
}
}
}
}
}