mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
4d3b1472e7
Original commit message from CVS: Added a goom plugin (goom.sourceforge.net) to test: ./gst-launch filesrc location=/opt/data/south.mp3 ! mad ! tee silent=true src%d! goom ! colorspace ! xvideosink tee0.src%d! osssink
29 lines
540 B
C
29 lines
540 B
C
#ifndef _GOOMTOOLS_H
|
|
#define _GOOMTOOLS_H
|
|
|
|
#define NB_RAND 0x10000
|
|
|
|
/* in graphic.c */
|
|
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 () ;
|
|
|
|
#define RAND()\
|
|
(rand_tab[rand_pos = rand_pos + 1])
|
|
|
|
#define RAND_CLOSE()\
|
|
free (rand_tab);\
|
|
rand_tab = 0;
|
|
|
|
|
|
//#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX))
|
|
#define iRAND(i) (RAND()%i)
|
|
|
|
#endif
|