44 lines
1.3 KiB
Java
44 lines
1.3 KiB
Java
package net.knarcraft.ffmpegconverter.streams;
|
|
|
|
/**
|
|
* An object representation of a video stream in a media file
|
|
*/
|
|
public class VideoStream extends AbstractStream implements StreamObject {
|
|
private final int width;
|
|
private final int height;
|
|
|
|
/**
|
|
* Instantiates a new video stream
|
|
*
|
|
* @param codec <p>The name of the codec for the video stream.</p>
|
|
* @param absoluteIndex <p>The index of the video stream.</p>
|
|
* @param relativeIndex <p>The index of the video stream relative to other video streams.</p>
|
|
* @param width <p>The width of the video stream.</p>
|
|
* @param height <p>The height of the video stream.</p>
|
|
*/
|
|
public VideoStream(String codec, int absoluteIndex, int relativeIndex, int width, int height) {
|
|
this.codecName = codec;
|
|
this.absoluteIndex = absoluteIndex;
|
|
this.relativeIndex = relativeIndex;
|
|
this.width = width;
|
|
this.height = height;
|
|
}
|
|
|
|
/**
|
|
* Gets the width of the video stream
|
|
*
|
|
* @return <p>The width of the video steam in pixels.</p>
|
|
*/
|
|
public int getWidth() {
|
|
return this.width;
|
|
}
|
|
|
|
/**
|
|
* Gets the height of the video stream
|
|
*
|
|
* @return <p>The height of the video stream in pixels.</p>
|
|
*/
|
|
public int getHeight() {
|
|
return this.height;
|
|
}
|
|
} |