IMFByteStream interface (mfobjects.h)

Represents a byte stream from some data source, which might be a local file, a network file, or some other source. The IMFByteStream interface supports the typical stream operations, such as reading, writing, and seeking.

Inheritance

The IMFByteStream interface inherits from the IUnknown interface. IMFByteStream also has these types of members:

Methods

The IMFByteStream interface has these methods.

 
IMFByteStream::BeginRead

Begins an asynchronous read operation from the stream.
IMFByteStream::BeginWrite

Begins an asynchronous write operation to the stream.
IMFByteStream::Close

Closes the stream and releases any resources associated with the stream, such as sockets or file handles. This method also cancels any pending asynchronous I/O requests.
IMFByteStream::EndRead

Completes an asynchronous read operation.
IMFByteStream::EndWrite

Completes an asynchronous write operation.
IMFByteStream::Flush

Clears any internal buffers used by the stream. If you are writing to the stream, the buffered data is written to the underlying file or device.
IMFByteStream::GetCapabilities

Retrieves the characteristics of the byte stream.
IMFByteStream::GetCurrentPosition

Retrieves the current read or write position in the stream.
IMFByteStream::GetLength

Retrieves the length of the stream.
IMFByteStream::IsEndOfStream

Queries whether the current position has reached the end of the stream.
IMFByteStream::Read

Reads data from the stream.
IMFByteStream::Seek

Moves the current position in the stream by a specified offset.
IMFByteStream::SetCurrentPosition

Sets the current read or write position.
IMFByteStream::SetLength

Sets the length of the stream.
IMFByteStream::Write

Writes data to the stream.

Remarks

The following functions return IMFByteStream pointers for local files:

A byte stream for a media source can be opened with read access. A byte stream for an archive media sink should be opened with both read and write access. (Read access may be required, because the archive sink might need to read portions of the file as it writes.)

Some implementations of this interface also expose one or more of the following interfaces:

This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:
  • Windows XP with Service Pack 2 (SP2) and later.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (October 2006 Update Rollup for Windows XP Media Center Edition) installed.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header mfobjects.h (include Mfidl.h)

See also

Byte Stream Attributes

IMFByteStreamBuffering

Media Foundation Interfaces