1 /* 2 * GStreamer 3 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> 4 * Copyright (C) 2002,2007 David A. Schleef <ds@schleef.org> 5 * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com> 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef __GST_GL_TEST_SRC_H__ 24 #define __GST_GL_TEST_SRC_H__ 25 26 #include <gst/gst.h> 27 #include <gst/base/gstpushsrc.h> 28 29 #include <gst/gl/gl.h> 30 31 #include "gltestsrc.h" 32 33 G_BEGIN_DECLS 34 35 #define GST_TYPE_GL_TEST_SRC \ 36 (gst_gl_test_src_get_type()) 37 #define GST_GL_TEST_SRC(obj) \ 38 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_TEST_SRC,GstGLTestSrc)) 39 #define GST_GL_TEST_SRC_CLASS(klass) \ 40 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_TEST_SRC,GstGLTestSrcClass)) 41 #define GST_IS_GL_TEST_SRC(obj) \ 42 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_TEST_SRC)) 43 #define GST_IS_GL_TEST_SRC_CLASS(klass) \ 44 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_TEST_SRC)) 45 46 typedef struct _GstGLTestSrcClass GstGLTestSrcClass; 47 48 /** 49 * GstGLTestSrc: 50 * 51 * Opaque data structure. 52 */ 53 struct _GstGLTestSrc { 54 GstPushSrc element; 55 56 /*< private >*/ 57 58 /* type of output */ 59 GstGLTestSrcPattern set_pattern; 60 GstGLTestSrcPattern active_pattern; 61 62 /* video state */ 63 GstVideoInfo out_info; 64 65 GstGLFramebuffer *fbo; 66 GstGLMemory *out_tex; 67 68 GstGLShader *shader; 69 70 GstBufferPool *pool; 71 72 GstGLDisplay *display; 73 GstGLContext *context, *other_context; 74 gint64 timestamp_offset; /* base offset */ 75 GstClockTime running_time; /* total running time */ 76 gint64 n_frames; /* total frames sent */ 77 gboolean negotiated; 78 79 gboolean gl_result; 80 const struct SrcFuncs *src_funcs; 81 gpointer src_impl; 82 83 GstCaps *out_caps; 84 }; 85 86 struct _GstGLTestSrcClass { 87 GstPushSrcClass parent_class; 88 }; 89 90 GType gst_gl_test_src_get_type (void); 91 92 G_END_DECLS 93 94 #endif /* __GST_GL_TEST_SRC_H__ */ 95