IMpeg2Stream::SupplyDataBuffer method (mpeg2data.h)
[The feature associated with this page, Microsoft TV Technologies, is a legacy feature. Microsoft strongly recommends that new code does not use this feature.]
The SupplyDataBuffer method provides a buffer for the Mpeg2Stream object to write data.
Syntax
HRESULT SupplyDataBuffer(
[in] PMPEG_STREAM_BUFFER pStreamBuffer
);
Parameters
[in] pStreamBuffer
Pointer to an MPEG_STREAM_BUFFER structure allocated by the caller. This structure contains a pointer to the buffer, also allocated by the caller. The buffer must be at least 4096 bytes.
Return value
The method returns an HRESULT. Possible values include those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
Invalid argument or NULL parameter. |
|
Insufficient memory. |
|
Failure. |
Remarks
The first time this method is called, it starts a worker thread that streams data to the buffer. When the data arrives, the MPEG2Stream object signals the event that was passed to the IMpeg2Stream::Initialize method. (Typically an application specifies the event handle when it calls IMpeg2Data::GetStreamOfSections.)
When the event is signaled, examine the hr field of the MPEG_STREAM_BUFFER structure. If this value is a success code, the request was successful and the buffer contains valid data. To get more data, call the SupplyDataBuffer method again and wait for the event to be signaled.
The section headers are not converted from network byte order or otherwise processed.
If the object is still waiting for data, this method returns E_FAIL.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | mpeg2data.h |