java.lang.Object
org.monte.media.quicktime.AbstractQuickTimeStream.Track
org.monte.media.quicktime.AbstractQuickTimeStream.AudioTrack
- Enclosing class:
AbstractQuickTimeStream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe number of bytes in a frame: for uncompressed audio, an uncompressed frame; for compressed audio, a compressed frame.protected longFor uncompressed audio, the number of bytes in a sample for a single channel.protected longThe size of an uncompressed sample in bytes.protected intSound compressionId.protected intNumber of sound channels used by the sound sample.protected doubleSound sample rate.protected intNumber of bits per audio sample before compression.protected longSound stsd samples per packet.protected byte[]Extensions to the stsd chunk.Fields inherited from class org.monte.media.quicktime.AbstractQuickTimeStream.Track
chunks, codec, editList, format, headerFlags, height, inputBuffer, inputTime, matrix, mediaCompressionType, mediaCompressorName, mediaDuration, mediaTimeScale, mediaType, outputBuffer, sampleCount, sampleSizes, syncInterval, syncSamples, timeToSamples, width, writeTime -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidMethods inherited from class org.monte.media.quicktime.AbstractQuickTimeStream.Track
addChunk, addSample, getFirstSampleTime, getSampleCount, getTrackDuration, isEmpty, isEnabled, isInMovie, isInPoster, isInPreview, setEnabled, setInMovie, setInPoster, setInPreview
-
Field Details
-
soundNumberOfChannels
protected int soundNumberOfChannelsNumber of sound channels used by the sound sample. -
soundSampleSize
protected int soundSampleSizeNumber of bits per audio sample before compression. -
soundCompressionId
protected int soundCompressionIdSound compressionId. The value -1 means fixed bit rate, -2 means variable bit rate. -
soundSamplesPerPacket
protected long soundSamplesPerPacketSound stsd samples per packet. The number of uncompressed samples generated by a compressed sample (an uncompressed sample is one sample from each channel). This is also the sample duration, expressed in the media’s timescale, where the timescale is equal to the sample rate. For uncompressed formats, this field is always 1. -
soundBytesPerPacket
protected long soundBytesPerPacketFor uncompressed audio, the number of bytes in a sample for a single channel. This replaces the older sampleSize field, which is set to 16. This value is calculated by dividing the frame size by the number of channels. The same calculation is performed to calculate the value of this field for compressed audio, but the result of the calculation is not generally meaningful for compressed audio. -
soundBytesPerFrame
protected long soundBytesPerFrameThe number of bytes in a frame: for uncompressed audio, an uncompressed frame; for compressed audio, a compressed frame. This can be calculated by multiplying the bytes per packet field by the number of channels. -
soundBytesPerSample
protected long soundBytesPerSampleThe size of an uncompressed sample in bytes. This is set to 1 for 8-bit audio, 2 for all other cases, even if the sample size is greater than 2 bytes. -
soundSampleRate
protected double soundSampleRateSound sample rate. The integer portion must match the media's time scale. -
stsdExtensions
protected byte[] stsdExtensionsExtensions to the stsd chunk. Must contain atom-based fields: ([long size, long type, some data], repeat)
-
-
Constructor Details
-
AudioTrack
public AudioTrack()
-
-
Method Details
-
writeSampleDescriptionAtom
protected void writeSampleDescriptionAtom(AbstractQuickTimeStream.CompositeAtom stblAtom) throws IOException - Specified by:
writeSampleDescriptionAtomin classAbstractQuickTimeStream.Track- Throws:
IOException
-