![]() |
![]() |
![]() |
![]() |
Add files to the copy queue
#include <mme/mme.h> int mme_mediacopier_add( mme_hdl_t *hdl, mme_mediacopier_info_t *copyinfo, char *statement, uint32_t flags );
mme
The function mme_mediacopier_add() prepares a media copying or ripping operation. Files that are selected by statement are added to the copyqueue table in the MME database.
To start a copy or ripping operation:
![]() |
To add files to the copy queue, specifying strings for unknown metadata, use mme_mediacopier_add_with_metadata(). |
By default, if you set the copyinfo members as follows: dstmsid=0, dstfolder=NULL, dstfilename=NULL, and encodeformatid=0, the MME will use the defaults in the configuration file mme.conf.
![]() |
You should not assume that the default destination mediastore set by the configuration element <Copying>/<Destination>/<MSID> is always your HDD. In some instances, on startup the MME may detect another mediastore, such as a CD, before it detects the HDD and assign it msid=1. When preparing a media copy or ripping operation, ensure that the destination mediastore (dstmsid) is a writeable mediastore. |
For more information, see the chapter Configuring Media Copying and Ripping in the MME Configuration Guide.
Media copying and ripping uses the flags argument to determine media copying and ripping behavior. Possible values are combinations of:
Flag | Value | Description |
---|---|---|
MME_MEDIACOPIER_COPYADD_NONE | 0x0000 | Copy or rip directly to a destination folder. Obsolete; not supported. |
MME_MEDIACOPIER_COPYADD_PRESERVE_PATH | 0x0001 | Preserve the original folder structure for copied or ripped files. Create folders as required. Obsolete; not supported. |
MME_MEDIACOPIER_USE_DEFAULT_FILENAME | 0x0002 | Use the default destination filename set in the MME configuration file. |
MME_MEDIACOPIER_USE_METADATA | 0x0004 | Use the specified metadata; do not use defaults. |
MME_MEDIACOPIER_USE_DEFAULT_FOLDERNAME | 0x0008 | Use the default destination folder name set in the MME configuration file. |
For more information about default destination files and folders, see “Configuration elements for the media copy and ripping destination” in the MME Configuration Guide chapter Configuring Media Copying and Ripping.
None delivered.
Full validation of data; all arguments are checked before the call returns.
Below is a code snippet from the mmecli.c example application. This code snippet illustrates how to set up a call to mme_mediacopier_add().
mme_mediacopier_info_t copyinfo; // Just use defaults for now copyinfo.dstmsid = 0; copyinfo.dstfolderid = 0; copyinfo.format = 0; copyinfo.bitrate = 0; rc = mme_mediacopier_add(&mmehdl, ©info, statement, 0); if (rc == -1) { sprintf(output, "Error setting copy add"); } else { sprintf(output, "copy added"); }
The example below shows how to use template strings for the destination folder and file name.
mme_mediacopier_info_t copyinfo; char *folder = "/ripped/$ARTIST/$ALBUM/"; char *title = "$0TRACK-$TITLE(date=$DATESTAMP,time=$TIMESTAMP,srcfid=$SRCFID)"; copyinfo.dstmsid = 1; copyinfo.dstfolder = folder; copyinfo.dstfilename = title; copyinfo.encodeformatid = 2; rc = mme_mediacopier_add(mmehdl, ©info, statement, 0); if (rc == -1) { sprintf(output, "Error setting copy add"); } else { sprintf(output, "copy added"); }
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
mme_mediacopier_add_with_metadata(), mme_mediacopier_cleanup(), mme_mediacopier_clear(), mme_mediacopier_disable(), mme_mediacopier_enable(), mme_mediacopier_get_status(), mme_mediacopier_remove(), mme_mediacopier_info_t
![]() |
![]() |
![]() |
![]() |