Share via


Metadata Constants

banner art

Metadata is descriptive information about the content transferred to or from a device. In Windows Media Device Manager, metadata consists of properties, where each property is a name-value pair. The name is always a wide-character string. The value is one of several defined data types described in the WMDM_TAG_DATATYPE enumeration.

Windows Media Device Manager has predefined common properties and it is strongly recommended that you use those instead defining new ones. For each predefined property, the SDK defines a global constant that contains the name string. You can reduce the chance of typographical errors by using the global constant. For example, the constant g_wszWMDMTitle is defined as "Title", corresponding to the Title property.

The following metadata property constants have been defined for use in this SDK. These are defined in mswmdm.h.

Storage Metadata Constants

Storage property Description Windows Media Device Manager type Underlying type
g_wszAudioWAVECodec Audio codec WMDM_TYPE_DWORD DWORD
g_wszVideoFourCCCodec Video codec WMDM_TYPE_DWORD DWORD
g_wszWMDMAlbumArt Whether or not the device supports album art WMDM_TYPE_BOOL BOOL
g_wszWMDMAlbumArtist Track's Album's Artists WMDM_TYPE_STRING LPCWSTR
g_wszWMDMAlbumCoverData Album art JPEG byte blob WMDM_TYPE_BINARY BYTE*
g_wszWMDMAlbumCoverDuration Album cover duration WMDM_TYPE_DWORD DWORD
g_wszWMDMAlbumCoverFormat Album art format WMDM_TYPE_DWORD DWORD
g_wszWMDMAlbumCoverHeight Album art height WMDM_TYPE_DWORD DWORD
g_wszWMDMAlbumCoverSize Album art size WMDM_TYPE_DWORD DWORD
g_wszWMDMAlbumCoverWidth Album art width WMDM_TYPE_DWORD DWORD
g_wszWMDMAlbumTitle Track's Album Title WMDM_TYPE_STRING LPCWSTR
g_wszWMDMAudioBitDepth Audio bit depth WMDM_TYPE_DWORD DWORD
g_wszWMDBackReferences A reference to the container object. For example, an audio object would use this property to reference a playlist. WMDM_TYPE_STRING LPCWSTR
g_wszWMDMAuthor Content author WMDM_TYPE_STRING LPCWSTR
g_wszWMDMAuthorDate Content authored date WMDM_TYPE_DATE WMDMDATETIME
g_wszWMDMBitrate Audio bit rate WMDM_TYPE_DWORD DWORD
g_wszWMDMBitrateType The MTP bit-rate type. (Currently not implemented.)

Valid values are:

MTP_BITRATETYPE_DISCRETE (0x001) which indicates that CBR and a discrete set of bit rates are supported.

MTP_BITRATETYPE_VARIABLE (0x0002) which indicates support for VBR.

MTP_BITRATE_TYPE_FREE (0x0003) which indicates that CBR and bit-rate values are continuous over a specified range.

WMDM_TYPE_DWORD DWORD
g_wszWMDMBlockAlignment Block alignment WMDM_TYPE_DWORD DWORD
g_wszWMDMBufferSize Buffer size WMDM_TYPE_DWORD DWORD
g_wszWMDMBuyNow Purchase this album (required for album art) WMDM_TYPE_BOOL BOOL
g_wszWMDMByteBookmark A bookmark identifying the last position played or viewed in a media object. (This bookmark is a zero-based byte offset.) WMDM_TYPE_QWORD QWORD
g_wszWMDMCategory A text field indicating the genre of a media item WMDM_TYPE_STRING LPCWSTR
g_wszWMDMCodec Reserved for future use WMDM_TYPE_DWORD DWORD
g_wszWMDMComposer Music composer WMDM_TYPE_STRING LPCWSTR
g_wszWMDMDataLength The data length for the referenced object WMDM_TYPE_QWORD QWORD
g_wszWMDMDataOffset A zero-based offset to the referenced object WMDM_TYPE_QWORD QWORD
g_wszWMDMDataUnits The units used for the data length (g_wszWMDMDataLength) and the data units (g_wszWMDMDataUnits) properties.

Units are assumed to be bytes if this property is not set.

WMDM_TYPE_DWORD DWORD
g_wszWMDMDescription TV series or photo description WMDM_TYPE_STRING LPCWSTR
g_wszWMDMDestinationURL The URL associated with an object.

This property is typically used for a media cast (or related) object.

