ltmmSampleTarget.GetSample Method

Visual Basic Example

Syntax

object.GetSample(TimeOut As Long) As ltmmMediaSample

Remarks

Retrieves a delivered media sample.

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:

ltmmSampleTarget.GetConnectedMediaType Method, ltmmSampleTarget.SetAcceptedMediaType Method, ltmmSampleTarget.GetAcceptedMediaType Method, ltmmSampleTarget.GetSample Method

Topics:

ltmmSampleTarget Object

 

ltmmMediaSample Object