1 /* GStreamer 2 * Copyright (C) <2019> Eric Marks <bigmarkslp@gmail.com> 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 21 #ifndef __GST_AATV_H__ 22 #define __GST_AATV_H__ 23 24 #include <gst/gst.h> 25 #include <gst/video/gstvideofilter.h> 26 #include <gst/video/video.h> 27 #include <aalib.h> 28 29 30 G_BEGIN_DECLS 31 32 #define GST_TYPE_AATV (gst_aatv_get_type()) 33 G_DECLARE_FINAL_TYPE (GstAATv, gst_aatv, GST, AATV, GstVideoFilter) 34 35 typedef struct _GstAATvDroplet GstAATvDroplet; 36 typedef struct _GstAATvARGB GstAATvARGB; 37 38 typedef enum { 39 GST_RAIN_OFF, 40 GST_RAIN_DOWN, 41 GST_RAIN_UP, 42 GST_RAIN_LEFT, 43 GST_RAIN_RIGHT 44 } GstRainMode; 45 46 struct _GstAATvDroplet { 47 gboolean enabled; 48 gint location; 49 gint length; 50 gint delay; 51 gint delay_counter; 52 }; 53 54 struct _GstAATv { 55 GstVideoFilter videofilter; 56 57 aa_context *context; 58 59 guint32 color_text; 60 guint32 color_text_bold,color_text_normal,color_text_dim; 61 guint32 color_rain; 62 guint32 color_rain_bold,color_rain_normal,color_rain_dim; 63 guint32 color_background; 64 65 GstRainMode rain_mode; 66 67 gint rain_width; 68 gint rain_height; 69 70 gint rain_length_min; 71 gint rain_length_max; 72 73 gint rain_delay_min; 74 gint rain_delay_max; 75 76 gfloat rain_spawn_rate; 77 78 gboolean auto_brightness; 79 gfloat brightness_target_min; 80 gfloat brightness_target_max; 81 gfloat lit_percentage; 82 83 GstAATvDroplet * raindrops; 84 struct aa_renderparams ascii_parms; 85 }; 86 87 GST_ELEMENT_REGISTER_DECLARE (aatv); 88 89 G_END_DECLS 90 91 92 #endif /* __GST_AASINKE_H__ */ 93