WMDM_TYPE_STRING LPCWSTR
g_wszWMDMRMId Reserved for future use    
g_wszWMDMDevicePlayCount Playback count on device WMDM_TYPE_DWORD DWORD
g_wszWMDMDuration Media duration, in 100 ns units WMDM_TYPE_QWORD QWORD
g_wszWMDMEditor The email address for the managing editor associated with a media object.

This property is typically used to identify the managing editor for an RSS channel.

WMDM_TYPE_STRING LPCWSTR
g_wszWMDMEncodingProfile The WMV9 encoding profiles supported by a device WMDM_TYPE_STRING LPCWSTR
g_wszWMDMFileAttributes The attributes for a file object WMDM_TYPE_QWORD QWORD
g_wszWMDMediaClassPrimaryID Music, video, non-music audio, other WMDM_TYPE_STRING LPCWSTR
g_wszWMDMFileCreationDate File creation date WMDM_TYPE_DATE WMDMDATETIME
g_wszWMDMFileName File name. Equivalent to calling  IWMDMStorage::GetName. WMDM_TYPE_STRING LPCWSTR
g_wszWMDMFileSize File size, in bytes. Equivalent to calling IWMDMStorage::GetSize. WMDM_TYPE_QWORD QWORD
g_wszWMDMFormatCode Format code for content format. It should be a WMDM_FORMATCODE

 value.

WMDM_TYPE_DWORD WMDM_FORMATCODE
g_wszWMDMFrameRate Frame rate WMDM_TYPE_DWORD DWORD
g_wszWMDMGenre Track's Genre WMDM_TYPE_STRING LPCWSTR
g_wszWMDMHeight Video or image height WMDM_TYPE_DWORD DWORD
g_wszWMDMIsProtected Whether content is DRM protected WMDM_TYPE_BOOL BOOL
g_wszWMDMIsRepeat True if not the first time episode has aired WMDM_TYPE_BOOL BOOL
g_wszWMDMKeyFrameDistance Key frame distance WMDM_TYPE_DWORD DWORD
g_wszWMDMLastModifiedDate Date/time file was last modified. Equivalent to calling IWMDMStorage::GetDate. WMDM_TYPE_DATE WMDMDATETIME
g_wszWMDMMediaClassSecondaryID Audio books, music videos, talk radio, and so on WMDM_TYPE_STRING LPCWSTR
g_wszWMDMMediaCredits TV credits (actors, director, producers) WMDM_TYPE_STRING LPCWSTR
g_wszWMDMMediaGuid Globally unique identifier for the media content WMDM_TYPE_STRING LPCWSTR
g_wszWMDMMediaOriginalBroadcastDateTime Date that episode first aired WMDM_TYPE_DATE WMDMDATETIME
g_wszWMDMMediaOriginalChannel Channel that episode was recorded from WMDM_TYPE_STRING LPCWSTR
g_wszWMDMMediaStationName TV station call letters or name WMDM_TYPE_STRING LPCWSTR
g_wszWMDMMetaGenre Content type derived from primary & secondary Class ID WMDM_TYPE_STRING LPCWSTR
g_wszWMDMNonConsumable Whether content is stored as an opaque data blob on the device. If so, the device does not need to understand the format or render it. WMDM_TYPE_BOOL BOOL
g_wszWMDMNumChannels Number of channels WMDM_TYPE_DWORD DWORD
g_wszWMDMObjectBookmark A bookmark (in milliseconds) that specifies the last position in the media object that was played or viewed WMDM_TYPE_STRING LPCWSTR
g_wszWMDMOwner The e-mail address for the owner of a media object WMDM_TYPE_STRING LPCWSTR
g_wszWMDMParentalRating Advisory rating WMDM_TYPE_STRING LPCWSTR
g_wszWMDMPersistentUniqueID Device-generated unique ID for storage WMDM_TYPE_STRING LPCWSTR
g_wszWMDMPlayCount Total count of file playback WMDM_TYPE_DWORD DWORD
g_wszWMDMProviderCopyright Copyright holder's name WMDM_TYPE_STRING LPCWSTR
g_wszWMDMQualitySetting Quality setting WMDM_TYPE_DWORD DWORD
g_wszWMDMSampleRate Sample rate WMDM_TYPE_DWORD DWORD
g_wszWMDMScanType Scan type WMDM_TYPE_DWORD DWORD
g_wszWMDMSourceURL The source URL for a media object WMDM_TYPE_STRING LPCWSTR
g_wszWMDMSubTitle TV episode title WMDM_TYPE_STRING LPCWSTR
g_wszWMDMSubTitleDescription TV episode description WMDM_TYPE_STRING LPCWSTR
g_wszWMDMSyncID Application generated GUID for sync purposes WMDM_TYPE_STRING LPCWSTR
g_wszWMDMSyncTime Device time stamp when copied WMDM_TYPE_DATE WMDMDATETIME
g_wszWMDMTimeBookmark A bookmark (in milliseconds) that specifies the last position played or viewed WMDM_TYPE_QWORD QWORD
g_wszWMDMTimeToLive The time (in minutes) until the content is updated WMDM_TYPE_QWORD QWORD
g_wszWMDMTitle Track title WMDM_TYPE_STRING LPCWSTR
g_wszWMDMTotalBitrate Total bit rate WMDM_TYPE_DWORD DWORD
g_wszWMDMTrack Track Number (1–99) WMDM_TYPE_DWORD DWORD
g_wszWMDMTrackMood Track's mood WMDM_TYPE_STRING LPCWSTR
g_wszWMDMUserEffectiveRating Calculated from user, service ratings, and play count WMDM_TYPE_DWORD DWORD
g_wszWMDMUserLastPlayTime Last listened to or viewed time stamp WMDM_TYPE_DATE WMDMDATETIME
g_wszWMDMUserRating User-set rating WMDM_TYPE_DWORD DWORD
g_wszWMDMUserRatingOnDevice User-set rating changed on device WMDM_TYPE_DWORD DWORD
g_wszWMDMVideoBitrate Video bit rate WMDM_TYPE_DWORD DWORD
g_wszWMDMWebmaster The e-mail address of the webmaster responsible for a media object WMDM_TYPE_STRING LPCWSTR
g_wszWMDMWidth Video or image width WMDM_TYPE_DWORD DWORD
g_wszWMDMYear Year the album was released WMDM_TYPE_STRING LPCWSTR

