Xeno-rat
|
MediaFoundationReader supporting reading from a stream. More...
Public Member Functions | |
StreamMediaFoundationReader (Stream stream, MediaFoundationReaderSettings settings=null) | |
Constructs a new media foundation reader from a stream. | |
![]() | |
MediaFoundationReader (string file) | |
Creates a new MediaFoundationReader based on the supplied file. | |
MediaFoundationReader (string file, MediaFoundationReaderSettings settings) | |
Creates a new MediaFoundationReader based on the supplied file. | |
override int | Read (byte[] buffer, int offset, int count) |
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. | |
![]() | |
override void | Flush () |
Flushes the buffer of the current stream and causes any buffered data to be written to the underlying device. | |
override long | Seek (long offset, SeekOrigin origin) |
Sets the position within the current stream. | |
override void | SetLength (long length) |
Throws a NotSupportedException with the message "Can't set length of a WaveFormatString". | |
override void | Write (byte[] buffer, int offset, int count) |
Throws a NotSupportedException with the message "Can't write to a WaveFormatString". | |
void | Skip (int seconds) |
Skips the playback to a new position in the audio file based on the specified number of seconds. | |
virtual bool | HasData (int count) |
Checks if there is data available at the current position. | |
Protected Member Functions | |
override IMFSourceReader | CreateReader (MediaFoundationReaderSettings settings) |
Creates a new instance of IMFSourceReader with the specified settings. | |
![]() | |
MediaFoundationReader () | |
Default constructor. | |
void | Init (MediaFoundationReaderSettings initialSettings) |
Initializes the MediaFoundationReader with the specified settings. | |
override void | Dispose (bool disposing) |
Releases the unmanaged resources used by the ClassName and optionally releases the managed resources. | |
Private Attributes | |
readonly Stream | stream |
Additional Inherited Members | |
![]() | |
override WaveFormat | WaveFormat [get] |
WaveFormat of this stream (n.b. this is after converting to PCM) | |
override long | Length [get] |
The bytesRequired of this stream in bytes (n.b may not be accurate) | |
override long | Position [get, set] |
Current position within this stream. | |
![]() | |
WaveFormat | WaveFormat [get] |
Retrieves the WaveFormat for this stream. | |
override bool | CanRead [get] |
We can read from this stream. | |
override bool | CanSeek [get] |
We can seek within this stream. | |
override bool | CanWrite [get] |
We can't write to this stream. | |
virtual int | BlockAlign [get] |
The block alignment for this wavestream. Do not modify the Position to anything that is not a whole multiple of this value. | |
virtual TimeSpan | CurrentTime [get, set] |
The current position in the stream in Time format. | |
virtual TimeSpan | TotalTime [get] |
Total length in real-time of the stream (may be an estimate for compressed files) | |
![]() | |
![]() | |
EventHandler | WaveFormatChanged |
WaveFormat has changed. | |
MediaFoundationReader supporting reading from a stream.
|
inline |
Constructs a new media foundation reader from a stream.
|
inlineprotectedvirtual |
Creates a new instance of IMFSourceReader with the specified settings.
settings | The settings for the new IMFSourceReader instance. |
This method creates a new IMFSourceReader from the byte stream created using the provided stream. It then sets the stream selection for audio and video, and configures the current media type for audio based on the specified settings.
Reimplemented from NAudio.Wave.MediaFoundationReader.
|
private |