Search in sources :

Example 6 with FrameManager

use of android.filterfw.core.FrameManager in project android_frameworks_base by ResurrectionRemix.

the class FilterEffect method frameFromTexture.

/**
     * Converts a texture into a Frame.
     */
protected Frame frameFromTexture(int texId, int width, int height) {
    FrameManager manager = getFilterContext().getFrameManager();
    FrameFormat format = ImageFormat.create(width, height, ImageFormat.COLORSPACE_RGBA, FrameFormat.TARGET_GPU);
    Frame frame = manager.newBoundFrame(format, GLFrame.EXISTING_TEXTURE_BINDING, texId);
    frame.setTimestamp(Frame.TIMESTAMP_UNKNOWN);
    return frame;
}
Also used : FrameFormat(android.filterfw.core.FrameFormat) Frame(android.filterfw.core.Frame) GLFrame(android.filterfw.core.GLFrame) FrameManager(android.filterfw.core.FrameManager)

Aggregations

Frame (android.filterfw.core.Frame)6 FrameFormat (android.filterfw.core.FrameFormat)6 FrameManager (android.filterfw.core.FrameManager)6 GLFrame (android.filterfw.core.GLFrame)6 CachedFrameManager (android.filterfw.core.CachedFrameManager)1