FileDocCategorySizeDatePackage
VideoStreamChunk.javaAPI DocJaudiotagger 2.0.43958Wed Mar 30 16:11:50 BST 2011org.jaudiotagger.audio.asf.data

VideoStreamChunk

public class VideoStreamChunk extends StreamChunk
author
Christian Laireiter

Fields Summary
private byte[]
codecId
Stores the codecs id. Normally the Four-CC (4-Bytes).
private long
pictureHeight
This field stores the height of the video stream.
private long
pictureWidth
This field stores the width of the video stream.
Constructors Summary
public VideoStreamChunk(BigInteger chunkLen)
Creates an instance.

param
chunkLen Length of the entire chunk (including guid and size)


                                   
        
        super(GUID.GUID_VIDEOSTREAM, chunkLen);
    
Methods Summary
public byte[]getCodecId()

return
Returns the codecId.

        return this.codecId.clone();
    
public java.lang.StringgetCodecIdAsString()
Returns the {@link #getCodecId()}, as a String, where each byte has been converted to a char.

return
Codec Id as String.

        String result;
        if (this.codecId == null) {
            result = "Unknown"; 
        } else {
            result = new String(getCodecId());
        }
        return result;
    
public longgetPictureHeight()

return
Returns the pictureHeight.

        return this.pictureHeight;
    
public longgetPictureWidth()

return
Returns the pictureWidth.

        return this.pictureWidth;
    
public java.lang.StringprettyPrint(java.lang.String prefix)
(overridden)

see
org.jaudiotagger.audio.asf.data.StreamChunk#prettyPrint(String)

        final StringBuilder result = new StringBuilder(super.prettyPrint(prefix));
        result.insert(0, Utils.LINE_SEPARATOR + prefix + "|->VideoStream");
        result.append(prefix).append("Video info:")
                .append(Utils.LINE_SEPARATOR);
        result.append(prefix).append("      |->Width  : ").append(
                getPictureWidth()).append(Utils.LINE_SEPARATOR);
        result.append(prefix).append("      |->Heigth : ").append(
                getPictureHeight()).append(Utils.LINE_SEPARATOR);
        result.append(prefix).append("      |->Codec  : ").append(
                getCodecIdAsString()).append(Utils.LINE_SEPARATOR);
        return result.toString();
    
public voidsetCodecId(byte[] codecIdentifier)

param
codecIdentifier The codecId to set.

        this.codecId = codecIdentifier.clone();
    
public voidsetPictureHeight(long picHeight)

param
picHeight

        this.pictureHeight = picHeight;
    
public voidsetPictureWidth(long picWidth)

param
picWidth

        this.pictureWidth = picWidth;