Metadata Constants

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_wszAudioWAVECodecAudio codecWMDM_TYPE_DWORDDWORD
g_wszVideoFourCCCodecVideo codecWMDM_TYPE_DWORDDWORD
g_wszWMDMAlbumArtWhether or not the device supports album artWMDM_TYPE_BOOLBOOL
g_wszWMDMAlbumArtistTrack's Album's ArtistsWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMAlbumCoverDataAlbum art JPEG byte blobWMDM_TYPE_BINARYBYTE*
g_wszWMDMAlbumCoverDurationAlbum cover durationWMDM_TYPE_DWORDDWORD
g_wszWMDMAlbumCoverFormatAlbum art formatWMDM_TYPE_DWORDDWORD
g_wszWMDMAlbumCoverHeightAlbum art heightWMDM_TYPE_DWORDDWORD
g_wszWMDMAlbumCoverSizeAlbum art sizeWMDM_TYPE_DWORDDWORD
g_wszWMDMAlbumCoverWidthAlbum art widthWMDM_TYPE_DWORDDWORD
g_wszWMDMAlbumTitleTrack's Album TitleWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMAudioBitDepthAudio bit depthWMDM_TYPE_DWORDDWORD
g_wszWMDBackReferencesA reference to the container object. For example, an audio object would use this property to reference a playlist.WMDM_TYPE_STRINGLPCWSTR
g_wszWMDMAuthorDateContent authored dateWMDM_TYPE_DATEWMDMDATETIME
g_wszWMDMBitrateAudio bit rateWMDM_TYPE_DWORDDWORD
g_wszWMDMBitrateTypeThe 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.

g_wszWMDMBlockAlignmentBlock alignmentWMDM_TYPE_DWORDDWORD
g_wszWMDMBufferSizeBuffer sizeWMDM_TYPE_DWORDDWORD
g_wszWMDMBuyNowPurchase this album (required for album art)WMDM_TYPE_BOOLBOOL
g_wszWMDMByteBookmarkA bookmark identifying the last position played or viewed in a media object. (This bookmark is a zero-based byte offset.)WMDM_TYPE_QWORDQWORD
g_wszWMDMCategoryA text field indicating the genre of a media itemWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMCodecReserved for future useWMDM_TYPE_DWORDDWORD
g_wszWMDMComposerMusic composerWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMDataLengthThe data length for the referenced objectWMDM_TYPE_QWORDQWORD
g_wszWMDMDataOffsetA zero-based offset to the referenced objectWMDM_TYPE_QWORDQWORD
g_wszWMDMDataUnitsThe 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.

g_wszWMDMDescriptionTV series or photo descriptionWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMDestinationURLThe URL associated with an object.

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

g_wszWMDMRMIdReserved for future use
g_wszWMDMDevicePlayCountPlayback count on deviceWMDM_TYPE_DWORDDWORD
g_wszWMDMDurationMedia duration, in 100 ns unitsWMDM_TYPE_QWORDQWORD
g_wszWMDMEditorThe 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.

g_wszWMDMEncodingProfileThe WMV9 encoding profiles supported by a deviceWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMFileAttributesThe attributes for a file objectWMDM_TYPE_QWORDQWORD
g_wszWMDMediaClassPrimaryIDMusic, video, non-music audio, otherWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMFileCreationDateFile creation dateWMDM_TYPE_DATEWMDMDATETIME
g_wszWMDMFileNameFile name. Equivalent to calling IWMDMStorage::GetName.WMDM_TYPE_STRINGLPCWSTR
g_wszWMDMFileSizeFile size, in bytes. Equivalent to calling IWMDMStorage::GetSize.WMDM_TYPE_QWORDQWORD
g_wszWMDMFormatCodeFormat code for content format. It should be a WMDM_FORMATCODE


