The synchronization process

The multimedia synchronization is done in multiple passes, so that the application may begin playing media without having to wait for all the metadata to be synchronized. You can perform various types of synchronizations that update some or all of the media information, depending on your application needs.

Before the synchronization begins, mm-sync first selects the best synchronizer for the requested operation. The service then traverses the files and folders on the mediastore in multiple passes to extract and upload the file information and media metadata. The number of passes made depends on the synchronization parameters. Each pass reads different media information and populates the appropriate database tables.

Your client application can do other work while the synchronization completes. The mm-sync API functions are nonblocking so the same thread that starts a synchronization can go on to perform other tasks, including playing media once the file information has been uploaded. Also, if the synchronizer service doesn't have the resources to start a synchronization, it places the request in its "pending" queue and signals the client, which can monitor the synchronization progress through event notifications.