public interface MediaMeta
It is possible that any particular meta data value may be null
.
It may be necessary for the media to be parsed before any meta data is available.
When invoking setter methods to change media meta data then that change is not applied
to the media file. It is necessary to call save()
to commit the changes to the media
file.
Media meta data instances should be explicitly cleaned up by using release()
, otherwise
a native memory leak may occur.
The media may contain meta data over and above that exposed here - this interface provides access to the meta data that vlc can provide.
It is not possible to re-read (or re-parse) the media meta data after it has already been parsed - this means that when invoking a setter method on a media meta instance it is not possible to undo that and restore the old value without obtaining a new media instance.
Not all media types can be parsed (e.g. network streams) - parsing such media may cause fatal errors or application hangs.
The media length is provided if it is available - for some media types the length is not available until some short time after the media has been played.
Modifier and Type | Method and Description |
---|---|
String |
getActors()
Get the actors meta data.
|
String |
getAlbum()
Get the album meta data.
|
String |
getAlbumArtist()
Get the album artist meta data.
|
String |
getArtist()
Get the artist meta data.
|
BufferedImage |
getArtwork()
Load the artwork associated with this media.
|
String |
getArtworkUrl()
Get the artwork URL meta data.
|
String |
getCopyright()
Get the copyright meta data.
|
String |
getDate()
Get the date meta data.
|
String |
getDescription()
Get the description meta data.
|
String |
getDirector()
Set the director meta data.
|
String |
getDiscNumber()
Get the disc number meta data.
|
String |
getEncodedBy()
Get the encoded by meta data.
|
String |
getEpisode()
Get the episode meta data.
|
String |
getGenre()
Get the genre meta data.
|
String |
getLanguage()
Get the language meta data.
|
long |
getLength()
Get the media length, if available.
|
String |
getNowPlaying()
Get the now playing meta data.
|
String |
getPublisher()
Get the publisher meta data.
|
String |
getRating()
Get the rating meta data.
|
String |
getSeason()
Get the season meta data.
|
String |
getSetting()
Get the setting meta data.
|
String |
getShowName()
Get the show name meta data.
|
String |
getTitle()
Get the title meta data.
|
String |
getTrackId()
Get the track id meta data.
|
String |
getTrackNumber()
Get the track number meta data.
|
String |
getTrackTotal()
Get the track total meta data.
|
String |
getUrl()
Get the URL meta data.
|
void |
parse()
Parse the media to load meta data.
|
void |
release()
Release the resources associated with this meta data instance.
|
void |
save()
Write the meta data to the media.
|
void |
setActors(String actors)
Set the actors meta data.
|
void |
setAlbum(String album)
Set the album meta data.
|
void |
setAlbumArtist(String albumArtist)
Set the album artist meta data.
|
void |
setArtist(String artist)
Set the artist meta data.
|
void |
setArtworkUrl(String artworkUrl)
Set the artwork URL meta data.
|
void |
setCopyright(String copyright)
Set the copyright meta data.
|
void |
setDate(String date)
Set the date meta data.
|
void |
setDescription(String description)
Set the description meta data.
|
void |
setDirector(String director)
Set the director meta data.
|
void |
setDiscNumber(String discNumber)
Set the disc number meta data.
|
void |
setEncodedBy(String encodedBy)
Set the encoded by meta data.
|
void |
setEpisode(String episode)
Set the episode meta data.
|
void |
setGenre(String genre)
Set the genre meta data.
|
void |
setLanguage(String language)
Set the language meta data.
|
void |
setNowPlaying(String nowPlaying)
Set the now playing meta data.
|
void |
setPublisher(String publisher)
Set the publisher meta data.
|
void |
setRating(String rating)
Set the rating meta data.
|
void |
setSeason(String season)
Set the season meta data.
|
void |
setSetting(String setting)
Set the setting meta data.
|
void |
setShowName(String showName)
Set the show name meta data.
|
void |
setTitle(String title)
Set the title meta data.
|
void |
setTrackId(String trackId)
Set the track id meta data.
|
void |
setTrackNumber(String trackNumber)
Set the track number meta data.
|
void |
setTrackTotal(String trackTotal)
Set the track total meta data.
|
void |
setUrl(String url)
Set the URL meta data.
|
void parse()
If the media is already parsed this will have no effect. If the media is not already parsed then it will be parsed synchronously.
String getTitle()
void setTitle(String title)
title
- titleString getArtist()
void setArtist(String artist)
artist
- artistString getGenre()
void setGenre(String genre)
genre
- genreString getCopyright()
void setCopyright(String copyright)
copyright
- copyrightString getAlbum()
void setAlbum(String album)
album
- albumString getTrackNumber()
void setTrackNumber(String trackNumber)
trackNumber
- track numberString getDescription()
void setDescription(String description)
description
- descriptionString getRating()
void setRating(String rating)
rating
- ratingString getDate()
void setDate(String date)
date
- dateString getSetting()
void setSetting(String setting)
setting
- settingString getUrl()
void setUrl(String url)
url
- urlString getLanguage()
void setLanguage(String language)
language
- languageString getNowPlaying()
void setNowPlaying(String nowPlaying)
nowPlaying
- now playingString getPublisher()
void setPublisher(String publisher)
publisher
- publisherString getEncodedBy()
void setEncodedBy(String encodedBy)
encodedBy
- encoded byString getArtworkUrl()
Invoking this method may trigger an HTTP request to download the artwork.
void setArtworkUrl(String artworkUrl)
artworkUrl
- artwork URLString getTrackId()
void setTrackId(String trackId)
trackId
- track idString getTrackTotal()
void setTrackTotal(String trackTotal)
trackTotal
- track totalString getDirector()
void setDirector(String director)
director
- directorString getSeason()
void setSeason(String season)
season
- seasonString getEpisode()
void setEpisode(String episode)
episode
- episodeString getShowName()
void setShowName(String showName)
showName
- show nameString getActors()
void setActors(String actors)
actors
- actorsString getAlbumArtist()
void setAlbumArtist(String albumArtist)
albumArtist
- album artistString getDiscNumber()
void setDiscNumber(String discNumber)
discNumber
- disc numberBufferedImage getArtwork()
Invoking this method may trigger an HTTP request to download the artwork.
null
if no artwork availablelong getLength()
Some media must be played before the length becomes available.
void save()
void release()
If release()
is not invoked before this instance is discarded, a native memory leak
may occur.
Copyright © 2009–2015 Caprica Software Limited. All rights reserved.