public class Mp4TrackField extends Mp4TagTextNumberField
There are a number of reserved fields making matters more complicated Reserved:2 bytes Track Number:2 bytes No of Tracks:2 bytes (or zero if not known) PlayListTitleReserved: 1 byte playtitlenameReserved:0 bytes
NUMBER_LENGTH, numbers
content, dataSize
id, logger, parentHeader
Constructor and Description |
---|
Mp4TrackField(int trackNo)
Create new Track Field with only track No
|
Mp4TrackField(int trackNo,
int total)
Create new Track Field with track No and total tracks
|
Mp4TrackField(String trackValue)
Create new Track Field parsing the String for the trackno/total
|
Mp4TrackField(String id,
ByteBuffer data)
Construct from filedata
|
Modifier and Type | Method and Description |
---|---|
protected void |
build(ByteBuffer data)
Processes the data and sets the position of the data buffer to just after the end of this fields data
ready for processing next field.
|
Short |
getTrackNo() |
Short |
getTrackTotal() |
void |
setTrackNo(int trackNo)
Set Track No
|
void |
setTrackTotal(int trackTotal)
Set total number of tracks
|
copyContent, getDataBytes, getFieldType, getNumbers
getContent, getEncoding, isBinary, isEmpty, setContent, setEncoding, toString
getId, getIdBytes, getRawContent, getRawContentDataOnly, isBinary, isCommon
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, getRawContent, isBinary, isCommon
public Mp4TrackField(String trackValue) throws FieldDataInvalidException
trackValue
- FieldDataInvalidException
public Mp4TrackField(int trackNo)
trackNo
- public Mp4TrackField(int trackNo, int total)
trackNo
- total
- public Mp4TrackField(String id, ByteBuffer data) throws UnsupportedEncodingException
id
- data
- UnsupportedEncodingException
protected void build(ByteBuffer data) throws UnsupportedEncodingException
Mp4TagField
build
in class Mp4TagTextNumberField
UnsupportedEncodingException
public Short getTrackNo()
public Short getTrackTotal()
public void setTrackNo(int trackNo)
trackNo
- public void setTrackTotal(int trackTotal)
trackTotal
- Copyright © 2005–2020 jthink.net. All rights reserved.