Skip to main content
IMFByteStream interface

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.

Members

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

Methods

The IMFByteStream interface has these methods.

MethodDescription
BeginRead

Begins an asynchronous read operation from the stream.

BeginWrite

Begins an asynchronous write operation to the stream.

Close

Closes the stream and releases any resources associated with the stream.

EndRead

Completes an asynchronous read operation.

EndWrite

Completes an asynchronous write operation.

Flush

Clears any internal buffers used by the stream.

GetCapabilities

Retrieves the characteristics of the byte stream.

GetCurrentPosition

Retrieves the current read or write position in the stream.

GetLength

Retrieves the length of the stream.

IsEndOfStream

Queries whether the current position has reached the end of the stream.

Read

Reads data from the stream.

Seek

Moves the current position in the stream by a specified offset.

SetCurrentPosition

Sets the current read or write position.

SetLength

Sets the length of the stream.

Write

Writes data to the stream.

 

Remarks

The following functions return IMFByteStream pointers for local files:

A byte stream for a media souce 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

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfobjects.h (include Mfidl.h)

Library

Mfuuid.lib

See also

Byte Stream Attributes
IMFByteStreamBuffering
Media Foundation Interfaces