---
name: "mtp_LIBMTP_track_struct"
section: "3"
platform: "linux"
package: "libmtp-doc"
version: "1.1.22-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mtp_LIBMTP_track_struct"
---

# mtp\_LIBMTP\_track\_struct(3)

## NAME

libmtp -

## SYNOPSIS

`#include <libmtp.h>`

### Data Fields

uint32\_t **item\_id**\
 uint32\_t **parent\_id**\
 uint32\_t **storage\_id**\
 char \* **title**\
 char \* **artist**\
 char \* **composer**\
 char \* **genre**\
 char \* **album**\
 char \* **date**\
 char \* **filename**\
 uint16\_t **tracknumber**\
 uint32\_t **duration**\
 uint32\_t **samplerate**\
 uint16\_t **nochannels**\
 uint32\_t **wavecodec**\
 uint32\_t **bitrate**\
 uint16\_t **bitratetype**\
 uint16\_t **rating**\
 uint32\_t **usecount**\
 uint64\_t **filesize**\
 time\_t **modificationdate**\
 **LIBMTP\_filetype\_t** **filetype**\
 **LIBMTP\_track\_t** \* **next**\

## Detailed Description

MTP track struct

**Examples** **getplaylist.c**, **playlists.c**, **sendtr.c**, and **tracks.c**.

## Field Documentation

### char\* LIBMTP\_track\_struct::album

Album name for track

**Examples** **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### char\* LIBMTP\_track\_struct::artist

Name of recording artist

**Examples** **getplaylist.c**, **playlists.c**, and **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::bitrate

(Average) bitrate for this file min=1 max=0x16e360

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### uint16\_t LIBMTP\_track\_struct::bitratetype

0 = unused, 1 = constant, 2 = VBR, 3 = free

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### char\* LIBMTP\_track\_struct::composer

Name of recording composer

**Examples** **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### char\* LIBMTP\_track\_struct::date

Date of original recording as a string

**Examples** **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::duration

Duration in milliseconds

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### char\* LIBMTP\_track\_struct::filename

Original filename of this track

**Examples** **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, **LIBMTP\_Get\_Trackmetadata()**, **LIBMTP\_Send\_Track\_From\_File\_Descriptor()**, **LIBMTP\_Send\_Track\_From\_Handler()**, and **LIBMTP\_Set\_Track\_Name()**.

### uint64\_t LIBMTP\_track\_struct::filesize

Size of track file in bytes

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, **LIBMTP\_Get\_Trackmetadata()**, **LIBMTP\_Send\_Track\_From\_File\_Descriptor()**, and **LIBMTP\_Send\_Track\_From\_Handler()**.

### LIBMTP\_filetype\_t LIBMTP\_track\_struct::filetype

Filetype used for the current track

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, **LIBMTP\_Get\_Trackmetadata()**, **LIBMTP\_Send\_Track\_From\_File\_Descriptor()**, **LIBMTP\_Send\_Track\_From\_Handler()**, **LIBMTP\_Set\_Track\_Name()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### char\* LIBMTP\_track\_struct::genre

Genre name for track

**Examples** **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::item\_id

Unique item ID

**Examples** **sendtr.c**, and **tracks.c**.

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, **LIBMTP\_Get\_Trackmetadata()**, **LIBMTP\_new\_track\_t()**, **LIBMTP\_Send\_Track\_From\_File\_Descriptor()**, **LIBMTP\_Send\_Track\_From\_Handler()**, **LIBMTP\_Set\_Track\_Name()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### time\_t LIBMTP\_track\_struct::modificationdate

Date of last alteration of the track

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, and **LIBMTP\_Get\_Trackmetadata()**.

### LIBMTP\_track\_t\* LIBMTP\_track\_struct::next

Next track in list or NULL if last track

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**.

### uint16\_t LIBMTP\_track\_struct::nochannels

Number of channels in this recording 0 = unknown, 1 or 2

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::parent\_id

ID of parent folder

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, **LIBMTP\_Get\_Trackmetadata()**, **LIBMTP\_Send\_Track\_From\_File\_Descriptor()**, and **LIBMTP\_Send\_Track\_From\_Handler()**.

### uint16\_t LIBMTP\_track\_struct::rating

User rating 0-100 (0x00-0x64)

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::samplerate

Sample rate of original file, min 0x1f80 max 0xbb80

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::storage\_id

ID of storage holding this track

**Examples** **sendtr.c**.

Referenced by **LIBMTP\_Get\_Tracklisting\_With\_Callback\_For\_Storage()**, **LIBMTP\_Get\_Trackmetadata()**, **LIBMTP\_Send\_Track\_From\_File\_Descriptor()**, and **LIBMTP\_Send\_Track\_From\_Handler()**.

### char\* LIBMTP\_track\_struct::title

Track title

**Examples** **getplaylist.c**, **playlists.c**, and **tracks.c**.

Referenced by **LIBMTP\_destroy\_track\_t()**, and **LIBMTP\_Update\_Track\_Metadata()**.

### uint16\_t LIBMTP\_track\_struct::tracknumber

Track number (in sequence on recording)

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::usecount

Number of times used/played

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

### uint32\_t LIBMTP\_track\_struct::wavecodec

FourCC wave codec name

**Examples** **tracks.c**.

Referenced by **LIBMTP\_Update\_Track\_Metadata()**.

## Author

Generated automatically by Doxygen for libmtp from the source code.
