LIBMTP_track_struct(3)
π LIBMTP_track_struct(3) π
okay bestie, sit down, hydrate, and let me tell you about LIBMTP_track_struct from the Library Functions Manual. this is The One struct that holds, like, one entire song's worth of metadata, and honestly? it's giving organized. π
β¨ NAME β¨
libmtp -
and thenβ¦ nothing. the description slot is literally empty. a ghost town. a blank bio on a main character's profile. π anyway, the name is libmtp.
π SYNOPSIS π
#include <libmtp.h>
π¦ Data Fields π¦
here's the whole cast list, in the order the page throws them at you:
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 β that's it, that's the whole thing. one struct, one track, infinite playlist potential. slay. π§β¨
πΈ Field Documentation πΈ
each field is about to get its own lil moment. no skips, no skims, we're doing the whole roster. periodt. π
π char* LIBMTP_track_struct::album
Album name for track. yes the whole album's name, not just the one song. album era energy. πΏ
Examples:
tracks.c.
Referenced by LIBMTP_destroy_track_t(), and LIBMTP_Update_Track_Metadata().
π§ char* LIBMTP_track_struct::artist
Name of recording artist. the person behind the mic, the one on the poster. π€
Examples:
getplaylist.c,playlists.c, andtracks.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. keep it inside that range, bestie, it's not a suggestion. π
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π¦ uint16_t LIBMTP_track_struct::bitratetype
0 = unused, 1 = constant, 2 = VBR, 3 = free. four little numbers, four whole personalities.
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π char* LIBMTP_track_struct::composer
Name of recording composer. the person who wrote the thing, separate from the artist who performed it. give them their flowers. π
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. as a string, okay? not a time_t, not a struct, a string. it said what it said. ποΈ
Examples:
tracks.c.
Referenced by LIBMTP_destroy_track_t(), and LIBMTP_Update_Track_Metadata().
π uint32_t LIBMTP_track_struct::duration
Duration in milliseconds. milliseconds!! so multiply your minutes by 60000 and go off. β±οΈ
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π char* LIBMTP_track_struct::filename
Original filename of this track. the raw, unedited, before-the-makeover name. π
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. 64 bits of it, because files are big now and we respect that. π¦
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. what kind of file we're bopping to. π΅
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. is it pop? is it hyperpop? is it "unclassifiable" because ur taste is that eclectic? π§
Examples:
tracks.c.
Referenced by LIBMTP_destroy_track_t(), and LIBMTP_Update_Track_Metadata().
π
uint32_t LIBMTP_track_struct::item_id
Unique item ID. the track's legal name, its government name, its one-of-a-kind identifier. πͺͺ
Examples:
sendtr.c, andtracks.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().
π¦ time_t LIBMTP_track_struct::modificationdate
Date of last alteration of the track. the glow-up timestamp. π°οΈ
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. this is the linked-list hand-holding, the "and thenβ¦" of it all. when it's NULL, the playlist is over, bestie. π«Ά
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. mono, stereo, or a mystery. ποΈ
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π uint32_t LIBMTP_track_struct::parent_id
ID of parent folder. every track has a home, and this is the address of its home. π
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). rate it or don't, but those are the numbers you get to play with. β
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π uint32_t LIBMTP_track_struct::samplerate
Sample rate of original file, min 0x1f80 max 0xbb80. hex-coded boundaries, because of course. ποΈ
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π§ uint32_t LIBMTP_track_struct::storage_id
ID of storage holding this track. which little device/chunk of memory is currently housing ur bop. πΎ
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. the name. the headline. the thing you scream-sing. π₯
Examples:
getplaylist.c,playlists.c, andtracks.c.
Referenced by LIBMTP_destroy_track_t(), and LIBMTP_Update_Track_Metadata().
π
uint16_t LIBMTP_track_struct::tracknumber
Track number (in sequence on recording). yes, track 1 matters, yes, the order matters, no, shuffle is not a personality. π’
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
β¨ uint32_t LIBMTP_track_struct::usecount
Number of times used/played. the play-count receipts are RIGHT THERE. π
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π¦ uint32_t LIBMTP_track_struct::wavecodec
FourCC wave codec name. four characters, one codec, zero chill. πΆ
Examples:
tracks.c.
Referenced by LIBMTP_Update_Track_Metadata().
π«Ά Author π«Ά
Generated automatically by Doxygen for libmtp from the source code. not a human, not a vibe curator, just Doxygen doing its little thing. π€
and that's the whole page!! from libmtp, Version 1.1.23, the one and only LIBMTP_track_struct(3) β go forth and populate ur structs responsibly, bestie. mwah. πβ¨π
π¦ where this page comes from
- ubuntu stonking: libmtp-doc 1.1.23-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms