Package org.mp4parser.boxes.microsoft
Class XtraBox
java.lang.Object
org.mp4parser.support.AbstractBox
org.mp4parser.boxes.microsoft.XtraBox
- All Implemented Interfaces:
Box,ParsableBox
4cc = ""Xtra""
Windows Media Xtra Box.I can't find definitive documentation on this from Microsoft so it's cobbled together from various sources. Mostly ExifTool for Perl.
Various references: https://msdn.microsoft.com/en-us/library/windows/desktop/dd743066(v=vs.85).aspx https://metacpan.org/source/EXIFTOOL/Image-ExifTool-9.76/lib/Image/ExifTool/Microsoft.pm http://www.ventismedia.com/mantis/view.php?id=12017 http://www.hydrogenaudio.org/forums/index.php?showtopic=75123&st=250 http://www.mediamonkey.com/forum/viewtopic.php?f=1&t=76321 https://code.google.com/p/mp4v2/issues/detail?id=113
- Author:
- marwatk
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final StringFields inherited from class org.mp4parser.support.AbstractBox
content, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid_parseDetails(ByteBuffer content) Parse the box's fields and child boxes if any.String[]Returns a list of the tag names present in this Xtra Boxprotected voidgetContent(ByteBuffer byteBuffer) Write the box's content into the givenByteBuffer.protected longGet the box's content size without its header.getFirstDateValue(String name) Returns the first Date value found for this taggetFirstLongValue(String name) Returns the first Long value found for this taggetFirstStringValue(String name) Returns the first String value found for this tagObject[]Returns an array of values for this tag.voidRemoves specified tag (all values for that tag will be removed)voidsetTagValue(String name, long value) Removes and recreates tag using specified Long valuevoidsetTagValue(String name, String value) Removes and recreates tag using specified String valuevoidsetTagValue(String name, Date date) Removes and recreates tag using specified Date valuevoidsetTagValues(String name, String[] values) Removes and recreates tag using specified String valuestoString()Methods inherited from class org.mp4parser.support.AbstractBox
getBox, getSize, getType, getUserType, isParsed, parse, parseDetails
-
Field Details
-
TYPE
- See Also:
-
MP4_XTRA_BT_UNICODE
public static final int MP4_XTRA_BT_UNICODE- See Also:
-
MP4_XTRA_BT_INT64
public static final int MP4_XTRA_BT_INT64- See Also:
-
MP4_XTRA_BT_FILETIME
public static final int MP4_XTRA_BT_FILETIME- See Also:
-
MP4_XTRA_BT_GUID
public static final int MP4_XTRA_BT_GUID- See Also:
-
-
Constructor Details
-
XtraBox
public XtraBox() -
XtraBox
-
-
Method Details
-
getContentSize
protected long getContentSize()Description copied from class:AbstractBoxGet the box's content size without its header. This must be the exact number of bytes thatgetContent(ByteBuffer)writes.- Specified by:
getContentSizein classAbstractBox- Returns:
- Gets the box's content size in bytes
- See Also:
-
toString
-
_parseDetails
Description copied from class:AbstractBoxParse the box's fields and child boxes if any.- Specified by:
_parseDetailsin classAbstractBox- Parameters:
content- the box's raw content beginning after the 4-cc field.
-
getContent
Description copied from class:AbstractBoxWrite the box's content into the givenByteBuffer. This must include flags and version in case of a full box.byteBufferhas been initialized withgetSize()bytes.- Specified by:
getContentin classAbstractBox- Parameters:
byteBuffer- the sink for the box's content
-
getAllTagNames
Returns a list of the tag names present in this Xtra Box- Returns:
- Possibly empty (zero length) array of tag names present
-
getFirstStringValue
Returns the first String value found for this tag- Parameters:
name- Tag name- Returns:
- First String value found
-
getFirstDateValue
Returns the first Date value found for this tag- Parameters:
name- Tag name- Returns:
- First Date value found
-
getFirstLongValue
Returns the first Long value found for this tag- Parameters:
name- Tag name- Returns:
- First long value found
-
getValues
Returns an array of values for this tag. Empty array when tag is not present- Parameters:
name- Tag name to retrieve- Returns:
- Possibly empty array of values (possible types are String, Long, Date and byte[] )
-
removeTag
Removes specified tag (all values for that tag will be removed)- Parameters:
name- Tag to remove
-
setTagValues
Removes and recreates tag using specified String values- Parameters:
name- Tag name to replacevalues- New String values
-
setTagValue
Removes and recreates tag using specified String value- Parameters:
name- Tag name to replacevalue- New String value
-
setTagValue
Removes and recreates tag using specified Date value- Parameters:
name- Tag name to replacedate- New Date value
-
setTagValue
Removes and recreates tag using specified Long value- Parameters:
name- Tag name to replacevalue- New Long value
-