ltmmMultiStreamTarget.GetSample Method

Visual Basic Example 1

Visual Basic Example 2

 

Syntax

object.GetSample(Stream As Long, TimeOut As Long) As ltmmMediaSample

Remarks

Retrieves a delivered media sample from a stream.

If the method fails, an error is raised. For more information, refer to the Error Codes.

Common errors:

VFW_E_TIMEOUT - [0x8004022E] The interval specified in TimeOut has elapsed before a sample was ready. You can call the function again or increase the timeout value.

VFW_E_SAMPLE_REJECTED_EOS - [0x8004022C] The end of stream has been reached. There are no more samples available for this stream.

If you get the sample in .NET, call System.Runtime.InteropServices.Marshal.ReleaseComObject to release the sample before getting another sample.

See Also

Elements:

ltmmMultiStreamTarget.StreamCount Propertyd, ltmmMultiStreamTarget.SetAcceptedMediaType Method, ltmmMultiStreamTarget.GetAcceptedMediaType Method, ltmmMultiStreamTarget.GetConnectedMediaType Method, ltmmMultiStreamTarget.WaitForSample Method

Topics:

ltmmMultiStreamTarget Object

 

ltmmMediaType Object