![]() |
![]() |
![]() |
![]() |
The MME provides an extensive API for exploring and browsing unsynchronized mediastores.
The MME's mediastore explorer API can be used to provide the end-user with the following information from an unsynchronized mediastore, such as an iPod. It provides:
![]() |
Retrieving more items than can be shown at one time in the HMI display window reduces system responsiveness:
|
The explorer API includes the following functions, structures and constants:
To explore an unsynchronized mediastore:
As you explore the folder, you can display to the user any metadata you have retrieved, and, if the user requests more complete metadata, call mme_ms_metadata_get(), mme_metadata_extract_data() and, if required, mme_metadata_extract_string() and mme_metadata_extract_unsigned() to retrieve and extract the metadata, then pass it up to the user.
Items retrieved by mme_explore_info_get() are presented as they occur; that is, they are not sorted or reorganized in any way. The items that are playable tracks, can be placed in file-based track sessions for playback. For information about how to create and modify file-based track sessions, see “Creating and modifying file-based track sessions” in the chapter Playing Audio.
![]() |
This function may require considerable time to complete execution: with some mediastore types, it requires a readdir() of the entire item being explored. |
The mediastore explorer API can be used to get the number of files and folders inside a specified folder on a mediastore, and, if requested, metadata. For optimal performance you should compose two different strings specifying the metadata to be retrieved:
![]() |
It is possible to request complete metadata from mme_explore_info_get(), but doing so may prove slow, especially when communicating with external devices, such as iPods, that are connected via relatively slow ports. |
There are two possible methods for composing the strings to retrieve metadata. Both methods use the values defined by the METADATA_* constants. You can compose your strings as comma-separated values according to either of the following models:
All filesystem APIs under QNX use UTF-8 character sets; and, with the exception of QNX4, all enforce its use, converting the character set on media to and from UTF-8 as required.
This characteristic of QNX filesystems means that when your client application is reading file and folder names from the explorer API it should assume that these names are in UTF-8 format. This rule includes filenames successfully converted from playlist file entries, but it does not include unconverted (raw) playlist file entries; the explorer API takes these entries directly from the playlist itself and does not convert them.
For information specific to displaying information from iPods, see “Displaying information from an iPod” in the chapter Working with iPods.
You can use the mme_explore_position_set() function's flags and filter arguments to filter the files examined and deliver only files of interest. Filtering is based on the values set in the flags argument, and can be done in two ways:
For example, to include only MP3 and WAVE files, based on the extensions .mp3 and .wav, you should call mme_explore_position_set() as follows:
rc = mme_explore_position_set( x_hdl, 0, 20, NULL, ".mp3$|.wav$", MME_EXPLORE_FILTER_INCLUDE );
Or, to exclude all files with the extension .mov, do the following:
rc = mme_explore_position_set( x_hdl, 0, 20, NULL, ".mov$", MME_EXPLORE_FILTER_EXCLUDE );
For more detailed information, see mme_explore_position_set() in the MME API Library Reference.
You can use the MME's directed synchronization capabilities to browse through mediastores. To let users browse through parts of a mediastore, call mme_sync_directed() with the path to the folder where you want to begin browsing. When the end user selects a new folder, call the function again with the new path.
For more information about directed synchronization, see “Directed synchronization” in the chapter Synchronizing Media.
![]() |
![]() |
![]() |
![]() |