@MediaClass(uuid1=218169601, uuid2=257, uuid3=5376, uuid4={6,14,43,52,2,6,1,1}, definedName="TimecodeStream", description="The TimecodeStream class specifies a stream of timecode data.", symbol="TimecodeStream") public abstract class TimecodeStreamImpl extends SegmentImpl implements TimecodeStream, Serializable, Cloneable
Implements a representation of a stream of timecode data.
ObjectClassPropertyID| Constructor and Description |
|---|
TimecodeStreamImpl() |
| Modifier and Type | Method and Description |
|---|---|
TimecodeStream |
clone()
Create a cloned copy of this interchange object.
|
TimecodeValue |
getPositionTimecode(long position)
Returns the timecode value for a
given frame of this timecode stream.
|
abstract int |
getSampleSize()
Returns the size of one sample of the timecode data of this
timecode stream, measured in bytes.
|
long |
getSourceBufferLength()
Returns the length of the timecode stream buffer contained
within the timecode stream object.
|
TCSource |
getTimecodeSource()
|
Stream |
getTimecodeStreamData()
Returns the data buffer containing the stream of timecode data of this
timecode stream.
|
Rational |
getTimecodeStreamSampleRate()
Returns the sample rate of the timecode stream, which specifies the sample rate
of the timecode data contained in the source property.
|
String |
getTimecodeStreamSampleRateString() |
ByteBuffer |
getUserDataAtPosition(long position)
Returns the user data (user-bits) for a particular frame of
this timecode stream.
|
abstract int |
getUserDataLength()
Returns the length of user data for one frame of this timecode
stream.
|
static TCSource |
initializeTimecodeSource() |
static Stream |
initializeTimecodeStreamData() |
static Rational |
initializeTimecodeStreamSampleRate() |
abstract ByteBuffer |
packTimecode(TimecodeValue timecode,
ByteBuffer packedBuffer)
Pack a given timecode value into a give byte array.
|
abstract ByteBuffer |
packUserBits(ByteBuffer userBits,
ByteBuffer packedBuffer)
Pack user data from the given byte array into the given packed buffer.
|
TimecodeValue |
segmentOffsetToTC(long offset)
Converts the given segment offset to a timecode
value.
|
long |
segmentTCToOffset(TimecodeValue timecode,
Rational editRate)
Converts the given timecode and edit rate
to a segment offset value.
|
void |
setPositionTimecode(long position,
TimecodeValue timecode)
Sets the timecode value for a
given frame of this timecode stream.
|
void |
setTimecodeSource(TCSource timecodeSource)
|
void |
setTimecodeStreamData(Stream timecodeStreamData)
Sets the data buffer containing the stream of timecode data of this
timecode stream.
|
void |
setTimecodeStreamSampleRate(Rational timecodeStreamSampleRate)
Sets the sample rate of this timecode stream, which specifies the sample rate
of the timecode data contained in the source property.
|
void |
setTimecodeStreamSampleRateString(String timecodeStreamSampleRate) |
void |
setUserDataAtPosition(long position,
ByteBuffer buffer)
Sets the user data (userbits) for a particular frame of the
timecode stream.
|
abstract TimecodeValue |
unpackTimecode(ByteBuffer buffer,
short fps)
Unpack a timecode value from the given buffer for the given number of frames per second.
|
abstract ByteBuffer |
unpackUserBits(ByteBuffer buffer)
Unpack user data from the given sample of the timecode stream.
|
generateSequence, getCutPoint, getKeyOffset, getPackLayerKeyIndicator, getSegmentBlob, getTrackBlob, getTrackKeyRenderSequence, getTrackName, getTrackRenderSequence, setCutPoint, setKeyOffset, setPackLayerKeyIndicator, setSegmentBlob, setTrackBlob, setTrackKeyRenderSequence, setTrackName, setTrackRenderSequenceappendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComment, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getEditName, getJupiterClipOffset, getJupiterID, getLengthPresent, initializeComponentDataDefinition, prependComponentAttribute, prependComponentKLVData, prependComponentUserComment, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setComponentLengthFromStream, setEditName, setJupiterClipOffset, setJupiterID, setLengthPresentaddApplicationPlugin, appendXMLChildren, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getLinkedGenerationIDString, getObjectClass, getPersistentID, getPersistentIndex, hashCode, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setLinkedGenerationIDString, setObjectClass, setPersistentID, setPersistentIndex, toStringgenerateSequenceappendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getLengthPresent, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setLengthPresentaddApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toStringgetPersistentID, setPersistentIndex@MediaProperty(uuid1=67371265, uuid2=513, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="TimecodeStreamSampleRate", aliases="SampleRate", typeName="Rational", optional=false, uniqueIdentifier=false, pid=5633, symbol="TimecodeStreamSampleRate") public Rational getTimecodeStreamSampleRate()
TimecodeStreamReturns the sample rate of the timecode stream, which specifies the sample rate of the timecode data contained in the source property.
getTimecodeStreamSampleRate in interface TimecodeStream@MediaPropertySetter(value="TimecodeStreamSampleRate") public void setTimecodeStreamSampleRate(Rational timecodeStreamSampleRate) throws NullPointerException
TimecodeStreamSets the sample rate of this timecode stream, which specifies the sample rate of the timecode data contained in the source property.
setTimecodeStreamSampleRate in interface TimecodeStreamtimecodeStreamSampleRate - Sample rate of this timecode stream.NullPointerExceptionpublic static final Rational initializeTimecodeStreamSampleRate()
public abstract int getSampleSize()
TimecodeStreamReturns the size of one sample of the timecode data of this timecode stream, measured in bytes.
getSampleSize in interface TimecodeStream@MediaProperty(uuid1=67568384, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,2}, definedName="TimecodeStreamData", aliases="Source", typeName="Stream", optional=false, uniqueIdentifier=false, pid=5634, symbol="TimecodeStreamData") public Stream getTimecodeStreamData()
TimecodeStreamReturns the data buffer containing the stream of timecode data of this timecode stream.
getTimecodeStreamData in interface TimecodeStreamTimecodeStream.getTimecodeStreamSampleRate()@MediaPropertySetter(value="TimecodeStreamData") public void setTimecodeStreamData(Stream timecodeStreamData) throws NullPointerException
TimecodeStreamSets the data buffer containing the stream of timecode data of this timecode stream.
setTimecodeStreamData in interface TimecodeStreamtimecodeStreamData - Stream of timecode data to store in this timecode stream.NullPointerException - The given timecode stream source property
is null.TimecodeStream.setTimecodeStreamSampleRate(Rational)public static final Stream initializeTimecodeStreamData()
public long getSourceBufferLength()
throws IOException
TimecodeStreamReturns the length of the timecode stream buffer contained within the timecode stream object. This is the size of the buffer and not the number of timecode entries in the stream.
getSourceBufferLength in interface TimecodeStreamIOException - Cannot access the underlying stream to determine the length.TimecodeStream.getTimecodeStreamData()@MediaProperty(uuid1=67371521, uuid2=0, uuid3=0, uuid4={6,14,43,52,1,1,1,1}, definedName="TimecodeSource", aliases="SourceType", typeName="TCSource", optional=false, uniqueIdentifier=false, pid=5635, symbol="TimecodeSource") public TCSource getTimecodeSource()
TimecodeStreamgetTimecodeSource in interface TimecodeStream@MediaPropertySetter(value="TimecodeSource") public void setTimecodeSource(TCSource timecodeSource) throws NullPointerException
TimecodeStreamsetTimecodeSource in interface TimecodeStreamtimecodeSource - Kind of timecode of this timecode stream.NullPointerExceptionpublic static final TCSource initializeTimecodeSource()
public ByteBuffer getUserDataAtPosition(long position) throws PositionOutOfRangeException, IOException
TimecodeStreamReturns the user data (user-bits) for a particular frame of this timecode stream.
getUserDataAtPosition in interface TimecodeStreamposition - Zero-based index to the frame to get the user bits
from.PositionOutOfRangeException - The given user data is outside the
acceptable range for this timecode stream.IOException - Error occurred when trying to read from the underlying
stream.TimecodeStream.getUserDataLength()public void setUserDataAtPosition(long position,
ByteBuffer buffer)
throws NullPointerException,
PositionOutOfRangeException,
IOException
TimecodeStreamSets the user data (userbits) for a particular frame of the timecode stream.
setUserDataAtPosition in interface TimecodeStreamposition - Zero-based offset to the userbits to set.buffer - User data for the specified frame.NullPointerException - The given user data buffer is null.PositionOutOfRangeException - The given user data is outside the
acceptable range for this timecode stream.IOException - Error occurred when trying to access date from the underlying
stream.public abstract int getUserDataLength()
TimecodeStreamReturns the length of user data for one frame of this timecode stream.
getUserDataLength in interface TimecodeStreamTimecodeStream.getUserDataAtPosition(long)public TimecodeValue getPositionTimecode(long position) throws PositionOutOfRangeException, IOException
TimecodeStreamReturns the timecode value for a given frame of this timecode stream. The frame index must be within the length of the stream.
getPositionTimecode in interface TimecodeStreamposition - Frame to find the timecode value for from the timecode
stream.PositionOutOfRangeException - Frame index is outside the length
of this timecode stream.IOException - Error occurred when trying to access data from the
underlying stream.public void setPositionTimecode(long position,
TimecodeValue timecode)
throws NullPointerException,
PositionOutOfRangeException,
IOException
TimecodeStreamSets the timecode value for a given frame of this timecode stream. The frame index must be within the length of the stream.
setPositionTimecode in interface TimecodeStreamposition - Zero-based offset to set the timecode value at.timecode - Timecode value to set at the given frame for the timecode
stream.NullPointerException - The given timecode value is null.PositionOutOfRangeException - Frame index is outside the length
of the stream.IOException - Error occurred when trying to write data to the underlying
stream.public TimecodeValue segmentOffsetToTC(long offset) throws IllegalArgumentException
SegmentConverts the given segment offset to a timecode value.
segmentOffsetToTC in interface SegmentsegmentOffsetToTC in class SegmentImploffset - Segment offset to be converted to a timecode.IllegalArgumentExceptionSegment.segmentTCToOffset(TimecodeValue, Rational)public long segmentTCToOffset(TimecodeValue timecode, Rational editRate) throws NullPointerException, TimecodeNotFoundException, BadSampleOffsetException
SegmentConverts the given timecode and edit rate to a segment offset value.
segmentTCToOffset in interface SegmentsegmentTCToOffset in class SegmentImpltimecode - Timecode to be converted to an offset.editRate - Edit rate of the given timecode.NullPointerException - One or both of the given timecode and/or edit rate is/are
null.TimecodeNotFoundException - The given timecode is not available
in this segment.BadSampleOffsetException - The given timecode is outside the bounds
of the timecode values represented by this segment.Segment.segmentOffsetToTC(long)public abstract TimecodeValue unpackTimecode(ByteBuffer buffer, short fps) throws NullPointerException, IllegalArgumentException
Unpack a timecode value from the given buffer for the given number of frames per second.
buffer - Data buffer containing bytes representing one timecode value.fps - Frames per second of the current timecode stream.NullPointerException - Argument is null.IllegalArgumentException - The given buffer does not contain sufficient data to unpack a timecode
value or the frame per second value is not a positive value.public abstract ByteBuffer packTimecode(TimecodeValue timecode, ByteBuffer packedBuffer) throws NullPointerException, IllegalArgumentException
Pack a given timecode value into a give byte array. Any user bits in the given packed buffer are preserved.
timecode - Timecode value to serialize.packedBuffer - Array of bytes into which the timecode should be packed.NullPointerException - One or more of the arguments is null.IllegalArgumentException - The given array of packed bytes is the wrong length to allow
the packing of a timecode value.public abstract ByteBuffer unpackUserBits(ByteBuffer buffer) throws NullPointerException, IllegalArgumentException
Unpack user data from the given sample of the timecode stream.
buffer - Buffer to use to unpack user data from.NullPointerException - Argument is null.IllegalArgumentException - The given data buffer is too short to enable user bits to be
extracted.public abstract ByteBuffer packUserBits(ByteBuffer userBits, ByteBuffer packedBuffer) throws NullPointerException, IllegalArgumentException
Pack user data from the given byte array into the given packed buffer.
userBits - User bits to set for a timecode value.packedBuffer - Buffer to pack user bits into.NullPointerException - One or more of the arguments is null.IllegalArgumentException - The packed buffer or array of user bits are of
the wrong length.public TimecodeStream clone()
InterchangeObjectCreate a cloned copy of this interchange object.
clone in interface MediaEntityclone in interface Componentclone in interface InterchangeObjectclone in interface Segmentclone in interface TimecodeStreamclone in class SegmentImplpublic String getTimecodeStreamSampleRateString()
public void setTimecodeStreamSampleRateString(String timecodeStreamSampleRate)
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.