Metadata Messages

This chapter describes the MediaFS device control messages defined to obtain media file metadata from a media device accessed and managed through MediaFS, or that are outside MediaFS. These message are:

Metadata retrieval messages to can be issued to:

Behavior of metadata requests

Metadata retrieved by a call to devctl() with a DCMD_MEDIA_* metadata retrieval message is returned as a NULL-terminated string.

Return

If the queried media device does no support the requested metadata query, the devctl() call with the DCMD_MEDIA_* metadata query message returns ENOTSUP.

Metadata for the currently playing file

To request metadata for the currently playing media file, use a metadata retrieval message with a call to the MediaFS control file, or to the current symbolic link.

Successful completion of a devctl() call with a metadata retrieval device control message to the control file or to the current symbolic link retrieves the requested metadata for the currently playing file.

Metadata for a specified file

To request metadata for a specific media file, use a metadata retrieval message with a call to that file.

Successful completion of a devctl() call with a metadata retrieval device control message to a file that is not the MediaFS control file or the current symbolic link retrieves the requested metadata for the specified file.

DCMD_MEDIA_ALBUM

DCMD_MEDIA_ALBUM queries a file for its album metadata, which the call returns in a NULL-terminated string. An empty string is valid if the album metadata is not known.

Buffer: char[1]

DCMD_MEDIA_ARTIST

DCMD_MEDIA_ARTIST queries a file for its artist metadata, which the call returns in a NULL-terminated string. An empty string is valid if the artist metadata is not knowm.

Buffer: char[1]

DCMD_MEDIA_COMMENT

DCMD_MEDIA_COMMENT queries a file for its comment metadata, which the call returns in a NULL-terminated string. An empty string is valid if there is no track comment metadata.

Buffer: char[1]

DCMD_MEDIA_COMPOSER

DCMD_MEDIA_COMPOSER DCMD_MEDIA_COMPOSER queries a file for its composer metadata, which the call returns in a NULL-terminated string. An empty string is valid if the composer metadata is not known.

Buffer: char[1]

DCMD_MEDIA_DURATION

DCMD_MEDIA_DURATION DCMD_MEDIA_DURATION queries a file for its duration, which the call returns as an unsigned integer indicating the track duration, in seconds.

Buffer: char[1]

DCMD_MEDIA_GENRE

DCMD_MEDIA_GENRE queries a file for its genre metadata, which the call returns in a NULL-terminated string. An empty string is valid if the genre metadata is not known.

Buffer: char[1]

DCMD_MEDIA_NAME

DCMD_MEDIA_NAME queries a file for its name, which the call returns in a NULL-terminated string. An empty string is valid if the name is not known.

Buffer: char[1]

DCMD_MEDIA_PUBLISHER

DCMD_MEDIA_PUBLISHER queries a file for its publisher metadata, which the call returns in a NULL-terminated string. An empty string is valid if the track number is not known.

Buffer: char[1]

DCMD_MEDIA_RELEASE_DATE

DCMD_MEDIA_RELEASE_DATE queries a file for its release data metadata, which the call returns in the _media_date data structure.

Buffer: char[1]

DCMD_MEDIA_SONG

DCMD_MEDIA_SONG queries a file for the song title, which the call returns in a NULL-terminated string.

Buffer: char[1]

DCMD_MEDIA_TRACK_NUM

DCMD_MEDIA_TRACK_NUM queries a file for its track number, which the call returns in a NULL-terminated string. An empty string is valid if the track number is not known.

Buffer: char[1]

DCMD_MEDIA_URL

DCMD_MEDIA_URL gets the URL for a media file.

Buffer: char[1]