DMOTest

 

Test Suites

DMOTest supports two test suites:

Streaming Tests

These tests are designed to test whether the DMO processes data correctly. They require a file with test data. For more information, see DMO Test Application File Format and Creating Test Files.

1.0 DMO Streaming Test 1: Positive Timestamp Offset Test

This test uses the DMO to process all of the data in the test file. It writes the output to a temporary file. Then, it makes a second pass using the same data. In the second pass, the test application adds a positive offset to each time stamp on the input data. It writes the output to a second temporary file, and compares the two files. They should contain the same data.

1.1 DMO Streaming Test 2: Negative Timestamp Offset Test

This test is identical to the test described in 1.0, except that it adds a negative offset on the second pass, rather than a positive offset.

1.2 Test DMO_SET_TYPEF_CLEAR flag

This test verifies that the DMO correctly handles the DMO_SET_TYPEF_TEST_ONLY flag. If the media types are cleared on all of the DMO's streams, the DMO should accept new media types. The test sets media types for all the streams. Then it clears all the media types and tries to set the original types again.

1.3 Test zero-size buffers on ProcessInput

This method verifies that the DMO correctly handles zero-size buffers. First it calls the IMediaObject::ProcessInput method with a zero-size buffer. The DMO should return an error code. Then it calls the IMediaObject::ProcessOutput method. Again, the DMO should return an error code. Also, it should not return the DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE flag.

1.4 Test consistency of DMO_INPUT_STATUSF_ACCEPT_DATA flag

In the IMediaObject::GetInputStatus method, the DMO should return the DMO_INPUT_STATUSF_ACCEPT_DATA flag if it can accept more input. The reverse is also true: If the DMO does not return this flag, it should not accept more input.

This test attempts to process input in both situations. It verifies that the return code from the IMediaObject::ProcessInput method is consistent with the status reported by GetInputStatus.

API Tests

These tests are designed to verify that the DMO follows the IMediaObject specification, with regard to error codes, parameter checking, and so forth.

2.0 Test GetStreamCount

This test verifies that the IMediaObject::GetStreamCount method returns E_POINTER when given a NULL parameter.

2.1 Test GetInputType

This test verifies that the IMediaObject::GetInputType method correctly handles invalid parameters for the stream index and the media-type index.

2.2 Test Stream Index on GetInputStreamInfo

This test verifies that the IMediaObject::GetInputStreamInfo method correctly handles invalid stream indices. It also validates the flags returned by this method.

2.3 Test Stream Index on GetOutputStreamInfo

This test verifies that the IMediaObject::GetOutputStreamInfo method correctly handles invalid stream indices. It also validates the flags returned by this method.

2.4 Test Invalid Parameter on GetInputStreamInfo

This test verifies that the IMediaObject::GetInputStreamInfo method correctly handles NULL parameters. It also validates the flags returned by this method.

2.5 Test Invalid Parameter on GetOutputStreamInfo

This test verifies that the IMediaObject::GetOutputStreamInfo method correctly handles NULL parameters. It also validates the flags returned by this method.