Device Metadata Constants

Device property Description PROPVARIANT type(vt) Comments
g_wszWMDMSupportedDeviceProperties Array of property names for properties supported by device VT_BSTR | VT_ARRAY  
g_wszWMDMDeviceFriendlyName Friendly name of the device VT_BSTR  
g_wszWMDMFormatsSupported Array of format codes for the formats supported by device VT_UI4 | VT_ARRAY  
g_wszWMDMFormatsSupportedAreOrdered Indicates whether the format returned in the supported-formats array are ordered according to device preference.

If this property is set to TRUE, applications should transfer content using the format codes that appear first in the array.

VT_BOOL  
g_wszWMDMSyncRelationshipID Sync relationship ID used by application VT_BSTR  
g_wszWMDMDeviceModelName Device model name VT_BSTR  
g_wszWMDMDeviceFirmwareVersion Firmware version VT_UI4  
g_wszWMDMDeviceVendorExtension Vendor extension supported by device VT_BSTR  
g_wszWMDMDeviceProtocol Protocol used for communication between host and the device VT_CLSID Predefined values are:

WMDM_DEVICE_PROTOCOL_MTP,

WMDM_DEVICE_PROTOCOL_RAPI,

WMDM_DEVICE_PROTOCOL_MSC

g_wszWMDMDeviceServiceProviderVendor ID of the vendor providing a Windows Media Device Manager service provider for the device VT_CLSID Predefined values are:

WMDM_SERVICE_PROVIDER_VENDOR_MICROSOFT

g_wszWMDMCollectionID Reserved for future use. VT_BSTR  
g_wszWMDMDeviceRevocationInfo The revocation information for a device.

This information would include elements like the revocation URL.

VT_BSTR  
g_wszWMDMSupportedDeviceProperties Array of property names for properties supported by device VT_BSTR | VT_ARRAY  
g_wszWMDMDeviceFriendlyName Friendly name of the device VT_BSTR  

Windows Portable Devices Metadata Constants

Windows Portable
Devices property
Description PROPVARIANT
type(vt)
Comments
g_wszWPDPassthroughPropertyValues A binary large object (or BLOB) used to set or retrieve Windows Portable Devices properties WMDM_TYPE_BINARY Allows Windows Media Device Manager clients to read and write Windows Portable Device properties that are not found in Windows Media Device Manager.

Note that some Windows Portable Device properties may not be accessible.

See Also