次の方法で共有


IMediaStream interface (mmstream.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note  This interface is deprecated. New applications should not use it.
 
The IMediaStream interface provides access to the characteristics of a media stream, such as the stream's media type and purpose ID. It also has methods that create data samples.

For sample code that implements the multimedia streaming interfaces, see Multimedia Streaming Sample Code.

Implement this interface when you want to add media type-specific functionality to your media stream. This interface is implemented on multimedia stream objects. IMediaStream provides generic sample-creation methods, but you usually want to write a more powerful version of these methods that will take advantage of your media type's specific characteristics.

Use this interface when your application needs to access a stream's media type information and create data samples.

Inheritance

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

Methods

The IMediaStream interface has these methods.

 
IMediaStream::AllocateSample

Note  This interface is deprecated. New applications should not use it. Allocates a new stream sample object for the current media stream.
IMediaStream::CreateSharedSample

Note  This interface is deprecated. New applications should not use it. Creates a new stream sample that shares the same backing object as the existing sample.
IMediaStream::GetInformation

Note  This interface is deprecated. New applications should not use it. Retrieves the stream's purpose ID and media type.
IMediaStream::GetMultiMediaStream

Note  This interface is deprecated. New applications should not use it. Retrieves a pointer to the multimedia stream that contains the specified media stream.
IMediaStream::SendEndOfStream

Note  This interface is deprecated. New applications should not use it. Forces the current stream to end. If the current stream isn't writable, this method does nothing.
IMediaStream::SetSameFormat

Note  This interface is deprecated. New applications should not use it. Sets the media stream to the same format as a previous stream.

Requirements

Requirement Value
Target Platform Windows
Header mmstream.h