#include <mp4v2/mp4v2.h>
int main( int argc, char** argv )
{
if( argc != 2 ) {
printf( "usage: %s file.mp4\n", argv[0] );
return 1;
}
MP4FileHandle file =
MP4Modify( argv[1], 0 );
printf( "MP4Modify failed\n" );
return 1;
}
printf( "name: %s\n", tags->name );
printf( "artist: %s\n", tags->artist );
printf( "albumArtist: %s\n", tags->albumArtist );
printf( "album: %s\n", tags->album );
printf( "grouping: %s\n", tags->grouping );
printf( "composer: %s\n", tags->composer );
printf( "comments: %s\n", tags->comments );
printf( "genre: %s\n", tags->genre );
printf( "genreType: %u\n", *tags->genreType );
printf( "releaseDate: %s\n", tags->releaseDate );
printf(
"track: index=%u total=%u\n", tags->track->
index, tags->track->
total );
printf(
"disk: index=%u total=%u\n", tags->disk->
index, tags->disk->
total );
printf( "tempo: %u\n", *tags->tempo );
printf( "compilation: %u\n", *tags->compilation );
printf( "tvShow: %s\n", tags->tvShow );
printf( "tvNetwork: %s\n", tags->tvNetwork );
printf( "tvEpisodeID: %s\n", tags->tvEpisodeID );
printf( "tvSeason: %u\n", *tags->tvSeason );
printf( "tvEpisode: %u\n", *tags->tvEpisode );
printf( "description: %s\n", tags->description );
if( tags->
longDescription )
printf( "longDescription: %s\n", tags->longDescription );
printf( "lyrics: %s\n", tags->lyrics );
printf( "sortName: %s\n", tags->sortName );
printf( "sortArtist: %s\n", tags->sortArtist );
if( tags->
sortAlbumArtist )
printf( "sortAlbumArtist: %s\n", tags->sortAlbumArtist );
printf( "sortAlbum: %s\n", tags->sortAlbum );
printf( "sortComposer: %s\n", tags->sortComposer );
printf( "sortTVShow: %s\n", tags->sortTVShow );
if( tags->
artworkCount ) {
uint32_t i;
for( i = 0; i < tags->artworkCount; i++, art++ )
printf(
"art[%d]: type=%d size=%u data=%p\n", i, art->
type, art->
size, art->
data );
}
printf( "copyright: %s\n", tags->copyright );
printf( "encodingTool: %s\n", tags->encodingTool );
printf( "encodedBy: %s\n", tags->encodedBy );
printf( "purchaseDate: %s\n", tags->purchaseDate );
printf( "podcast: %u\n", *tags->podcast );
printf( "keywords: %s\n", tags->keywords );
printf( "category: %s\n", tags->category );
printf( "hdVideo: %u\n", *tags->hdVideo );
printf( "mediaType: %u\n", *tags->mediaType );
if( tags->
contentRating )
printf( "contentRating: %u\n", *tags->contentRating );
printf( "gapless: %u\n", *tags->gapless );
printf( "contentID: %u\n", *tags->contentID );
printf( "artistID: %u\n", *tags->artistID );
printf( "playlistID: %llu\n", *tags->playlistID );
printf( "genreID: %u\n", *tags->genreID );
printf( "xid: %s\n", tags->xid );
if( tags->
iTunesAccount )
printf( "iTunesAccount: %s\n", tags->iTunesAccount );
if( tags->
iTunesAccountType )
printf( "iTunesAccountType: %u\n", *tags->iTunesAccountType );
if( tags->
iTunesCountry )
printf( "iTunesCountry: %u\n", *tags->iTunesCountry );
uint8_t n8;
uint16_t n16;
uint32_t n32;
uint64_t n64;
dtrack.index = 1;
dtrack.total = 1;
ddisk.index = 1;
ddisk.total = 1;
MP4TagsSetName ( tags, "my name" );
MP4TagsSetArtist ( tags, "my artist" );
MP4TagsSetAlbumArtist ( tags, "my albumArtist" );
MP4TagsSetAlbum ( tags, "my album" );
MP4TagsSetGrouping ( tags, "my grouping" );
MP4TagsSetComposer ( tags, "my composer" );
MP4TagsSetComments ( tags, "my comments" );
MP4TagsSetGenre ( tags, "my genre" );
n16 = 5;
MP4TagsSetGenreType ( tags, &n16 );
MP4TagsSetReleaseDate ( tags, "my releaseDate" );
MP4TagsSetTrack ( tags, &dtrack );
MP4TagsSetDisk ( tags, &ddisk );
n16 = 60;
MP4TagsSetTempo ( tags, &n16 );
n8 = 0;
MP4TagsSetCompilation ( tags, &n8 );
MP4TagsSetTVShow ( tags, "my tvShow" );
MP4TagsSetTVNetwork ( tags, "my tvNetwork" );
MP4TagsSetTVEpisodeID ( tags, "my tvEpisodeID" );
n32 = 0;
MP4TagsSetTVSeason ( tags, &n32 );
n32 = 0;
MP4TagsSetTVEpisode ( tags, &n32 );
MP4TagsSetDescription ( tags, "my description" );
MP4TagsSetLongDescription ( tags, "my longDescription" );
MP4TagsSetLyrics ( tags, "my lyrics" );
MP4TagsSetSortName ( tags, "my sortName" );
MP4TagsSetSortArtist ( tags, "my sortArtist" );
MP4TagsSetSortAlbumArtist ( tags, "my sortAlbumArtist" );
MP4TagsSetSortAlbum ( tags, "my sortAlbum" );
MP4TagsSetSortComposer ( tags, "my sortComposer" );
MP4TagsSetSortTVShow ( tags, "my sortTVShow" );
MP4TagsSetCopyright ( tags, "my copyright" );
MP4TagsSetEncodingTool ( tags, "my encodingTool" );
MP4TagsSetEncodedBy ( tags, "my encodedBy" );
MP4TagsSetPurchaseDate ( tags, "my purchaseDate" );
n8 = 0;
MP4TagsSetPodcast ( tags, &n8 );
MP4TagsSetKeywords ( tags, "my keywords" );
MP4TagsSetCategory ( tags, "my category" );
n8 = 0;
MP4TagsSetHDVideo ( tags, &n8 );
n8 = 9;
MP4TagsSetMediaType ( tags, &n8 );
n8 = 0;
MP4TagsSetContentRating ( tags, &n8 );
n8 = 0;
MP4TagsSetGapless ( tags, &n8 );
MP4TagsSetITunesAccount ( tags, "my iTunesAccount" );
n8 = 0;
MP4TagsSetITunesAccountType ( tags, &n8 );
n32 = 143441;
MP4TagsSetITunesCountry ( tags, &n32 );
n32 = 0;
MP4TagsSetContentID ( tags, &n32 );
n32 = 0;
MP4TagsSetArtistID ( tags, &n32 );
n64 = 0;
MP4TagsSetPlaylistID ( tags, &n64 );
n32 = 0;
MP4TagsSetGenreID ( tags, &n32 );
n32 = 0;
MP4TagsSetComposerID ( tags, &n32 );
MP4TagsSetXID ( tags, "my prefix:my scheme:my identifier" );
return 0;
}