![]() |
![]() |
![]() |
![]() |
Read track data from the track session view
#include <mme/mme.h> int mme_trksessionview_readx( mme_hdl_t *hdl, unsigned type, int offset, unsigned ntracks, void *buf, unsigned *buflen );
mme
The function mme_trksessionview_readx() reads track session data from the trksessionview table. It fills the buffer referenced by buf with an array of elements.
The number of elements in the array is set by the ntracks parameter, and the type and size of the elements are determined by the type parameter:
![]() |
Set the type argument to TRKVIEW_READ_FILE only for file-based track sessions (track sessions created with the mode argument set to MME_PLAYMODE_FILE). |
The function mme_trksessionview_readx() returns the number of elements it successfully read. This number may be less than the number of elements requested (ntracks if the source mediastore contains less files than the requested number, or if the allocated buffer is too small to contain the information for all the requested tracks.
To ensure that you call mme_trksessionview_readx() with a buffer large enough for all the requested elements, you can call it once with buflen set to 0:
*buflen = 0 mme_trksessionview_readx(hdl, type, offset, ntracks, buf, buflen);
The function will fill in buflen with the buffer size required for the number and type of information you request. You can then call mme_trksessionview_readx() a second time, certain that your buffer is large enough for your request.
typedef struct { uint64_t fid; } trksessionview_entry_t;
The data structure trksessionview_entry_t defines the array used by mme_trksessionview_read() to store track session view entries in memory.
typedef struct { uint64_t msid; uint32_t reserved; char *filename; } trksessionview_entry_file_t;
The data structure trksessionview_entry_file_t carries information about tracks in a track session. It contains the following members:
Member | Type | Description |
---|---|---|
msid | uint64_t | The mediastore ID of the mediastore with the track. |
reserved | uint32-t | Reserved for future use. |
filename | char | The filename of the track. |
#define TRKVIEW_READ_FID 0x00000001 #define TRKVIEW_READ_FILE 0x00000002
The TRKVIEW_READ_* constants are used to set the type of information mme_trksessionview_readx() requests from the trksessionview table. Its value can be set to:
None delivered.
This function doesn't block.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
mme_trksessionview_get_info(), mme_trksessionview_info_t, mme_trksessionview_metadata_get(), mme_trksessionview_writedb()
![]() |
![]() |
![]() |
![]() |