Microsoft DirectX 8.0 |
This interface contains methods for creating multimedia streams with arbitrary media types. Use this interface if you need to create a multimedia stream with a format that is not supported by the other Microsoft® DirectShow® multimedia streaming interfaces.
This interface inherits from the IMediaStream interface.
Note For video streams, use the IDirectDrawMediaStream interface instead of this interface. For audio streams, use the IAudioMediaStream interface.
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IMediaStream methods Description GetMultiMediaStream Retrieves a pointer to the multimedia stream that contains the specified media stream. GetInformation Retrieves the stream's purpose identifier (ID) and media type. SetSameFormat Sets the media stream to the same format as a previous stream. AllocateSample Allocates a new stream sample object for the current media stream. CreateSharedSample Creates a new stream sample that shares the same backing object as the existing sample. SendEndOfStream Forces the current stream to end. If the current stream is not writable, calling this method has no effect. IAMMediaTypeStream methods Description GetFormat Retrieves the format of the stream. SetFormat Sets the format of the stream. CreateSample Creates a stream sample and optionally specifies the sample buffer. GetStreamAllocatorRequirements Retrieves the allocator requirements for the stream. This method is not currently implemented. SetStreamAllocatorRequirements Sets the allocator requirements for the stream. This method is not currently implemented.
Creates a stream sample and optionally specifies the sample buffer.
Syntax
HRESULT CreateSample( long lSampleSize, BYTE *pbBuffer, DWORD dwFlags, IUnknown *pUnkOuter, IAMMediaTypeSample **ppAMMediaTypeSample );
Parameters
- lSampleSize
- [in] Size of the sample.
- pbBuffer
- [in] [optional] Pointer to an array of bytes that contains the sample data, or NULL.
- dwFlags
- [in] Reserved.
- pUnkOuter
- [in] [optional] Pointer to the interface of an object that aggregates the stream sample.
- ppAMMediaTypeSample
- [in] Address of an IAMMediaTypeSample interface pointer that receives a pointer to the created sample.
Return Value
Returns one of the following values.
E_OUTOFMEMORY Insufficient memory. E_POINTER NULL pointer argument. S_OK Success.
Remarks
If pUnkOuter is non-NULL, the new stream sample is aggregated into the specified object. Filters that receive the sample can then query it for interfaces supported by the aggregating object.
Retrieves the format of the stream.
Syntax
HRESULT GetFormat( AM_MEDIA_TYPE *pMediaType, DWORD dwFlags );
Parameters
- pMediaType
- [out] Pointer to an AM_MEDIA_TYPE structure that receives the stream format.
- dwFlags
- [in] Reserved.
Return Value
Returns one of the following values.
MS_E_NOSTREAM No stream is associated with this object. S_OK Success.
Retrieves the allocator requirements for the stream. This method is not currently implemented.
Syntax
HRESULT GetStreamAllocatorRequirements( ALLOCATOR_PROPERTIES *pProps );
Parameters
- pProps
- [out] Pointer to an ALLOCATOR_PROPERTIES structure that receives the stream allocator requirements.
Return Value
Returns E_FAIL.
Sets the format of the stream.
Syntax
HRESULT SetFormat( AM_MEDIA_TYPE *pMediaType, DWORD dwFlags );
Parameters
- pMediaType
- [in] Pointer to an AM_MEDIA_TYPE structure that contains the stream format.
- dwFlags
- [in] Reserved.
Return Value
Returns one of the following values.
MS_E_SAMPLEALLOC The stream has already allocated a sample with another media type. S_OK Success.
Sets the allocator requirements for the stream. This method is not currently implemented.
Syntax
HRESULT SetStreamAllocatorRequirements( ALLOCATOR_PROPERTIES *pProps );
Parameters
- pProps
- [in] Pointer to an ALLOCATOR_PROPERTIES structure that contains the stream allocator requirements.
Return Value
Returns E_FAIL.