}
Logger.setLevel(Logger.Level.INFO);
// Create a media player
MediaPlayerFactory factory = new MediaPlayerFactory();
// Get the meta data and dump it out
MediaMeta mediaMeta = factory.getMediaMeta(args[0], true);
Logger.info("mediaMeta={}", mediaMeta);
Logger.info("original description={}", mediaMeta.getDescription());
// Keep the original description to restore it later
String originalDescription = mediaMeta.getDescription();
// Write new meta data
mediaMeta.setDescription("Oh isn't this a lovely tune.");
mediaMeta.save();
mediaMeta.release();
// Re-read to confirm the updated value
mediaMeta = factory.getMediaMeta(args[0], true);
Logger.info("mediaMeta={}", mediaMeta);
Logger.info("updated description={}", mediaMeta.getDescription());
// Restore the original description
mediaMeta.setDescription(originalDescription);
mediaMeta.save();
mediaMeta.release();
// Re-read to confirm
mediaMeta = factory.getMediaMeta(args[0], true);
Logger.info("mediaMeta={}", mediaMeta);
Logger.info("restored description={}", mediaMeta.getDescription());
mediaMeta.release();
// Orderly clean-up
factory.release();
}