// Generate frame if not generated already
if (mFrame == null) {
FrameFormat outputFormat = ImageFormat.create(mWidth, mHeight,
ImageFormat.COLORSPACE_RGBA,
FrameFormat.TARGET_GPU);
mFrame = context.getFrameManager().newBoundFrame(outputFormat,
GLFrame.EXISTING_TEXTURE_BINDING,
mTexId);
mFrame.setTimestamp(mTimestamp);
}
// Push output
pushOutput("frame", mFrame);
if (!mRepeatFrame) {
// Close output port as we are done here
closeOutputPort("frame");
}