1 /* GStreamer 2 * Copyright (C) <2003> David A. Schleef <ds@schleef.org> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GL_TEST_SRC_H__ 21 #define __GL_TEST_SRC_H__ 22 23 #include <glib.h> 24 25 typedef struct _GstGLTestSrc GstGLTestSrc; 26 27 /** 28 * GstGLTestSrcPattern: 29 * @GST_GL_TEST_SRC_SMPTE: A standard SMPTE test pattern 30 * @GST_GL_TEST_SRC_SNOW: Random noise 31 * @GST_GL_TEST_SRC_BLACK: A black image 32 * @GST_GL_TEST_SRC_WHITE: A white image 33 * @GST_GL_TEST_SRC_RED: A red image 34 * @GST_GL_TEST_SRC_GREEN: A green image 35 * @GST_GL_TEST_SRC_BLUE: A blue image 36 * @GST_GL_TEST_SRC_CHECKERS1: Checkers pattern (1px) 37 * @GST_GL_TEST_SRC_CHECKERS2: Checkers pattern (2px) 38 * @GST_GL_TEST_SRC_CHECKERS4: Checkers pattern (4px) 39 * @GST_GL_TEST_SRC_CHECKERS8: Checkers pattern (8px) 40 * @GST_GL_TEST_SRC_CIRCULAR: Circular pattern 41 * @GST_GL_TEST_SRC_BLINK: Alternate between black and white 42 * 43 * The test pattern to produce. 44 */ 45 typedef enum { 46 GST_GL_TEST_SRC_SMPTE, 47 GST_GL_TEST_SRC_SNOW, 48 GST_GL_TEST_SRC_BLACK, 49 GST_GL_TEST_SRC_WHITE, 50 GST_GL_TEST_SRC_RED, 51 GST_GL_TEST_SRC_GREEN, 52 GST_GL_TEST_SRC_BLUE, 53 GST_GL_TEST_SRC_CHECKERS1, 54 GST_GL_TEST_SRC_CHECKERS2, 55 GST_GL_TEST_SRC_CHECKERS4, 56 GST_GL_TEST_SRC_CHECKERS8, 57 GST_GL_TEST_SRC_CIRCULAR, 58 GST_GL_TEST_SRC_BLINK, 59 GST_GL_TEST_SRC_MANDELBROT 60 } GstGLTestSrcPattern; 61 62 #include "gstgltestsrc.h" 63 64 struct BaseSrcImpl { 65 GstGLTestSrc *src; 66 GstGLContext *context; 67 GstVideoInfo v_info; 68 }; 69 70 struct SrcFuncs 71 { 72 GstGLTestSrcPattern pattern; 73 gpointer (*new) (GstGLTestSrc * src); 74 gboolean (*init) (gpointer impl, GstGLContext * context, const GstVideoInfo * v_info); 75 gboolean (*fill_bound_fbo) (gpointer impl); 76 void (*free) (gpointer impl); 77 }; 78 79 const struct SrcFuncs * gst_gl_test_src_get_src_funcs_for_pattern (GstGLTestSrcPattern pattern); 80 81 #endif 82