1 /* GStreamer 2 * Copyright (C) 2007 Michael Smith <msmith@xiph.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 21 #include <gst/gst.h> 22 #include <gst/video/gstvideodecoder.h> 23 24 #ifndef __VMNCDEC_H__ 25 #define __VMNCDEC_H__ 26 27 G_BEGIN_DECLS 28 29 #define GST_TYPE_VMNC_DEC \ 30 (gst_vmnc_dec_get_type()) 31 #define GST_VMNC_DEC(obj) \ 32 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VMNC_DEC,GstVMncDec)) 33 34 35 #define MAKE_TYPE(a,b,c,d) ((a<<24)|(b<<16)|(c<<8)|d) 36 enum 37 { 38 TYPE_RAW = 0, 39 TYPE_COPY = 1, 40 TYPE_RRE = 2, 41 TYPE_CoRRE = 4, 42 TYPE_HEXTILE = 5, 43 44 TYPE_WMVd = MAKE_TYPE ('W', 'M', 'V', 'd'), 45 TYPE_WMVe = MAKE_TYPE ('W', 'M', 'V', 'e'), 46 TYPE_WMVf = MAKE_TYPE ('W', 'M', 'V', 'f'), 47 TYPE_WMVg = MAKE_TYPE ('W', 'M', 'V', 'g'), 48 TYPE_WMVh = MAKE_TYPE ('W', 'M', 'V', 'h'), 49 TYPE_WMVi = MAKE_TYPE ('W', 'M', 'V', 'i'), 50 TYPE_WMVj = MAKE_TYPE ('W', 'M', 'V', 'j') 51 }; 52 53 struct RFBFormat 54 { 55 int width; 56 int height; 57 int stride; 58 int bytes_per_pixel; 59 int depth; 60 int big_endian; 61 62 guint8 descriptor[16]; /* The raw format descriptor block */ 63 }; 64 65 enum CursorType 66 { 67 CURSOR_COLOUR = 0, 68 CURSOR_ALPHA = 1 69 }; 70 71 struct Cursor 72 { 73 enum CursorType type; 74 int visible; 75 int x; 76 int y; 77 int width; 78 int height; 79 int hot_x; 80 int hot_y; 81 guint8 *cursordata; 82 guint8 *cursormask; 83 }; 84 85 typedef struct 86 { 87 GstVideoDecoder parent; 88 89 gboolean have_format; 90 91 GstVideoCodecState *input_state; 92 93 int framerate_num; 94 int framerate_denom; 95 96 struct Cursor cursor; 97 struct RFBFormat format; 98 guint8 *imagedata; 99 } GstVMncDec; 100 101 typedef struct 102 { 103 GstVideoDecoderClass parent_class; 104 } GstVMncDecClass; 105 106 GType gst_vmnc_dec_get_type (void); 107 GST_ELEMENT_REGISTER_DECLARE (vmncdec); 108 109 G_END_DECLS 110 111 #endif /* __VMNCDEC_H__ */ 112