|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectencoder.Encoder
public class Encoder
The Encoder class deals with the encoding process.
This class takes a group of video frames as input and does encoding of those frames by using a desired video compression technique and outputs the encoded / compressed set of video frames.
| Constructor Summary | |
|---|---|
Encoder(java.lang.String folderName,
java.lang.String fileName,
int imageWidth,
int imageHeight,
int frameNo,
int numberOfFrames,
int groupOfFrames,
int frameRate,
int bitRate,
java.lang.String mode)
Constructs a Encoder initializes LinkedList,
Node, Counters and DataFile |
|
| Method Summary | |
|---|---|
void |
checkStatus(java.lang.String type)
Checks status of flag generated by internal process or any flag generated by user to stop Encoder Process |
void |
encode()
The main Encoder encoding process is handled by encode method |
static void |
main(java.lang.String[] args)
Main program of the class |
static void |
print(java.lang.Process p,
java.lang.String type)
Prints the input, output and error streams of the process build by ProcessBuilder |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Encoder(java.lang.String folderName,
java.lang.String fileName,
int imageWidth,
int imageHeight,
int frameNo,
int numberOfFrames,
int groupOfFrames,
int frameRate,
int bitRate,
java.lang.String mode)
Encoder initializes LinkedList,
Node, Counters and DataFile
folderName - path to folder contains framesfileName - common part of file of framesimageWidth - of the frame of type intimageHeight - of the frame of type intframeNo - starting frame number of type intnumberOfFrames - Total number of the framesgroupOfFrames - number of frames in a group to be processed at a timeframeRate - of the video to feed the frames IntegerbitRate - the target bit ratemode - String representation of the input like Frames, Video and Cam| Method Detail |
|---|
public void encode()
Encoder encoding process is handled by encode method
encode calculates bitsToRead for Y, Cb and Cr components
and writes the data to the header file, reads the raw data and converts them to YCbCr
starts the encoding process.
public void checkStatus(java.lang.String type)
type - String representation of the Process type like camProcess, selfpublic static void main(java.lang.String[] args)
args -
public static void print(java.lang.Process p,
java.lang.String type)
ProcessBuilder
print will redirects the process input, output
and error streams of the process
p - is Processtype - is type of stream to print as String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||