[136/906] reindent gstgldisplay with gstreamer-c-mode

This commit is contained in:
Filippo Argiolas 2008-08-01 11:00:49 +02:00 committed by Tim-Philipp Müller
parent db7490cd72
commit 395ea4fa2a
2 changed files with 2144 additions and 2143 deletions

File diff suppressed because it is too large Load diff

View file

@ -29,69 +29,69 @@
#include "gstglshader.h" #include "gstglshader.h"
#define GST_TYPE_GL_DISPLAY \ #define GST_TYPE_GL_DISPLAY \
(gst_gl_display_get_type()) (gst_gl_display_get_type())
#define GST_GL_DISPLAY(obj) \ #define GST_GL_DISPLAY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY,GstGLDisplay)) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY,GstGLDisplay))
#define GST_GL_DISPLAY_CLASS(klass) \ #define GST_GL_DISPLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLDisplayClass)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GL_DISPLAY,GstGLDisplayClass))
#define GST_IS_GL_DISPLAY(obj) \ #define GST_IS_GL_DISPLAY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY))
#define GST_IS_GL_DISPLAY_CLASS(klass) \ #define GST_IS_GL_DISPLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_DISPLAY)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GL_DISPLAY))
typedef struct _GstGLDisplay GstGLDisplay; typedef struct _GstGLDisplay GstGLDisplay;
typedef struct _GstGLDisplayClass GstGLDisplayClass; typedef struct _GstGLDisplayClass GstGLDisplayClass;
//Color space conversion method //Color space conversion method
typedef enum { typedef enum {
GST_GL_DISPLAY_CONVERSION_GLSL, //ARB_fragment_shade GST_GL_DISPLAY_CONVERSION_GLSL, //ARB_fragment_shade
GST_GL_DISPLAY_CONVERSION_MATRIX, //ARB_imaging GST_GL_DISPLAY_CONVERSION_MATRIX, //ARB_imaging
GST_GL_DISPLAY_CONVERSION_MESA, //MESA_ycbcr_texture GST_GL_DISPLAY_CONVERSION_MESA, //MESA_ycbcr_texture
} GstGLDisplayConversion; } GstGLDisplayConversion;
//Projection type //Projection type
typedef enum { typedef enum {
GST_GL_DISPLAY_PROJECTION_ORTHO2D, GST_GL_DISPLAY_PROJECTION_ORTHO2D,
GST_GL_DISPLAY_PROJECTION_PERSPECIVE GST_GL_DISPLAY_PROJECTION_PERSPECIVE
} GstGLDisplayProjection; } GstGLDisplayProjection;
//Message type //Message type
typedef enum { typedef enum {
GST_GL_DISPLAY_ACTION_CREATE_CONTEXT, GST_GL_DISPLAY_ACTION_CREATE_CONTEXT,
GST_GL_DISPLAY_ACTION_DESTROY_CONTEXT, GST_GL_DISPLAY_ACTION_DESTROY_CONTEXT,
GST_GL_DISPLAY_ACTION_CHANGE_CONTEXT, GST_GL_DISPLAY_ACTION_CHANGE_CONTEXT,
GST_GL_DISPLAY_ACTION_VISIBLE_CONTEXT, GST_GL_DISPLAY_ACTION_VISIBLE_CONTEXT,
GST_GL_DISPLAY_ACTION_RESIZE_CONTEXT, GST_GL_DISPLAY_ACTION_RESIZE_CONTEXT,
GST_GL_DISPLAY_ACTION_REDISPLAY_CONTEXT, GST_GL_DISPLAY_ACTION_REDISPLAY_CONTEXT,
GST_GL_DISPLAY_ACTION_GEN_TEXTURE, GST_GL_DISPLAY_ACTION_GEN_TEXTURE,
GST_GL_DISPLAY_ACTION_DEL_TEXTURE, GST_GL_DISPLAY_ACTION_DEL_TEXTURE,
GST_GL_DISPLAY_ACTION_INIT_UPLOAD, GST_GL_DISPLAY_ACTION_INIT_UPLOAD,
GST_GL_DISPLAY_ACTION_DO_UPLOAD, GST_GL_DISPLAY_ACTION_DO_UPLOAD,
GST_GL_DISPLAY_ACTION_INIT_DOWNLOAD, GST_GL_DISPLAY_ACTION_INIT_DOWNLOAD,
GST_GL_DISPLAY_ACTION_DO_DOWNLOAD, GST_GL_DISPLAY_ACTION_DO_DOWNLOAD,
GST_GL_DISPLAY_ACTION_GEN_FBO, GST_GL_DISPLAY_ACTION_GEN_FBO,
GST_GL_DISPLAY_ACTION_USE_FBO, GST_GL_DISPLAY_ACTION_USE_FBO,
GST_GL_DISPLAY_ACTION_DEL_FBO, GST_GL_DISPLAY_ACTION_DEL_FBO,
GST_GL_DISPLAY_ACTION_GEN_SHADER, GST_GL_DISPLAY_ACTION_GEN_SHADER,
GST_GL_DISPLAY_ACTION_DEL_SHADER GST_GL_DISPLAY_ACTION_DEL_SHADER
} GstGLDisplayAction; } GstGLDisplayAction;
//Message to communicate with the gl thread //Message to communicate with the gl thread
typedef struct _GstGLDisplayMsg { typedef struct _GstGLDisplayMsg {
GstGLDisplayAction action; GstGLDisplayAction action;
gint glutWinId; gint glutWinId;
GstGLDisplay* display; GstGLDisplay* display;
} GstGLDisplayMsg; } GstGLDisplayMsg;
//Texture pool elements //Texture pool elements
typedef struct _GstGLDisplayTex { typedef struct _GstGLDisplayTex {
GLuint texture; GLuint texture;
} GstGLDisplayTex; } GstGLDisplayTex;
@ -103,139 +103,139 @@ typedef gboolean (* CDCB) ( GLuint, GLuint, GLuint);
typedef void (* GLCB) ( gint, gint, guint, gpointer stuff); typedef void (* GLCB) ( gint, gint, guint, gpointer stuff);
struct _GstGLDisplay { struct _GstGLDisplay {
GObject object; GObject object;
//thread safe //thread safe
GMutex* mutex; GMutex* mutex;
//gl context //gl context
gint glutWinId; gint glutWinId;
gulong winId; gulong winId;
GString* title; GString* title;
gint win_xpos; gint win_xpos;
gint win_ypos; gint win_ypos;
gboolean visible; gboolean visible;
gboolean isAlive; gboolean isAlive;
GQueue* texturePool; GQueue* texturePool;
//conditions //conditions
GCond* cond_create_context; GCond* cond_create_context;
GCond* cond_destroy_context; GCond* cond_destroy_context;
GCond* cond_change_context; GCond* cond_change_context;
GCond* cond_gen_texture; GCond* cond_gen_texture;
GCond* cond_del_texture; GCond* cond_del_texture;
GCond* cond_init_upload; GCond* cond_init_upload;
GCond* cond_do_upload; GCond* cond_do_upload;
GCond* cond_init_download; GCond* cond_init_download;
GCond* cond_do_download; GCond* cond_do_download;
GCond* cond_gen_fbo; GCond* cond_gen_fbo;
GCond* cond_use_fbo; GCond* cond_use_fbo;
GCond* cond_del_fbo; GCond* cond_del_fbo;
GCond* cond_gen_shader; GCond* cond_gen_shader;
GCond* cond_del_shader; GCond* cond_del_shader;
//action redisplay //action redisplay
GLuint redisplay_texture; GLuint redisplay_texture;
GLuint redisplay_texture_width; GLuint redisplay_texture_width;
GLuint redisplay_texture_height; GLuint redisplay_texture_height;
//action resize //action resize
gint resize_width; gint resize_width;
gint resize_height; gint resize_height;
//action gen and del texture //action gen and del texture
GLuint gen_texture; GLuint gen_texture;
GLuint del_texture; GLuint del_texture;
//client callbacks //client callbacks
CRCB clientReshapeCallback; CRCB clientReshapeCallback;
CDCB clientDrawCallback; CDCB clientDrawCallback;
//upload //upload
GLuint upload_fbo; GLuint upload_fbo;
GLuint upload_depth_buffer; GLuint upload_depth_buffer;
GLuint upload_texture; GLuint upload_texture;
GLuint upload_width; GLuint upload_width;
GLuint upload_height; GLuint upload_height;
GstVideoFormat upload_video_format; GstVideoFormat upload_video_format;
GstGLDisplayConversion colorspace_conversion; GstGLDisplayConversion colorspace_conversion;
gint upload_data_with; gint upload_data_with;
gint upload_data_height; gint upload_data_height;
gpointer upload_data; gpointer upload_data;
//filter gen fbo //filter gen fbo
GLuint gen_fbo_width; GLuint gen_fbo_width;
GLuint gen_fbo_height; GLuint gen_fbo_height;
GLuint generated_fbo; GLuint generated_fbo;
GLuint generated_depth_buffer; GLuint generated_depth_buffer;
//filter use fbo //filter use fbo
GLuint use_fbo; GLuint use_fbo;
GLuint use_depth_buffer; GLuint use_depth_buffer;
GLuint use_fbo_texture; GLuint use_fbo_texture;
GLuint use_fbo_width; GLuint use_fbo_width;
GLuint use_fbo_height; GLuint use_fbo_height;
GLCB use_fbo_scene_cb; GLCB use_fbo_scene_cb;
gdouble use_fbo_proj_param1; gdouble use_fbo_proj_param1;
gdouble use_fbo_proj_param2; gdouble use_fbo_proj_param2;
gdouble use_fbo_proj_param3; gdouble use_fbo_proj_param3;
gdouble use_fbo_proj_param4; gdouble use_fbo_proj_param4;
GstGLDisplayProjection use_fbo_projection; GstGLDisplayProjection use_fbo_projection;
gpointer* use_fbo_stuff; gpointer* use_fbo_stuff;
GLuint input_texture_width; GLuint input_texture_width;
GLuint input_texture_height; GLuint input_texture_height;
GLuint input_texture; GLuint input_texture;
//filter del fbo //filter del fbo
GLuint del_fbo; GLuint del_fbo;
GLuint del_depth_buffer; GLuint del_depth_buffer;
//download //download
GLuint download_fbo; GLuint download_fbo;
GLuint download_depth_buffer; GLuint download_depth_buffer;
GLuint download_texture; GLuint download_texture;
GLuint download_texture_u; GLuint download_texture_u;
GLuint download_texture_v; GLuint download_texture_v;
gint download_width; gint download_width;
gint download_height; gint download_height;
GstVideoFormat download_video_format; GstVideoFormat download_video_format;
gpointer download_data; gpointer download_data;
GLenum multipleRT[3]; GLenum multipleRT[3];
GLuint ouput_texture; GLuint ouput_texture;
GLuint ouput_texture_width; GLuint ouput_texture_width;
GLuint ouput_texture_height; GLuint ouput_texture_height;
//action gen and del shader //action gen and del shader
const gchar* gen_text_shader; const gchar* gen_text_shader;
GstGLShader* gen_shader; GstGLShader* gen_shader;
GstGLShader* del_shader; GstGLShader* del_shader;
//fragement shader upload //fragement shader upload
gchar* text_shader_upload_YUY2_UYVY; gchar* text_shader_upload_YUY2_UYVY;
GstGLShader* shader_upload_YUY2; GstGLShader* shader_upload_YUY2;
GstGLShader* shader_upload_UYVY; GstGLShader* shader_upload_UYVY;
gchar* text_shader_upload_I420_YV12; gchar* text_shader_upload_I420_YV12;
GstGLShader* shader_upload_I420_YV12; GstGLShader* shader_upload_I420_YV12;
gchar* text_shader_upload_AYUV; gchar* text_shader_upload_AYUV;
GstGLShader* shader_upload_AYUV; GstGLShader* shader_upload_AYUV;
//fragement shader download //fragement shader download
gchar* text_shader_download_YUY2_UYVY; gchar* text_shader_download_YUY2_UYVY;
GstGLShader* shader_download_YUY2; GstGLShader* shader_download_YUY2;
GstGLShader* shader_download_UYVY; GstGLShader* shader_download_UYVY;
gchar* text_shader_download_I420_YV12; gchar* text_shader_download_I420_YV12;
GstGLShader* shader_download_I420_YV12; GstGLShader* shader_download_I420_YV12;
gchar* text_shader_download_AYUV; gchar* text_shader_download_AYUV;
GstGLShader* shader_download_AYUV; GstGLShader* shader_download_AYUV;
}; };
struct _GstGLDisplayClass { struct _GstGLDisplayClass {
GObjectClass object_class; GObjectClass object_class;
}; };
GType gst_gl_display_get_type (void); GType gst_gl_display_get_type (void);