sourceFilter Element
[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The sourceFilter element contains elements that select items from a library.
<sourceFilter
type = "string"
id = "WPL_GUID"
name = "string"
>
</sourceFilter>
Attributes
-
type
-
The type of filter object. There are no predefined values for this attribute.
-
id (required)
-
The GUID that uniquely identifies the source filter object. The source filter object's methods are invoked to interpret the fragment elements contained in the sourceFilter element.
Value Description {4202947A-A563-4B05-A754-A1B4B5989849} The GUID for the "Music in my library" source filter. {B2D9BDDC-8E49-444B-9BA4-193ABF9C7870} The GUID for the "Video in my library" source filter. {CC823400-A8E4-4081-B073-D3B6D952FE69} The GUID for the "Pictures in my library" source filter. {E5415A66-7763-4BDE-B97F-5557CA73C303} The GUID for the "TV shows in my library" source filter. -
name (required)
-
The name of the filter object.
Value Description Music in my library A filter object that selects specified items from the set of music items in the user's library. Video in my library A filter object that selects specified items from the set of video items in the user's library. Pictures in my library A filter object that selects specified items from the set of photo items in the user's library. TV shows in my library A filter object that selects specified items from the set of TV items in the user's library.
Parent/Child Elements
Hierarchy | Elements |
---|---|
Parent | querySet |
Child | fragment |
Remarks
The sourceFilter element selects items from the library without regard for the size of the result set. The filter element, on the other hand, limits the size of the result set.
Examples
<sourceFilter
type = "smartFilterObject"
id = "{4202947A-A563-4B05-A754-A1B4B5989849}"
name = "Music in my library">
<fragment name = "Genre">
<argument name = "condition">Is</argument>
<argument name = "value">Rock</argument>
</fragment>
<fragment name = "Album Artist">
<argument name = "condition">Is Not</argument>
<argument name = "value">Brenda Diaz</argument>
</fragment>
</sourceFilter>
Requirements
Requirement | Value |
---|---|
Version |
Windows Media Player 9 Series or later. |