|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproject.android.imageprocessing.GLRenderer
project.android.imageprocessing.output.Mp4VideoFileEndpoint
public class Mp4VideoFileEndpoint
A mp4 video renderer extension of GLRenderer. This class accepts a texture as input and renders it to a mp4 video file at the given frame rate. This class currently fails on most android 4+ (API 14+) devices but does work on most android 2.2 (API 8) devices. Hopefully, this will be fixed in future updates. Video recording will start when startRecording is called. It will finish recording and close the video recorder when finishRecording is called. This class does not handle displaying to the screen; however it does use the screen to render to the video recorder, so if display is not required the opengl context should be hidden.
Constructor Summary | |
---|---|
Mp4VideoFileEndpoint(java.lang.String filename,
int fps)
Creates a new Mp4VideoFileEndpoint |
Method Summary | |
---|---|
void |
finishRecording()
Stops and finalizes the video recording. |
boolean |
isRecording()
Returns whether or not the recorder is running |
void |
newTextureReady(int texture,
GLTextureOutputRenderer source)
Signals that a new texture is available and the image should be reprocessed. |
void |
startRecording()
Starts a new video recording |
Methods inherited from class project.android.imageprocessing.GLRenderer |
---|
getHeight, getWidth, onDrawFrame, onPause, onResume, onSurfaceCreated, rotateClockwise90Degrees, rotateCounterClockwise90Degrees, setRenderSize |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mp4VideoFileEndpoint(java.lang.String filename, int fps)
filename
- The file name and path that the video should be written to. ".mp4" will appended to the filenamefps
- The frames per second that the video should be encoded atMethod Detail |
---|
public boolean isRecording()
public void startRecording()
public void newTextureReady(int texture, GLTextureOutputRenderer source)
GLTextureInputRenderer
newTextureReady
in interface GLTextureInputRenderer
texture
- The texture id to be used as input.source
- The GLTextureOutputRenderer which produced the texture.public void finishRecording()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |