diff options
Diffstat (limited to 'gst')
59 files changed, 1061 insertions, 1061 deletions
diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index d39c239b6..9fcb4df4d 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -251,12 +251,12 @@ gst_auparse_chain (GstPad * pad, GstBuffer * buf) /* Docs : - http://www.opengroup.org/public/pubs/external/auformat.html - http://astronomy.swin.edu.au/~pbourke/dataformats/au/ - Solaris headers : /usr/include/audio/au.h - libsndfile : src/au.c + http://www.opengroup.org/public/pubs/external/auformat.html + http://astronomy.swin.edu.au/~pbourke/dataformats/au/ + Solaris headers : /usr/include/audio/au.h + libsndfile : src/au.c Samples : - http://www.tsp.ece.mcgill.ca/MMSP/Documents/AudioFormats/AU/Samples.html + http://www.tsp.ece.mcgill.ca/MMSP/Documents/AudioFormats/AU/Samples.html */ switch (auparse->encoding) { diff --git a/gst/autodetect/gstautoaudiosink.h b/gst/autodetect/gstautoaudiosink.h index 50b6b47c0..4d47ebd34 100644 --- a/gst/autodetect/gstautoaudiosink.h +++ b/gst/autodetect/gstautoaudiosink.h @@ -28,10 +28,10 @@ G_BEGIN_DECLS (gst_auto_audio_sink_get_type ()) #define GST_AUTO_AUDIO_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUTO_AUDIO_SINK, \ - GstAutoAudioSink)) + GstAutoAudioSink)) #define GST_AUTO_AUDIO_SINK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUTO_AUDIO_SINK, \ - GstAutoAudioSink)) + GstAutoAudioSink)) #define GST_IS_AUTO_AUDIO_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUTO_AUDIO_SINK)) #define GST_IS_AUTO_AUDIO_SINK_CLASS(obj) \ @@ -49,7 +49,7 @@ typedef struct _GstAutoAudioSinkClass { GstBinClass parent_class; } GstAutoAudioSinkClass; -GType gst_auto_audio_sink_get_type (void); +GType gst_auto_audio_sink_get_type (void); G_END_DECLS diff --git a/gst/autodetect/gstautovideosink.h b/gst/autodetect/gstautovideosink.h index 06995ad88..81d9d1645 100644 --- a/gst/autodetect/gstautovideosink.h +++ b/gst/autodetect/gstautovideosink.h @@ -28,10 +28,10 @@ G_BEGIN_DECLS (gst_auto_video_sink_get_type ()) #define GST_AUTO_VIDEO_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUTO_VIDEO_SINK, \ - GstAutoVideoSink)) + GstAutoVideoSink)) #define GST_AUTO_VIDEO_SINK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUTO_VIDEO_SINK, \ - GstAutoVideoSink)) + GstAutoVideoSink)) #define GST_IS_AUTO_VIDEO_SINK(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUTO_VIDEO_SINK)) #define GST_IS_AUTO_VIDEO_SINK_CLASS(obj) \ @@ -49,7 +49,7 @@ typedef struct _GstAutoVideoSinkClass { GstBinClass parent_class; } GstAutoVideoSinkClass; -GType gst_auto_video_sink_get_type (void); +GType gst_auto_video_sink_get_type (void); G_END_DECLS diff --git a/gst/avi/gstavidemux.h b/gst/avi/gstavidemux.h index 617c7234b..4aa517694 100644 --- a/gst/avi/gstavidemux.h +++ b/gst/avi/gstavidemux.h @@ -39,49 +39,49 @@ G_BEGIN_DECLS #define GST_IS_AVI_DEMUX_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_AVI_DEMUX)) -#define GST_AVI_DEMUX_MAX_STREAMS 16 +#define GST_AVI_DEMUX_MAX_STREAMS 16 #define CHUNKID_TO_STREAMNR(chunkid) \ ((((chunkid) & 0xff) - '0') * 10 + \ (((chunkid) >> 8) & 0xff) - '0') typedef struct { - gint index_nr; - gint stream_nr; - guint64 ts, dur; - guint32 flags; - guint64 offset; - gint size; - guint64 bytes_before; - guint32 frames_before; + gint index_nr; + gint stream_nr; + guint64 ts, dur; + guint32 flags; + guint64 offset; + gint size; + guint64 bytes_before; + guint32 frames_before; } gst_avi_index_entry; typedef struct { /* index of this streamcontext */ - guint num; + guint num; /* pad, strh */ - GstPad *pad; - gst_riff_strh *strh; + GstPad *pad; + gst_riff_strh *strh; union { gst_riff_strf_vids *vids; gst_riff_strf_auds *auds; gst_riff_strf_iavs *iavs; - gpointer data; + gpointer data; } strf; - GstBuffer *extradata, *initdata; - gchar *name; + GstBuffer *extradata, *initdata; + gchar *name; /* current position (byte, frame, time) */ - guint current_frame; - guint64 current_byte; - gint current_entry; + guint current_frame; + guint64 current_byte; + gint current_entry; /* stream length */ - guint64 total_bytes; - guint32 total_frames; + guint64 total_bytes; + guint32 total_frames; - guint64 *indexes; + guint64 *indexes; } avi_stream_context; typedef enum { @@ -91,44 +91,44 @@ typedef enum { } GstAviDemuxState; typedef struct _GstAviDemux { - GstElement parent; + GstElement parent; /* pads */ - GstPad *sinkpad; + GstPad *sinkpad; /* AVI decoding state */ GstAviDemuxState state; - guint64 offset; + guint64 offset; /* index */ gst_avi_index_entry *index_entries; - guint index_size; - guint64 index_offset; - guint current_entry; + guint index_size; + guint64 index_offset; + guint current_entry; /* streams */ - guint num_streams; - guint num_v_streams; - guint num_a_streams; + guint num_streams; + guint num_v_streams; + guint num_a_streams; avi_stream_context stream[GST_AVI_DEMUX_MAX_STREAMS]; /* some stream info for length */ - gst_riff_avih *avih; + gst_riff_avih *avih; /* seeking */ - gdouble segment_rate; - GstSeekFlags segment_flags; + gdouble segment_rate; + GstSeekFlags segment_flags; /* in GST_FORMAT_TIME */ - gint64 segment_start; - gint64 segment_stop; - GstEvent *seek_event; + gint64 segment_start; + gint64 segment_stop; + GstEvent *seek_event; } GstAviDemux; typedef struct _GstAviDemuxClass { GstElementClass parent_class; } GstAviDemuxClass; -GType gst_avi_demux_get_type (void); +GType gst_avi_demux_get_type (void); G_END_DECLS diff --git a/gst/cutter/gstcutter.h b/gst/cutter/gstcutter.h index 84166636b..c69d89858 100644 --- a/gst/cutter/gstcutter.h +++ b/gst/cutter/gstcutter.h @@ -51,21 +51,21 @@ struct _GstCutter GstPad *sinkpad, *srcpad; - double threshold_level; /* level below which to cut */ - double threshold_length; /* how long signal has to remain - * below this level before cutting */ + double threshold_level; /* level below which to cut */ + double threshold_length; /* how long signal has to remain + * below this level before cutting */ - double silent_run_length; /* how long has it been below threshold ? */ + double silent_run_length; /* how long has it been below threshold ? */ gboolean silent; - double pre_length; /* how long can the pre-record buffer be ? */ + double pre_length; /* how long can the pre-record buffer be ? */ double pre_run_length; /* how long is it currently ? */ - GList *pre_buffer; /* list of GstBuffers in pre-record buffer */ - gboolean leaky; /* do we leak an overflowing prebuffer ? */ + GList *pre_buffer; /* list of GstBuffers in pre-record buffer */ + gboolean leaky; /* do we leak an overflowing prebuffer ? */ - gboolean have_caps; /* did we get the needed caps yet ? */ - gint width; /* bit width of data */ - long max_sample; /* maximum sample value */ + gboolean have_caps; /* did we get the needed caps yet ? */ + gint width; /* bit width of data */ + long max_sample; /* maximum sample value */ }; struct _GstCutterClass diff --git a/gst/debug/tests.c b/gst/debug/tests.c index d3324f328..bba3eb55d 100644 --- a/gst/debug/tests.c +++ b/gst/debug/tests.c @@ -415,14 +415,14 @@ md5_process_block (const void *buffer, size_t len, MD5Test * ctx) before the computation. To reduce the work for the next steps we store the swapped words in the array CORRECT_WORDS. */ -#define OP(a, b, c, d, s, T) \ - do \ - { \ - a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \ - ++words; \ - CYCLIC (a, s); \ - a += b; \ - } \ +#define OP(a, b, c, d, s, T) \ + do \ + { \ + a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \ + ++words; \ + CYCLIC (a, s); \ + a += b; \ + } \ while (0) /* It is unfortunate that C does not provide an operator for @@ -457,13 +457,13 @@ md5_process_block (const void *buffer, size_t len, MD5Test * ctx) in CORRECT_WORDS. Redefine the macro to take an additional first argument specifying the function to use. */ #undef OP -#define OP(f, a, b, c, d, k, s, T) \ - do \ - { \ - a += f (b, c, d) + correct_words[k] + T; \ - CYCLIC (a, s); \ - a += b; \ - } \ +#define OP(f, a, b, c, d, k, s, T) \ + do \ + { \ + a += f (b, c, d) + correct_words[k] + T; \ + CYCLIC (a, s); \ + a += b; \ + } \ while (0) /* Round 2. */ diff --git a/gst/debug/tests.h b/gst/debug/tests.h index 5638bf6d8..444a1c19a 100644 --- a/gst/debug/tests.h +++ b/gst/debug/tests.h @@ -26,14 +26,14 @@ typedef struct _GstTestInfo GstTestInfo; struct _GstTestInfo { - GParamSpec * (* get_spec) (const GstTestInfo *info, gboolean compare_value); - gpointer (* new) (const GstTestInfo *info); - void (* add) (gpointer test, - GstBuffer *buffer); - gboolean (* finish) (gpointer test, GValue *value); - void (* get_value) (gpointer test, - GValue *value); - void (* free) (gpointer test); + GParamSpec * (* get_spec) (const GstTestInfo *info, gboolean compare_value); + gpointer (* new) (const GstTestInfo *info); + void (* add) (gpointer test, + GstBuffer *buffer); + gboolean (* finish) (gpointer test, GValue *value); + void (* get_value) (gpointer test, + GValue *value); + void (* free) (gpointer test); }; extern const GstTestInfo tests[]; diff --git a/gst/effectv/gstwarp.c b/gst/effectv/gstwarp.c index 1d24671be..3cca8da5c 100644 --- a/gst/effectv/gstwarp.c +++ b/gst/effectv/gstwarp.c @@ -45,7 +45,7 @@ #include <gst/video/video.h> #ifndef M_PI -#define M_PI 3.14159265358979323846 +#define M_PI 3.14159265358979323846 #endif #define GST_TYPE_WARPTV \ diff --git a/gst/flx/flx_fmt.h b/gst/flx/flx_fmt.h index 2af8db5ff..e50ee48ee 100644 --- a/gst/flx/flx_fmt.h +++ b/gst/flx/flx_fmt.h @@ -29,101 +29,101 @@ extern "C" { enum Flx_TypeChunk { - /* frame chunks */ - FLX_PREFIX_TYPE = 0xf100, - FLX_SCRIPT_CHUNK = 0xf1e0, - FLX_FRAME_TYPE = 0xf1fa, - FLX_SEGMENT_TABLE = 0xf1fb, - FLX_HUFFMAN_TABLE = 0xf1fc, - - /* sub chunks */ - FLX_CEL_DATA = 3, - FLX_COLOR256 = 4, - FLX_SS2 = 7, - FLX_COLOR64 = 11, - FLX_LC = 12, - FLX_BLACK = 13, - FLX_BRUN = 15, - FLX_COPY = 16, - FLX_MINI = 18, - FLX_DTA_RUN = 25, - FLX_DTA_COPY = 26, - FLX_DTA_LC = 27, - FLX_LABEL = 31, - FLX_BMP_MASK = 32, - FLX_MLEV_MASK = 33, - FLX_SEGMENT = 34, - FLX_KEY_IMAGE = 35, - FLX_KEY_PAL = 36, - FLX_REGION = 37, - FLX_WAVE = 38, - FLX_USERSTRING = 39, - FLX_RGN_MASK = 40 + /* frame chunks */ + FLX_PREFIX_TYPE = 0xf100, + FLX_SCRIPT_CHUNK = 0xf1e0, + FLX_FRAME_TYPE = 0xf1fa, + FLX_SEGMENT_TABLE = 0xf1fb, + FLX_HUFFMAN_TABLE = 0xf1fc, + + /* sub chunks */ + FLX_CEL_DATA = 3, + FLX_COLOR256 = 4, + FLX_SS2 = 7, + FLX_COLOR64 = 11, + FLX_LC = 12, + FLX_BLACK = 13, + FLX_BRUN = 15, + FLX_COPY = 16, + FLX_MINI = 18, + FLX_DTA_RUN = 25, + FLX_DTA_COPY = 26, + FLX_DTA_LC = 27, + FLX_LABEL = 31, + FLX_BMP_MASK = 32, + FLX_MLEV_MASK = 33, + FLX_SEGMENT = 34, + FLX_KEY_IMAGE = 35, + FLX_KEY_PAL = 36, + FLX_REGION = 37, + FLX_WAVE = 38, + FLX_USERSTRING = 39, + FLX_RGN_MASK = 40 }; enum Flx_MagicHdr { - FLX_MAGICHDR_FLI = 0xaf11, - FLX_MAGICHDR_FLC = 0xaf12, - FLX_MAGICHDR_FLX = 0xaf44, - FLX_MAGICHDR_HUFFBWT = 0xaf30 + FLX_MAGICHDR_FLI = 0xaf11, + FLX_MAGICHDR_FLC = 0xaf12, + FLX_MAGICHDR_FLX = 0xaf44, + FLX_MAGICHDR_HUFFBWT = 0xaf30 }; typedef struct _FlxHeader { - guint32 size; - guint16 type; - guint16 frames; - guint16 width,height,depth,flags; - guint32 speed; - guint16 reserved1; - /* FLC */ - guint32 created,creator,updated,updater; - guint16 aspect_dx, aspect_dy; - /* EGI */ - guint16 ext_flags,keyframes,totalframes; - guint32 req_memory; - guint16 max_regions,transp_num; - guchar reserved2[24]; - /* FLC */ - guint32 oframe1,oframe2; - guchar reserved3[40]; + guint32 size; + guint16 type; + guint16 frames; + guint16 width,height,depth,flags; + guint32 speed; + guint16 reserved1; + /* FLC */ + guint32 created,creator,updated,updater; + guint16 aspect_dx, aspect_dy; + /* EGI */ + guint16 ext_flags,keyframes,totalframes; + guint32 req_memory; + guint16 max_regions,transp_num; + guchar reserved2[24]; + /* FLC */ + guint32 oframe1,oframe2; + guchar reserved3[40]; } FlxHeader; #define FlxHeaderSize 128 typedef struct _FlxFrameChunk { - guint32 size; - guint16 id; + guint32 size; + guint16 id; } FlxFrameChunk; #define FlxFrameChunkSize 6 typedef struct _FlxPrefixChunk { - guint16 chunks; - guchar reserved[8]; + guint16 chunks; + guchar reserved[8]; } FlxPrefixChunk; typedef struct _FlxSegmentTable { - guint16 segments; + guint16 segments; } FlxSegmentTable; typedef struct _FlxHuffmanTable { - guint16 codelength; - guint16 numcodes; - guchar reserved[6]; + guint16 codelength; + guint16 numcodes; + guchar reserved[6]; } FlxHuffmanTable; typedef struct _FlxFrameType { - guint16 chunks; - guint16 delay; - guchar reserved[6]; + guint16 chunks; + guint16 delay; + guchar reserved[6]; } FlxFrameType; #define FlxFrameTypeSize 10 diff --git a/gst/flx/gstflxdec.h b/gst/flx/gstflxdec.h index edbfce173..7ba5b7601 100644 --- a/gst/flx/gstflxdec.h +++ b/gst/flx/gstflxdec.h @@ -34,7 +34,7 @@ typedef enum { GST_FLXDEC_READ_HEADER, GST_FLXDEC_PLAYING, } GstFlxDecState; - + /* Definition of structure storing data for this element. */ typedef struct _GstFlxDec GstFlxDec; diff --git a/gst/goom/filters.c b/gst/goom/filters.c index 16f8f5323..f92dbcd78 100644 --- a/gst/goom/filters.c +++ b/gst/goom/filters.c @@ -5,9 +5,9 @@ * -ajout de zoomFilter() * -copie de zoomFilter() en zoomFilterRGB(), gérant les 3 couleurs * -optimisation de sinFilter (utilisant une table de sin) - * -asm - * -optimisation de la procedure de génération du buffer de transformation - * la vitesse est maintenant comprise dans [0..128] au lieu de [0..100] + * -asm + * -optimisation de la procedure de génération du buffer de transformation + * la vitesse est maintenant comprise dans [0..128] au lieu de [0..100] */ /*#define _DEBUG_PIXEL; */ @@ -185,7 +185,7 @@ calculatePXandPY (int x, int y, int *px, int *py) static inline void setPixelRGB (Uint * buffer, Uint x, Uint y, Color c) { -/* buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b */ +/* buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b */ #ifdef _DEBUG_PIXEL if (x + y * resolx >= resolx * resoly) { fprintf (stderr, "setPixel ERROR : hors du tableau... %i, %i\n", x, y); @@ -245,7 +245,7 @@ getPixelRGB (Uint * buffer, Uint x, Uint y, Color * c) (unsigned char *) (buffer + (x + y * resolx))); c->v = *(unsigned char *) (++tmp8); c->r = *(unsigned char *) (++tmp8); -/* *c = (Color) buffer[x+y*WIDTH] ; */ +/* *c = (Color) buffer[x+y*WIDTH] ; */ #endif } @@ -273,7 +273,7 @@ getPixelRGB_ (Uint * buffer, Uint x, Color * c) c->b = *(unsigned char *) (tmp8 = (unsigned char *) (buffer + x)); c->v = *(unsigned char *) (++tmp8); c->r = *(unsigned char *) (++tmp8); -/* *c = (Color) buffer[x+y*WIDTH] ; */ +/* *c = (Color) buffer[x+y*WIDTH] ; */ #endif } @@ -452,8 +452,8 @@ zoomFilterFastRGB (Uint * pix1, npx10 = (px / sqrtperte); npy10 = (py / sqrtperte); -/* if (npx10 >= prevX) fprintf(stderr,"error npx:%d",npx10); - if (npy10 >= prevY) fprintf(stderr,"error npy:%d",npy10); +/* if (npx10 >= prevX) fprintf(stderr,"error npx:%d",npx10); + if (npy10 >= prevY) fprintf(stderr,"error npy:%d",npy10); */ coefh = px % sqrtperte; coefv = py % sqrtperte; diff --git a/gst/goom/filters.h b/gst/goom/filters.h index 33784c299..dac34dd9e 100644 --- a/gst/goom/filters.h +++ b/gst/goom/filters.h @@ -7,16 +7,16 @@ typedef struct { - int vitesse ; - unsigned char pertedec ; - unsigned char sqrtperte ; - int middleX,middleY ; - char reverse ; - char mode ; - /** @since June 2001 */ - int hPlaneEffect ; - int vPlaneEffect ; - char noisify ; + int vitesse ; + unsigned char pertedec ; + unsigned char sqrtperte ; + int middleX,middleY ; + char reverse ; + char mode ; + /** @since June 2001 */ + int hPlaneEffect ; + int vPlaneEffect ; + char noisify ; } ZoomFilterData ; @@ -28,8 +28,8 @@ typedef struct #define WATER_MODE 5 void pointFilter(guint32 *pix1, Color c, - float t1, float t2, float t3, float t4, - guint32 cycle); + float t1, float t2, float t3, float t4, + guint32 cycle); /* filtre de zoom : le contenu de pix1 est copie dans pix2, avec l'effet appliqué @@ -43,9 +43,9 @@ Uint middleY); */ void zoomFilterFastRGB (guint32 *pix1, - guint32 *pix2, - ZoomFilterData *zf, - guint32 resx, guint32 resy); + guint32 *pix2, + ZoomFilterData *zf, + guint32 resx, guint32 resy); /* filtre sin : @@ -58,11 +58,11 @@ void zoomFilterFastRGB (guint32 *pix1, */ /* void sinFilter(Uint *pix1,Uint *pix2, - Uint cycle, - Uint mode, - Uint rate, - char lenght, - Uint speed); + Uint cycle, + Uint mode, + Uint rate, + char lenght, + Uint speed); */ #define SIN_MUL 1 diff --git a/gst/goom/goom_tools.h b/gst/goom/goom_tools.h index e3613825b..91f310c24 100644 --- a/gst/goom/goom_tools.h +++ b/gst/goom/goom_tools.h @@ -8,22 +8,22 @@ extern int * rand_tab ; extern unsigned short rand_pos ; #define RAND_INIT(i) \ - srand (i) ;\ - if (!rand_tab)\ - rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;\ - rand_pos = 1 ;\ - while (rand_pos != 0)\ - rand_tab [rand_pos++] = rand () ; + srand (i) ;\ + if (!rand_tab)\ + rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;\ + rand_pos = 1 ;\ + while (rand_pos != 0)\ + rand_tab [rand_pos++] = rand () ; #define RAND()\ - (rand_tab[rand_pos = rand_pos + 1]) + (rand_tab[rand_pos = rand_pos + 1]) #define RAND_CLOSE()\ - free (rand_tab);\ - rand_tab = 0; + free (rand_tab);\ + rand_tab = 0; /*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */ #define iRAND(i) (RAND()%i) - + #endif diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c index 7a16784f6..d5d51686a 100644 --- a/gst/law/alaw-encode.c +++ b/gst/law/alaw-encode.c @@ -50,16 +50,16 @@ static GstFlowReturn gst_alawenc_chain (GstPad * pad, GstBuffer * buffer); * * s16_to_alaw() accepts an 16-bit integer and encodes it as A-law data. * - * Linear Input Code Compressed Code - * ------------------------ --------------- - * 0000000wxyza 000wxyz - * 0000001wxyza 001wxyz - * 000001wxyzab 010wxyz - * 00001wxyzabc 011wxyz - * 0001wxyzabcd 100wxyz - * 001wxyzabcde 101wxyz - * 01wxyzabcdef 110wxyz - * 1wxyzabcdefg 111wxyz + * Linear Input Code Compressed Code + * ------------------------ --------------- + * 0000000wxyza 000wxyz + * 0000001wxyza 001wxyz + * 000001wxyzab 010wxyz + * 00001wxyzabc 011wxyz + * 0001wxyzabcd 100wxyz + * 001wxyzabcde 101wxyz + * 01wxyzabcdef 110wxyz + * 1wxyzabcdefg 111wxyz * * For further information see John C. Bellamy's Digital Telephony, 1982, * John Wiley & Sons, pps 98-111 and 472-476. diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c index de8ca6a09..6bb53ddc1 100644 --- a/gst/level/gstlevel.c +++ b/gst/level/gstlevel.c @@ -328,7 +328,7 @@ gst_level_calculate_##TYPE (TYPE * in, guint num, gint channels, \ { \ register int j; \ double squaresum = 0.0; /* square sum of the integer samples */ \ - register double square = 0.0; /* Square */ \ + register double square = 0.0; /* Square */ \ register double peaksquare = 0.0; /* Peak Square Sample */ \ gdouble normalizer; /* divisor to get a [-1.0, 1.0] range */ \ \ diff --git a/gst/level/gstlevel.h b/gst/level/gstlevel.h index b003c23a1..50794b305 100644 --- a/gst/level/gstlevel.h +++ b/gst/level/gstlevel.h @@ -50,27 +50,27 @@ typedef struct _GstLevelClass GstLevelClass; struct _GstLevel { GstBaseTransform element; - gboolean message; /* whether or not to post messages */ - gdouble interval; /* how many seconds between emits */ + gboolean message; /* whether or not to post messages */ + gdouble interval; /* how many seconds between emits */ - gint rate; /* caps variables */ + gint rate; /* caps variables */ gint width; gint channels; - gdouble decay_peak_ttl; /* time to live for peak in seconds */ - gdouble decay_peak_falloff; /* falloff in dB/sec */ - gint num_frames; /* frame count (1 sample per channel) + gdouble decay_peak_ttl; /* time to live for peak in seconds */ + gdouble decay_peak_falloff; /* falloff in dB/sec */ + gint num_frames; /* frame count (1 sample per channel) * since last emit */ /* per-channel arrays for intermediate values */ - gdouble *CS; /* normalized Cumulative Square */ - gdouble *peak; /* normalized Peak value over buffer */ - gdouble *last_peak; /* last normalized Peak value over interval */ - gdouble *decay_peak; /* running decaying normalized Peak */ - gdouble *decay_peak_base; /* value of last peak we are decaying from */ - gdouble *MS; /* normalized Mean Square of buffer */ - gdouble *RMS_dB; /* RMS in dB to emit */ - GstClockTime *decay_peak_age; /* age of last peak */ + gdouble *CS; /* normalized Cumulative Square */ + gdouble *peak; /* normalized Peak value over buffer */ + gdouble *last_peak; /* last normalized Peak value over interval */ + gdouble *decay_peak; /* running decaying normalized Peak */ + gdouble *decay_peak_base; /* value of last peak we are decaying from */ + gdouble *MS; /* normalized Mean Square of buffer */ + gdouble *RMS_dB; /* RMS in dB to emit */ + GstClockTime *decay_peak_age; /* age of last peak */ }; struct _GstLevelClass { diff --git a/gst/matroska/ebml-write.h b/gst/matroska/ebml-write.h index b579d8b2b..a0739c0b8 100644 --- a/gst/matroska/ebml-write.h +++ b/gst/matroska/ebml-write.h @@ -77,56 +77,56 @@ GstFlowReturn gst_ebml_last_write_result (GstEbmlWrite *ebml); * each element, but fill this one until a flush. */ void gst_ebml_write_set_cache (GstEbmlWrite *ebml, - guint size); + guint size); void gst_ebml_write_flush_cache (GstEbmlWrite *ebml); /* * Seeking. */ void gst_ebml_write_seek (GstEbmlWrite *ebml, - guint64 pos); + guint64 pos); /* * Data writing. */ void gst_ebml_write_uint (GstEbmlWrite *ebml, - guint32 id, - guint64 num); + guint32 id, + guint64 num); void gst_ebml_write_sint (GstEbmlWrite *ebml, - guint32 id, - gint64 num); + guint32 id, + gint64 num); void gst_ebml_write_float (GstEbmlWrite *ebml, - guint32 id, - gdouble num); + guint32 id, + gdouble num); void gst_ebml_write_ascii (GstEbmlWrite *ebml, - guint32 id, - const gchar *str); + guint32 id, + const gchar *str); void gst_ebml_write_utf8 (GstEbmlWrite *ebml, - guint32 id, - const gchar *str); + guint32 id, + const gchar *str); void gst_ebml_write_date (GstEbmlWrite *ebml, - guint32 id, - gint64 date); + guint32 id, + gint64 date); guint64 gst_ebml_write_master_start (GstEbmlWrite *ebml, - guint32 id); + guint32 id); void gst_ebml_write_master_finish (GstEbmlWrite *ebml, - guint64 startpos); + guint64 startpos); void gst_ebml_write_binary (GstEbmlWrite *ebml, - guint32 id, - guchar *binary, - guint64 length); + guint32 id, + guchar *binary, + guint64 length); void gst_ebml_write_header (GstEbmlWrite *ebml, - gchar *doctype, - guint version); + gchar *doctype, + guint version); /* * Note: this is supposed to be used only for media data. */ void gst_ebml_write_buffer_header (GstEbmlWrite *ebml, - guint32 id, - guint64 length); + guint32 id, + guint64 length); void gst_ebml_write_buffer (GstEbmlWrite *ebml, - GstBuffer *data); + GstBuffer *data); /* * A hack, basically... See matroska-mux.c. I should actually @@ -134,8 +134,8 @@ void gst_ebml_write_buffer (GstEbmlWrite *ebml, * works for now. */ void gst_ebml_replace_uint (GstEbmlWrite *ebml, - guint64 pos, - guint64 num); + guint64 pos, + guint64 num); G_END_DECLS diff --git a/gst/matroska/matroska-demux.h b/gst/matroska/matroska-demux.h index 889bb6503..14401a589 100644 --- a/gst/matroska/matroska-demux.h +++ b/gst/matroska/matroska-demux.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS #define GST_IS_MATROSKA_DEMUX_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_DEMUX)) -#define GST_MATROSKA_DEMUX_MAX_STREAMS 64 +#define GST_MATROSKA_DEMUX_MAX_STREAMS 64 typedef enum { GST_MATROSKA_DEMUX_STATE_START, diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h index ff61efd1d..a23bfdb3f 100644 --- a/gst/matroska/matroska-ids.h +++ b/gst/matroska/matroska-ids.h @@ -218,7 +218,7 @@ typedef enum { typedef struct _GstMatroskaTrackContext { GstPad *pad; GstCaps *caps; - guint index; + guint index; /* some often-used info */ gchar *codec_id, *codec_name, *name, *language; @@ -249,7 +249,7 @@ typedef struct _GstMatroskaTrackAudioContext { /* Special flag for Vorbis, we need to send codec_priv first before * sending any data, and just testing for time == 0 is not enough * to detect that */ - gboolean first_frame; + gboolean first_frame; } GstMatroskaTrackAudioContext; typedef struct _GstMatroskaTrackComplexContext { diff --git a/gst/matroska/matroska-mux.h b/gst/matroska/matroska-mux.h index 2f1d2db48..e3d3499e1 100644 --- a/gst/matroska/matroska-mux.h +++ b/gst/matroska/matroska-mux.h @@ -84,7 +84,7 @@ typedef struct _GstMatroskaMux { GstElement element; /* pads */ - GstPad *srcpad; + GstPad *srcpad; GstCollectPads *collect; GstEbmlWrite *ebml_write; diff --git a/gst/monoscope/convolve.c b/gst/monoscope/convolve.c index 4d2821488..070baa4d9 100644 --- a/gst/monoscope/convolve.c +++ b/gst/monoscope/convolve.c @@ -19,7 +19,7 @@ * * * Note: 7th December 2004: This file used to be licensed under the GPL, - * but we got permission from Ralp Loader to relicense it to LGPL. + * but we got permission from Ralp Loader to relicense it to LGPL. * * $Id$ * @@ -288,7 +288,7 @@ convolve_match (const int *lastchoice, for (i = 0; i < 256; i++) right[i] -= avg; /* End-of-stack marker. */ -#if 0 /* The following line produces a CRASH, need to figure out why?!! */ +#if 0 /* The following line produces a CRASH, need to figure out why?!! */ top[1].b.null = scratch; #endif top[1].b.main = NULL; diff --git a/gst/monoscope/convolve.h b/gst/monoscope/convolve.h index ff2b1e254..dc934ec87 100644 --- a/gst/monoscope/convolve.h +++ b/gst/monoscope/convolve.h @@ -44,8 +44,8 @@ convolve_state *convolve_init (void); void convolve_close (convolve_state * state); int convolve_match (const int * lastchoice, - const short int * input, - convolve_state * state); + const short int * input, + convolve_state * state); #ifdef __cplusplus } diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c index 44e5d0bd2..74ee8688e 100644 --- a/gst/multipart/multipartmux.c +++ b/gst/multipart/multipartmux.c @@ -80,7 +80,7 @@ GST_ELEMENT_DETAILS ("multipart muxer", "mux multipart streams", "Wim Taymans <wim@fluendo.com>"); -#define DEFAULT_BOUNDARY "ThisRandomString" +#define DEFAULT_BOUNDARY "ThisRandomString" enum { diff --git a/gst/oldcore/gstaggregator.c b/gst/oldcore/gstaggregator.c index 71d8d50aa..53b165a4c 100644 --- a/gst/oldcore/gstaggregator.c +++ b/gst/oldcore/gstaggregator.c @@ -82,7 +82,7 @@ gst_aggregator_sched_get_type (void) return aggregator_sched_type; } -#define AGGREGATOR_IS_LOOP_BASED(ag) ((ag)->sched != AGGREGATOR_CHAIN) +#define AGGREGATOR_IS_LOOP_BASED(ag) ((ag)->sched != AGGREGATOR_CHAIN) static GstPad *gst_aggregator_request_new_pad (GstElement * element, GstPadTemplate * temp, const gchar * unused); diff --git a/gst/oldcore/gstaggregator.h b/gst/oldcore/gstaggregator.h index 24af881da..327e0bf87 100644 --- a/gst/oldcore/gstaggregator.h +++ b/gst/oldcore/gstaggregator.h @@ -30,7 +30,7 @@ G_BEGIN_DECLS typedef enum { - AGGREGATOR_LOOP = 1, + AGGREGATOR_LOOP = 1, AGGREGATOR_LOOP_SELECT, AGGREGATOR_CHAIN } GstAggregatorSchedType; @@ -46,8 +46,8 @@ typedef enum { #define GST_IS_AGGREGATOR_CLASS(obj) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR)) -typedef struct _GstAggregator GstAggregator; -typedef struct _GstAggregatorClass GstAggregatorClass; +typedef struct _GstAggregator GstAggregator; +typedef struct _GstAggregatorClass GstAggregatorClass; struct _GstAggregator { GstElement element; @@ -67,7 +67,7 @@ struct _GstAggregatorClass { GstElementClass parent_class; }; -GType gst_aggregator_get_type (void); +GType gst_aggregator_get_type (void); G_END_DECLS diff --git a/gst/oldcore/gstmd5sink.c b/gst/oldcore/gstmd5sink.c index bd661bfc6..282d4c3f9 100644 --- a/gst/oldcore/gstmd5sink.c +++ b/gst/oldcore/gstmd5sink.c @@ -66,8 +66,8 @@ GST_BOILERPLATE_FULL (GstMD5Sink, gst_md5sink, GstElement, GST_TYPE_ELEMENT, _do_init); /* GObject stuff */ -/*static void gst_md5sink_set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec);*/ +/*static void gst_md5sink_set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec);*/ static void gst_md5sink_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); @@ -255,14 +255,14 @@ md5_process_block (const void *buffer, size_t len, GstMD5Sink * ctx) before the computation. To reduce the work for the next steps we store the swapped words in the array CORRECT_WORDS. */ -#define OP(a, b, c, d, s, T) \ - do \ - { \ - a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \ - ++words; \ - CYCLIC (a, s); \ - a += b; \ - } \ +#define OP(a, b, c, d, s, T) \ + do \ + { \ + a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \ + ++words; \ + CYCLIC (a, s); \ + a += b; \ + } \ while (0) /* It is unfortunate that C does not provide an operator for @@ -297,13 +297,13 @@ md5_process_block (const void *buffer, size_t len, GstMD5Sink * ctx) in CORRECT_WORDS. Redefine the macro to take an additional first argument specifying the function to use. */ #undef OP -#define OP(f, a, b, c, d, k, s, T) \ - do \ - { \ - a += f (b, c, d) + correct_words[k] + T; \ - CYCLIC (a, s); \ - a += b; \ - } \ +#define OP(f, a, b, c, d, k, s, T) \ + do \ + { \ + a += f (b, c, d) + correct_words[k] + T; \ + CYCLIC (a, s); \ + a += b; \ + } \ while (0) /* Round 2. */ diff --git a/gst/oldcore/gstmd5sink.h b/gst/oldcore/gstmd5sink.h index d2b8109a8..b083e12e8 100644 --- a/gst/oldcore/gstmd5sink.h +++ b/gst/oldcore/gstmd5sink.h @@ -67,7 +67,7 @@ struct _GstMD5SinkClass { }; -GType gst_md5sink_get_type (void); +GType gst_md5sink_get_type (void); G_END_DECLS diff --git a/gst/oldcore/gstmultifilesrc.c b/gst/oldcore/gstmultifilesrc.c index cfc3aef7d..df722aaf6 100644 --- a/gst/oldcore/gstmultifilesrc.c +++ b/gst/oldcore/gstmultifilesrc.c @@ -78,7 +78,7 @@ static void gst_multifilesrc_get_property (GObject * object, guint prop_id, static GstData *gst_multifilesrc_get (GstPad * pad); -/*static GstBuffer * gst_multifilesrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ +/*static GstBuffer * gst_multifilesrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ static GstStateChangeReturn gst_multifilesrc_change_state (GstElement * element); diff --git a/gst/oldcore/gstmultifilesrc.h b/gst/oldcore/gstmultifilesrc.h index 34fc5991b..c78ee8a26 100644 --- a/gst/oldcore/gstmultifilesrc.h +++ b/gst/oldcore/gstmultifilesrc.h @@ -41,10 +41,10 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIFILESRC)) typedef enum { - GST_MULTIFILESRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0), + GST_MULTIFILESRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0), GST_MULTIFILESRC_NEWFILE = (GST_ELEMENT_FLAG_LAST << 1) - GST_MULTIFILESRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) + GST_MULTIFILESRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) } GstMultiFileSrcFlags; typedef struct _GstMultiFileSrc GstMultiFileSrc; @@ -67,7 +67,7 @@ struct _GstMultiFileSrc { gint curfileindex; /* how many files have we done so far */ gboolean have_newmedia_events; /* tunable parameter to say whether new media - disconts should be generated */ + disconts should be generated */ gboolean new_seek; }; diff --git a/gst/oldcore/gstpipefilter.h b/gst/oldcore/gstpipefilter.h index 281375d4c..87ba8ad5e 100644 --- a/gst/oldcore/gstpipefilter.h +++ b/gst/oldcore/gstpipefilter.h @@ -42,9 +42,9 @@ G_BEGIN_DECLS (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER)) typedef enum { - GST_PIPEFILTER_OPEN = (GST_ELEMENT_FLAG_LAST << 0), + GST_PIPEFILTER_OPEN = (GST_ELEMENT_FLAG_LAST << 0), - GST_PIPEFILTER_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) + GST_PIPEFILTER_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) } GstPipeFilterFlags; typedef struct _GstPipefilter GstPipefilter; diff --git a/gst/oldcore/gstshaper.h b/gst/oldcore/gstshaper.h index 1fe84e515..4b3db6fc8 100644 --- a/gst/oldcore/gstshaper.h +++ b/gst/oldcore/gstshaper.h @@ -50,22 +50,22 @@ typedef struct _GstShaper GstShaper; typedef struct _GstShaperClass GstShaperClass; struct _GstShaper { - GstElement element; + GstElement element; - GSList *connections; - gint nconnections; + GSList *connections; + gint nconnections; - GstShaperPolicyType policy; + GstShaperPolicyType policy; - gboolean silent; - gchar *last_message; + gboolean silent; + gchar *last_message; }; struct _GstShaperClass { GstElementClass parent_class; }; -GType gst_shaper_get_type (void); +GType gst_shaper_get_type (void); G_END_DECLS diff --git a/gst/rtp/gstrtpL16depay.h b/gst/rtp/gstrtpL16depay.h index 940cca61f..2c0660774 100644 --- a/gst/rtp/gstrtpL16depay.h +++ b/gst/rtp/gstrtpL16depay.h @@ -27,7 +27,7 @@ #ifdef __cplusplus extern "C" { -#endif /* __cplusplus */ +#endif /* __cplusplus */ /* Definition of structure storing data for this element. */ typedef struct _GstRtpL16Depay GstRtpL16Depay; @@ -67,7 +67,7 @@ gboolean gst_rtp_L16depay_plugin_init (GstPlugin * plugin); #ifdef __cplusplus } -#endif /* __cplusplus */ +#endif /* __cplusplus */ -#endif /* __GST_RTP_L16_DEPAY_H__ */ +#endif /* __GST_RTP_L16_DEPAY_H__ */ diff --git a/gst/rtp/gstrtpL16pay.h b/gst/rtp/gstrtpL16pay.h index def345b4f..632079869 100644 --- a/gst/rtp/gstrtpL16pay.h +++ b/gst/rtp/gstrtpL16pay.h @@ -69,4 +69,4 @@ gboolean gst_rtpL16pay_plugin_init (GstPlugin * plugin); G_END_DECLS -#endif /* __GST_RTP_L16_PAY_H__ */ +#endif /* __GST_RTP_L16_PAY_H__ */ diff --git a/gst/rtp/gstrtpdepay.h b/gst/rtp/gstrtpdepay.h index 8f035c6a3..67b258424 100644 --- a/gst/rtp/gstrtpdepay.h +++ b/gst/rtp/gstrtpdepay.h @@ -24,11 +24,11 @@ G_BEGIN_DECLS -#define GST_TYPE_RTP_DEPAY (gst_rtp_depay_get_type()) -#define GST_IS_RTP_DEPAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_DEPAY)) -#define GST_IS_RTP_DEPAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DEPAY)) -#define GST_RTP_DEPAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_DEPAY, GstRTPDepay)) -#define GST_RTP_DEPAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_DEPAY, GstRTPDepayClass)) +#define GST_TYPE_RTP_DEPAY (gst_rtp_depay_get_type()) +#define GST_IS_RTP_DEPAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_DEPAY)) +#define GST_IS_RTP_DEPAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_DEPAY)) +#define GST_RTP_DEPAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_DEPAY, GstRTPDepay)) +#define GST_RTP_DEPAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_DEPAY, GstRTPDepayClass)) typedef struct _GstRTPDepay GstRTPDepay; typedef struct _GstRTPDepayClass GstRTPDepayClass; diff --git a/gst/rtp/gstrtpmp4vpay.c b/gst/rtp/gstrtpmp4vpay.c index 9463f45e8..e3dc6b4e7 100644 --- a/gst/rtp/gstrtpmp4vpay.c +++ b/gst/rtp/gstrtpmp4vpay.c @@ -54,7 +54,7 @@ GST_STATIC_PAD_TEMPLATE ("src", ) ); -#define DEFAULT_SEND_CONFIG FALSE +#define DEFAULT_SEND_CONFIG FALSE enum { @@ -255,12 +255,12 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay) return ret; } -#define VOS_STARTCODE 0x000001B0 -#define VOS_ENDCODE 0x000001B1 -#define USER_DATA_STARTCODE 0x000001B2 -#define GOP_STARTCODE 0x000001B3 -#define VISUAL_OBJECT_STARTCODE 0x000001B5 -#define VOP_STARTCODE 0x000001B6 +#define VOS_STARTCODE 0x000001B0 +#define VOS_ENDCODE 0x000001B1 +#define USER_DATA_STARTCODE 0x000001B2 +#define GOP_STARTCODE 0x000001B3 +#define VISUAL_OBJECT_STARTCODE 0x000001B5 +#define VOP_STARTCODE 0x000001B6 static gboolean gst_rtp_mp4v_pay_depay_data (GstRtpMP4VPay * enc, guint8 * data, guint size, diff --git a/gst/rtp/gstrtpmp4vpay.h b/gst/rtp/gstrtpmp4vpay.h index f1cb7eed8..eb57239f4 100644 --- a/gst/rtp/gstrtpmp4vpay.h +++ b/gst/rtp/gstrtpmp4vpay.h @@ -48,8 +48,8 @@ struct _GstRtpMP4VPay GstClockTime first_ts; GstClockTime duration; - gint rate; - gint profile; + gint rate; + gint profile; GstBuffer *config; gboolean send_config; }; diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index da6e79bf2..701105018 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -52,9 +52,9 @@ enum LAST_SIGNAL }; -#define DEFAULT_LOCATION NULL -#define DEFAULT_PROTOCOLS GST_RTSP_PROTO_UDP_UNICAST | GST_RTSP_PROTO_UDP_MULTICAST | GST_RTSP_PROTO_TCP -#define DEFAULT_DEBUG FALSE +#define DEFAULT_LOCATION NULL +#define DEFAULT_PROTOCOLS GST_RTSP_PROTO_UDP_UNICAST | GST_RTSP_PROTO_UDP_MULTICAST | GST_RTSP_PROTO_TCP +#define DEFAULT_DEBUG FALSE enum { @@ -300,34 +300,34 @@ done: return ret; } -#define PARSE_INT(p, del, res) \ -G_STMT_START { \ - gchar *t = p; \ - p = strstr (p, del); \ - if (p == NULL) \ - res = -1; \ - else { \ - *p = '\0'; \ - p++; \ - res = atoi (t); \ - } \ +#define PARSE_INT(p, del, res) \ +G_STMT_START { \ + gchar *t = p; \ + p = strstr (p, del); \ + if (p == NULL) \ + res = -1; \ + else { \ + *p = '\0'; \ + p++; \ + res = atoi (t); \ + } \ } G_STMT_END -#define PARSE_STRING(p, del, res) \ -G_STMT_START { \ - gchar *t = p; \ - p = strstr (p, del); \ - if (p == NULL) \ - res = NULL; \ - else { \ - *p = '\0'; \ - p++; \ - res = t; \ - } \ +#define PARSE_STRING(p, del, res) \ +G_STMT_START { \ + gchar *t = p; \ + p = strstr (p, del); \ + if (p == NULL) \ + res = NULL; \ + else { \ + *p = '\0'; \ + p++; \ + res = t; \ + } \ } G_STMT_END -#define SKIP_SPACES(p) \ - while (*p && g_ascii_isspace (*p)) \ +#define SKIP_SPACES(p) \ + while (*p && g_ascii_isspace (*p)) \ p++; static gboolean diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h index 89604d2e6..2cab470a4 100644 --- a/gst/rtsp/gstrtspsrc.h +++ b/gst/rtsp/gstrtspsrc.h @@ -47,18 +47,18 @@ typedef struct _GstRTSPSrcClass GstRTSPSrcClass; /* flags with allowed protocols */ typedef enum { - GST_RTSP_PROTO_UDP_UNICAST = (1 << 0), - GST_RTSP_PROTO_UDP_MULTICAST = (1 << 1), - GST_RTSP_PROTO_TCP = (1 << 2), + GST_RTSP_PROTO_UDP_UNICAST = (1 << 0), + GST_RTSP_PROTO_UDP_MULTICAST = (1 << 1), + GST_RTSP_PROTO_TCP = (1 << 2), } GstRTSPProto; typedef struct _GstRTSPStream GstRTSPStream; struct _GstRTSPStream { - gint id; + gint id; - gint rtpchannel; - gint rtcpchannel; + gint rtpchannel; + gint rtcpchannel; GstRTSPSrc *parent; @@ -78,22 +78,22 @@ struct _GstRTSPStream { struct _GstRTSPSrc { GstElement element; - gboolean interleaved; - GstTask *task; + gboolean interleaved; + GstTask *task; - gint numstreams; - GList *streams; + gint numstreams; + GList *streams; - gchar *location; - gboolean debug; + gchar *location; + gboolean debug; - GstRTSPProto protocols; + GstRTSPProto protocols; /* supported options */ - gint options; + gint options; RTSPConnection *connection; - RTSPMessage *request; - RTSPMessage *response; + RTSPMessage *request; + RTSPMessage *response; }; struct _GstRTSPSrcClass { diff --git a/gst/rtsp/rtspconnection.h b/gst/rtsp/rtspconnection.h index 720c14713..6af3fde90 100644 --- a/gst/rtsp/rtspconnection.h +++ b/gst/rtsp/rtspconnection.h @@ -30,23 +30,23 @@ G_BEGIN_DECLS typedef struct _RTSPConnection { - gint fd; /* our socket */ + gint fd; /* our socket */ - gint cseq; /* sequence number */ - gchar session_id[512]; /* session id */ + gint cseq; /* sequence number */ + gchar session_id[512]; /* session id */ - RTSPState state; /* state of the connection */ + RTSPState state; /* state of the connection */ } RTSPConnection; /* opening/closing a connection */ -RTSPResult rtsp_connection_open (RTSPUrl *url, RTSPConnection **conn); -RTSPResult rtsp_connection_create (gint fd, RTSPConnection **conn); -RTSPResult rtsp_connection_close (RTSPConnection *conn); -RTSPResult rtsp_connection_free (RTSPConnection *conn); +RTSPResult rtsp_connection_open (RTSPUrl *url, RTSPConnection **conn); +RTSPResult rtsp_connection_create (gint fd, RTSPConnection **conn); +RTSPResult rtsp_connection_close (RTSPConnection *conn); +RTSPResult rtsp_connection_free (RTSPConnection *conn); /* sending/receiving messages */ -RTSPResult rtsp_connection_send (RTSPConnection *conn, RTSPMessage *message); -RTSPResult rtsp_connection_receive (RTSPConnection *conn, RTSPMessage *message); +RTSPResult rtsp_connection_send (RTSPConnection *conn, RTSPMessage *message); +RTSPResult rtsp_connection_receive (RTSPConnection *conn, RTSPMessage *message); G_END_DECLS diff --git a/gst/rtsp/rtspdefs.h b/gst/rtsp/rtspdefs.h index 9ba100fe7..c5b4474e8 100644 --- a/gst/rtsp/rtspdefs.h +++ b/gst/rtsp/rtspdefs.h @@ -25,14 +25,14 @@ G_BEGIN_DECLS typedef enum { - RTSP_OK = 0, + RTSP_OK = 0, /* errors */ - RTSP_EINVAL = -1, - RTSP_ENOMEM = -2, - RTSP_ERESOLV = -3, - RTSP_ENOTIMPL = -4, - RTSP_ESYS = -5, - RTSP_EPARSE = -6, + RTSP_EINVAL = -1, + RTSP_ENOMEM = -2, + RTSP_ERESOLV = -3, + RTSP_ENOTIMPL = -4, + RTSP_ESYS = -5, + RTSP_EPARSE = -6, } RTSPResult; typedef enum { @@ -54,17 +54,17 @@ typedef enum { } RTSPState; typedef enum { - RTSP_DESCRIBE = (1 << 0), - RTSP_ANNOUNCE = (1 << 1), - RTSP_GET_PARAMETER = (1 << 2), - RTSP_OPTIONS = (1 << 3), - RTSP_PAUSE = (1 << 4), - RTSP_PLAY = (1 << 5), - RTSP_RECORD = (1 << 6), - RTSP_REDIRECT = (1 << 7), - RTSP_SETUP = (1 << 8), - RTSP_SET_PARAMETER = (1 << 9), - RTSP_TEARDOWN = (1 << 10), + RTSP_DESCRIBE = (1 << 0), + RTSP_ANNOUNCE = (1 << 1), + RTSP_GET_PARAMETER = (1 << 2), + RTSP_OPTIONS = (1 << 3), + RTSP_PAUSE = (1 << 4), + RTSP_PLAY = (1 << 5), + RTSP_RECORD = (1 << 6), + RTSP_REDIRECT = (1 << 7), + RTSP_SETUP = (1 << 8), + RTSP_SET_PARAMETER = (1 << 9), + RTSP_TEARDOWN = (1 << 10), } RTSPMethod; typedef enum { @@ -74,102 +74,102 @@ typedef enum { * g = general * e = entity */ - RTSP_HDR_ACCEPT, /* Accept R opt. entity */ - RTSP_HDR_ACCEPT_ENCODING, /* Accept-Encoding R opt. entity */ - RTSP_HDR_ACCEPT_LANGUAGE, /* Accept-Language R opt. all */ - RTSP_HDR_ALLOW, /* Allow r opt. all */ - RTSP_HDR_AUTHORIZATION, /* Authorization R opt. all */ - RTSP_HDR_BANDWIDTH, /* Bandwidth R opt. all */ - RTSP_HDR_BLOCKSIZE, /* Blocksize R opt. all but OPTIONS, TEARDOWN */ - RTSP_HDR_CACHE_CONTROL, /* Cache-Control g opt. SETUP */ - RTSP_HDR_CONFERENCE, /* Conference R opt. SETUP */ - RTSP_HDR_CONNECTION, /* Connection g req. all */ - RTSP_HDR_CONTENT_BASE, /* Content-Base e opt. entity */ - RTSP_HDR_CONTENT_ENCODING, /* Content-Encoding e req. SET_PARAMETER, DESCRIBE, ANNOUNCE */ - RTSP_HDR_CONTENT_LANGUAGE, /* Content-Language e req. DESCRIBE, ANNOUNCE */ - RTSP_HDR_CONTENT_LENGTH, /* Content-Length e req. SET_PARAMETER, ANNOUNCE, entity */ - RTSP_HDR_CONTENT_LOCATION, /* Content-Location e opt. entity */ - RTSP_HDR_CONTENT_TYPE, /* Content-Type e req. SET_PARAMETER, ANNOUNCE, entity */ - RTSP_HDR_CSEQ, /* CSeq g req. all */ - RTSP_HDR_DATE, /* Date g opt. all */ - RTSP_HDR_EXPIRES, /* Expires e opt. DESCRIBE, ANNOUNCE */ - RTSP_HDR_FROM, /* From R opt. all */ - RTSP_HDR_IF_MODIFIED_SINCE, /* If-Modified-Since R opt. DESCRIBE, SETUP */ - RTSP_HDR_LAST_MODIFIED, /* Last-Modified e opt. entity */ - RTSP_HDR_PROXY_AUTHENTICATE, /* Proxy-Authenticate */ - RTSP_HDR_PROXY_REQUIRE, /* Proxy-Require R req. all */ - RTSP_HDR_PUBLIC, /* Public r opt. all */ - RTSP_HDR_RANGE, /* Range Rr opt. PLAY, PAUSE, RECORD */ - RTSP_HDR_REFERER, /* Referer R opt. all */ - RTSP_HDR_REQUIRE, /* Require R req. all */ - RTSP_HDR_RETRY_AFTER, /* Retry-After r opt. all */ - RTSP_HDR_RTP_INFO, /* RTP-Info r req. PLAY */ - RTSP_HDR_SCALE, /* Scale Rr opt. PLAY, RECORD */ - RTSP_HDR_SESSION, /* Session Rr req. all but SETUP, OPTIONS */ - RTSP_HDR_SERVER, /* Server r opt. all */ - RTSP_HDR_SPEED, /* Speed Rr opt. PLAY */ - RTSP_HDR_TRANSPORT, /* Transport Rr req. SETUP */ - RTSP_HDR_UNSUPPORTED, /* Unsupported r req. all */ - RTSP_HDR_USER_AGENT, /* User-Agent R opt. all */ - RTSP_HDR_VIA, /* Via g opt. all */ - RTSP_HDR_WWW_AUTHENTICATE, /* WWW-Authenticate r opt. all */ + RTSP_HDR_ACCEPT, /* Accept R opt. entity */ + RTSP_HDR_ACCEPT_ENCODING, /* Accept-Encoding R opt. entity */ + RTSP_HDR_ACCEPT_LANGUAGE, /* Accept-Language R opt. all */ + RTSP_HDR_ALLOW, /* Allow r opt. all */ + RTSP_HDR_AUTHORIZATION, /* Authorization R opt. all */ + RTSP_HDR_BANDWIDTH, /* Bandwidth R opt. all */ + RTSP_HDR_BLOCKSIZE, /* Blocksize R opt. all but OPTIONS, TEARDOWN */ + RTSP_HDR_CACHE_CONTROL, /* Cache-Control g opt. SETUP */ + RTSP_HDR_CONFERENCE, /* Conference R opt. SETUP */ + RTSP_HDR_CONNECTION, /* Connection g req. all */ + RTSP_HDR_CONTENT_BASE, /* Content-Base e opt. entity */ + RTSP_HDR_CONTENT_ENCODING, /* Content-Encoding e req. SET_PARAMETER, DESCRIBE, ANNOUNCE */ + RTSP_HDR_CONTENT_LANGUAGE, /* Content-Language e req. DESCRIBE, ANNOUNCE */ + RTSP_HDR_CONTENT_LENGTH, /* Content-Length e req. SET_PARAMETER, ANNOUNCE, entity */ + RTSP_HDR_CONTENT_LOCATION, /* Content-Location e opt. entity */ + RTSP_HDR_CONTENT_TYPE, /* Content-Type e req. SET_PARAMETER, ANNOUNCE, entity */ + RTSP_HDR_CSEQ, /* CSeq g req. all */ + RTSP_HDR_DATE, /* Date g opt. all */ + RTSP_HDR_EXPIRES, /* Expires e opt. DESCRIBE, ANNOUNCE */ + RTSP_HDR_FROM, /* From R opt. all */ + RTSP_HDR_IF_MODIFIED_SINCE, /* If-Modified-Since R opt. DESCRIBE, SETUP */ + RTSP_HDR_LAST_MODIFIED, /* Last-Modified e opt. entity */ + RTSP_HDR_PROXY_AUTHENTICATE, /* Proxy-Authenticate */ + RTSP_HDR_PROXY_REQUIRE, /* Proxy-Require R req. all */ + RTSP_HDR_PUBLIC, /* Public r opt. all */ + RTSP_HDR_RANGE, /* Range Rr opt. PLAY, PAUSE, RECORD */ + RTSP_HDR_REFERER, /* Referer R opt. all */ + RTSP_HDR_REQUIRE, /* Require R req. all */ + RTSP_HDR_RETRY_AFTER, /* Retry-After r opt. all */ + RTSP_HDR_RTP_INFO, /* RTP-Info r req. PLAY */ + RTSP_HDR_SCALE, /* Scale Rr opt. PLAY, RECORD */ + RTSP_HDR_SESSION, /* Session Rr req. all but SETUP, OPTIONS */ + RTSP_HDR_SERVER, /* Server r opt. all */ + RTSP_HDR_SPEED, /* Speed Rr opt. PLAY */ + RTSP_HDR_TRANSPORT, /* Transport Rr req. SETUP */ + RTSP_HDR_UNSUPPORTED, /* Unsupported r req. all */ + RTSP_HDR_USER_AGENT, /* User-Agent R opt. all */ + RTSP_HDR_VIA, /* Via g opt. all */ + RTSP_HDR_WWW_AUTHENTICATE, /* WWW-Authenticate r opt. all */ } RTSPHeaderField; typedef enum { - RTSP_STS_CONTINUE = 100, - RTSP_STS_OK = 200, - RTSP_STS_CREATED = 201, - RTSP_STS_LOW_ON_STORAGE = 250, - RTSP_STS_MULTIPLE_CHOICES = 300, - RTSP_STS_MOVED_PERMANENTLY = 301, - RTSP_STS_MOVE_TEMPORARILY = 302, - RTSP_STS_SEE_OTHER = 303, - RTSP_STS_NOT_MODIFIED = 304, - RTSP_STS_USE_PROXY = 305, - RTSP_STS_BAD_REQUEST = 400, - RTSP_STS_UNAUTHORIZED = 401, - RTSP_STS_PAYMENT_REQUIRED = 402, - RTSP_STS_FORBIDDEN = 403, - RTSP_STS_NOT_FOUND = 404, - RTSP_STS_METHOD_NOT_ALLOWED = 405, - RTSP_STS_NOT_ACCEPTABLE = 406, - RTSP_STS_PROXY_AUTH_REQUIRED = 407, - RTSP_STS_REQUEST_TIMEOUT = 408, - RTSP_STS_GONE = 410, - RTSP_STS_LENGTH_REQUIRED = 411, - RTSP_STS_PRECONDITION_FAILED = 412, - RTSP_STS_REQUEST_ENTITY_TOO_LARGE = 413, - RTSP_STS_REQUEST_URI_TOO_LARGE = 414, - RTSP_STS_UNSUPPORTED_MEDIA_TYPE = 415, - RTSP_STS_PARAMETER_NOT_UNDERSTOOD = 451, - RTSP_STS_CONFERENCE_NOT_FOUND = 452, - RTSP_STS_NOT_ENOUGH_BANDWIDTH = 453, - RTSP_STS_SESSION_NOT_FOUND = 454, - RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE = 455, - RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE = 456, - RTSP_STS_INVALID_RANGE = 457, - RTSP_STS_PARAMETER_IS_READONLY = 458, - RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED = 459, - RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED = 460, - RTSP_STS_UNSUPPORTED_TRANSPORT = 461, - RTSP_STS_DESTINATION_UNREACHABLE = 462, - RTSP_STS_INTERNAL_SERVER_ERROR = 500, - RTSP_STS_NOT_IMPLEMENTED = 501, - RTSP_STS_BAD_GATEWAY = 502, - RTSP_STS_SERVICE_UNAVAILABLE = 503, - RTSP_STS_GATEWAY_TIMEOUT = 504, - RTSP_STS_RTSP_VERSION_NOT_SUPPORTED = 505, - RTSP_STS_OPTION_NOT_SUPPORTED = 551, + RTSP_STS_CONTINUE = 100, + RTSP_STS_OK = 200, + RTSP_STS_CREATED = 201, + RTSP_STS_LOW_ON_STORAGE = 250, + RTSP_STS_MULTIPLE_CHOICES = 300, + RTSP_STS_MOVED_PERMANENTLY = 301, + RTSP_STS_MOVE_TEMPORARILY = 302, + RTSP_STS_SEE_OTHER = 303, + RTSP_STS_NOT_MODIFIED = 304, + RTSP_STS_USE_PROXY = 305, + RTSP_STS_BAD_REQUEST = 400, + RTSP_STS_UNAUTHORIZED = 401, + RTSP_STS_PAYMENT_REQUIRED = 402, + RTSP_STS_FORBIDDEN = 403, + RTSP_STS_NOT_FOUND = 404, + RTSP_STS_METHOD_NOT_ALLOWED = 405, + RTSP_STS_NOT_ACCEPTABLE = 406, + RTSP_STS_PROXY_AUTH_REQUIRED = 407, + RTSP_STS_REQUEST_TIMEOUT = 408, + RTSP_STS_GONE = 410, + RTSP_STS_LENGTH_REQUIRED = 411, + RTSP_STS_PRECONDITION_FAILED = 412, + RTSP_STS_REQUEST_ENTITY_TOO_LARGE = 413, + RTSP_STS_REQUEST_URI_TOO_LARGE = 414, + RTSP_STS_UNSUPPORTED_MEDIA_TYPE = 415, + RTSP_STS_PARAMETER_NOT_UNDERSTOOD = 451, + RTSP_STS_CONFERENCE_NOT_FOUND = 452, + RTSP_STS_NOT_ENOUGH_BANDWIDTH = 453, + RTSP_STS_SESSION_NOT_FOUND = 454, + RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE = 455, + RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE = 456, + RTSP_STS_INVALID_RANGE = 457, + RTSP_STS_PARAMETER_IS_READONLY = 458, + RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED = 459, + RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED = 460, + RTSP_STS_UNSUPPORTED_TRANSPORT = 461, + RTSP_STS_DESTINATION_UNREACHABLE = 462, + RTSP_STS_INTERNAL_SERVER_ERROR = 500, + RTSP_STS_NOT_IMPLEMENTED = 501, + RTSP_STS_BAD_GATEWAY = 502, + RTSP_STS_SERVICE_UNAVAILABLE = 503, + RTSP_STS_GATEWAY_TIMEOUT = 504, + RTSP_STS_RTSP_VERSION_NOT_SUPPORTED = 505, + RTSP_STS_OPTION_NOT_SUPPORTED = 551, } RTSPStatusCode; -const gchar* rtsp_method_as_text (RTSPMethod method); -const gchar* rtsp_header_as_text (RTSPHeaderField field); -const gchar* rtsp_status_as_text (RTSPStatusCode code); -const gchar* rtsp_status_to_string (RTSPStatusCode code); +const gchar* rtsp_method_as_text (RTSPMethod method); +const gchar* rtsp_header_as_text (RTSPHeaderField field); +const gchar* rtsp_status_as_text (RTSPStatusCode code); +const gchar* rtsp_status_to_string (RTSPStatusCode code); -RTSPHeaderField rtsp_find_header_field (gchar *header); -RTSPMethod rtsp_find_method (gchar *method); +RTSPHeaderField rtsp_find_header_field (gchar *header); +RTSPMethod rtsp_find_method (gchar *method); G_END_DECLS diff --git a/gst/rtsp/rtspmessage.h b/gst/rtsp/rtspmessage.h index 60adb70c7..154ed2874 100644 --- a/gst/rtsp/rtspmessage.h +++ b/gst/rtsp/rtspmessage.h @@ -35,50 +35,50 @@ typedef enum typedef struct _RTSPMessage { - RTSPMsgType type; + RTSPMsgType type; union { struct { - RTSPMethod method; - gchar *uri; + RTSPMethod method; + gchar *uri; } request; struct { - RTSPStatusCode code; - gchar *reason; + RTSPStatusCode code; + gchar *reason; } response; struct { - gint channel; + gint channel; } data; } type_data; GHashTable *hdr_fields; - guint8 *body; - guint body_size; + guint8 *body; + guint body_size; } RTSPMessage; -RTSPResult rtsp_message_new_request (RTSPMethod method, gchar *uri, RTSPMessage **msg); -RTSPResult rtsp_message_init_request (RTSPMethod method, gchar *uri, RTSPMessage *msg); +RTSPResult rtsp_message_new_request (RTSPMethod method, gchar *uri, RTSPMessage **msg); +RTSPResult rtsp_message_init_request (RTSPMethod method, gchar *uri, RTSPMessage *msg); -RTSPResult rtsp_message_new_response (RTSPStatusCode code, gchar *reason, - RTSPMessage *request, RTSPMessage **msg); -RTSPResult rtsp_message_init_response (RTSPStatusCode code, gchar *reason, - RTSPMessage *request, RTSPMessage *msg); -RTSPResult rtsp_message_init_data (gint channel, RTSPMessage *msg); +RTSPResult rtsp_message_new_response (RTSPStatusCode code, gchar *reason, + RTSPMessage *request, RTSPMessage **msg); +RTSPResult rtsp_message_init_response (RTSPStatusCode code, gchar *reason, + RTSPMessage *request, RTSPMessage *msg); +RTSPResult rtsp_message_init_data (gint channel, RTSPMessage *msg); -RTSPResult rtsp_message_free (RTSPMessage *msg); +RTSPResult rtsp_message_free (RTSPMessage *msg); -RTSPResult rtsp_message_add_header (RTSPMessage *msg, RTSPHeaderField field, gchar *value); -RTSPResult rtsp_message_remove_header (RTSPMessage *msg, RTSPHeaderField field); -RTSPResult rtsp_message_get_header (RTSPMessage *msg, RTSPHeaderField field, gchar **value); +RTSPResult rtsp_message_add_header (RTSPMessage *msg, RTSPHeaderField field, gchar *value); +RTSPResult rtsp_message_remove_header (RTSPMessage *msg, RTSPHeaderField field); +RTSPResult rtsp_message_get_header (RTSPMessage *msg, RTSPHeaderField field, gchar **value); -RTSPResult rtsp_message_set_body (RTSPMessage *msg, guint8 *data, guint size); -RTSPResult rtsp_message_take_body (RTSPMessage *msg, guint8 *data, guint size); -RTSPResult rtsp_message_get_body (RTSPMessage *msg, guint8 **data, guint *size); +RTSPResult rtsp_message_set_body (RTSPMessage *msg, guint8 *data, guint size); +RTSPResult rtsp_message_take_body (RTSPMessage *msg, guint8 *data, guint size); +RTSPResult rtsp_message_get_body (RTSPMessage *msg, guint8 **data, guint *size); -RTSPResult rtsp_message_dump (RTSPMessage *msg); +RTSPResult rtsp_message_dump (RTSPMessage *msg); G_END_DECLS diff --git a/gst/rtsp/rtsptransport.h b/gst/rtsp/rtsptransport.h index 288275fbc..e746f5010 100644 --- a/gst/rtsp/rtsptransport.h +++ b/gst/rtsp/rtsptransport.h @@ -45,34 +45,34 @@ typedef struct } RTSPRange; typedef struct _RTSPTransport { - RTSPTransMode trans; + RTSPTransMode trans; RTSPProfile profile; RTSPLowerTrans lower_transport; - gboolean multicast; - gchar *destination; - gchar *source; - gint layers; - gboolean mode_play; - gboolean mode_record; - gboolean append; - RTSPRange interleaved; + gboolean multicast; + gchar *destination; + gchar *source; + gint layers; + gboolean mode_play; + gboolean mode_record; + gboolean append; + RTSPRange interleaved; /* mulitcast specific */ - gint ttl; + gint ttl; /* RTP specific */ - RTSPRange port; - RTSPRange client_port; - RTSPRange server_port; - gchar *ssrc; + RTSPRange port; + RTSPRange client_port; + RTSPRange server_port; + gchar *ssrc; } RTSPTransport; RTSPResult rtsp_transport_new (RTSPTransport **transport); RTSPResult rtsp_transport_init (RTSPTransport *transport); -RTSPResult rtsp_transport_parse (gchar *str, RTSPTransport *transport); +RTSPResult rtsp_transport_parse (gchar *str, RTSPTransport *transport); RTSPResult rtsp_transport_free (RTSPTransport *transport); diff --git a/gst/rtsp/rtspurl.c b/gst/rtsp/rtspurl.c index 7f58cb45f..da7a8795b 100644 --- a/gst/rtsp/rtspurl.c +++ b/gst/rtsp/rtspurl.c @@ -21,10 +21,10 @@ #include "rtspurl.h" -#define RTSP_PROTO "rtsp://" -#define RTSP_PROTO_LEN 7 -#define RTSPU_PROTO "rtspu://" -#define RTSPU_PROTO_LEN 8 +#define RTSP_PROTO "rtsp://" +#define RTSP_PROTO_LEN 7 +#define RTSPU_PROTO "rtspu://" +#define RTSPU_PROTO_LEN 8 /* format is rtsp[u]://[user:passwd@]host[:port]/abspath */ diff --git a/gst/rtsp/rtspurl.h b/gst/rtsp/rtspurl.h index 2492b87b3..1fae3003b 100644 --- a/gst/rtsp/rtspurl.h +++ b/gst/rtsp/rtspurl.h @@ -26,7 +26,7 @@ G_BEGIN_DECLS -#define RTSP_DEFAULT_PORT 554 +#define RTSP_DEFAULT_PORT 554 typedef struct _RTSPUrl { RTSPProto protocol; @@ -38,8 +38,8 @@ typedef struct _RTSPUrl { gchar *abspath; } RTSPUrl; -RTSPResult rtsp_url_parse (const gchar *urlstr, RTSPUrl **url); -void rtsp_url_free (RTSPUrl *url); +RTSPResult rtsp_url_parse (const gchar *urlstr, RTSPUrl **url); +void rtsp_url_free (RTSPUrl *url); G_END_DECLS diff --git a/gst/rtsp/sdpmessage.c b/gst/rtsp/sdpmessage.c index 76dd73d7d..5ab9b85f4 100644 --- a/gst/rtsp/sdpmessage.c +++ b/gst/rtsp/sdpmessage.c @@ -22,51 +22,51 @@ #include "sdpmessage.h" -#define FREE_STRING(field) g_free ((field)); (field) = NULL; -#define FREE_ARRAY(field) \ -G_STMT_START { \ - if (field) \ - g_array_free (field, TRUE); \ - field = NULL; \ +#define FREE_STRING(field) g_free ((field)); (field) = NULL; +#define FREE_ARRAY(field) \ +G_STMT_START { \ + if (field) \ + g_array_free (field, TRUE); \ + field = NULL; \ } G_STMT_END -#define REPLACE_STRING(field,val) FREE_STRING(field);field=g_strdup (val); - -#define INIT_ARRAY(field,type) \ -G_STMT_START { \ - if (field) \ - g_array_set_size (field,0); \ - else \ - field = g_array_new (FALSE, TRUE, sizeof(type)); \ +#define REPLACE_STRING(field,val) FREE_STRING(field);field=g_strdup (val); + +#define INIT_ARRAY(field,type) \ +G_STMT_START { \ + if (field) \ + g_array_set_size (field,0); \ + else \ + field = g_array_new (FALSE, TRUE, sizeof(type)); \ } G_STMT_END -#define DEFINE_STRING_SETTER(field) \ -RTSPResult sdp_message_set_##field (SDPMessage *msg, gchar *val) { \ - g_free (msg->field); \ - msg->field = g_strdup (val); \ - return RTSP_OK; \ +#define DEFINE_STRING_SETTER(field) \ +RTSPResult sdp_message_set_##field (SDPMessage *msg, gchar *val) { \ + g_free (msg->field); \ + msg->field = g_strdup (val); \ + return RTSP_OK; \ } -#define DEFINE_STRING_GETTER(field) \ -char* sdp_message_get_##field (SDPMessage *msg) { \ - return msg->field; \ +#define DEFINE_STRING_GETTER(field) \ +char* sdp_message_get_##field (SDPMessage *msg) { \ + return msg->field; \ } -#define DEFINE_ARRAY_LEN(field) \ -gint sdp_message_##field##_len (SDPMessage *msg) { \ - return ((msg)->field->len); \ +#define DEFINE_ARRAY_LEN(field) \ +gint sdp_message_##field##_len (SDPMessage *msg) { \ + return ((msg)->field->len); \ } -#define DEFINE_ARRAY_GETTER(method,field,type) \ -type sdp_message_get_##method (SDPMessage *msg, gint i) { \ - return g_array_index ((msg)->field, type, i); \ +#define DEFINE_ARRAY_GETTER(method,field,type) \ +type sdp_message_get_##method (SDPMessage *msg, gint i) { \ + return g_array_index ((msg)->field, type, i); \ } -#define DEFINE_ARRAY_P_GETTER(method,field,type) \ -type * sdp_message_get_##method (SDPMessage *msg, gint i) { \ - return &g_array_index ((msg)->field, type, i); \ +#define DEFINE_ARRAY_P_GETTER(method,field,type) \ +type * sdp_message_get_##method (SDPMessage *msg, gint i) { \ + return &g_array_index ((msg)->field, type, i); \ } -#define DEFINE_ARRAY_ADDER(method,field,type,dup_method) \ -RTSPResult sdp_message_add_##method (SDPMessage *msg, type val) { \ - type v = dup_method(val); \ - g_array_append_val((msg)->field, v); \ - return RTSP_OK; \ +#define DEFINE_ARRAY_ADDER(method,field,type,dup_method) \ +RTSPResult sdp_message_add_##method (SDPMessage *msg, type val) { \ + type v = dup_method(val); \ + g_array_append_val((msg)->field, v); \ + return RTSP_OK; \ } diff --git a/gst/rtsp/sdpmessage.h b/gst/rtsp/sdpmessage.h index 450bdced1..e50a9ee96 100644 --- a/gst/rtsp/sdpmessage.h +++ b/gst/rtsp/sdpmessage.h @@ -71,94 +71,94 @@ typedef struct { } SDPAttribute; typedef struct { - gchar *media; - gint port; - gint num_ports; - gchar *proto; - GArray *fmts; - gchar *information; - GArray *connections; - GArray *bandwidths; - SDPKey key; - GArray *attributes; + gchar *media; + gint port; + gint num_ports; + gchar *proto; + GArray *fmts; + gchar *information; + GArray *connections; + GArray *bandwidths; + SDPKey key; + GArray *attributes; } SDPMedia; typedef struct { - gchar *version; - SDPOrigin origin; - gchar *session_name; - gchar *information; - gchar *uri; - GArray *emails; - GArray *phones; + gchar *version; + SDPOrigin origin; + gchar *session_name; + gchar *information; + gchar *uri; + GArray *emails; + GArray *phones; SDPConnection connection; - GArray *bandwidths; - GArray *times; - GArray *zones; - SDPKey key; - GArray *attributes; - GArray *medias; + GArray *bandwidths; + GArray *times; + GArray *zones; + SDPKey key; + GArray *attributes; + GArray *medias; } SDPMessage; /* Session descriptions */ -RTSPResult sdp_message_new (SDPMessage **msg); -RTSPResult sdp_message_init (SDPMessage *msg); -RTSPResult sdp_message_clean (SDPMessage *msg); -RTSPResult sdp_message_free (SDPMessage *msg); - -RTSPResult sdp_message_parse_buffer (guint8 *data, guint size, SDPMessage *msg); - -RTSPResult sdp_message_set_version (SDPMessage *msg, gchar *version); -gchar* sdp_message_get_version (SDPMessage *msg); -RTSPResult sdp_message_set_origin (SDPMessage *msg, gchar *username, gchar *sess_id, - gchar *sess_version, gchar *nettype, - gchar *addrtype, gchar *addr); -SDPOrigin* sdp_message_get_origin (SDPMessage *msg); -RTSPResult sdp_message_set_session_name (SDPMessage *msg, gchar *session_name); -gchar* sdp_message_get_session_name (SDPMessage *msg); -RTSPResult sdp_message_set_information (SDPMessage *msg, gchar *information); -gchar* sdp_message_get_information (SDPMessage *msg); -RTSPResult sdp_message_set_uri (SDPMessage *msg, gchar *uri); -gchar* sdp_message_get_uri (SDPMessage *msg); -gint sdp_message_emails_len (SDPMessage *msg); -gchar* sdp_message_get_email (SDPMessage *msg, gint i); -RTSPResult sdp_message_add_email (SDPMessage *msg, gchar *email); -gint sdp_message_phones_len (SDPMessage *msg); -gchar* sdp_message_get_phone (SDPMessage *msg, gint i); -RTSPResult sdp_message_add_phone (SDPMessage *msg, gchar *phone); -RTSPResult sdp_message_set_connection (SDPMessage *msg, gchar *nettype, gchar *addrtype, - gchar *address, gint ttl, gint addr_number); -SDPConnection* sdp_message_get_connection (SDPMessage *msg); -gint sdp_message_bandwidths_len (SDPMessage *msg); -SDPBandwidth* sdp_message_get_bandwidth (SDPMessage *msg, gint i); -RTSPResult sdp_message_add_bandwidth (SDPMessage *msg, gchar *bwtype, gint bandwidth); -gint sdp_message_times_len (SDPMessage *msg); -SDPTime* sdp_message_get_time (SDPMessage *msg, gint i); -RTSPResult sdp_message_add_time (SDPMessage *msg, gchar *time); -gint sdp_message_zones_len (SDPMessage *msg); -SDPZone* sdp_message_get_zone (SDPMessage *msg, gint i); -RTSPResult sdp_message_add_zone (SDPMessage *msg, gchar *time, gchar *typed_time); -RTSPResult sdp_message_set_key (SDPMessage *msg, gchar *type, gchar *data); -SDPKey* sdp_message_get_key (SDPMessage *msg); -gint sdp_message_attributes_len (SDPMessage *msg); -SDPAttribute* sdp_message_get_attribute (SDPMessage *msg, gint i); -gchar* sdp_message_get_attribute_val (SDPMessage *msg, gchar *key); -RTSPResult sdp_message_add_attribute (SDPMessage *msg, gchar *key, gchar *value); -gint sdp_message_medias_len (SDPMessage *msg); -SDPMedia* sdp_message_get_media (SDPMessage *msg, gint i); -RTSPResult sdp_message_add_media (SDPMessage *msg, SDPMedia *media); - - -RTSPResult sdp_message_dump (SDPMessage *msg); +RTSPResult sdp_message_new (SDPMessage **msg); +RTSPResult sdp_message_init (SDPMessage *msg); +RTSPResult sdp_message_clean (SDPMessage *msg); +RTSPResult sdp_message_free (SDPMessage *msg); + +RTSPResult sdp_message_parse_buffer (guint8 *data, guint size, SDPMessage *msg); + +RTSPResult sdp_message_set_version (SDPMessage *msg, gchar *version); +gchar* sdp_message_get_version (SDPMessage *msg); +RTSPResult sdp_message_set_origin (SDPMessage *msg, gchar *username, gchar *sess_id, + gchar *sess_version, gchar *nettype, + gchar *addrtype, gchar *addr); +SDPOrigin* sdp_message_get_origin (SDPMessage *msg); +RTSPResult sdp_message_set_session_name (SDPMessage *msg, gchar *session_name); +gchar* sdp_message_get_session_name (SDPMessage *msg); +RTSPResult sdp_message_set_information (SDPMessage *msg, gchar *information); +gchar* sdp_message_get_information (SDPMessage *msg); +RTSPResult sdp_message_set_uri (SDPMessage *msg, gchar *uri); +gchar* sdp_message_get_uri (SDPMessage *msg); +gint sdp_message_emails_len (SDPMessage *msg); +gchar* sdp_message_get_email (SDPMessage *msg, gint i); +RTSPResult sdp_message_add_email (SDPMessage *msg, gchar *email); +gint sdp_message_phones_len (SDPMessage *msg); +gchar* sdp_message_get_phone (SDPMessage *msg, gint i); +RTSPResult sdp_message_add_phone (SDPMessage *msg, gchar *phone); +RTSPResult sdp_message_set_connection (SDPMessage *msg, gchar *nettype, gchar *addrtype, + gchar *address, gint ttl, gint addr_number); +SDPConnection* sdp_message_get_connection (SDPMessage *msg); +gint sdp_message_bandwidths_len (SDPMessage *msg); +SDPBandwidth* sdp_message_get_bandwidth (SDPMessage *msg, gint i); +RTSPResult sdp_message_add_bandwidth (SDPMessage *msg, gchar *bwtype, gint bandwidth); +gint sdp_message_times_len (SDPMessage *msg); +SDPTime* sdp_message_get_time (SDPMessage *msg, gint i); +RTSPResult sdp_message_add_time (SDPMessage *msg, gchar *time); +gint sdp_message_zones_len (SDPMessage *msg); +SDPZone* sdp_message_get_zone (SDPMessage *msg, gint i); +RTSPResult sdp_message_add_zone (SDPMessage *msg, gchar *time, gchar *typed_time); +RTSPResult sdp_message_set_key (SDPMessage *msg, gchar *type, gchar *data); +SDPKey* sdp_message_get_key (SDPMessage *msg); +gint sdp_message_attributes_len (SDPMessage *msg); +SDPAttribute* sdp_message_get_attribute (SDPMessage *msg, gint i); +gchar* sdp_message_get_attribute_val (SDPMessage *msg, gchar *key); +RTSPResult sdp_message_add_attribute (SDPMessage *msg, gchar *key, gchar *value); +gint sdp_message_medias_len (SDPMessage *msg); +SDPMedia* sdp_message_get_media (SDPMessage *msg, gint i); +RTSPResult sdp_message_add_media (SDPMessage *msg, SDPMedia *media); + + +RTSPResult sdp_message_dump (SDPMessage *msg); /* Media descriptions */ -RTSPResult sdp_media_new (SDPMedia **media); -RTSPResult sdp_media_init (SDPMedia *media); -RTSPResult sdp_media_clean (SDPMedia *media); -RTSPResult sdp_media_free (SDPMedia *media); +RTSPResult sdp_media_new (SDPMedia **media); +RTSPResult sdp_media_init (SDPMedia *media); +RTSPResult sdp_media_clean (SDPMedia *media); +RTSPResult sdp_media_free (SDPMedia *media); -gchar* sdp_media_get_attribute_val (SDPMedia *media, gchar *key); -gchar* sdp_media_get_format (SDPMedia *media, gint i); +gchar* sdp_media_get_attribute_val (SDPMedia *media, gchar *key); +gchar* sdp_media_get_format (SDPMedia *media, gint i); G_END_DECLS diff --git a/gst/smpte/barboxwipes.c b/gst/smpte/barboxwipes.c index 012a4fb0e..7be26a358 100644 --- a/gst/smpte/barboxwipes.c +++ b/gst/smpte/barboxwipes.c @@ -33,150 +33,150 @@ enum }; static gint boxes_1b[][7] = { -#define WIPE_B1_1 0 +#define WIPE_B1_1 0 {BOX_VERTICAL, 0, 0, 0, 1, 1, 1}, -#define WIPE_B1_2 1 +#define WIPE_B1_2 1 {BOX_HORIZONTAL, 0, 0, 0, 1, 1, 1} }; static gint boxes_2b[][7 * 2] = { -#define WIPE_B2_21 0 +#define WIPE_B2_21 0 {BOX_VERTICAL, 0, 0, 1, 1, 2, 0, BOX_VERTICAL, 1, 0, 0, 2, 2, 1}, -#define WIPE_B2_22 1 +#define WIPE_B2_22 1 {BOX_HORIZONTAL, 0, 0, 1, 2, 1, 0, BOX_HORIZONTAL, 0, 1, 0, 2, 2, 1}, }; static gint box_clock_1b[][1 * 10] = { -#define WIPE_B1_241 0 +#define WIPE_B1_241 0 {BOX_CLOCK, 0, 0, 0, 1, 0, 0, 0, 1, 1}, -#define WIPE_B1_242 1 +#define WIPE_B1_242 1 {BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 0, 1}, -#define WIPE_B1_243 2 +#define WIPE_B1_243 2 {BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1}, -#define WIPE_B1_244 3 +#define WIPE_B1_244 3 {BOX_CLOCK, 1, 0, 0, 0, 0, 0, 1, 1, 1}, }; -#define WIPE_B2_221 0 +#define WIPE_B2_221 0 static gint box_clock_2b[][2 * 10] = { -#define WIPE_B2_221 0 +#define WIPE_B2_221 0 {BOX_CLOCK, 1, 0, 0, 2, 0, 0, 1, 2, 1, BOX_CLOCK, 1, 0, 0, 1, 2, 1, 0, 0, 2}, -#define WIPE_B2_222 1 +#define WIPE_B2_222 1 {BOX_CLOCK, 2, 1, 0, 2, 2, 0, 0, 1, 1, BOX_CLOCK, 2, 1, 0, 0, 1, 1, 2, 0, 2}, -#define WIPE_B2_223 2 +#define WIPE_B2_223 2 {BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 0, 1, BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2}, -#define WIPE_B2_224 3 +#define WIPE_B2_224 3 {BOX_CLOCK, 0, 1, 0, 0, 0, 0, 2, 1, 1, BOX_CLOCK, 0, 1, 0, 2, 1, 1, 0, 2, 2}, -#define WIPE_B2_225 4 +#define WIPE_B2_225 4 {BOX_CLOCK, 1, 0, 0, 2, 0, 0, 1, 2, 1, BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 0, 1}, -#define WIPE_B2_226 5 +#define WIPE_B2_226 5 {BOX_CLOCK, 0, 1, 0, 0, 0, 0, 2, 1, 1, BOX_CLOCK, 2, 1, 0, 2, 2, 0, 0, 1, 1}, -#define WIPE_B2_231 6 +#define WIPE_B2_231 6 {BOX_CLOCK, 1, 0, 0, 1, 2, 0, 2, 0, 1, BOX_CLOCK, 1, 0, 0, 1, 2, 0, 0, 0, 1}, -#define WIPE_B2_232 7 +#define WIPE_B2_232 7 {BOX_CLOCK, 2, 1, 0, 0, 1, 0, 2, 0, 1, BOX_CLOCK, 2, 1, 0, 0, 1, 0, 2, 2, 1}, -#define WIPE_B2_233 8 +#define WIPE_B2_233 8 {BOX_CLOCK, 1, 2, 0, 1, 0, 0, 2, 2, 1, BOX_CLOCK, 1, 2, 0, 1, 0, 0, 0, 2, 1}, -#define WIPE_B2_234 9 +#define WIPE_B2_234 9 {BOX_CLOCK, 0, 1, 0, 2, 1, 0, 0, 0, 1, BOX_CLOCK, 0, 1, 0, 2, 1, 0, 0, 2, 1}, -#define WIPE_B2_251 10 +#define WIPE_B2_251 10 {BOX_CLOCK, 0, 0, 0, 1, 0, 0, 0, 2, 1, BOX_CLOCK, 2, 0, 0, 1, 0, 0, 2, 2, 1}, -#define WIPE_B2_252 11 +#define WIPE_B2_252 11 {BOX_CLOCK, 0, 0, 0, 0, 1, 0, 2, 0, 1, BOX_CLOCK, 0, 2, 0, 0, 1, 0, 2, 2, 1}, -#define WIPE_B2_253 12 +#define WIPE_B2_253 12 {BOX_CLOCK, 0, 2, 0, 1, 2, 0, 0, 0, 1, BOX_CLOCK, 2, 2, 0, 1, 2, 0, 2, 0, 1}, -#define WIPE_B2_254 13 +#define WIPE_B2_254 13 {BOX_CLOCK, 2, 0, 0, 2, 1, 0, 0, 0, 1, BOX_CLOCK, 2, 2, 0, 2, 1, 0, 0, 2, 1}, }; static gint box_clock_4b[][4 * 10] = { -#define WIPE_B4_201 0 +#define WIPE_B4_201 0 {BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1, BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2, BOX_CLOCK, 1, 1, 0, 1, 2, 2, 0, 1, 3, BOX_CLOCK, 1, 1, 0, 0, 1, 3, 1, 0, 4}, -#define WIPE_B4_202 1 +#define WIPE_B4_202 1 {BOX_CLOCK, 1, 1, 0, 1, 0, 3, 2, 1, 4, BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2, BOX_CLOCK, 1, 1, 0, 0, 1, 2, 1, 0, 3}, -#define WIPE_B4_203 2 +#define WIPE_B4_203 2 {BOX_CLOCK, 1, 1, 0, 1, 0, 2, 2, 1, 3, BOX_CLOCK, 1, 1, 0, 2, 1, 3, 1, 2, 4, BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1, BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 0, 2}, -#define WIPE_B4_204 3 +#define WIPE_B4_204 3 {BOX_CLOCK, 1, 1, 0, 1, 0, 1, 2, 1, 2, BOX_CLOCK, 1, 1, 0, 2, 1, 2, 1, 2, 3, BOX_CLOCK, 1, 1, 0, 1, 2, 3, 0, 1, 4, BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1}, -#define WIPE_B4_205 4 +#define WIPE_B4_205 4 {BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1, BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2, BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1, BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 0, 2}, -#define WIPE_B4_206 5 +#define WIPE_B4_206 5 {BOX_CLOCK, 1, 1, 0, 1, 0, 1, 2, 1, 2, BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2, BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1}, -#define WIPE_B4_207 6 +#define WIPE_B4_207 6 {BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1, BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1, BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1}, -#define WIPE_B4_211 7 +#define WIPE_B4_211 7 {BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1, BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2, BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 1, 1, BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 2, 2}, -#define WIPE_B4_212 8 +#define WIPE_B4_212 8 {BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 0, 1, BOX_CLOCK, 1, 1, 0, 1, 0, 1, 0, 1, 2, BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2}, -#define WIPE_B4_213 9 +#define WIPE_B4_213 9 {BOX_CLOCK, 1, 1, 0, 1, 0, 0, 2, 1, 1, BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 1, 1, BOX_CLOCK, 1, 1, 0, 1, 2, 0, 2, 1, 1, BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 1, 1}, -#define WIPE_B4_214 10 +#define WIPE_B4_214 10 {BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 0, 1, BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1, BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 2, 1}, -#define WIPE_B4_227 11 +#define WIPE_B4_227 11 {BOX_CLOCK, 1, 0, 0, 2, 0, 0, 1, 1, 1, BOX_CLOCK, 1, 0, 0, 1, 1, 1, 0, 0, 2, BOX_CLOCK, 1, 2, 0, 2, 2, 0, 1, 1, 1, BOX_CLOCK, 1, 2, 0, 1, 1, 1, 0, 2, 2}, -#define WIPE_B4_228 12 +#define WIPE_B4_228 12 {BOX_CLOCK, 0, 1, 0, 0, 0, 0, 1, 1, 1, BOX_CLOCK, 0, 1, 0, 1, 1, 1, 0, 2, 2, BOX_CLOCK, 2, 1, 0, 2, 0, 0, 1, 1, 1, BOX_CLOCK, 2, 1, 0, 1, 1, 1, 2, 2, 2}, -#define WIPE_B4_235 13 +#define WIPE_B4_235 13 {BOX_CLOCK, 1, 0, 0, 1, 1, 0, 0, 0, 1, BOX_CLOCK, 1, 0, 0, 1, 1, 0, 2, 0, 1, BOX_CLOCK, 1, 2, 0, 1, 1, 0, 2, 2, 1, BOX_CLOCK, 1, 2, 0, 1, 1, 0, 0, 2, 1}, -#define WIPE_B4_236 14 +#define WIPE_B4_236 14 {BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 0, 1, BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 2, 1, BOX_CLOCK, 2, 1, 0, 1, 1, 0, 2, 0, 1, @@ -184,7 +184,7 @@ static gint box_clock_4b[][4 * 10] = { }; static gint box_clock_8b[][8 * 10] = { -#define WIPE_B8_261 0 +#define WIPE_B8_261 0 {BOX_CLOCK, 2, 1, 0, 2, 2, 0, 4, 1, 1, BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 0, 2, BOX_CLOCK, 2, 1, 0, 2, 0, 2, 0, 1, 3, @@ -193,7 +193,7 @@ static gint box_clock_8b[][8 * 10] = { BOX_CLOCK, 2, 3, 0, 4, 3, 1, 2, 4, 2, BOX_CLOCK, 2, 3, 0, 2, 4, 2, 0, 3, 3, BOX_CLOCK, 2, 3, 0, 0, 3, 3, 2, 2, 4}, -#define WIPE_B8_262 1 +#define WIPE_B8_262 1 {BOX_CLOCK, 1, 2, 0, 2, 2, 0, 1, 0, 1, BOX_CLOCK, 1, 2, 0, 1, 0, 1, 0, 2, 2, BOX_CLOCK, 1, 2, 0, 0, 2, 2, 1, 4, 3, @@ -202,7 +202,7 @@ static gint box_clock_8b[][8 * 10] = { BOX_CLOCK, 3, 2, 0, 3, 0, 1, 4, 2, 2, BOX_CLOCK, 3, 2, 0, 4, 2, 2, 3, 4, 3, BOX_CLOCK, 3, 2, 0, 3, 4, 3, 2, 2, 4}, -#define WIPE_B8_263 2 +#define WIPE_B8_263 2 {BOX_CLOCK, 2, 1, 0, 2, 0, 0, 4, 1, 1, BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 2, 2, BOX_CLOCK, 2, 1, 0, 2, 0, 0, 0, 1, 1, @@ -211,7 +211,7 @@ static gint box_clock_8b[][8 * 10] = { BOX_CLOCK, 2, 3, 0, 4, 3, 1, 2, 2, 2, BOX_CLOCK, 2, 3, 0, 2, 4, 0, 0, 3, 1, BOX_CLOCK, 2, 3, 0, 0, 3, 1, 2, 2, 2}, -#define WIPE_B8_264 3 +#define WIPE_B8_264 3 {BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 0, 1, BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2, BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 4, 1, @@ -224,100 +224,100 @@ static gint box_clock_8b[][8 * 10] = { static gint triangles_2t[][2 * 9] = { /* 3 -> 6 */ -#define WIPE_T2_3 0 +#define WIPE_T2_3 0 {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1}, -#define WIPE_T2_4 WIPE_T2_3+1 +#define WIPE_T2_4 WIPE_T2_3+1 {0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1}, -#define WIPE_T2_5 WIPE_T2_4+1 +#define WIPE_T2_5 WIPE_T2_4+1 {0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0}, -#define WIPE_T2_6 WIPE_T2_5+1 +#define WIPE_T2_6 WIPE_T2_5+1 {0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1}, -#define WIPE_T2_41 WIPE_T2_6+1 +#define WIPE_T2_41 WIPE_T2_6+1 {0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 2}, -#define WIPE_T2_42 WIPE_T2_41+1 +#define WIPE_T2_42 WIPE_T2_41+1 {0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 2, 1, 1, 1}, -#define WIPE_T2_45 WIPE_T2_42+1 +#define WIPE_T2_45 WIPE_T2_42+1 {0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1}, -#define WIPE_T2_46 WIPE_T2_45+1 +#define WIPE_T2_46 WIPE_T2_45+1 {0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}, -#define WIPE_T2_245 WIPE_T2_46+1 +#define WIPE_T2_245 WIPE_T2_46+1 {0, 0, 0, 2, 0, 0, 2, 2, 1, 2, 2, 0, 0, 2, 0, 0, 0, 1}, -#define WIPE_T2_246 WIPE_T2_245+1 +#define WIPE_T2_246 WIPE_T2_245+1 {0, 2, 0, 0, 0, 0, 2, 0, 1, 2, 0, 0, 2, 2, 0, 0, 2, 1}, }; static gint triangles_3t[][3 * 9] = { /* 23 -> 26 */ -#define WIPE_T3_23 0 +#define WIPE_T3_23 0 {0, 0, 1, 1, 0, 0, 0, 2, 1, 1, 0, 0, 0, 2, 1, 2, 2, 1, 1, 0, 0, 2, 0, 1, 2, 2, 1}, -#define WIPE_T3_24 1 +#define WIPE_T3_24 1 {0, 0, 1, 2, 0, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0, 0, 2, 1, 2, 1, 0, 0, 2, 1, 2, 2, 1}, -#define WIPE_T3_25 2 +#define WIPE_T3_25 2 {0, 0, 1, 0, 2, 1, 1, 2, 0, 0, 0, 1, 2, 0, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 2, 2, 1}, -#define WIPE_T3_26 3 +#define WIPE_T3_26 3 {0, 0, 1, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 2, 1, 0, 1, 0, 0, 2, 1, 2, 2, 1}, }; static gint triangles_4t[][4 * 9] = { -#define WIPE_T4_61 0 +#define WIPE_T4_61 0 {0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 0, 2, 2, 1, 2, 1, 1, 0, 0, 2, 0, 1, 1, 2, 1, 2, 0, 1, 1, 2, 1, 2, 2, 2}, -#define WIPE_T4_62 1 +#define WIPE_T4_62 1 {0, 0, 2, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 1, 0, 0, 1, 1, 2, 1, 0, 2, 2, 1, 0, 1, 1, 0, 2, 2, 2, 2, 1}, -#define WIPE_T4_63 2 +#define WIPE_T4_63 2 {0, 0, 2, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 2, 2, 1, 1, 0, 1, 2, 0, 2, 2, 2, 1}, -#define WIPE_T4_64 3 +#define WIPE_T4_64 3 {0, 0, 1, 2, 0, 2, 2, 1, 1, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 1, 1, 0, 2, 1, 2, 2, 2}, -#define WIPE_T4_65 4 +#define WIPE_T4_65 4 {0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 2, 0, 0, 1, 2, 0, 2, 2, 1}, -#define WIPE_T4_66 5 +#define WIPE_T4_66 5 {0, 0, 1, 2, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 2, 2, 0, 0, 1, 0, 0, 2, 1, 2, 2, 0}, -#define WIPE_T4_67 6 +#define WIPE_T4_67 6 {0, 0, 1, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 2, 1, 1, 0, 0, 1, 2, 1, 2, 2, 0, 1, 0, 0, 2, 0, 1, 2, 2, 0}, -#define WIPE_T4_68 7 +#define WIPE_T4_68 7 {0, 0, 0, 2, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, 1, 2, 1, 0, 0, 1, 1, 2, 1, 0, 0, 2, 0, 2, 1, 0, 0, 2, 0, 2, 2, 1}, -#define WIPE_T4_101 8 +#define WIPE_T4_101 8 {0, 0, 1, 2, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 2, 1, 1, 1, 0, 0, 2, 1, 2, 2, 1, @@ -326,7 +326,7 @@ static gint triangles_4t[][4 * 9] = { static gint triangles_8t[][8 * 9] = { /* 7 */ -#define WIPE_T8_7 0 +#define WIPE_T8_7 0 {0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 1, 1, @@ -335,7 +335,7 @@ static gint triangles_8t[][8 * 9] = { 1, 1, 1, 0, 2, 0, 1, 2, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}, -#define WIPE_T8_43 1 +#define WIPE_T8_43 1 {0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 2, @@ -344,7 +344,7 @@ static gint triangles_8t[][8 * 9] = { 1, 1, 1, 0, 2, 1, 1, 2, 0, 0, 1, 2, 1, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 2, 1, 1, 1}, -#define WIPE_T8_44 2 +#define WIPE_T8_44 2 {0, 0, 1, 1, 0, 2, 1, 1, 1, 1, 0, 2, 2, 0, 1, 1, 1, 1, 2, 0, 1, 1, 1, 1, 2, 1, 0, @@ -353,7 +353,7 @@ static gint triangles_8t[][8 * 9] = { 1, 1, 1, 0, 2, 1, 1, 2, 2, 0, 1, 0, 1, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1}, -#define WIPE_T8_47 3 +#define WIPE_T8_47 3 {0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 2, 0, 0, 1, 1, 0, 2, 0, 0, 1, 1, 0, 2, 1, 1, @@ -362,7 +362,7 @@ static gint triangles_8t[][8 * 9] = { 1, 1, 0, 0, 2, 0, 1, 2, 1, 0, 1, 1, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0}, -#define WIPE_T8_48 4 +#define WIPE_T8_48 4 {0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 2, 0, 1, 2, 1, 0, @@ -375,7 +375,7 @@ static gint triangles_8t[][8 * 9] = { static gint triangles_16t[][16 * 9] = { /* 8 */ -#define WIPE_T16_8 0 +#define WIPE_T16_8 0 {0, 0, 1, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 2, 1, 1, 1, 0, 0, 2, 1, 2, 2, 1, @@ -406,148 +406,148 @@ struct _GstWipeConfig }; static GstWipeConfig wipe_config[] = { -#define WIPE_CONFIG_1 0 +#define WIPE_CONFIG_1 0 {boxes_1b[WIPE_B1_1], 1, 0, 0, 0}, /* 1 */ -#define WIPE_CONFIG_2 WIPE_CONFIG_1+1 +#define WIPE_CONFIG_2 WIPE_CONFIG_1+1 {boxes_1b[WIPE_B1_2], 1, 0, 0, 0}, /* 2 */ -#define WIPE_CONFIG_3 WIPE_CONFIG_2+1 +#define WIPE_CONFIG_3 WIPE_CONFIG_2+1 {triangles_2t[WIPE_T2_3], 2, 0, 0, 0}, /* 3 */ -#define WIPE_CONFIG_4 WIPE_CONFIG_3+1 +#define WIPE_CONFIG_4 WIPE_CONFIG_3+1 {triangles_2t[WIPE_T2_4], 2, 0, 0, 0}, /* 4 */ -#define WIPE_CONFIG_5 WIPE_CONFIG_4+1 +#define WIPE_CONFIG_5 WIPE_CONFIG_4+1 {triangles_2t[WIPE_T2_5], 2, 0, 0, 0}, /* 5 */ -#define WIPE_CONFIG_6 WIPE_CONFIG_5+1 +#define WIPE_CONFIG_6 WIPE_CONFIG_5+1 {triangles_2t[WIPE_T2_6], 2, 0, 0, 0}, /* 6 */ -#define WIPE_CONFIG_7 WIPE_CONFIG_6+1 +#define WIPE_CONFIG_7 WIPE_CONFIG_6+1 {triangles_8t[WIPE_T8_7], 8, 1, 1, 0}, /* 7 */ -#define WIPE_CONFIG_8 WIPE_CONFIG_7+1 +#define WIPE_CONFIG_8 WIPE_CONFIG_7+1 {triangles_16t[WIPE_T16_8], 16, 2, 2, 0}, /* 8 */ -#define WIPE_CONFIG_21 WIPE_CONFIG_8+1 +#define WIPE_CONFIG_21 WIPE_CONFIG_8+1 {boxes_2b[WIPE_B2_21], 2, 1, 1, 0}, /* 21 */ -#define WIPE_CONFIG_22 WIPE_CONFIG_21+1 +#define WIPE_CONFIG_22 WIPE_CONFIG_21+1 {boxes_2b[WIPE_B2_22], 2, 1, 1, 0}, /* 22 */ -#define WIPE_CONFIG_23 WIPE_CONFIG_22+1 +#define WIPE_CONFIG_23 WIPE_CONFIG_22+1 {triangles_3t[WIPE_T3_23], 3, 1, 1, 0}, /* 23 */ -#define WIPE_CONFIG_24 WIPE_CONFIG_23+1 +#define WIPE_CONFIG_24 WIPE_CONFIG_23+1 {triangles_3t[WIPE_T3_24], 3, 1, 1, 0}, /* 24 */ -#define WIPE_CONFIG_25 WIPE_CONFIG_24+1 +#define WIPE_CONFIG_25 WIPE_CONFIG_24+1 {triangles_3t[WIPE_T3_23], 3, 1, 1, 0}, /* 25 */ -#define WIPE_CONFIG_26 WIPE_CONFIG_25+1 +#define WIPE_CONFIG_26 WIPE_CONFIG_25+1 {triangles_3t[WIPE_T3_26], 3, 1, 1, 0}, /* 26 */ -#define WIPE_CONFIG_41 WIPE_CONFIG_26+1 +#define WIPE_CONFIG_41 WIPE_CONFIG_26+1 {triangles_2t[WIPE_T2_41], 2, 0, 0, 1}, /* 41 */ -#define WIPE_CONFIG_42 WIPE_CONFIG_41+1 +#define WIPE_CONFIG_42 WIPE_CONFIG_41+1 {triangles_2t[WIPE_T2_42], 2, 0, 0, 1}, /* 42 */ -#define WIPE_CONFIG_43 WIPE_CONFIG_42+1 +#define WIPE_CONFIG_43 WIPE_CONFIG_42+1 {triangles_8t[WIPE_T8_43], 8, 1, 1, 1}, /* 43 */ -#define WIPE_CONFIG_44 WIPE_CONFIG_43+1 +#define WIPE_CONFIG_44 WIPE_CONFIG_43+1 {triangles_8t[WIPE_T8_44], 8, 1, 1, 1}, /* 44 */ -#define WIPE_CONFIG_45 WIPE_CONFIG_44+1 +#define WIPE_CONFIG_45 WIPE_CONFIG_44+1 {triangles_2t[WIPE_T2_45], 2, 0, 0, 0}, /* 45 */ -#define WIPE_CONFIG_46 WIPE_CONFIG_45+1 +#define WIPE_CONFIG_46 WIPE_CONFIG_45+1 {triangles_2t[WIPE_T2_46], 2, 0, 0, 0}, /* 46 */ -#define WIPE_CONFIG_47 WIPE_CONFIG_46+1 +#define WIPE_CONFIG_47 WIPE_CONFIG_46+1 {triangles_8t[WIPE_T8_47], 8, 1, 1, 0}, /* 47 */ -#define WIPE_CONFIG_48 WIPE_CONFIG_47+1 +#define WIPE_CONFIG_48 WIPE_CONFIG_47+1 {triangles_8t[WIPE_T8_48], 8, 1, 1, 0}, /* 48 */ -#define WIPE_CONFIG_61 WIPE_CONFIG_48+1 +#define WIPE_CONFIG_61 WIPE_CONFIG_48+1 {triangles_4t[WIPE_T4_61], 4, 1, 1, 1}, /* 61 */ -#define WIPE_CONFIG_62 WIPE_CONFIG_61+1 +#define WIPE_CONFIG_62 WIPE_CONFIG_61+1 {triangles_4t[WIPE_T4_62], 4, 1, 1, 1}, /* 62 */ -#define WIPE_CONFIG_63 WIPE_CONFIG_62+1 +#define WIPE_CONFIG_63 WIPE_CONFIG_62+1 {triangles_4t[WIPE_T4_63], 4, 1, 1, 1}, /* 63 */ -#define WIPE_CONFIG_64 WIPE_CONFIG_63+1 +#define WIPE_CONFIG_64 WIPE_CONFIG_63+1 {triangles_4t[WIPE_T4_64], 4, 1, 1, 1}, /* 64 */ -#define WIPE_CONFIG_65 WIPE_CONFIG_64+1 +#define WIPE_CONFIG_65 WIPE_CONFIG_64+1 {triangles_4t[WIPE_T4_65], 4, 1, 1, 0}, /* 65 */ -#define WIPE_CONFIG_66 WIPE_CONFIG_65+1 +#define WIPE_CONFIG_66 WIPE_CONFIG_65+1 {triangles_4t[WIPE_T4_66], 4, 1, 1, 0}, /* 66 */ -#define WIPE_CONFIG_67 WIPE_CONFIG_66+1 +#define WIPE_CONFIG_67 WIPE_CONFIG_66+1 {triangles_4t[WIPE_T4_67], 4, 1, 1, 0}, /* 67 */ -#define WIPE_CONFIG_68 WIPE_CONFIG_67+1 +#define WIPE_CONFIG_68 WIPE_CONFIG_67+1 {triangles_4t[WIPE_T4_68], 4, 1, 1, 0}, /* 68 */ -#define WIPE_CONFIG_101 WIPE_CONFIG_68+1 +#define WIPE_CONFIG_101 WIPE_CONFIG_68+1 {triangles_4t[WIPE_T4_101], 4, 1, 1, 0}, /* 101 */ -#define WIPE_CONFIG_201 WIPE_CONFIG_101+1 +#define WIPE_CONFIG_201 WIPE_CONFIG_101+1 {box_clock_4b[WIPE_B4_201], 4, 1, 1, 2}, /* 201 */ -#define WIPE_CONFIG_202 WIPE_CONFIG_201+1 +#define WIPE_CONFIG_202 WIPE_CONFIG_201+1 {box_clock_4b[WIPE_B4_202], 4, 1, 1, 2}, /* 202 */ -#define WIPE_CONFIG_203 WIPE_CONFIG_202+1 +#define WIPE_CONFIG_203 WIPE_CONFIG_202+1 {box_clock_4b[WIPE_B4_203], 4, 1, 1, 2}, /* 203 */ -#define WIPE_CONFIG_204 WIPE_CONFIG_203+1 +#define WIPE_CONFIG_204 WIPE_CONFIG_203+1 {box_clock_4b[WIPE_B4_204], 4, 1, 1, 2}, /* 204 */ -#define WIPE_CONFIG_205 WIPE_CONFIG_204+1 +#define WIPE_CONFIG_205 WIPE_CONFIG_204+1 {box_clock_4b[WIPE_B4_205], 4, 1, 1, 1}, /* 205 */ -#define WIPE_CONFIG_206 WIPE_CONFIG_205+1 +#define WIPE_CONFIG_206 WIPE_CONFIG_205+1 {box_clock_4b[WIPE_B4_206], 4, 1, 1, 1}, /* 206 */ -#define WIPE_CONFIG_207 WIPE_CONFIG_206+1 +#define WIPE_CONFIG_207 WIPE_CONFIG_206+1 {box_clock_4b[WIPE_B4_207], 4, 1, 1, 0}, /* 207 */ -#define WIPE_CONFIG_211 WIPE_CONFIG_207+1 +#define WIPE_CONFIG_211 WIPE_CONFIG_207+1 {box_clock_4b[WIPE_B4_211], 4, 1, 1, 1}, /* 211 */ -#define WIPE_CONFIG_212 WIPE_CONFIG_211+1 +#define WIPE_CONFIG_212 WIPE_CONFIG_211+1 {box_clock_4b[WIPE_B4_212], 4, 1, 1, 1}, /* 212 */ -#define WIPE_CONFIG_213 WIPE_CONFIG_212+1 +#define WIPE_CONFIG_213 WIPE_CONFIG_212+1 {box_clock_4b[WIPE_B4_213], 4, 1, 1, 0}, /* 213 */ -#define WIPE_CONFIG_214 WIPE_CONFIG_213+1 +#define WIPE_CONFIG_214 WIPE_CONFIG_213+1 {box_clock_4b[WIPE_B4_214], 4, 1, 1, 0}, /* 214 */ -#define WIPE_CONFIG_221 WIPE_CONFIG_214+1 +#define WIPE_CONFIG_221 WIPE_CONFIG_214+1 {box_clock_2b[WIPE_B2_221], 2, 1, 1, 1}, /* 221 */ -#define WIPE_CONFIG_222 WIPE_CONFIG_221+1 +#define WIPE_CONFIG_222 WIPE_CONFIG_221+1 {box_clock_2b[WIPE_B2_222], 2, 1, 1, 1}, /* 222 */ -#define WIPE_CONFIG_223 WIPE_CONFIG_222+1 +#define WIPE_CONFIG_223 WIPE_CONFIG_222+1 {box_clock_2b[WIPE_B2_223], 2, 1, 1, 1}, /* 223 */ -#define WIPE_CONFIG_224 WIPE_CONFIG_223+1 +#define WIPE_CONFIG_224 WIPE_CONFIG_223+1 {box_clock_2b[WIPE_B2_224], 2, 1, 1, 1}, /* 224 */ -#define WIPE_CONFIG_225 WIPE_CONFIG_224+1 +#define WIPE_CONFIG_225 WIPE_CONFIG_224+1 {box_clock_2b[WIPE_B2_225], 2, 1, 1, 0}, /* 225 */ -#define WIPE_CONFIG_226 WIPE_CONFIG_225+1 +#define WIPE_CONFIG_226 WIPE_CONFIG_225+1 {box_clock_2b[WIPE_B2_226], 2, 1, 1, 0}, /* 226 */ -#define WIPE_CONFIG_227 WIPE_CONFIG_226+1 +#define WIPE_CONFIG_227 WIPE_CONFIG_226+1 {box_clock_4b[WIPE_B4_227], 4, 1, 1, 1}, /* 227 */ -#define WIPE_CONFIG_228 WIPE_CONFIG_227+1 +#define WIPE_CONFIG_228 WIPE_CONFIG_227+1 {box_clock_4b[WIPE_B4_228], 4, 1, 1, 1}, /* 228 */ -#define WIPE_CONFIG_231 WIPE_CONFIG_228+1 +#define WIPE_CONFIG_231 WIPE_CONFIG_228+1 {box_clock_2b[WIPE_B2_231], 2, 1, 1, 0}, /* 231 */ -#define WIPE_CONFIG_232 WIPE_CONFIG_231+1 +#define WIPE_CONFIG_232 WIPE_CONFIG_231+1 {box_clock_2b[WIPE_B2_232], 2, 1, 1, 0}, /* 232 */ -#define WIPE_CONFIG_233 WIPE_CONFIG_232+1 +#define WIPE_CONFIG_233 WIPE_CONFIG_232+1 {box_clock_2b[WIPE_B2_233], 2, 1, 1, 0}, /* 233 */ -#define WIPE_CONFIG_234 WIPE_CONFIG_233+1 +#define WIPE_CONFIG_234 WIPE_CONFIG_233+1 {box_clock_2b[WIPE_B2_234], 2, 1, 1, 0}, /* 234 */ -#define WIPE_CONFIG_235 WIPE_CONFIG_234+1 +#define WIPE_CONFIG_235 WIPE_CONFIG_234+1 {box_clock_4b[WIPE_B4_235], 4, 1, 1, 0}, /* 235 */ -#define WIPE_CONFIG_236 WIPE_CONFIG_235+1 +#define WIPE_CONFIG_236 WIPE_CONFIG_235+1 {box_clock_4b[WIPE_B4_236], 4, 1, 1, 0}, /* 236 */ -#define WIPE_CONFIG_241 WIPE_CONFIG_236+1 +#define WIPE_CONFIG_241 WIPE_CONFIG_236+1 {box_clock_1b[WIPE_B1_241], 1, 0, 0, 0}, /* 241 */ -#define WIPE_CONFIG_242 WIPE_CONFIG_241+1 +#define WIPE_CONFIG_242 WIPE_CONFIG_241+1 {box_clock_1b[WIPE_B1_242], 1, 0, 0, 0}, /* 242 */ -#define WIPE_CONFIG_243 WIPE_CONFIG_242+1 +#define WIPE_CONFIG_243 WIPE_CONFIG_242+1 {box_clock_1b[WIPE_B1_243], 1, 0, 0, 0}, /* 243 */ -#define WIPE_CONFIG_244 WIPE_CONFIG_243+1 +#define WIPE_CONFIG_244 WIPE_CONFIG_243+1 {box_clock_1b[WIPE_B1_244], 1, 0, 0, 0}, /* 244 */ -#define WIPE_CONFIG_245 WIPE_CONFIG_244+1 +#define WIPE_CONFIG_245 WIPE_CONFIG_244+1 {triangles_2t[WIPE_T2_245], 2, 1, 1, 0}, /* 245 */ -#define WIPE_CONFIG_246 WIPE_CONFIG_245+1 +#define WIPE_CONFIG_246 WIPE_CONFIG_245+1 {triangles_2t[WIPE_T2_246], 2, 1, 1, 0}, /* 246 */ -#define WIPE_CONFIG_251 WIPE_CONFIG_246+1 +#define WIPE_CONFIG_251 WIPE_CONFIG_246+1 {box_clock_2b[WIPE_B2_251], 2, 1, 1, 0}, /* 251 */ -#define WIPE_CONFIG_252 WIPE_CONFIG_251+1 +#define WIPE_CONFIG_252 WIPE_CONFIG_251+1 {box_clock_2b[WIPE_B2_252], 2, 1, 1, 0}, /* 252 */ -#define WIPE_CONFIG_253 WIPE_CONFIG_252+1 +#define WIPE_CONFIG_253 WIPE_CONFIG_252+1 {box_clock_2b[WIPE_B2_253], 2, 1, 1, 0}, /* 253 */ -#define WIPE_CONFIG_254 WIPE_CONFIG_253+1 +#define WIPE_CONFIG_254 WIPE_CONFIG_253+1 {box_clock_2b[WIPE_B2_254], 2, 1, 1, 0}, /* 254 */ -#define WIPE_CONFIG_261 WIPE_CONFIG_254+1 +#define WIPE_CONFIG_261 WIPE_CONFIG_254+1 {box_clock_8b[WIPE_B8_261], 8, 2, 2, 2}, /* 261 */ -#define WIPE_CONFIG_262 WIPE_CONFIG_261+1 +#define WIPE_CONFIG_262 WIPE_CONFIG_261+1 {box_clock_8b[WIPE_B8_262], 8, 2, 2, 2}, /* 262 */ -#define WIPE_CONFIG_263 WIPE_CONFIG_262+1 +#define WIPE_CONFIG_263 WIPE_CONFIG_262+1 {box_clock_8b[WIPE_B8_263], 8, 2, 2, 1}, /* 263 */ -#define WIPE_CONFIG_264 WIPE_CONFIG_263+1 +#define WIPE_CONFIG_264 WIPE_CONFIG_263+1 {box_clock_8b[WIPE_B8_264], 8, 2, 2, 1}, /* 264 */ }; diff --git a/gst/smpte/gstmask.h b/gst/smpte/gstmask.h index 6131c6243..79428d756 100644 --- a/gst/smpte/gstmask.h +++ b/gst/smpte/gstmask.h @@ -27,37 +27,37 @@ typedef struct _GstMask GstMask; typedef struct _GstMaskDefinition GstMaskDefinition; -typedef void (*GstMaskDrawFunc) (GstMask *mask); -typedef void (*GstMaskDestroyFunc) (GstMask *mask); +typedef void (*GstMaskDrawFunc) (GstMask *mask); +typedef void (*GstMaskDestroyFunc) (GstMask *mask); struct _GstMaskDefinition { - gint type; - gchar *short_name; - gchar *long_name; - GstMaskDrawFunc draw_func; - GstMaskDestroyFunc destroy_func; - gpointer user_data; + gint type; + gchar *short_name; + gchar *long_name; + GstMaskDrawFunc draw_func; + GstMaskDestroyFunc destroy_func; + gpointer user_data; }; struct _GstMask { - gint type; - guint32 *data; - gpointer user_data; + gint type; + guint32 *data; + gpointer user_data; - gint width; - gint height; - gint bpp; + gint width; + gint height; + gint bpp; - GstMaskDestroyFunc destroy_func; + GstMaskDestroyFunc destroy_func; }; -void _gst_mask_init (void); -void _gst_mask_register (GstMaskDefinition *definition); +void _gst_mask_init (void); +void _gst_mask_register (GstMaskDefinition *definition); -void _gst_mask_default_destroy (GstMask *mask); +void _gst_mask_default_destroy (GstMask *mask); -const GList* gst_mask_get_definitions (void); -GstMask* gst_mask_factory_new (gint type, gint bpp, gint width, gint height); -void gst_mask_destroy (GstMask *mask); +const GList* gst_mask_get_definitions (void); +GstMask* gst_mask_factory_new (gint type, gint bpp, gint width, gint height); +void gst_mask_destroy (GstMask *mask); #endif /* __GST_MASK_H__ */ diff --git a/gst/smpte/gstsmpte.h b/gst/smpte/gstsmpte.h index 107ccc0d2..18d2f629e 100644 --- a/gst/smpte/gstsmpte.h +++ b/gst/smpte/gstsmpte.h @@ -41,26 +41,26 @@ typedef struct _GstSMPTE GstSMPTE; typedef struct _GstSMPTEClass GstSMPTEClass; struct _GstSMPTE { - GstElement element; + GstElement element; - gint format; - gint width; - gint height; - gdouble fps; + gint format; + gint width; + gint height; + gdouble fps; - gint duration; - gint position; + gint duration; + gint position; - GstPad *srcpad, - *sinkpad1, - *sinkpad2; + GstPad *srcpad, + *sinkpad1, + *sinkpad2; GstCollectPads *collect; - gint type; - gint border; - gint depth; - GstMask *mask; + gint type; + gint border; + gint depth; + GstMask *mask; }; struct _GstSMPTEClass { diff --git a/gst/smpte/paint.c b/gst/smpte/paint.c index f4f648296..369e36f00 100644 --- a/gst/smpte/paint.c +++ b/gst/smpte/paint.c @@ -75,75 +75,75 @@ gst_smpte_paint_hbox (guint32 * dest, gint stride, } } -#define STEP_3D_LINE(dxabs,dyabs,dzabs,sdx,sdy,sdz,xr,yr,zr,px,py,pz) \ -G_STMT_START { \ - if (dxabs >= dyabs && dxabs >= dzabs) { \ - yr += dyabs; \ - zr += dzabs; \ - if (yr >= dxabs) { \ - py += sdy; \ - yr -= dxabs; \ - } \ - if (zr >= dzabs) { \ - pz += sdz; \ - zr -= dxabs; \ - } \ - px += sdx; \ - } else if (dyabs >= dxabs && dyabs >= dzabs) { \ - xr += dxabs; \ - zr += dzabs; \ - if (xr >= dyabs) { \ - px += sdx; \ - xr -= dyabs; \ - } \ - if (zr >= dzabs) { \ - pz += sdz; \ - zr -= dyabs; \ - } \ - py += sdy; \ - } else { \ - yr += dyabs; \ - xr += dxabs; \ - if (yr >= dyabs) { \ - py += sdy; \ - yr -= dzabs; \ - } \ - if (xr >= dyabs) { \ - px += sdx; \ - xr -= dzabs; \ - } \ - pz += sdz; \ - } \ +#define STEP_3D_LINE(dxabs,dyabs,dzabs,sdx,sdy,sdz,xr,yr,zr,px,py,pz) \ +G_STMT_START { \ + if (dxabs >= dyabs && dxabs >= dzabs) { \ + yr += dyabs; \ + zr += dzabs; \ + if (yr >= dxabs) { \ + py += sdy; \ + yr -= dxabs; \ + } \ + if (zr >= dzabs) { \ + pz += sdz; \ + zr -= dxabs; \ + } \ + px += sdx; \ + } else if (dyabs >= dxabs && dyabs >= dzabs) { \ + xr += dxabs; \ + zr += dzabs; \ + if (xr >= dyabs) { \ + px += sdx; \ + xr -= dyabs; \ + } \ + if (zr >= dzabs) { \ + pz += sdz; \ + zr -= dyabs; \ + } \ + py += sdy; \ + } else { \ + yr += dyabs; \ + xr += dxabs; \ + if (yr >= dyabs) { \ + py += sdy; \ + yr -= dzabs; \ + } \ + if (xr >= dyabs) { \ + px += sdx; \ + xr -= dzabs; \ + } \ + pz += sdz; \ + } \ } G_STMT_END -#define SWAP_INT(a,b) \ -G_STMT_START { \ - gint tmp; \ - tmp = (a); \ - (a) = (b); \ - (b) = (tmp); \ +#define SWAP_INT(a,b) \ +G_STMT_START { \ + gint tmp; \ + tmp = (a); \ + (a) = (b); \ + (b) = (tmp); \ } G_STMT_END #define SIGN(a) ((a) < 0 ? -1 : 1) #define PREPARE_3D_LINE(x0,y0,z0,x1,y1,z1,dxabs,dyabs,dzabs,sdx,sdy,sdz,xr,yr,zr,px,py,pz)\ -G_STMT_START { \ - gint dx, dy, dz; \ - dx = x1 - x0; \ - dy = y1 - y0; \ - dz = z1 - z0; \ - dxabs = abs (dx); \ - dyabs = abs (dy); \ - dzabs = abs (dz); \ - sdx = SIGN (dx); \ - sdy = SIGN (dy); \ - sdz = SIGN (dz); \ - xr = dxabs >> 1; \ - yr = dyabs >> 1; \ - zr = dzabs >> 1; \ - px = x0; \ - py = y0; \ - pz = z0; \ +G_STMT_START { \ + gint dx, dy, dz; \ + dx = x1 - x0; \ + dy = y1 - y0; \ + dz = z1 - z0; \ + dxabs = abs (dx); \ + dyabs = abs (dy); \ + dzabs = abs (dz); \ + sdx = SIGN (dx); \ + sdy = SIGN (dy); \ + sdz = SIGN (dz); \ + xr = dxabs >> 1; \ + yr = dyabs >> 1; \ + zr = dzabs >> 1; \ + px = x0; \ + py = y0; \ + pz = z0; \ } G_STMT_END void diff --git a/gst/smpte/paint.h b/gst/smpte/paint.h index 4c34cf92d..3de748148 100644 --- a/gst/smpte/paint.h +++ b/gst/smpte/paint.h @@ -22,26 +22,26 @@ #include <glib.h> -void gst_smpte_paint_vbox (guint32 *dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1); -void gst_smpte_paint_hbox (guint32 *dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1); +void gst_smpte_paint_vbox (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1); +void gst_smpte_paint_hbox (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1); -void gst_smpte_paint_triangle_linear (guint32 *dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1, - gint x2, gint y2, gint c2); +void gst_smpte_paint_triangle_linear (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1, + gint x2, gint y2, gint c2); -void gst_smpte_paint_triangle_clock (guint32 *dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1, - gint x2, gint y2, gint c2); +void gst_smpte_paint_triangle_clock (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1, + gint x2, gint y2, gint c2); -void gst_smpte_paint_box_clock (guint32 *dest, gint stride, - gint x0, gint y0, gint c0, - gint x1, gint y1, gint c1, - gint x2, gint y2, gint c2); +void gst_smpte_paint_box_clock (guint32 *dest, gint stride, + gint x0, gint y0, gint c0, + gint x1, gint y1, gint c1, + gint x2, gint y2, gint c2); #endif /* __GST_SMPTE_PAINT_H__ */ diff --git a/gst/udp/gstdynudpsink.h b/gst/udp/gstdynudpsink.h index 9ade72759..c85eea9bd 100644 --- a/gst/udp/gstdynudpsink.h +++ b/gst/udp/gstdynudpsink.h @@ -40,11 +40,11 @@ G_BEGIN_DECLS #include <arpa/inet.h> #include "gstudp.h" -#define GST_TYPE_DYNUDPSINK (gst_dynudpsink_get_type()) -#define GST_DYNUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DYNUDPSINK,GstDynUDPSink)) -#define GST_DYNUDPSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DYNUDPSINK,GstDynUDPSink)) -#define GST_IS_DYNUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DYNUDPSINK)) -#define GST_IS_DYNUDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DYNUDPSINK)) +#define GST_TYPE_DYNUDPSINK (gst_dynudpsink_get_type()) +#define GST_DYNUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DYNUDPSINK,GstDynUDPSink)) +#define GST_DYNUDPSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DYNUDPSINK,GstDynUDPSink)) +#define GST_IS_DYNUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DYNUDPSINK)) +#define GST_IS_DYNUDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DYNUDPSINK)) typedef struct _GstDynUDPSink GstDynUDPSink; typedef struct _GstDynUDPSinkClass GstDynUDPSinkClass; @@ -69,7 +69,7 @@ struct _GstDynUDPSinkClass { GType gst_dynudpsink_get_type(void); -GValueArray* gst_dynudpsink_get_stats (GstDynUDPSink *sink, const gchar *host, gint port); +GValueArray* gst_dynudpsink_get_stats (GstDynUDPSink *sink, const gchar *host, gint port); G_END_DECLS diff --git a/gst/udp/gstmultiudpsink.h b/gst/udp/gstmultiudpsink.h index c5b22dd1a..4b75dfcfc 100644 --- a/gst/udp/gstmultiudpsink.h +++ b/gst/udp/gstmultiudpsink.h @@ -40,11 +40,11 @@ G_BEGIN_DECLS #include <arpa/inet.h> #include "gstudp.h" -#define GST_TYPE_MULTIUDPSINK (gst_multiudpsink_get_type()) -#define GST_MULTIUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIUDPSINK,GstMultiUDPSink)) -#define GST_MULTIUDPSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTIUDPSINK,GstMultiUDPSink)) -#define GST_IS_MULTIUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIUDPSINK)) -#define GST_IS_MULTIUDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIUDPSINK)) +#define GST_TYPE_MULTIUDPSINK (gst_multiudpsink_get_type()) +#define GST_MULTIUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIUDPSINK,GstMultiUDPSink)) +#define GST_MULTIUDPSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTIUDPSINK,GstMultiUDPSink)) +#define GST_IS_MULTIUDPSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIUDPSINK)) +#define GST_IS_MULTIUDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIUDPSINK)) typedef struct _GstMultiUDPSink GstMultiUDPSink; typedef struct _GstMultiUDPSinkClass GstMultiUDPSinkClass; @@ -66,8 +66,8 @@ struct _GstMultiUDPSink { int sock; - GMutex *client_lock; - GList *clients; + GMutex *client_lock; + GList *clients; }; struct _GstMultiUDPSinkClass { @@ -80,16 +80,16 @@ struct _GstMultiUDPSinkClass { GValueArray* (*get_stats) (GstMultiUDPSink *sink, const gchar *host, gint port); /* signals */ - void (*client_added) (GstElement *element, const gchar *host, gint port); - void (*client_removed) (GstElement *element, const gchar *host, gint port); + void (*client_added) (GstElement *element, const gchar *host, gint port); + void (*client_removed) (GstElement *element, const gchar *host, gint port); }; GType gst_multiudpsink_get_type(void); -void gst_multiudpsink_add (GstMultiUDPSink *sink, const gchar *host, gint port); -void gst_multiudpsink_remove (GstMultiUDPSink *sink, const gchar *host, gint port); -void gst_multiudpsink_clear (GstMultiUDPSink *sink); -GValueArray* gst_multiudpsink_get_stats (GstMultiUDPSink *sink, const gchar *host, gint port); +void gst_multiudpsink_add (GstMultiUDPSink *sink, const gchar *host, gint port); +void gst_multiudpsink_remove (GstMultiUDPSink *sink, const gchar *host, gint port); +void gst_multiudpsink_clear (GstMultiUDPSink *sink); +GValueArray* gst_multiudpsink_get_stats (GstMultiUDPSink *sink, const gchar *host, gint port); G_END_DECLS diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c index 927f01753..d7b0f70ec 100644 --- a/gst/udp/gstudpsink.c +++ b/gst/udp/gstudpsink.c @@ -22,8 +22,8 @@ #endif #include "gstudpsink.h" -#define UDP_DEFAULT_HOST "localhost" -#define UDP_DEFAULT_PORT 4951 +#define UDP_DEFAULT_HOST "localhost" +#define UDP_DEFAULT_PORT 4951 /* elementfactory information */ static GstElementDetails gst_udpsink_details = diff --git a/gst/udp/gstudpsink.h b/gst/udp/gstudpsink.h index 57abccaef..b5deb86fd 100644 --- a/gst/udp/gstudpsink.h +++ b/gst/udp/gstudpsink.h @@ -41,11 +41,11 @@ G_BEGIN_DECLS #include <arpa/inet.h> #include "gstudp.h" -#define GST_TYPE_UDPSINK (gst_udpsink_get_type()) -#define GST_UDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_UDPSINK,GstUDPSink)) -#define GST_UDPSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_UDPSINK,GstUDPSink)) -#define GST_IS_UDPSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_UDPSINK)) -#define GST_IS_UDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSINK)) +#define GST_TYPE_UDPSINK (gst_udpsink_get_type()) +#define GST_UDPSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_UDPSINK,GstUDPSink)) +#define GST_UDPSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_UDPSINK,GstUDPSink)) +#define GST_IS_UDPSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_UDPSINK)) +#define GST_IS_UDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSINK)) typedef struct _GstUDPSink GstUDPSink; typedef struct _GstUDPSinkClass GstUDPSinkClass; diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index 5f3835bde..35e1a5723 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -42,14 +42,14 @@ GST_DEBUG_CATEGORY (udpsrc_debug); #define WRITE_SOCKET(src) src->control_sock[1] #define READ_SOCKET(src) src->control_sock[0] -#define SEND_COMMAND(src, command) \ -G_STMT_START { \ - unsigned char c; c = command; \ - write (WRITE_SOCKET(src), &c, 1); \ +#define SEND_COMMAND(src, command) \ +G_STMT_START { \ + unsigned char c; c = command; \ + write (WRITE_SOCKET(src), &c, 1); \ } G_STMT_END -#define READ_COMMAND(src, command, res) \ -G_STMT_START { \ +#define READ_COMMAND(src, command, res) \ +G_STMT_START { \ res = read(READ_SOCKET(src), &command, 1); \ } G_STMT_END @@ -64,10 +64,10 @@ GST_ELEMENT_DETAILS ("UDP packet receiver", "Receive data over the network via UDP", "Wim Taymans <wim@fluendo.com>"); -#define UDP_DEFAULT_PORT 4951 -#define UDP_DEFAULT_MULTICAST_GROUP "0.0.0.0" -#define UDP_DEFAULT_URI "udp://0.0.0.0:4951" -#define UDP_DEFAULT_CAPS NULL +#define UDP_DEFAULT_PORT 4951 +#define UDP_DEFAULT_MULTICAST_GROUP "0.0.0.0" +#define UDP_DEFAULT_URI "udp://0.0.0.0:4951" +#define UDP_DEFAULT_CAPS NULL enum { diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c index f0f2377c1..3e21aa638 100644 --- a/gst/videomixer/videomixer.c +++ b/gst/videomixer/videomixer.c @@ -31,13 +31,13 @@ GST_DEBUG_CATEGORY_STATIC (gst_videomixer_debug); #define GST_TYPE_VIDEO_MIXER_PAD (gst_videomixer_pad_get_type()) #define GST_VIDEO_MIXER_PAD(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_MIXER_PAD, GstVideoMixerPad)) + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_MIXER_PAD, GstVideoMixerPad)) #define GST_VIDEO_MIXER_PAD_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_MIXER_PAD, GstVideoMixerPadiClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_MIXER_PAD, GstVideoMixerPadiClass)) #define GST_IS_VIDEO_MIXER_PAD(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_MIXER_PAD)) + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_MIXER_PAD)) #define GST_IS_VIDEO_MIXER_PAD_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_MIXER_PAD)) + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_MIXER_PAD)) typedef struct _GstVideoMixerPad GstVideoMixerPad; typedef struct _GstVideoMixerPadClass GstVideoMixerPadClass; @@ -45,13 +45,13 @@ typedef struct _GstVideoMixerCollect GstVideoMixerCollect; #define GST_TYPE_VIDEO_MIXER (gst_videomixer_get_type()) #define GST_VIDEO_MIXER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_MIXER, GstVideoMixer)) + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_MIXER, GstVideoMixer)) #define GST_VIDEO_MIXER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_MIXER, GstVideoMixerClass)) + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_MIXER, GstVideoMixerClass)) #define GST_IS_VIDEO_MIXER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_MIXER)) + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_MIXER)) #define GST_IS_VIDEO_MIXER_CLASS(obj) \ - (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_MIXER)) + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_MIXER)) static GType gst_videomixer_get_type (void); @@ -604,139 +604,139 @@ gst_videomixer_request_new_pad (GstElement * element, return GST_PAD (mixpad); } -#define BLEND_NORMAL(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ - U = ((U1*(255-alpha))+(U2*alpha))>>8; \ - V = ((V1*(255-alpha))+(V2*alpha))>>8; - -#define BLEND_ADD(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = Y1+((Y2*alpha)>>8); \ - U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \ - V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \ - if (Y>255) { \ - gint mult = MAX (0, 288-Y); \ - U = ((U*mult) + (127*(32-mult)))>>5; \ - V = ((V*mult) + (127*(32-mult)))>>5; \ - Y = 255; \ - } \ - U = MIN (U,255); \ - V = MIN (V,255); - -#define BLEND_SUBTRACT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = Y1-((Y2*alpha)>>8); \ - U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \ - V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \ - if (Y<0) { \ - gint mult = MIN (32, -Y); \ - U = ((U*(32-mult)) + (127*mult))>>5; \ - V = ((V*(32-mult)) + (127*mult))>>5; \ - Y = 0; \ - } - -#define BLEND_DARKEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - if (Y1 < Y2) { \ - Y = Y1; U = U1; V = V1; \ - } \ - else { \ - Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ - U = ((U1*(255-alpha))+(U2*alpha))>>8; \ - V = ((V1*(255-alpha))+(V2*alpha))>>8; \ - } - -#define BLEND_LIGHTEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - if (Y1 > Y2) { \ - Y = Y1; U = U1; V = V1; \ - } \ - else { \ - Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ - U = ((U1*(255-alpha))+(U2*alpha))>>8; \ - V = ((V1*(255-alpha))+(V2*alpha))>>8; \ - } - -#define BLEND_MULTIPLY(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = (Y1*(256*(255-alpha) +(Y2*alpha)))>>16; \ - U = ((U1*(255-alpha)*256)+(alpha*(U1*Y2+128*(256-Y2))))>>16; \ - V = ((V1*(255-alpha)*256)+(alpha*(V1*Y2+128*(256-Y2))))>>16; - -#define BLEND_DIFFERENCE(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = ABS((gint)Y1-(gint)Y2)+127; \ - U = ABS((gint)U1-(gint)U2)+127; \ - V = ABS((gint)V1-(gint)V2)+127; \ - Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ - U = ((U*alpha)+(U1*(255-alpha)))>>8; \ - V = ((V*alpha)+(V1*(255-alpha)))>>8; \ - if (Y>255) { \ - gint mult = MAX (0, 288-Y); \ - U = ((U*mult) + (127*(32-mult)))>>5; \ - V = ((V*mult) + (127*(32-mult)))>>5; \ - Y = 255; \ - } else if (Y<0) { \ - gint mult = MIN (32, -Y); \ - U = ((U*(32-mult)) + (127*mult))>>5; \ - V = ((V*(32-mult)) + (127*mult))>>5; \ - Y = 0; \ - } \ - U = CLAMP(U, 0, 255); \ +#define BLEND_NORMAL(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ + U = ((U1*(255-alpha))+(U2*alpha))>>8; \ + V = ((V1*(255-alpha))+(V2*alpha))>>8; + +#define BLEND_ADD(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = Y1+((Y2*alpha)>>8); \ + U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \ + V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \ + if (Y>255) { \ + gint mult = MAX (0, 288-Y); \ + U = ((U*mult) + (127*(32-mult)))>>5; \ + V = ((V*mult) + (127*(32-mult)))>>5; \ + Y = 255; \ + } \ + U = MIN (U,255); \ + V = MIN (V,255); + +#define BLEND_SUBTRACT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = Y1-((Y2*alpha)>>8); \ + U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \ + V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \ + if (Y<0) { \ + gint mult = MIN (32, -Y); \ + U = ((U*(32-mult)) + (127*mult))>>5; \ + V = ((V*(32-mult)) + (127*mult))>>5; \ + Y = 0; \ + } + +#define BLEND_DARKEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + if (Y1 < Y2) { \ + Y = Y1; U = U1; V = V1; \ + } \ + else { \ + Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ + U = ((U1*(255-alpha))+(U2*alpha))>>8; \ + V = ((V1*(255-alpha))+(V2*alpha))>>8; \ + } + +#define BLEND_LIGHTEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + if (Y1 > Y2) { \ + Y = Y1; U = U1; V = V1; \ + } \ + else { \ + Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ + U = ((U1*(255-alpha))+(U2*alpha))>>8; \ + V = ((V1*(255-alpha))+(V2*alpha))>>8; \ + } + +#define BLEND_MULTIPLY(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = (Y1*(256*(255-alpha) +(Y2*alpha)))>>16; \ + U = ((U1*(255-alpha)*256)+(alpha*(U1*Y2+128*(256-Y2))))>>16; \ + V = ((V1*(255-alpha)*256)+(alpha*(V1*Y2+128*(256-Y2))))>>16; + +#define BLEND_DIFFERENCE(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = ABS((gint)Y1-(gint)Y2)+127; \ + U = ABS((gint)U1-(gint)U2)+127; \ + V = ABS((gint)V1-(gint)V2)+127; \ + Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ + U = ((U*alpha)+(U1*(255-alpha)))>>8; \ + V = ((V*alpha)+(V1*(255-alpha)))>>8; \ + if (Y>255) { \ + gint mult = MAX (0, 288-Y); \ + U = ((U*mult) + (127*(32-mult)))>>5; \ + V = ((V*mult) + (127*(32-mult)))>>5; \ + Y = 255; \ + } else if (Y<0) { \ + gint mult = MIN (32, -Y); \ + U = ((U*(32-mult)) + (127*mult))>>5; \ + V = ((V*(32-mult)) + (127*mult))>>5; \ + Y = 0; \ + } \ + U = CLAMP(U, 0, 255); \ V = CLAMP(V, 0, 255); -#define BLEND_EXCLUSION(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = ((gint)(Y1^0xff)*Y2+(gint)(Y2^0xff)*Y1)>>8; \ - U = ((gint)(U1^0xff)*Y2+(gint)(Y2^0xff)*U1)>>8; \ - V = ((gint)(V1^0xff)*Y2+(gint)(Y2^0xff)*V1)>>8; \ - Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ - U = ((U*alpha)+(U1*(255-alpha)))>>8; \ - V = ((V*alpha)+(V1*(255-alpha)))>>8; \ - if (Y>255) { \ - gint mult = MAX (0, 288-Y); \ - U = ((U*mult) + (127*(32-mult)))>>5; \ - V = ((V*mult) + (127*(32-mult)))>>5; \ - Y = 255; \ - } else if (Y<0) { \ - gint mult = MIN (32, -Y); \ - U = ((U*(32-mult)) + (127*mult))>>5; \ - V = ((V*(32-mult)) + (127*mult))>>5; \ - Y = 0; \ - } \ - U = CLAMP(U, 0, 255); \ +#define BLEND_EXCLUSION(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = ((gint)(Y1^0xff)*Y2+(gint)(Y2^0xff)*Y1)>>8; \ + U = ((gint)(U1^0xff)*Y2+(gint)(Y2^0xff)*U1)>>8; \ + V = ((gint)(V1^0xff)*Y2+(gint)(Y2^0xff)*V1)>>8; \ + Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ + U = ((U*alpha)+(U1*(255-alpha)))>>8; \ + V = ((V*alpha)+(V1*(255-alpha)))>>8; \ + if (Y>255) { \ + gint mult = MAX (0, 288-Y); \ + U = ((U*mult) + (127*(32-mult)))>>5; \ + V = ((V*mult) + (127*(32-mult)))>>5; \ + Y = 255; \ + } else if (Y<0) { \ + gint mult = MIN (32, -Y); \ + U = ((U*(32-mult)) + (127*mult))>>5; \ + V = ((V*(32-mult)) + (127*mult))>>5; \ + Y = 0; \ + } \ + U = CLAMP(U, 0, 255); \ V = CLAMP(V, 0, 255); -#define BLEND_SOFTLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = (gint)Y1+(gint)Y2 - 127; \ - U = (gint)U1+(gint)U2 - 127; \ - V = (gint)V1+(gint)V2 - 127; \ - Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ - U = ((U*alpha)+(U1*(255-alpha)))>>8; \ - V = ((V*alpha)+(V1*(255-alpha)))>>8; \ - if (Y>255) { \ - gint mult = MAX (0, 288-Y); \ - U = ((U*mult) + (127*(32-mult)))>>5; \ - V = ((V*mult) + (127*(32-mult)))>>5; \ - Y = 255; \ - } else if (Y<0) { \ - gint mult = MIN (32, -Y); \ - U = ((U*(32-mult)) + (127*mult))>>5; \ - V = ((V*(32-mult)) + (127*mult))>>5; \ - Y = 0; \ - } \ - -#define BLEND_HARDLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ - Y = (gint)Y1+(gint)Y2*2 - 255; \ - U = (gint)U1+(gint)U2 - 127; \ - V = (gint)V1+(gint)V2 - 127; \ - Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ - U = ((U*alpha)+(U1*(255-alpha)))>>8; \ - V = ((V*alpha)+(V1*(255-alpha)))>>8; \ - if (Y>255) { \ - gint mult = MAX (0, 288-Y); \ - U = ((U*mult) + (127*(32-mult)))>>5; \ - V = ((V*mult) + (127*(32-mult)))>>5; \ - Y = 255; \ - } else if (Y<0) { \ - gint mult = MIN (32, -Y); \ - U = ((U*(32-mult)) + (127*mult))>>5; \ - V = ((V*(32-mult)) + (127*mult))>>5; \ - Y = 0; \ - } \ +#define BLEND_SOFTLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = (gint)Y1+(gint)Y2 - 127; \ + U = (gint)U1+(gint)U2 - 127; \ + V = (gint)V1+(gint)V2 - 127; \ + Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ + U = ((U*alpha)+(U1*(255-alpha)))>>8; \ + V = ((V*alpha)+(V1*(255-alpha)))>>8; \ + if (Y>255) { \ + gint mult = MAX (0, 288-Y); \ + U = ((U*mult) + (127*(32-mult)))>>5; \ + V = ((V*mult) + (127*(32-mult)))>>5; \ + Y = 255; \ + } else if (Y<0) { \ + gint mult = MIN (32, -Y); \ + U = ((U*(32-mult)) + (127*mult))>>5; \ + V = ((V*(32-mult)) + (127*mult))>>5; \ + Y = 0; \ + } \ + +#define BLEND_HARDLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ + Y = (gint)Y1+(gint)Y2*2 - 255; \ + U = (gint)U1+(gint)U2 - 127; \ + V = (gint)V1+(gint)V2 - 127; \ + Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ + U = ((U*alpha)+(U1*(255-alpha)))>>8; \ + V = ((V*alpha)+(V1*(255-alpha)))>>8; \ + if (Y>255) { \ + gint mult = MAX (0, 288-Y); \ + U = ((U*mult) + (127*(32-mult)))>>5; \ + V = ((V*mult) + (127*(32-mult)))>>5; \ + Y = 255; \ + } else if (Y<0) { \ + gint mult = MIN (32, -Y); \ + U = ((U*(32-mult)) + (127*mult))>>5; \ + V = ((V*(32-mult)) + (127*mult))>>5; \ + Y = 0; \ + } \ #define BLEND_MODE BLEND_NORMAL #if 0 diff --git a/gst/wavenc/riff.h b/gst/wavenc/riff.h index f04760385..d0b920027 100644 --- a/gst/wavenc/riff.h +++ b/gst/wavenc/riff.h @@ -25,7 +25,7 @@ #include <gst/gst.h> typedef enum { - GST_RIFF_OK = 0, + GST_RIFF_OK = 0, GST_RIFF_ENOTRIFF = -1, GST_RIFF_EINVAL = -2, GST_RIFF_ENOMEM = -3 @@ -411,10 +411,10 @@ struct _gst_riff_chunk { struct _gst_riff_index_entry { guint32 id; guint32 flags; -#define GST_RIFF_IF_LIST (0x00000001L) -#define GST_RIFF_IF_KEYFRAME (0x00000010L) -#define GST_RIFF_IF_NO_TIME (0x00000100L) -#define GST_RIFF_IF_COMPUSE (0x0FFF0000L) +#define GST_RIFF_IF_LIST (0x00000001L) +#define GST_RIFF_IF_KEYFRAME (0x00000010L) +#define GST_RIFF_IF_NO_TIME (0x00000100L) +#define GST_RIFF_IF_COMPUSE (0x0FFF0000L) guint32 offset; guint32 size; }; @@ -423,18 +423,18 @@ struct _gst_riff_dmlh { guint32 totalframes; }; -typedef struct _gst_riff_riff gst_riff_riff; -typedef struct _gst_riff_list gst_riff_list; -typedef struct _gst_riff_chunk gst_riff_chunk; -typedef struct _gst_riff_index_entry gst_riff_index_entry; +typedef struct _gst_riff_riff gst_riff_riff; +typedef struct _gst_riff_list gst_riff_list; +typedef struct _gst_riff_chunk gst_riff_chunk; +typedef struct _gst_riff_index_entry gst_riff_index_entry; -typedef struct _gst_riff_avih gst_riff_avih; -typedef struct _gst_riff_strh gst_riff_strh; -typedef struct _gst_riff_strf_vids gst_riff_strf_vids; -typedef struct _gst_riff_strf_auds gst_riff_strf_auds; -typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; +typedef struct _gst_riff_avih gst_riff_avih; +typedef struct _gst_riff_strh gst_riff_strh; +typedef struct _gst_riff_strf_vids gst_riff_strf_vids; +typedef struct _gst_riff_strf_auds gst_riff_strf_auds; +typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; typedef struct _gst_riff_dmlh gst_riff_dmlh; -typedef struct _GstRiffChunk GstRiffChunk; +typedef struct _GstRiffChunk GstRiffChunk; struct _GstRiffChunk { gulong offset; diff --git a/gst/wavparse/gstwavparse.h b/gst/wavparse/gstwavparse.h index b56f61ae1..f364083e1 100644 --- a/gst/wavparse/gstwavparse.h +++ b/gst/wavparse/gstwavparse.h @@ -56,7 +56,7 @@ struct _GstWavParse { /* WAVE decoding state */ GstWavParseState state; - guint64 offset; + guint64 offset; /* format of audio, see defines below */ gint format; |