g_wszWMDMHeightVideo or image heightWMDM_TYPE_DWORDDWORD
g_wszWMDMIsProtectedWhether content is DRM protectedWMDM_TYPE_BOOLBOOL
g_wszWMDMIsRepeatTrue if not the first time episode has airedWMDM_TYPE_BOOLBOOL
g_wszWMDMKeyFrameDistanceKey frame distanceWMDM_TYPE_DWORDDWORD
g_wszWMDMLastModifiedDateDate/time file was last modified. Equivalent to calling IWMDMStorage::GetDate.WMDM_TYPE_DATEWMDMDATETIME
g_wszWMDMMediaClassSecondaryIDAudio books, music videos, talk radio, and so onWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMMediaCreditsTV credits (actors, director, producers)WMDM_TYPE_STRINGLPCWSTR
g_wszWMDMMediaGuidGlobally unique identifier for the media contentWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMMediaOriginalBroadcastDateTimeDate that episode first airedWMDM_TYPE_DATEWMDMDATETIME
g_wszWMDMMediaOriginalChannelChannel that episode was recorded fromWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMMediaStationNameTV station call letters or nameWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMMetaGenreContent type derived from primary & secondary Class IDWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMNonConsumableWhether 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_BOOLBOOL
g_wszWMDMNumChannelsNumber of channelsWMDM_TYPE_DWORDDWORD
g_wszWMDMObjectBookmarkA bookmark (in milliseconds) that specifies the last position in the media object that was played or viewedWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMOwnerThe e-mail address for the owner of a media objectWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMParentalRatingAdvisory ratingWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMPersistentUniqueIDDevice-generated unique ID for storageWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMPlayCountTotal count of file playbackWMDM_TYPE_DWORDDWORD
g_wszWMDMProviderCopyrightCopyright holder's nameWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMQualitySettingQuality settingWMDM_TYPE_DWORDDWORD
g_wszWMDMSampleRateSample rateWMDM_TYPE_DWORDDWORD
g_wszWMDMSourceURLThe source URL for a media objectWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMSubTitleDescriptionTV episode descriptionWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMSyncIDApplication generated GUID for sync purposesWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMSyncTimeDevice time stamp when copiedWMDM_TYPE_DATEWMDMDATETIME
g_wszWMDMTimeBookmarkA bookmark (in milliseconds) that specifies the last position played or viewedWMDM_TYPE_QWORDQWORD
g_wszWMDMTimeToLiveThe time (in minutes) until the content is updatedWMDM_TYPE_QWORDQWORD
g_wszWMDMTotalBitrateTotal bit rateWMDM_TYPE_DWORDDWORD
g_wszWMDMTrackTrack Number (1–99)WMDM_TYPE_DWORDDWORD
g_wszWMDMUserEffectiveRatingCalculated from user, service ratings, and play countWMDM_TYPE_DWORDDWORD
g_wszWMDMUserLastPlayTimeLast listened to or viewed time stampWMDM_TYPE_DATEWMDMDATETIME
g_wszWMDMUserRatingUser-set ratingWMDM_TYPE_DWORDDWORD
g_wszWMDMUserRatingOnDeviceUser-set rating changed on deviceWMDM_TYPE_DWORDDWORD
g_wszWMDMVideoBitrateVideo bit rateWMDM_TYPE_DWORDDWORD
g_wszWMDMWebmasterThe e-mail address of the webmaster responsible for a media objectWMDM_TYPE_STRINGLPCWSTR
g_wszWMDMWidthVideo or image widthWMDM_TYPE_DWORDDWORD
g_wszWMDMYearYear the album was releasedWMDM_TYPE_STRINGLPCWSTR


Device Metadata Constants

Device property Description PROPVARIANT type(vt) Comments
g_wszWMDMSupportedDevicePropertiesArray of property names for properties supported by deviceVT_BSTR | VT_ARRAY
g_wszWMDMDeviceFriendlyNameFriendly name of the deviceVT_BSTR
g_wszWMDMFormatsSupportedArray of format codes for the formats supported by deviceVT_UI4 | VT_ARRAY
g_wszWMDMFormatsSupportedAreOrderedIndicates 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.

g_wszWMDMSyncRelationshipIDSync relationship ID used by applicationVT_BSTR
g_wszWMDMDeviceModelNameDevice model nameVT_BSTR
g_wszWMDMDeviceFirmwareVersionFirmware versionVT_UI4
g_wszWMDMDeviceVendorExtensionVendor extension supported by deviceVT_BSTR
g_wszWMDMDeviceProtocolProtocol used for communication between host and the deviceVT_CLSIDPredefined values are:




g_wszWMDMDeviceServiceProviderVendorID of the vendor providing a Windows Media Device Manager service provider for the deviceVT_CLSIDPredefined values are:


g_wszWMDMCollectionIDReserved for future use.VT_BSTR
g_wszWMDMDeviceRevocationInfoThe revocation information for a device.

This information would include elements like the revocation URL.

g_wszWMDMSupportedDevicePropertiesArray of property names for properties supported by deviceVT_BSTR | VT_ARRAY
g_wszWMDMDeviceFriendlyNameFriendly name of the deviceVT_BSTR


Windows Portable Devices Metadata Constants

Windows Portable Devices property Description PROPVARIANT type(vt) Comments
g_wszWPDPassthroughPropertyValuesA binary large object (or BLOB) used to set or retrieve Windows Portable Devices propertiesWMDM_TYPE_BINARYAllows 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.


Related topics

Programming Reference



Community Additions