Creating and Modifying the XML File for the DirectShow Playback and Latency Tests (Windows Embedded CE 6.0)
1/6/2010
A media XML file can be found under private\test\multimedia\directx\dshow\playback\tests\XMLSuites\CETK_playbacktests.xml. You can update the file provided with your correct server paths, or create your own and update the command line to point to your XML file; see Command Line Parameters for the DirectShow Playback and Latency Tests.
Add or remove tests from the XML suite to change the test cases that run. You can also update parameters for the tests using the XML file, as described below. It is good practice to change the XML file as part of the source enlistment; then when you rebuild your source directory, the XML file in the source will overwrite the XML file on the device or release directory.
The XML schema is as follows.
<?xml version="1.0" encoding="utf-8" ?>
<TestConfig Name="" Desc="" GenerateId=>
<MediaList>
<Media>
<Name></Name>
<FileName></FileName>
<Description></Description>
<BaseUrl>
<IIS_HTTP></IIS_HTTP>
<WMS_HTTP></WMS_HTTP>
<MMSU></MMSU>
<release></release>
<Disk></Disk>
</BaseUrl>
</Media>
</MediaList>
<TestList>
<TestGroup Name="" TestIdBase="">
<Test Name="" Desc="">
<TestID></TestID>
<Media></Media>
<DownloadTo></DownloadTo>
<FilterList></FilterList>
<PositionList></PositionList>
<StateChangeSequence Desc="Type,HowMany,TimeBetween"></StateChangeSequence>
<Verify>
<CorrectGraph></CorrectGraph>
<PlaybackDuration></PlaybackDuration>
<StartupLatency></StartupLatency>
<VerifyStateChangeLatency></VerifyStateChangeLatency>
<DecodedVideoLatencyRunToFirstSample></DecodedVideoLatencyRunToFirstSample>
<DecodedVideoLatencyPauseToFirstSample></DecodedVideoLatencyPauseToFirstSample>
</Verify>
</Test>
</TestGroup>
</TestList>
</TestConfig>
The root node of the XML config file contains the TestConfig node. The TestConfig node contains a media list node MediaList and a test list node TestList. The media list can be wholly contained within the config file or can refer to a different file which contains the actual list of media. The test list can be organized into Test and TestGroup nodes. Test nodes contain the name of the test to be run, the media to run on and the parameters for the test. TestGroup nodes serve to logically group together Test nodes. They also serve to specify the test id base for the group of test nodes which then get numbered sequentially following the test id base.
The following table lists the XML nodes, starting with the root node, and describes what each node can contain.
XML Node | Schema |
---|---|
TestConfig – the root node of the config file which contains a optional media list and a test list |
<TestConfig optional:GenerateId="true"> Optional:<MediaList>…</MediaList> Mandatory:<TestList>…</TestList> </TestConfig> Attribute: GenerateId="true" – enables automatic generation of test ids All other attributes are ignored |
MediaList - lists the media to be used or contains a pointer to a separate file containing the media list. |
<MediaList Container="filename"> The Container attribute is optional. If it is not present then at least one media element must be present <Media>…</Media> </MediaList> Attribute: Container="filepath", the path and filename |
Media – gives detail about the media clip |
<Media> <Name>friendly name to be referred in the xml file</Name> <FileName>name of the actual file</FileName> <Description>description of clip(informative only)</Description> <BaseUrl> <IIS_HTTP>http path of file on IIS server</IIS_HTTP> <WMS_HTTP>http path of file on WMS server</WMS_HTTP> <MMSU>mms path of file</MMSU> <release>release path</release> <Disk>path of file on storage media</Disk> </BaseUrl> </Media> |
TestList – lists the tests to be run. |
<TestList> Contains 0 or more TestGroup or Test nodes </TestList> |
TestGroup – allows tests to be logically grouped and also allows specifying test base ids |
<TestGroup Name="groupname" TestIdBase="base"> Contains 0 or more Test nodes </TestGroup> Attribute: TestIdBase contains the base id for the test group. This is used if GenerateId is set to "true" in TestConfig and all the tests in the TestGroup node will be numbered sequentially starting from the base id. |
Verify – lists the verifiers to be used |
<Verify> Contains 0 or more verifier nodes </Verify> These verifier nodes are specified in the table following this one. |
TestId – lists test ids to be used if automatic generation is not enabled. |
<TestID>DWORD</TestID> |
Media – lists the (1 or more) media+protocol to be used |
<Media> medianame:protocol,medianame:protocol,… <Media> Medianame is the name given in the <Name> tag of the <Media> object |
DownloadTo – specifies the location where the media will be staged before being used |
<DownloadTo>directory path</DownloadTo> |
PositionList – lists the positions (as % of duration) to be used |
<PositionList> pos1,pos2,…,posN </PositionsList> Each posN is a number between 0:100 that represents a position in the media as a percentage of the duration. For instance, if the duration is 10 seconds, then pos=30 represents 3 seconds. |
FilterList –lists the filter names |
<FilterList> NSSOURCE:…:VIDREND </FilterList> The filter names are actually the "wellknownname' of the filter to the test. The only filters accepted are the ones specified in the test binary. Currently accepted values: WMADEC, WMVDEC, MP43DEC, MPGDEC, MP3DEC, MP13DECDMO, MP13DEC, MP2ADEC, MP2VDEC, MP2VDEC, MP2VENC, AVISPLIT, WAVPAR, AVISPLIT, MPGSPLIT, MPEG2DMUX, MPEG2Demux, AUDREND, VIDREND, ICMDISP, ACMDISP, NSSOURCE, ASYNCRDR, URLRDR, CLRCONV, AVIMUX, MPEGMUX, OVMIXER, FILEWR. For a full list of these filters and details, look at the map structure at line 122 of Playback\Framework\FilterDesc.cpp in the test source code. For future releases, the test will be configurable to recognize new filters. |
StateChangeSequece – specifies the state change pattern and number of state changes |
<StateChangeSequence> InitialState,Sequence,NumStateChanges,DelayBetweenChangesInMilliseconds </StateChangeSequence> InitialState can be Stopped, Paused, Running Sequence can be PlayPause, PlayStop, PauseStop, RandomSequence |
Test – specifies the actual test to be run and the parameters. |
<Test Name="testname" Desc="desc">params </Test>. Attributes: Name specifies the test function to be run. This string is associated with the test function in an internal function table. Desc is concatenated to the generic description of the test when listing out tests. The <Test> tag contains parameters specific to the type of test description expected for this test. These parameters are specified in a table below. |
The following table shows the nodes that can be included under the <Verify> tag.
Node | Description |
---|---|
CorrectGraph – verifies that the listed filters are part of the connected graph |
<CorrectGraph>list of filter separated by ‘:'</CorrectGraph> The only filters accepted are the ones specified in the test binary. Currently accepted values: WMADEC, WMVDEC, MP43DEC, MPGDEC, MP3DEC, MP13DECDMO, MP13DEC, MP2ADEC, MP2VDEC, MP2VDEC, MP2VENC, AVISPLIT, WAVPAR, AVISPLIT, MPGSPLIT, MPEG2DMUX, MPEG2Demux, AUDREND, VIDREND, ICMDISP, ACMDISP, NSSOURCE, ASYNCRDR, URLRDR, CLRCONV, AVIMUX, MPEGMUX, OVMIXER, FILEWR. For a full list of these filters and details, look at the map structure at line 122 of Playback\Framework\FilterDesc.cpp in the test source code. For future releases, the test will be configurable to recognize new filters. |
PlaybackDuration – verifies that the clip played for the duration we expected. Will fail if we fail both the % and the time threashold |
<PlaybackDuration>acceptable threshold in % of total duration, acceptable threshold in milliseconds</PlaybackDuration> |
StartupLatency – measures how many milliseconds from the time we started playing the clip (called Run) to when we get the first sample out of the decoder |
<StartupLatency>acceptable latency in milliseconds</StartupLatency> |
VerifyStateChangeLatency – measures how much time (in milliseconds) it takes to change filter graph state between specified states |
<VerifyStateChangeLatency>acceptable latency in milliseconds</VerifyStateChangeLatency> State changes to measure specified in the <StateChangeSequence> tag |
DecodedVideoLatencyRunToFirstSample - measures how long it takes from calling Run to getting the first frame out of the video decoder |
<DecodedVideoLatencyRunToFirstSample>acceptable latency in milliseconds</DecodedVideoLatencyRunToFirstSample> |
DecodedVideoLatencyPauseToFirstSample - measures how long it takes from calling Pause to getting the first frame out of the video decoder |
<DecodedVideoLatencyPauseToFirstSample>acceptable latency in milliseconds</DecodedVideoLatencyPauseToFirstSample> |
The following table shows the parameters expected for the <Test> tag.
Parameter expected | Description |
---|---|
Playback test parameters |
Contains nodes in the following order. Optional nodes can be omitted, but the order must be maintained. Optional: <TestId>DWORD</TestId> Mandatory: <Media>one or more entries of the form "medianame:protocol" separated by ‘,'</Media> Optional: <DownloadTo>download path</DownloadTo> Optional: <PositionList>start position,stop position</PositionList> Optional: <Verify>…</Verify> |
Build test parameters |
Contains nodes in the following order. Optional nodes can be omitted, but the order must be maintained. Optional: <TestId>DWORD</TestId> Mandatory: <Media>one or more entries of the form "medianame:protocol" separated by ‘,'</Media> Optional: <DownloadTo>download path</DownloadTo> Optional: <FilterList> list of filters, separated by ‘:' </FilterList> Optional: <Verify>…</Verify> |
State change test parameters |
Contains nodes in the following order. Optional nodes can be omitted, but the order must be maintained. Optional: <TestId>DWORD</TestId> Mandatory: <Media>one or more entries of the form "medianame:protocol" separated by ‘,'</Media> Optional: <DownloadTo>download path</DownloadTo> Mandatory: <StateChangeSequence>…</StateChangeSequence> Optional: <Verify>…</Verify> |