com.mp4parser.iso14496.part15.AvcConfigurationBox Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isoparser Show documentation
Show all versions of isoparser Show documentation
A generic parser and writer for all ISO 14496 based files (MP4, Quicktime, DCF, PDCF, ...)
/*
* Copyright 2008 CoreMedia AG, Hamburg
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mp4parser.iso14496.part15;
import com.googlecode.mp4parser.AbstractBox;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/**
* 4cc = "{@value #TYPE}"
* Defined in ISO/IEC 14496-15:2004.
* Possible paths
*
* - /moov/trak/mdia/minf/stbl/stsd/avc1/avcC
* - /moov/trak/mdia/minf/stbl/stsd/drmi/avcC
*
*/
public final class AvcConfigurationBox extends AbstractBox {
public static final String TYPE = "avcC";
public AvcDecoderConfigurationRecord avcDecoderConfigurationRecord = new AvcDecoderConfigurationRecord();
public AvcConfigurationBox() {
super(TYPE);
}
public int getConfigurationVersion() {
return avcDecoderConfigurationRecord.configurationVersion;
}
public int getAvcProfileIndication() {
return avcDecoderConfigurationRecord.avcProfileIndication;
}
public int getProfileCompatibility() {
return avcDecoderConfigurationRecord.profileCompatibility;
}
public int getAvcLevelIndication() {
return avcDecoderConfigurationRecord.avcLevelIndication;
}
public int getLengthSizeMinusOne() {
return avcDecoderConfigurationRecord.lengthSizeMinusOne;
}
public List getSequenceParameterSets() {
return Collections.unmodifiableList(avcDecoderConfigurationRecord.sequenceParameterSets);
}
public List getPictureParameterSets() {
return Collections.unmodifiableList(avcDecoderConfigurationRecord.pictureParameterSets);
}
public void setConfigurationVersion(int configurationVersion) {
this.avcDecoderConfigurationRecord.configurationVersion = configurationVersion;
}
public void setAvcProfileIndication(int avcProfileIndication) {
this.avcDecoderConfigurationRecord.avcProfileIndication = avcProfileIndication;
}
public void setProfileCompatibility(int profileCompatibility) {
this.avcDecoderConfigurationRecord.profileCompatibility = profileCompatibility;
}
public void setAvcLevelIndication(int avcLevelIndication) {
this.avcDecoderConfigurationRecord.avcLevelIndication = avcLevelIndication;
}
public void setLengthSizeMinusOne(int lengthSizeMinusOne) {
this.avcDecoderConfigurationRecord.lengthSizeMinusOne = lengthSizeMinusOne;
}
public void setSequenceParameterSets(List sequenceParameterSets) {
this.avcDecoderConfigurationRecord.sequenceParameterSets = sequenceParameterSets;
}
public void setPictureParameterSets(List pictureParameterSets) {
this.avcDecoderConfigurationRecord.pictureParameterSets = pictureParameterSets;
}
public int getChromaFormat() {
return avcDecoderConfigurationRecord.chromaFormat;
}
public void setChromaFormat(int chromaFormat) {
this.avcDecoderConfigurationRecord.chromaFormat = chromaFormat;
}
public int getBitDepthLumaMinus8() {
return avcDecoderConfigurationRecord.bitDepthLumaMinus8;
}
public void setBitDepthLumaMinus8(int bitDepthLumaMinus8) {
this.avcDecoderConfigurationRecord.bitDepthLumaMinus8 = bitDepthLumaMinus8;
}
public int getBitDepthChromaMinus8() {
return avcDecoderConfigurationRecord.bitDepthChromaMinus8;
}
public void setBitDepthChromaMinus8(int bitDepthChromaMinus8) {
this.avcDecoderConfigurationRecord.bitDepthChromaMinus8 = bitDepthChromaMinus8;
}
public List getSequenceParameterSetExts() {
return avcDecoderConfigurationRecord.sequenceParameterSetExts;
}
public void setSequenceParameterSetExts(List sequenceParameterSetExts) {
this.avcDecoderConfigurationRecord.sequenceParameterSetExts = sequenceParameterSetExts;
}
public boolean hasExts() {
return avcDecoderConfigurationRecord.hasExts;
}
public void setHasExts(boolean hasExts) {
this.avcDecoderConfigurationRecord.hasExts = hasExts;
}
@Override
public void _parseDetails(ByteBuffer content) {
avcDecoderConfigurationRecord = new AvcDecoderConfigurationRecord(content);
}
@Override
public long getContentSize() {
return avcDecoderConfigurationRecord.getContentSize();
}
@Override
public void getContent(ByteBuffer byteBuffer) {
avcDecoderConfigurationRecord.getContent(byteBuffer);
}
// just to display sps in isoviewer no practical use
public String[] getSPS() {
return avcDecoderConfigurationRecord.getSPS();
}
public String[] getPPS() {
return avcDecoderConfigurationRecord.getPPS();
}
public AvcDecoderConfigurationRecord getavcDecoderConfigurationRecord() {
return avcDecoderConfigurationRecord;
}
@Override
public String toString() {
return "AvcConfigurationBox{" +
"avcDecoderConfigurationRecord=" + avcDecoderConfigurationRecord +
'}';
}
}