expand tabs

Original commit message from CVS:
expand tabs
This commit is contained in:
Thomas Vander Stichele 2005-12-06 19:44:58 +00:00
parent f2085bd7ef
commit 3ecf433432
99 changed files with 1531 additions and 1424 deletions

107
ChangeLog
View file

@ -1,3 +1,110 @@
2005-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/aalib/gstaasink.h:
* ext/cairo/gsttextoverlay.h:
* ext/dv/gstdvdec.h:
* ext/dv/gstdvdemux.c:
* ext/dv/gstdvdemux.h:
* ext/esd/esdsink.h:
* ext/flac/flac_compat.h:
* ext/flac/gstflacdec.h:
* ext/flac/gstflacenc.h:
* ext/gconf/gconf.h:
* ext/gconf/gstgconfaudiosink.h:
* ext/gconf/gstgconfvideosink.h:
* ext/gdk_pixbuf/gstgdkanimation.h:
* ext/jpeg/gstjpegdec.h:
* ext/jpeg/smokecodec.h:
* ext/jpeg/smokeformat.h:
* ext/ladspa/gstsignalprocessor.h:
* ext/ladspa/search.c: (LADSPAPluginSearch):
* ext/ladspa/utils.h:
* ext/libmng/gstmng.c:
* ext/libmng/gstmngdec.h:
* ext/libmng/gstmngenc.c:
* ext/libmng/gstmngenc.h:
* ext/libpng/gstpng.c:
* ext/libpng/gstpngenc.c:
* ext/libpng/gstpngenc.h:
* ext/shout2/gstshout2.h:
* ext/speex/gstspeexdec.h:
* ext/speex/gstspeexenc.c:
* ext/speex/gstspeexenc.h:
* gst/auparse/gstauparse.c: (gst_auparse_chain):
* gst/autodetect/gstautoaudiosink.h:
* gst/autodetect/gstautovideosink.h:
* gst/avi/gstavidemux.h:
* gst/cutter/gstcutter.c: (gst_cutter_chain),
(gst_cutter_set_property), (gst_cutter_get_caps):
* gst/cutter/gstcutter.h:
* gst/debug/tests.c: (md5_process_block):
* gst/debug/tests.h:
* gst/effectv/gstwarp.c:
* gst/flx/flx_fmt.h:
* gst/flx/gstflxdec.h:
* gst/goom/filters.c: (setPixelRGB), (getPixelRGB), (getPixelRGB_),
(zoomFilterFastRGB):
* gst/goom/filters.h:
* gst/goom/goom_tools.h:
* gst/law/alaw-encode.c:
* gst/level/gstlevel.c:
* gst/level/gstlevel.h:
* gst/matroska/ebml-write.h:
* gst/matroska/matroska-demux.h:
* gst/matroska/matroska-ids.h:
* gst/matroska/matroska-mux.h:
* gst/monoscope/convolve.c: (convolve_match):
* gst/monoscope/convolve.h:
* gst/multipart/multipartmux.c:
* gst/oldcore/gstaggregator.c:
* gst/oldcore/gstaggregator.h:
* gst/oldcore/gstmd5sink.c: (md5_process_block):
* gst/oldcore/gstmd5sink.h:
* gst/oldcore/gstmultifilesrc.c:
* gst/oldcore/gstmultifilesrc.h:
* gst/oldcore/gstpipefilter.h:
* gst/oldcore/gstshaper.h:
* gst/rtp/gstrtpL16depay.h:
* gst/rtp/gstrtpL16pay.h:
* gst/rtp/gstrtpdepay.h:
* gst/rtp/gstrtpmp4vpay.c:
* gst/rtp/gstrtpmp4vpay.h:
* gst/rtsp/gstrtspsrc.c:
* gst/rtsp/gstrtspsrc.h:
* gst/rtsp/rtspconnection.h:
* gst/rtsp/rtspdefs.h:
* gst/rtsp/rtspmessage.h:
* gst/rtsp/rtsptransport.h:
* gst/rtsp/rtspurl.c:
* gst/rtsp/rtspurl.h:
* gst/rtsp/sdpmessage.c:
* gst/rtsp/sdpmessage.h:
* gst/smpte/barboxwipes.c:
* gst/smpte/gstmask.h:
* gst/smpte/gstsmpte.h:
* gst/smpte/paint.c:
* gst/smpte/paint.h:
* gst/udp/gstdynudpsink.h:
* gst/udp/gstmultiudpsink.h:
* gst/udp/gstudpsink.c:
* gst/udp/gstudpsink.h:
* gst/udp/gstudpsrc.c:
* gst/videomixer/videomixer.c:
* gst/wavenc/riff.h:
* gst/wavparse/gstwavparse.h:
* sys/oss/gstossdmabuffer.h:
* sys/oss/gstossmixer.h:
* sys/oss/gstossmixerelement.h:
* sys/oss/gstossmixertrack.h:
* sys/oss/gstosssink.c:
* sys/oss/gstosssink.h:
* sys/oss/gstosssrc.c:
* sys/oss/gstosssrc.h:
* sys/osxaudio/gstosxaudioelement.h:
* sys/osxaudio/gstosxaudiosink.h:
* sys/osxaudio/gstosxaudiosrc.h:
expand tabs
=== release 0.10.0 === === release 0.10.0 ===
2005-12-05 <thomas (at) apestaart (dot) org> 2005-12-05 <thomas (at) apestaart (dot) org>

View file

@ -66,7 +66,7 @@ struct _GstAASinkClass {
/* signals */ /* signals */
void (*frame_displayed) (GstElement *element); void (*frame_displayed) (GstElement *element);
void (*have_size) (GstElement *element, guint width, guint height); void (*have_size) (GstElement *element, guint width, guint height);
}; };
GType gst_aasink_get_type(void); GType gst_aasink_get_type(void);

View file

@ -60,8 +60,8 @@ struct _GstCairoTextOverlay {
gint ypad; gint ypad;
gint deltax; gint deltax;
gint deltay; gint deltay;
gchar *default_text; gchar *default_text;
gboolean want_shading; gboolean want_shading;
guchar *text_fill_image; guchar *text_fill_image;
guchar *text_outline_image; guchar *text_outline_image;
@ -69,7 +69,7 @@ struct _GstCairoTextOverlay {
gint text_x0, text_x1; /* start/end x position of text */ gint text_x0, text_x1; /* start/end x position of text */
gint text_dy; gint text_dy;
gboolean need_render; gboolean need_render;
gchar *font; gchar *font;
gint slant; gint slant;

View file

@ -46,29 +46,29 @@ typedef struct _GstDVDecClass GstDVDecClass;
struct _GstDVDec { struct _GstDVDec {
GstElement element; GstElement element;
GstPad *sinkpad; GstPad *sinkpad;
GstPad *srcpad; GstPad *srcpad;
dv_decoder_t *decoder; dv_decoder_t *decoder;
gboolean clamp_luma; gboolean clamp_luma;
gboolean clamp_chroma; gboolean clamp_chroma;
gint quality; gint quality;
gint frame_len; gint frame_len;
gboolean PAL; gboolean PAL;
gint framerate_numerator; gint framerate_numerator;
gint framerate_denominator; gint framerate_denominator;
gint height; gint height;
gboolean wide; gboolean wide;
/* negotiated output */ /* negotiated output */
dv_color_space_t space; dv_color_space_t space;
gint bpp; gint bpp;
gint video_offset; gint video_offset;
gint drop_factor; gint drop_factor;
gboolean headers_seen; gboolean headers_seen;
}; };

View file

@ -74,15 +74,15 @@
#define PAL_FRAMERATE_NUMERATOR 25 #define PAL_FRAMERATE_NUMERATOR 25
#define PAL_FRAMERATE_DENOMINATOR 1 #define PAL_FRAMERATE_DENOMINATOR 1
#define PAL_NORMAL_PAR_X 59 #define PAL_NORMAL_PAR_X 59
#define PAL_NORMAL_PAR_Y 54 #define PAL_NORMAL_PAR_Y 54
#define PAL_WIDE_PAR_X 118 #define PAL_WIDE_PAR_X 118
#define PAL_WIDE_PAR_Y 81 #define PAL_WIDE_PAR_Y 81
#define NTSC_NORMAL_PAR_X 10 #define NTSC_NORMAL_PAR_X 10
#define NTSC_NORMAL_PAR_Y 11 #define NTSC_NORMAL_PAR_Y 11
#define NTSC_WIDE_PAR_X 40 #define NTSC_WIDE_PAR_X 40
#define NTSC_WIDE_PAR_Y 33 #define NTSC_WIDE_PAR_Y 33
static GstElementDetails dvdemux_details = static GstElementDetails dvdemux_details =
GST_ELEMENT_DETAILS ("DV system stream demuxer", GST_ELEMENT_DETAILS ("DV system stream demuxer",

View file

@ -47,47 +47,47 @@ typedef struct _GstDVDemuxClass GstDVDemuxClass;
struct _GstDVDemux { struct _GstDVDemux {
GstElement element; GstElement element;
GstPad *sinkpad; GstPad *sinkpad;
GstPad *videosrcpad; GstPad *videosrcpad;
GstPad *audiosrcpad; GstPad *audiosrcpad;
dv_decoder_t *decoder; dv_decoder_t *decoder;
GstAdapter *adapter; GstAdapter *adapter;
gint frame_len; gint frame_len;
/* PAL or NTSC flag */ /* PAL or NTSC flag */
gboolean PAL; gboolean PAL;
/* video params */ /* video params */
gint framerate_numerator; gint framerate_numerator;
gint framerate_denominator; gint framerate_denominator;
gint height; gint height;
gboolean wide; gboolean wide;
/* audio params */ /* audio params */
gint frequency; gint frequency;
gint channels; gint channels;
gint framecount; gint framecount;
guint64 timestamp; guint64 timestamp;
guint64 duration; guint64 duration;
gint64 total_frames; gint64 total_frames;
guint64 audio_offset; guint64 audio_offset;
guint64 video_offset; guint64 video_offset;
gint64 start_byte; gint64 start_byte;
gint64 stop_byte; gint64 stop_byte;
gint64 start_timestamp; gint64 start_timestamp;
gint64 stop_timestamp; gint64 stop_timestamp;
gboolean need_discont; gboolean need_discont;
gboolean new_media; gboolean new_media;
gboolean found_header; gboolean found_header;
gint16 *audio_buffers[4]; gint16 *audio_buffers[4];
}; };
struct _GstDVDemuxClass { struct _GstDVDemuxClass {

View file

@ -43,11 +43,11 @@ typedef struct _GstEsdSink GstEsdSink;
typedef struct _GstEsdSinkClass GstEsdSinkClass; typedef struct _GstEsdSinkClass GstEsdSinkClass;
struct _GstEsdSink { struct _GstEsdSink {
GstAudioSink sink; GstAudioSink sink;
int fd; int fd;
int ctrl_fd; int ctrl_fd;
gchar *host; gchar *host;
}; };
struct _GstEsdSinkClass { struct _GstEsdSinkClass {

View file

@ -32,21 +32,21 @@
#if FLAC_VERSION < 0x010004 #if FLAC_VERSION < 0x010004
#define FLAC__STREAM_ENCODER_OK FLAC__STREAM_ENCODER_WRITE_OK #define FLAC__STREAM_ENCODER_OK FLAC__STREAM_ENCODER_WRITE_OK
#define FLAC__seekable_stream_decoder_process_single(a) \ #define FLAC__seekable_stream_decoder_process_single(a) \
FLAC__seekable_stream_decoder_process_one_frame(a) FLAC__seekable_stream_decoder_process_one_frame(a)
#endif /* FLAC_VERSION < 0x010004 */ #endif /* FLAC_VERSION < 0x010004 */
#if FLAC_VERSION < 0x010003 #if FLAC_VERSION < 0x010003
#define FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC \ #define FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC \
FLAC__STREAM_DECODER_ERROR_LOST_SYNC FLAC__STREAM_DECODER_ERROR_LOST_SYNC
#define FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER \ #define FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER \
FLAC__STREAM_DECODER_ERROR_BAD_HEADER FLAC__STREAM_DECODER_ERROR_BAD_HEADER
#define FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH \ #define FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH \
FLAC__STREAM_DECODER_ERROR_FRAME_CRC_MISMATCH FLAC__STREAM_DECODER_ERROR_FRAME_CRC_MISMATCH
#define FLAC__STREAM_DECODER_WRITE_STATUS_ABORT \ #define FLAC__STREAM_DECODER_WRITE_STATUS_ABORT \
FLAC__STREAM_DECODER_WRITE_ABORT FLAC__STREAM_DECODER_WRITE_ABORT
#define FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE \ #define FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE \
FLAC__STREAM_DECODER_WRITE_CONTINUE FLAC__STREAM_DECODER_WRITE_CONTINUE
#define FLAC__StreamMetadata FLAC__StreamMetaData #define FLAC__StreamMetadata FLAC__StreamMetaData

View file

@ -41,26 +41,26 @@ typedef struct _FlacDec FlacDec;
typedef struct _FlacDecClass FlacDecClass; typedef struct _FlacDecClass FlacDecClass;
struct _FlacDec { struct _FlacDec {
GstElement element; GstElement element;
GstPad *sinkpad,*srcpad; GstPad *sinkpad,*srcpad;
guint64 offset; guint64 offset;
FLAC__SeekableStreamDecoder *decoder; FLAC__SeekableStreamDecoder *decoder;
gint channels; gint channels;
gint depth; gint depth;
gint width; gint width;
gint frequency; gint frequency;
gboolean need_discont; gboolean need_discont;
gboolean seek_pending; gboolean seek_pending;
gint64 seek_value; gint64 seek_value;
gboolean init; gboolean init;
guint64 total_samples; guint64 total_samples;
guint64 stream_samples; guint64 stream_samples;
gboolean eos; gboolean eos;
}; };
struct _FlacDecClass { struct _FlacDecClass {

View file

@ -40,27 +40,27 @@ typedef struct _GstFlacEnc GstFlacEnc;
typedef struct _GstFlacEncClass GstFlacEncClass; typedef struct _GstFlacEncClass GstFlacEncClass;
struct _GstFlacEnc { struct _GstFlacEnc {
GstElement element; GstElement element;
GstPad *sinkpad,*srcpad; GstPad *sinkpad,*srcpad;
gboolean first; gboolean first;
GstBuffer *first_buf; GstBuffer *first_buf;
guint64 offset; guint64 offset;
guint64 samples_written; guint64 samples_written;
gboolean eos; gboolean eos;
gint channels; gint channels;
gint depth; gint depth;
gint sample_rate; gint sample_rate;
gboolean negotiated; gboolean negotiated;
gint quality; gint quality;
gboolean stopped; gboolean stopped;
FLAC__int32 *data; FLAC__int32 *data;
FLAC__SeekableStreamEncoder *encoder; FLAC__SeekableStreamEncoder *encoder;
FLAC__StreamMetadata **meta; FLAC__StreamMetadata **meta;
GstTagList * tags; GstTagList * tags;
}; };
struct _GstFlacEncClass { struct _GstFlacEncClass {

View file

@ -29,18 +29,18 @@
G_BEGIN_DECLS G_BEGIN_DECLS
gchar * gst_gconf_get_string (const gchar *key); gchar * gst_gconf_get_string (const gchar *key);
void gst_gconf_set_string (const gchar *key, void gst_gconf_set_string (const gchar *key,
const gchar *value); const gchar *value);
GstElement * gst_gconf_render_bin_from_key (const gchar *key); GstElement * gst_gconf_render_bin_from_key (const gchar *key);
GstElement * gst_gconf_render_bin_from_description (const gchar *description); GstElement * gst_gconf_render_bin_from_description (const gchar *description);
GstElement * gst_gconf_get_default_video_sink (void); GstElement * gst_gconf_get_default_video_sink (void);
GstElement * gst_gconf_get_default_audio_sink (void); GstElement * gst_gconf_get_default_audio_sink (void);
GstElement * gst_gconf_get_default_video_src (void); GstElement * gst_gconf_get_default_video_src (void);
GstElement * gst_gconf_get_default_audio_src (void); GstElement * gst_gconf_get_default_audio_src (void);
GstElement * gst_gconf_get_default_visualization_element (void); GstElement * gst_gconf_get_default_visualization_element (void);
G_END_DECLS G_END_DECLS

View file

@ -29,10 +29,10 @@ G_BEGIN_DECLS
(gst_gconf_audio_sink_get_type ()) (gst_gconf_audio_sink_get_type ())
#define GST_GCONF_AUDIO_SINK(obj) \ #define GST_GCONF_AUDIO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GCONF_AUDIO_SINK, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GCONF_AUDIO_SINK, \
GstGConfAudioSink)) GstGConfAudioSink))
#define GST_GCONF_AUDIO_SINK_CLASS(klass) \ #define GST_GCONF_AUDIO_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GCONF_AUDIO_SINK, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GCONF_AUDIO_SINK, \
GstGConfAudioSink)) GstGConfAudioSink))
#define GST_IS_GCONF_AUDIO_SINK(obj) \ #define GST_IS_GCONF_AUDIO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GCONF_AUDIO_SINK)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GCONF_AUDIO_SINK))
#define GST_IS_GCONF_AUDIO_SINK_CLASS(obj) \ #define GST_IS_GCONF_AUDIO_SINK_CLASS(obj) \
@ -51,7 +51,7 @@ typedef struct _GstGConfAudioSinkClass {
GstBinClass parent_class; GstBinClass parent_class;
} GstGConfAudioSinkClass; } GstGConfAudioSinkClass;
GType gst_gconf_audio_sink_get_type (void); GType gst_gconf_audio_sink_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -29,10 +29,10 @@ G_BEGIN_DECLS
(gst_gconf_video_sink_get_type ()) (gst_gconf_video_sink_get_type ())
#define GST_GCONF_VIDEO_SINK(obj) \ #define GST_GCONF_VIDEO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GCONF_VIDEO_SINK, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GCONF_VIDEO_SINK, \
GstGConfVideoSink)) GstGConfVideoSink))
#define GST_GCONF_VIDEO_SINK_CLASS(klass) \ #define GST_GCONF_VIDEO_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GCONF_VIDEO_SINK, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GCONF_VIDEO_SINK, \
GstGConfVideoSink)) GstGConfVideoSink))
#define GST_IS_GCONF_VIDEO_SINK(obj) \ #define GST_IS_GCONF_VIDEO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GCONF_VIDEO_SINK)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GCONF_VIDEO_SINK))
#define GST_IS_GCONF_VIDEO_SINK_CLASS(obj) \ #define GST_IS_GCONF_VIDEO_SINK_CLASS(obj) \
@ -51,7 +51,7 @@ typedef struct _GstGConfVideoSinkClass {
GstBinClass parent_class; GstBinClass parent_class;
} GstGConfVideoSinkClass; } GstGConfVideoSinkClass;
GType gst_gconf_video_sink_get_type (void); GType gst_gconf_video_sink_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -34,11 +34,11 @@ G_BEGIN_DECLS
#define GST_GDK_MAX_DELAY_TO_SEEK (GST_SECOND / 4) #define GST_GDK_MAX_DELAY_TO_SEEK (GST_SECOND / 4)
#define GST_TYPE_GDK_ANIMATION (gst_gdk_animation_get_type()) #define GST_TYPE_GDK_ANIMATION (gst_gdk_animation_get_type())
#define GST_GDK_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GDK_ANIMATION,GstGdkAnimation)) #define GST_GDK_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GDK_ANIMATION,GstGdkAnimation))
#define GST_GDK_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GDK_ANIMATION,GstGdkAnimation)) #define GST_GDK_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_GDK_ANIMATION,GstGdkAnimation))
#define GST_IS_GDK_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GDK_ANIMATION)) #define GST_IS_GDK_ANIMATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GDK_ANIMATION))
#define GST_IS_GDK_ANIMATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GDK_ANIMATION)) #define GST_IS_GDK_ANIMATION_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_GDK_ANIMATION))
typedef struct _GstGdkAnimation GstGdkAnimation; typedef struct _GstGdkAnimation GstGdkAnimation;
typedef struct _GstGdkAnimationClass GstGdkAnimationClass; typedef struct _GstGdkAnimationClass GstGdkAnimationClass;
@ -48,66 +48,66 @@ typedef struct _GstGdkAnimationIterClass GstGdkAnimationIterClass;
struct _GstGdkAnimation struct _GstGdkAnimation
{ {
GdkPixbufAnimation parent; GdkPixbufAnimation parent;
/* name of temporary buffer file */ /* name of temporary buffer file */
gchar * temp_location; gchar * temp_location;
/* file descriptor to temporary file or 0 if we're done writing */ /* file descriptor to temporary file or 0 if we're done writing */
int temp_fd; int temp_fd;
/* size of image */ /* size of image */
gint width; gint width;
gint height; gint height;
gint bpp; gint bpp;
/* static image we use */ /* static image we use */
GdkPixbuf * pixbuf; GdkPixbuf * pixbuf;
}; };
struct _GstGdkAnimationClass struct _GstGdkAnimationClass
{ {
GdkPixbufAnimationClass parent_class; GdkPixbufAnimationClass parent_class;
}; };
GType gst_gdk_animation_get_type (void); GType gst_gdk_animation_get_type (void);
GstGdkAnimation * gst_gdk_animation_new (GError **error); GstGdkAnimation * gst_gdk_animation_new (GError **error);
gboolean gst_gdk_animation_add_data (GstGdkAnimation * ani, gboolean gst_gdk_animation_add_data (GstGdkAnimation * ani,
const guint8 * data, const guint8 * data,
guint size); guint size);
void gst_gdk_animation_done_adding (GstGdkAnimation * ani); void gst_gdk_animation_done_adding (GstGdkAnimation * ani);
#define GST_TYPE_GDK_ANIMATION_ITER (gst_gdk_animation_iter_get_type ()) #define GST_TYPE_GDK_ANIMATION_ITER (gst_gdk_animation_iter_get_type ())
#define GST_GDK_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIter)) #define GST_GDK_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIter))
#define GST_IS_GDK_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GST_TYPE_GDK_ANIMATION_ITER)) #define GST_IS_GDK_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GST_TYPE_GDK_ANIMATION_ITER))
#define GST_GDK_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIterClass)) #define GST_GDK_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIterClass))
#define GST_IS_GDK_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GDK_ANIMATION_ITER)) #define GST_IS_GDK_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GDK_ANIMATION_ITER))
#define GST_GDK_ANIMATION_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIterClass)) #define GST_GDK_ANIMATION_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GDK_ANIMATION_ITER, GstGdkAnimationIterClass))
struct _GstGdkAnimationIter { struct _GstGdkAnimationIter {
GdkPixbufAnimationIter parent; GdkPixbufAnimationIter parent;
/* our animation */ /* our animation */
GstGdkAnimation * ani; GstGdkAnimation * ani;
/* start timeval */ /* start timeval */
GTimeVal start; GTimeVal start;
/* timestamp of last buffer */ /* timestamp of last buffer */
GstClockTime last_timestamp; GstClockTime last_timestamp;
/* pipeline we're using */ /* pipeline we're using */
GstElement * pipeline; GstElement * pipeline;
gboolean eos; gboolean eos;
gboolean just_seeked; gboolean just_seeked;
/* current image and the buffers containing the data */ /* current image and the buffers containing the data */
GdkPixbuf * pixbuf; GdkPixbuf * pixbuf;
GQueue * buffers; GQueue * buffers;
}; };
struct _GstGdkAnimationIterClass { struct _GstGdkAnimationIterClass {
GdkPixbufAnimationIterClass parent_class; GdkPixbufAnimationIterClass parent_class;
}; };
GType gst_gdk_animation_iter_get_type (void) G_GNUC_CONST; GType gst_gdk_animation_iter_get_type (void) G_GNUC_CONST;

View file

@ -83,8 +83,8 @@ struct _GstJpegDec {
/* negotiated state */ /* negotiated state */
gint caps_framerate_numerator; gint caps_framerate_numerator;
gint caps_framerate_denominator; gint caps_framerate_denominator;
gint caps_width; gint caps_width;
gint caps_height; gint caps_height;
struct jpeg_decompress_struct cinfo; struct jpeg_decompress_struct cinfo;
struct GstJpegDecErrorMgr jerr; struct GstJpegDecErrorMgr jerr;

View file

@ -30,84 +30,84 @@ extern "C" {
typedef struct _SmokeCodecInfo SmokeCodecInfo; typedef struct _SmokeCodecInfo SmokeCodecInfo;
typedef enum { typedef enum {
SMOKECODEC_WRONGVERSION = -5, SMOKECODEC_WRONGVERSION = -5,
SMOKECODEC_WRONGSIZE = -4, SMOKECODEC_WRONGSIZE = -4,
SMOKECODEC_ERROR = -3, SMOKECODEC_ERROR = -3,
SMOKECODEC_NOMEM = -2, SMOKECODEC_NOMEM = -2,
SMOKECODEC_NULLPTR = -1, SMOKECODEC_NULLPTR = -1,
SMOKECODEC_OK = 0 SMOKECODEC_OK = 0
} SmokeCodecResult; } SmokeCodecResult;
typedef enum { typedef enum {
SMOKECODEC_KEYFRAME = (1<<0), SMOKECODEC_KEYFRAME = (1<<0),
SMOKECODEC_MOTION_VECTORS = (1<<1) SMOKECODEC_MOTION_VECTORS = (1<<1)
} SmokeCodecFlags; } SmokeCodecFlags;
#define SMOKECODEC_ID_STRING "smoke" #define SMOKECODEC_ID_STRING "smoke"
typedef enum { typedef enum {
SMOKECODEC_TYPE_ID = 0x80, SMOKECODEC_TYPE_ID = 0x80,
SMOKECODEC_TYPE_COMMENT = 0x81, SMOKECODEC_TYPE_COMMENT = 0x81,
SMOKECODEC_TYPE_EXTRA = 0x83, SMOKECODEC_TYPE_EXTRA = 0x83,
SMOKECODEC_TYPE_DATA = 0x40 SMOKECODEC_TYPE_DATA = 0x40
} SmokePacketType; } SmokePacketType;
/* init */ /* init */
int smokecodec_encode_new (SmokeCodecInfo **info, int smokecodec_encode_new (SmokeCodecInfo **info,
const unsigned int width, const unsigned int width,
const unsigned int height, const unsigned int height,
const unsigned int fps_num, const unsigned int fps_num,
const unsigned int fps_denom); const unsigned int fps_denom);
int smokecodec_decode_new (SmokeCodecInfo **info); int smokecodec_decode_new (SmokeCodecInfo **info);
/* config */ /* config */
SmokeCodecResult smokecodec_set_quality (SmokeCodecInfo *info, SmokeCodecResult smokecodec_set_quality (SmokeCodecInfo *info,
const unsigned int min, const unsigned int min,
const unsigned int max); const unsigned int max);
SmokeCodecResult smokecodec_get_quality (SmokeCodecInfo *info, SmokeCodecResult smokecodec_get_quality (SmokeCodecInfo *info,
unsigned int *min, unsigned int *min,
unsigned int *max); unsigned int *max);
SmokeCodecResult smokecodec_set_threshold (SmokeCodecInfo *info, SmokeCodecResult smokecodec_set_threshold (SmokeCodecInfo *info,
const unsigned int threshold); const unsigned int threshold);
SmokeCodecResult smokecodec_get_threshold (SmokeCodecInfo *info, SmokeCodecResult smokecodec_get_threshold (SmokeCodecInfo *info,
unsigned int *threshold); unsigned int *threshold);
SmokeCodecResult smokecodec_set_bitrate (SmokeCodecInfo *info, SmokeCodecResult smokecodec_set_bitrate (SmokeCodecInfo *info,
const unsigned int bitrate); const unsigned int bitrate);
SmokeCodecResult smokecodec_get_bitrate (SmokeCodecInfo *info, SmokeCodecResult smokecodec_get_bitrate (SmokeCodecInfo *info,
unsigned int *bitrate); unsigned int *bitrate);
/* encoding */ /* encoding */
SmokeCodecResult smokecodec_encode_id (SmokeCodecInfo *info, SmokeCodecResult smokecodec_encode_id (SmokeCodecInfo *info,
unsigned char *out, unsigned char *out,
unsigned int *outsize); unsigned int *outsize);
SmokeCodecResult smokecodec_encode (SmokeCodecInfo *info, SmokeCodecResult smokecodec_encode (SmokeCodecInfo *info,
const unsigned char *in, const unsigned char *in,
SmokeCodecFlags flags, SmokeCodecFlags flags,
unsigned char *out, unsigned char *out,
unsigned int *outsize); unsigned int *outsize);
/* decoding */ /* decoding */
SmokeCodecResult smokecodec_parse_id (SmokeCodecInfo *info, SmokeCodecResult smokecodec_parse_id (SmokeCodecInfo *info,
const unsigned char *in, const unsigned char *in,
const unsigned int insize); const unsigned int insize);
SmokeCodecResult smokecodec_parse_header (SmokeCodecInfo *info, SmokeCodecResult smokecodec_parse_header (SmokeCodecInfo *info,
const unsigned char *in, const unsigned char *in,
const unsigned int insize, const unsigned int insize,
SmokeCodecFlags *flags, SmokeCodecFlags *flags,
unsigned int *width, unsigned int *width,
unsigned int *height, unsigned int *height,
unsigned int *fps_num, unsigned int *fps_num,
unsigned int *fps_denom); unsigned int *fps_denom);
SmokeCodecResult smokecodec_decode (SmokeCodecInfo *info, SmokeCodecResult smokecodec_decode (SmokeCodecInfo *info,
const unsigned char *in, const unsigned char *in,
const unsigned int insize, const unsigned int insize,
unsigned char *out); unsigned char *out);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -26,16 +26,16 @@
extern "C" { extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#define IDX_TYPE 0 #define IDX_TYPE 0
#define IDX_WIDTH 1 #define IDX_WIDTH 1
#define IDX_HEIGHT 3 #define IDX_HEIGHT 3
#define IDX_FPS_NUM 5 #define IDX_FPS_NUM 5
#define IDX_FPS_DENOM 9 #define IDX_FPS_DENOM 9
#define IDX_FLAGS 13 #define IDX_FLAGS 13
#define IDX_NUM_BLOCKS 14 #define IDX_NUM_BLOCKS 14
#define IDX_SIZE 16 #define IDX_SIZE 16
#define IDX_BLOCKS 18 #define IDX_BLOCKS 18
#define OFFS_PICT 18 #define OFFS_PICT 18
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -29,12 +29,12 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_SIGNAL_PROCESSOR (gst_signal_processor_get_type()) #define GST_TYPE_SIGNAL_PROCESSOR (gst_signal_processor_get_type())
#define GST_SIGNAL_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SIGNAL_PROCESSOR,GstSignalProcessor)) #define GST_SIGNAL_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SIGNAL_PROCESSOR,GstSignalProcessor))
#define GST_SIGNAL_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SIGNAL_PROCESSOR,GstSignalProcessorClass)) #define GST_SIGNAL_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SIGNAL_PROCESSOR,GstSignalProcessorClass))
#define GST_SIGNAL_PROCESSOR_GET_CLASS(obj) \ #define GST_SIGNAL_PROCESSOR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_SIGNAL_PROCESSOR,GstSignalProcessorClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_SIGNAL_PROCESSOR,GstSignalProcessorClass))
#define GST_IS_SIGNAL_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SIGNAL_PROCESSOR)) #define GST_IS_SIGNAL_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SIGNAL_PROCESSOR))
#define GST_IS_SIGNAL_PROCESSOR_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SIGNAL_PROCESSOR)) #define GST_IS_SIGNAL_PROCESSOR_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SIGNAL_PROCESSOR))
@ -43,7 +43,7 @@ typedef struct _GstSignalProcessorClass GstSignalProcessorClass;
struct _GstSignalProcessor { struct _GstSignalProcessor {
GstElement element; GstElement element;
GstCaps *caps; GstCaps *caps;
@ -74,11 +74,11 @@ struct _GstSignalProcessorClass {
/* virtual methods for subclasses */ /* virtual methods for subclasses */
gboolean (*setup) (GstSignalProcessor *self, guint sample_rate); gboolean (*setup) (GstSignalProcessor *self, guint sample_rate);
gboolean (*start) (GstSignalProcessor *self); gboolean (*start) (GstSignalProcessor *self);
void (*stop) (GstSignalProcessor *self); void (*stop) (GstSignalProcessor *self);
void (*cleanup) (GstSignalProcessor *self); void (*cleanup) (GstSignalProcessor *self);
void (*process) (GstSignalProcessor *self, guint num_frames); void (*process) (GstSignalProcessor *self, guint num_frames);
gboolean (*event) (GstSignalProcessor *self, GstEvent *event); gboolean (*event) (GstSignalProcessor *self, GstEvent *event);
}; };

View file

@ -108,8 +108,8 @@ LADSPAPluginSearch (LADSPAPluginSearchCallbackFunction fCallbackFunction)
if (!pcLADSPAPath) { if (!pcLADSPAPath) {
/* fprintf(stderr, */ /* fprintf(stderr, */
/* "Warning: You do not have a LADSPA_PATH " */ /* "Warning: You do not have a LADSPA_PATH " */
/* "environment variable set.\n"); */ /* "environment variable set.\n"); */
return; return;
} }

View file

@ -32,8 +32,8 @@ void unloadLADSPAPluginLibrary(void * pvLADSPAPluginLibrary);
informative error messages. */ informative error messages. */
const LADSPA_Descriptor * const LADSPA_Descriptor *
findLADSPAPluginDescriptor(void * pvLADSPAPluginLibrary, findLADSPAPluginDescriptor(void * pvLADSPAPluginLibrary,
const char * pcPluginLibraryFilename, const char * pcPluginLibraryFilename,
const char * pcPluginLabel); const char * pcPluginLabel);
/*****************************************************************************/ /*****************************************************************************/

View file

@ -30,10 +30,10 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#define GST_TYPE_MNGDEC (gst_mngdec_get_type()) #define GST_TYPE_MNGDEC (gst_mngdec_get_type())
#define GST_MNGDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MNGDEC,GstMngDec)) #define GST_MNGDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MNGDEC,GstMngDec))
#define GST_MNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MNGDEC,GstMngDec)) #define GST_MNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MNGDEC,GstMngDec))
#define GST_IS_MNGDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MNGDEC)) #define GST_IS_MNGDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MNGDEC))
#define GST_IS_MNGDEC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MNGDEC)) #define GST_IS_MNGDEC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MNGDEC))
typedef struct _GstMngDec GstMngDec; typedef struct _GstMngDec GstMngDec;

View file

@ -24,7 +24,7 @@
#include "gstmngenc.h" #include "gstmngenc.h"
#include <gst/video/video.h> #include <gst/video/video.h>
#define MAX_HEIGHT 4096 #define MAX_HEIGHT 4096
GstElementDetails gst_mngenc_details = { GstElementDetails gst_mngenc_details = {
@ -42,7 +42,7 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_SNAPSHOT TRUE #define DEFAULT_SNAPSHOT TRUE
enum enum
{ {

View file

@ -29,10 +29,10 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#define GST_TYPE_MNGENC (gst_mngenc_get_type()) #define GST_TYPE_MNGENC (gst_mngenc_get_type())
#define GST_MNGENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MNGENC,GstMngEnc)) #define GST_MNGENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MNGENC,GstMngEnc))
#define GST_MNGENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MNGENC,GstMngEnc)) #define GST_MNGENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MNGENC,GstMngEnc))
#define GST_IS_MNGENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MNGENC)) #define GST_IS_MNGENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MNGENC))
#define GST_IS_MNGENC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MNGENC)) #define GST_IS_MNGENC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MNGENC))
typedef struct _GstMngEnc GstMngEnc; typedef struct _GstMngEnc GstMngEnc;

View file

@ -25,7 +25,7 @@
#include <gst/video/video.h> #include <gst/video/video.h>
#include <zlib.h> #include <zlib.h>
#define MAX_HEIGHT 4096 #define MAX_HEIGHT 4096
static GstElementDetails gst_pngenc_details = { static GstElementDetails gst_pngenc_details = {
@ -45,9 +45,9 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_SNAPSHOT TRUE #define DEFAULT_SNAPSHOT TRUE
/* #define DEFAULT_NEWMEDIA FALSE */ /* #define DEFAULT_NEWMEDIA FALSE */
#define DEFAULT_COMPRESSION_LEVEL 6 #define DEFAULT_COMPRESSION_LEVEL 6
enum enum
{ {

View file

@ -29,10 +29,10 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#define GST_TYPE_PNGENC (gst_pngenc_get_type()) #define GST_TYPE_PNGENC (gst_pngenc_get_type())
#define GST_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PNGENC,GstPngEnc)) #define GST_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PNGENC,GstPngEnc))
#define GST_PNGENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PNGENC,GstPngEnc)) #define GST_PNGENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PNGENC,GstPngEnc))
#define GST_IS_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGENC)) #define GST_IS_PNGENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGENC))
#define GST_IS_PNGENC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGENC)) #define GST_IS_PNGENC_CLASS(obj)(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGENC))
typedef struct _GstPngEnc GstPngEnc; typedef struct _GstPngEnc GstPngEnc;

View file

@ -61,7 +61,7 @@ struct _GstShout2send {
GstTagList* tags; GstTagList* tags;
GstClock *clock; GstClock *clock;
}; };

View file

@ -48,30 +48,30 @@ typedef struct _GstSpeexDecClass GstSpeexDecClass;
#define DEC_MAX_FRAME_SIZE 2000 #define DEC_MAX_FRAME_SIZE 2000
struct _GstSpeexDec { struct _GstSpeexDec {
GstElement element; GstElement element;
/* pads */ /* pads */
GstPad *sinkpad, GstPad *sinkpad,
*srcpad; *srcpad;
void *state; void *state;
SpeexStereoState stereo; SpeexStereoState stereo;
#ifdef SPEEX_1_0 #ifdef SPEEX_1_0
SpeexMode *mode; SpeexMode *mode;
#else #else
const SpeexMode *mode; const SpeexMode *mode;
#endif #endif
SpeexHeader *header; SpeexHeader *header;
SpeexCallback callback; SpeexCallback callback;
SpeexBits bits; SpeexBits bits;
gfloat output[DEC_MAX_FRAME_SIZE]; gfloat output[DEC_MAX_FRAME_SIZE];
gboolean enh; gboolean enh;
gint frame_size; gint frame_size;
guint64 samples_out; guint64 samples_out;
guint64 packetno; guint64 packetno;
}; };
struct _GstSpeexDecClass { struct _GstSpeexDecClass {

View file

@ -52,14 +52,14 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_QUALITY 8.0 #define DEFAULT_QUALITY 8.0
#define DEFAULT_BITRATE 0 #define DEFAULT_BITRATE 0
#define DEFAULT_VBR FALSE #define DEFAULT_VBR FALSE
#define DEFAULT_ABR 0 #define DEFAULT_ABR 0
#define DEFAULT_VAD FALSE #define DEFAULT_VAD FALSE
#define DEFAULT_DTX FALSE #define DEFAULT_DTX FALSE
#define DEFAULT_COMPLEXITY 3 #define DEFAULT_COMPLEXITY 3
#define DEFAULT_NFRAMES 1 #define DEFAULT_NFRAMES 1
enum enum
{ {

View file

@ -59,58 +59,58 @@ typedef struct _GstSpeexEnc GstSpeexEnc;
typedef struct _GstSpeexEncClass GstSpeexEncClass; typedef struct _GstSpeexEncClass GstSpeexEncClass;
struct _GstSpeexEnc { struct _GstSpeexEnc {
GstElement element; GstElement element;
/* pads */ /* pads */
GstPad *sinkpad, GstPad *sinkpad,
*srcpad; *srcpad;
gint packet_count; gint packet_count;
gint n_packets; gint n_packets;
SpeexBits bits; SpeexBits bits;
SpeexHeader header; SpeexHeader header;
#if SPEEX_1_0 #if SPEEX_1_0
SpeexMode *speex_mode; SpeexMode *speex_mode;
#else #else
const SpeexMode *speex_mode; const SpeexMode *speex_mode;
#endif #endif
void *state; void *state;
GstSpeexMode mode; GstSpeexMode mode;
GstAdapter *adapter; GstAdapter *adapter;
gfloat quality; gfloat quality;
gint bitrate; gint bitrate;
gboolean vbr; gboolean vbr;
gint abr; gint abr;
gboolean vad; gboolean vad;
gboolean dtx; gboolean dtx;
gint complexity; gint complexity;
gint nframes; gint nframes;
gint lookahead; gint lookahead;
gint channels; gint channels;
gint rate; gint rate;
gboolean setup; gboolean setup;
gboolean header_sent; gboolean header_sent;
gboolean eos; gboolean eos;
guint64 samples_in; guint64 samples_in;
guint64 bytes_out; guint64 bytes_out;
GstTagList *tags; GstTagList *tags;
gchar *last_message; gchar *last_message;
gint frame_size; gint frame_size;
guint64 frameno; guint64 frameno;
guint8 *comments; guint8 *comments;
gint comment_len; gint comment_len;
gfloat input[MAX_FRAME_SIZE]; gfloat input[MAX_FRAME_SIZE];
}; };
struct _GstSpeexEncClass { struct _GstSpeexEncClass {

View file

@ -251,12 +251,12 @@ gst_auparse_chain (GstPad * pad, GstBuffer * buf)
/* /*
Docs : Docs :
http://www.opengroup.org/public/pubs/external/auformat.html http://www.opengroup.org/public/pubs/external/auformat.html
http://astronomy.swin.edu.au/~pbourke/dataformats/au/ http://astronomy.swin.edu.au/~pbourke/dataformats/au/
Solaris headers : /usr/include/audio/au.h Solaris headers : /usr/include/audio/au.h
libsndfile : src/au.c libsndfile : src/au.c
Samples : 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) { switch (auparse->encoding) {

View file

@ -28,10 +28,10 @@ G_BEGIN_DECLS
(gst_auto_audio_sink_get_type ()) (gst_auto_audio_sink_get_type ())
#define GST_AUTO_AUDIO_SINK(obj) \ #define GST_AUTO_AUDIO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUTO_AUDIO_SINK, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUTO_AUDIO_SINK, \
GstAutoAudioSink)) GstAutoAudioSink))
#define GST_AUTO_AUDIO_SINK_CLASS(klass) \ #define GST_AUTO_AUDIO_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUTO_AUDIO_SINK, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUTO_AUDIO_SINK, \
GstAutoAudioSink)) GstAutoAudioSink))
#define GST_IS_AUTO_AUDIO_SINK(obj) \ #define GST_IS_AUTO_AUDIO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUTO_AUDIO_SINK)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUTO_AUDIO_SINK))
#define GST_IS_AUTO_AUDIO_SINK_CLASS(obj) \ #define GST_IS_AUTO_AUDIO_SINK_CLASS(obj) \
@ -49,7 +49,7 @@ typedef struct _GstAutoAudioSinkClass {
GstBinClass parent_class; GstBinClass parent_class;
} GstAutoAudioSinkClass; } GstAutoAudioSinkClass;
GType gst_auto_audio_sink_get_type (void); GType gst_auto_audio_sink_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -28,10 +28,10 @@ G_BEGIN_DECLS
(gst_auto_video_sink_get_type ()) (gst_auto_video_sink_get_type ())
#define GST_AUTO_VIDEO_SINK(obj) \ #define GST_AUTO_VIDEO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUTO_VIDEO_SINK, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUTO_VIDEO_SINK, \
GstAutoVideoSink)) GstAutoVideoSink))
#define GST_AUTO_VIDEO_SINK_CLASS(klass) \ #define GST_AUTO_VIDEO_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUTO_VIDEO_SINK, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUTO_VIDEO_SINK, \
GstAutoVideoSink)) GstAutoVideoSink))
#define GST_IS_AUTO_VIDEO_SINK(obj) \ #define GST_IS_AUTO_VIDEO_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUTO_VIDEO_SINK)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUTO_VIDEO_SINK))
#define GST_IS_AUTO_VIDEO_SINK_CLASS(obj) \ #define GST_IS_AUTO_VIDEO_SINK_CLASS(obj) \
@ -49,7 +49,7 @@ typedef struct _GstAutoVideoSinkClass {
GstBinClass parent_class; GstBinClass parent_class;
} GstAutoVideoSinkClass; } GstAutoVideoSinkClass;
GType gst_auto_video_sink_get_type (void); GType gst_auto_video_sink_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -39,49 +39,49 @@ G_BEGIN_DECLS
#define GST_IS_AVI_DEMUX_CLASS(obj) \ #define GST_IS_AVI_DEMUX_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_AVI_DEMUX)) (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) \ #define CHUNKID_TO_STREAMNR(chunkid) \
((((chunkid) & 0xff) - '0') * 10 + \ ((((chunkid) & 0xff) - '0') * 10 + \
(((chunkid) >> 8) & 0xff) - '0') (((chunkid) >> 8) & 0xff) - '0')
typedef struct { typedef struct {
gint index_nr; gint index_nr;
gint stream_nr; gint stream_nr;
guint64 ts, dur; guint64 ts, dur;
guint32 flags; guint32 flags;
guint64 offset; guint64 offset;
gint size; gint size;
guint64 bytes_before; guint64 bytes_before;
guint32 frames_before; guint32 frames_before;
} gst_avi_index_entry; } gst_avi_index_entry;
typedef struct { typedef struct {
/* index of this streamcontext */ /* index of this streamcontext */
guint num; guint num;
/* pad, strh */ /* pad, strh */
GstPad *pad; GstPad *pad;
gst_riff_strh *strh; gst_riff_strh *strh;
union { union {
gst_riff_strf_vids *vids; gst_riff_strf_vids *vids;
gst_riff_strf_auds *auds; gst_riff_strf_auds *auds;
gst_riff_strf_iavs *iavs; gst_riff_strf_iavs *iavs;
gpointer data; gpointer data;
} strf; } strf;
GstBuffer *extradata, *initdata; GstBuffer *extradata, *initdata;
gchar *name; gchar *name;
/* current position (byte, frame, time) */ /* current position (byte, frame, time) */
guint current_frame; guint current_frame;
guint64 current_byte; guint64 current_byte;
gint current_entry; gint current_entry;
/* stream length */ /* stream length */
guint64 total_bytes; guint64 total_bytes;
guint32 total_frames; guint32 total_frames;
guint64 *indexes; guint64 *indexes;
} avi_stream_context; } avi_stream_context;
typedef enum { typedef enum {
@ -91,44 +91,44 @@ typedef enum {
} GstAviDemuxState; } GstAviDemuxState;
typedef struct _GstAviDemux { typedef struct _GstAviDemux {
GstElement parent; GstElement parent;
/* pads */ /* pads */
GstPad *sinkpad; GstPad *sinkpad;
/* AVI decoding state */ /* AVI decoding state */
GstAviDemuxState state; GstAviDemuxState state;
guint64 offset; guint64 offset;
/* index */ /* index */
gst_avi_index_entry *index_entries; gst_avi_index_entry *index_entries;
guint index_size; guint index_size;
guint64 index_offset; guint64 index_offset;
guint current_entry; guint current_entry;
/* streams */ /* streams */
guint num_streams; guint num_streams;
guint num_v_streams; guint num_v_streams;
guint num_a_streams; guint num_a_streams;
avi_stream_context stream[GST_AVI_DEMUX_MAX_STREAMS]; avi_stream_context stream[GST_AVI_DEMUX_MAX_STREAMS];
/* some stream info for length */ /* some stream info for length */
gst_riff_avih *avih; gst_riff_avih *avih;
/* seeking */ /* seeking */
gdouble segment_rate; gdouble segment_rate;
GstSeekFlags segment_flags; GstSeekFlags segment_flags;
/* in GST_FORMAT_TIME */ /* in GST_FORMAT_TIME */
gint64 segment_start; gint64 segment_start;
gint64 segment_stop; gint64 segment_stop;
GstEvent *seek_event; GstEvent *seek_event;
} GstAviDemux; } GstAviDemux;
typedef struct _GstAviDemuxClass { typedef struct _GstAviDemuxClass {
GstElementClass parent_class; GstElementClass parent_class;
} GstAviDemuxClass; } GstAviDemuxClass;
GType gst_avi_demux_get_type (void); GType gst_avi_demux_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -51,21 +51,21 @@ struct _GstCutter
GstPad *sinkpad, *srcpad; GstPad *sinkpad, *srcpad;
double threshold_level; /* level below which to cut */ double threshold_level; /* level below which to cut */
double threshold_length; /* how long signal has to remain double threshold_length; /* how long signal has to remain
* below this level before cutting */ * 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; 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 ? */ double pre_run_length; /* how long is it currently ? */
GList *pre_buffer; /* list of GstBuffers in pre-record buffer */ GList *pre_buffer; /* list of GstBuffers in pre-record buffer */
gboolean leaky; /* do we leak an overflowing prebuffer ? */ gboolean leaky; /* do we leak an overflowing prebuffer ? */
gboolean have_caps; /* did we get the needed caps yet ? */ gboolean have_caps; /* did we get the needed caps yet ? */
gint width; /* bit width of data */ gint width; /* bit width of data */
long max_sample; /* maximum sample value */ long max_sample; /* maximum sample value */
}; };
struct _GstCutterClass struct _GstCutterClass

View file

@ -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 before the computation. To reduce the work for the next steps
we store the swapped words in the array CORRECT_WORDS. */ we store the swapped words in the array CORRECT_WORDS. */
#define OP(a, b, c, d, s, T) \ #define OP(a, b, c, d, s, T) \
do \ do \
{ \ { \
a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \ a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \
++words; \ ++words; \
CYCLIC (a, s); \ CYCLIC (a, s); \
a += b; \ a += b; \
} \ } \
while (0) while (0)
/* It is unfortunate that C does not provide an operator for /* 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 in CORRECT_WORDS. Redefine the macro to take an additional first
argument specifying the function to use. */ argument specifying the function to use. */
#undef OP #undef OP
#define OP(f, a, b, c, d, k, s, T) \ #define OP(f, a, b, c, d, k, s, T) \
do \ do \
{ \ { \
a += f (b, c, d) + correct_words[k] + T; \ a += f (b, c, d) + correct_words[k] + T; \
CYCLIC (a, s); \ CYCLIC (a, s); \
a += b; \ a += b; \
} \ } \
while (0) while (0)
/* Round 2. */ /* Round 2. */

View file

@ -26,14 +26,14 @@
typedef struct _GstTestInfo GstTestInfo; typedef struct _GstTestInfo GstTestInfo;
struct _GstTestInfo { struct _GstTestInfo {
GParamSpec * (* get_spec) (const GstTestInfo *info, gboolean compare_value); GParamSpec * (* get_spec) (const GstTestInfo *info, gboolean compare_value);
gpointer (* new) (const GstTestInfo *info); gpointer (* new) (const GstTestInfo *info);
void (* add) (gpointer test, void (* add) (gpointer test,
GstBuffer *buffer); GstBuffer *buffer);
gboolean (* finish) (gpointer test, GValue *value); gboolean (* finish) (gpointer test, GValue *value);
void (* get_value) (gpointer test, void (* get_value) (gpointer test,
GValue *value); GValue *value);
void (* free) (gpointer test); void (* free) (gpointer test);
}; };
extern const GstTestInfo tests[]; extern const GstTestInfo tests[];

View file

@ -45,7 +45,7 @@
#include <gst/video/video.h> #include <gst/video/video.h>
#ifndef M_PI #ifndef M_PI
#define M_PI 3.14159265358979323846 #define M_PI 3.14159265358979323846
#endif #endif
#define GST_TYPE_WARPTV \ #define GST_TYPE_WARPTV \

View file

@ -29,101 +29,101 @@ extern "C" {
enum Flx_TypeChunk enum Flx_TypeChunk
{ {
/* frame chunks */ /* frame chunks */
FLX_PREFIX_TYPE = 0xf100, FLX_PREFIX_TYPE = 0xf100,
FLX_SCRIPT_CHUNK = 0xf1e0, FLX_SCRIPT_CHUNK = 0xf1e0,
FLX_FRAME_TYPE = 0xf1fa, FLX_FRAME_TYPE = 0xf1fa,
FLX_SEGMENT_TABLE = 0xf1fb, FLX_SEGMENT_TABLE = 0xf1fb,
FLX_HUFFMAN_TABLE = 0xf1fc, FLX_HUFFMAN_TABLE = 0xf1fc,
/* sub chunks */ /* sub chunks */
FLX_CEL_DATA = 3, FLX_CEL_DATA = 3,
FLX_COLOR256 = 4, FLX_COLOR256 = 4,
FLX_SS2 = 7, FLX_SS2 = 7,
FLX_COLOR64 = 11, FLX_COLOR64 = 11,
FLX_LC = 12, FLX_LC = 12,
FLX_BLACK = 13, FLX_BLACK = 13,
FLX_BRUN = 15, FLX_BRUN = 15,
FLX_COPY = 16, FLX_COPY = 16,
FLX_MINI = 18, FLX_MINI = 18,
FLX_DTA_RUN = 25, FLX_DTA_RUN = 25,
FLX_DTA_COPY = 26, FLX_DTA_COPY = 26,
FLX_DTA_LC = 27, FLX_DTA_LC = 27,
FLX_LABEL = 31, FLX_LABEL = 31,
FLX_BMP_MASK = 32, FLX_BMP_MASK = 32,
FLX_MLEV_MASK = 33, FLX_MLEV_MASK = 33,
FLX_SEGMENT = 34, FLX_SEGMENT = 34,
FLX_KEY_IMAGE = 35, FLX_KEY_IMAGE = 35,
FLX_KEY_PAL = 36, FLX_KEY_PAL = 36,
FLX_REGION = 37, FLX_REGION = 37,
FLX_WAVE = 38, FLX_WAVE = 38,
FLX_USERSTRING = 39, FLX_USERSTRING = 39,
FLX_RGN_MASK = 40 FLX_RGN_MASK = 40
}; };
enum Flx_MagicHdr enum Flx_MagicHdr
{ {
FLX_MAGICHDR_FLI = 0xaf11, FLX_MAGICHDR_FLI = 0xaf11,
FLX_MAGICHDR_FLC = 0xaf12, FLX_MAGICHDR_FLC = 0xaf12,
FLX_MAGICHDR_FLX = 0xaf44, FLX_MAGICHDR_FLX = 0xaf44,
FLX_MAGICHDR_HUFFBWT = 0xaf30 FLX_MAGICHDR_HUFFBWT = 0xaf30
}; };
typedef struct _FlxHeader typedef struct _FlxHeader
{ {
guint32 size; guint32 size;
guint16 type; guint16 type;
guint16 frames; guint16 frames;
guint16 width,height,depth,flags; guint16 width,height,depth,flags;
guint32 speed; guint32 speed;
guint16 reserved1; guint16 reserved1;
/* FLC */ /* FLC */
guint32 created,creator,updated,updater; guint32 created,creator,updated,updater;
guint16 aspect_dx, aspect_dy; guint16 aspect_dx, aspect_dy;
/* EGI */ /* EGI */
guint16 ext_flags,keyframes,totalframes; guint16 ext_flags,keyframes,totalframes;
guint32 req_memory; guint32 req_memory;
guint16 max_regions,transp_num; guint16 max_regions,transp_num;
guchar reserved2[24]; guchar reserved2[24];
/* FLC */ /* FLC */
guint32 oframe1,oframe2; guint32 oframe1,oframe2;
guchar reserved3[40]; guchar reserved3[40];
} FlxHeader; } FlxHeader;
#define FlxHeaderSize 128 #define FlxHeaderSize 128
typedef struct _FlxFrameChunk typedef struct _FlxFrameChunk
{ {
guint32 size; guint32 size;
guint16 id; guint16 id;
} FlxFrameChunk; } FlxFrameChunk;
#define FlxFrameChunkSize 6 #define FlxFrameChunkSize 6
typedef struct _FlxPrefixChunk typedef struct _FlxPrefixChunk
{ {
guint16 chunks; guint16 chunks;
guchar reserved[8]; guchar reserved[8];
} FlxPrefixChunk; } FlxPrefixChunk;
typedef struct _FlxSegmentTable typedef struct _FlxSegmentTable
{ {
guint16 segments; guint16 segments;
} FlxSegmentTable; } FlxSegmentTable;
typedef struct _FlxHuffmanTable typedef struct _FlxHuffmanTable
{ {
guint16 codelength; guint16 codelength;
guint16 numcodes; guint16 numcodes;
guchar reserved[6]; guchar reserved[6];
} FlxHuffmanTable; } FlxHuffmanTable;
typedef struct _FlxFrameType typedef struct _FlxFrameType
{ {
guint16 chunks; guint16 chunks;
guint16 delay; guint16 delay;
guchar reserved[6]; guchar reserved[6];
} FlxFrameType; } FlxFrameType;
#define FlxFrameTypeSize 10 #define FlxFrameTypeSize 10

View file

@ -34,7 +34,7 @@ typedef enum {
GST_FLXDEC_READ_HEADER, GST_FLXDEC_READ_HEADER,
GST_FLXDEC_PLAYING, GST_FLXDEC_PLAYING,
} GstFlxDecState; } GstFlxDecState;
/* Definition of structure storing data for this element. */ /* Definition of structure storing data for this element. */
typedef struct _GstFlxDec GstFlxDec; typedef struct _GstFlxDec GstFlxDec;

View file

@ -5,9 +5,9 @@
* -ajout de zoomFilter() * -ajout de zoomFilter()
* -copie de zoomFilter() en zoomFilterRGB(), gérant les 3 couleurs * -copie de zoomFilter() en zoomFilterRGB(), gérant les 3 couleurs
* -optimisation de sinFilter (utilisant une table de sin) * -optimisation de sinFilter (utilisant une table de sin)
* -asm * -asm
* -optimisation de la procedure de génération du buffer de transformation * -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] * la vitesse est maintenant comprise dans [0..128] au lieu de [0..100]
*/ */
/*#define _DEBUG_PIXEL; */ /*#define _DEBUG_PIXEL; */
@ -185,7 +185,7 @@ calculatePXandPY (int x, int y, int *px, int *py)
static inline void static inline void
setPixelRGB (Uint * buffer, Uint x, Uint y, Color c) 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 #ifdef _DEBUG_PIXEL
if (x + y * resolx >= resolx * resoly) { if (x + y * resolx >= resolx * resoly) {
fprintf (stderr, "setPixel ERROR : hors du tableau... %i, %i\n", x, y); 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))); (unsigned char *) (buffer + (x + y * resolx)));
c->v = *(unsigned char *) (++tmp8); c->v = *(unsigned char *) (++tmp8);
c->r = *(unsigned char *) (++tmp8); c->r = *(unsigned char *) (++tmp8);
/* *c = (Color) buffer[x+y*WIDTH] ; */ /* *c = (Color) buffer[x+y*WIDTH] ; */
#endif #endif
} }
@ -273,7 +273,7 @@ getPixelRGB_ (Uint * buffer, Uint x, Color * c)
c->b = *(unsigned char *) (tmp8 = (unsigned char *) (buffer + x)); c->b = *(unsigned char *) (tmp8 = (unsigned char *) (buffer + x));
c->v = *(unsigned char *) (++tmp8); c->v = *(unsigned char *) (++tmp8);
c->r = *(unsigned char *) (++tmp8); c->r = *(unsigned char *) (++tmp8);
/* *c = (Color) buffer[x+y*WIDTH] ; */ /* *c = (Color) buffer[x+y*WIDTH] ; */
#endif #endif
} }
@ -452,8 +452,8 @@ zoomFilterFastRGB (Uint * pix1,
npx10 = (px / sqrtperte); npx10 = (px / sqrtperte);
npy10 = (py / sqrtperte); npy10 = (py / sqrtperte);
/* if (npx10 >= prevX) fprintf(stderr,"error npx:%d",npx10); /* if (npx10 >= prevX) fprintf(stderr,"error npx:%d",npx10);
if (npy10 >= prevY) fprintf(stderr,"error npy:%d",npy10); if (npy10 >= prevY) fprintf(stderr,"error npy:%d",npy10);
*/ */
coefh = px % sqrtperte; coefh = px % sqrtperte;
coefv = py % sqrtperte; coefv = py % sqrtperte;

View file

@ -7,16 +7,16 @@
typedef struct typedef struct
{ {
int vitesse ; int vitesse ;
unsigned char pertedec ; unsigned char pertedec ;
unsigned char sqrtperte ; unsigned char sqrtperte ;
int middleX,middleY ; int middleX,middleY ;
char reverse ; char reverse ;
char mode ; char mode ;
/** @since June 2001 */ /** @since June 2001 */
int hPlaneEffect ; int hPlaneEffect ;
int vPlaneEffect ; int vPlaneEffect ;
char noisify ; char noisify ;
} ZoomFilterData ; } ZoomFilterData ;
@ -28,8 +28,8 @@ typedef struct
#define WATER_MODE 5 #define WATER_MODE 5
void pointFilter(guint32 *pix1, Color c, void pointFilter(guint32 *pix1, Color c,
float t1, float t2, float t3, float t4, float t1, float t2, float t3, float t4,
guint32 cycle); guint32 cycle);
/* filtre de zoom : /* filtre de zoom :
le contenu de pix1 est copie dans pix2, avec l'effet appliqué le contenu de pix1 est copie dans pix2, avec l'effet appliqué
@ -43,9 +43,9 @@ Uint middleY);
*/ */
void zoomFilterFastRGB (guint32 *pix1, void zoomFilterFastRGB (guint32 *pix1,
guint32 *pix2, guint32 *pix2,
ZoomFilterData *zf, ZoomFilterData *zf,
guint32 resx, guint32 resy); guint32 resx, guint32 resy);
/* filtre sin : /* filtre sin :
@ -58,11 +58,11 @@ void zoomFilterFastRGB (guint32 *pix1,
*/ */
/* /*
void sinFilter(Uint *pix1,Uint *pix2, void sinFilter(Uint *pix1,Uint *pix2,
Uint cycle, Uint cycle,
Uint mode, Uint mode,
Uint rate, Uint rate,
char lenght, char lenght,
Uint speed); Uint speed);
*/ */
#define SIN_MUL 1 #define SIN_MUL 1

View file

@ -8,22 +8,22 @@ extern int * rand_tab ;
extern unsigned short rand_pos ; extern unsigned short rand_pos ;
#define RAND_INIT(i) \ #define RAND_INIT(i) \
srand (i) ;\ srand (i) ;\
if (!rand_tab)\ if (!rand_tab)\
rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;\ rand_tab = (int *) malloc (NB_RAND * sizeof(int)) ;\
rand_pos = 1 ;\ rand_pos = 1 ;\
while (rand_pos != 0)\ while (rand_pos != 0)\
rand_tab [rand_pos++] = rand () ; rand_tab [rand_pos++] = rand () ;
#define RAND()\ #define RAND()\
(rand_tab[rand_pos = rand_pos + 1]) (rand_tab[rand_pos = rand_pos + 1])
#define RAND_CLOSE()\ #define RAND_CLOSE()\
free (rand_tab);\ free (rand_tab);\
rand_tab = 0; rand_tab = 0;
/*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */ /*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */
#define iRAND(i) (RAND()%i) #define iRAND(i) (RAND()%i)
#endif #endif

View file

@ -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. * s16_to_alaw() accepts an 16-bit integer and encodes it as A-law data.
* *
* Linear Input Code Compressed Code * Linear Input Code Compressed Code
* ------------------------ --------------- * ------------------------ ---------------
* 0000000wxyza 000wxyz * 0000000wxyza 000wxyz
* 0000001wxyza 001wxyz * 0000001wxyza 001wxyz
* 000001wxyzab 010wxyz * 000001wxyzab 010wxyz
* 00001wxyzabc 011wxyz * 00001wxyzabc 011wxyz
* 0001wxyzabcd 100wxyz * 0001wxyzabcd 100wxyz
* 001wxyzabcde 101wxyz * 001wxyzabcde 101wxyz
* 01wxyzabcdef 110wxyz * 01wxyzabcdef 110wxyz
* 1wxyzabcdefg 111wxyz * 1wxyzabcdefg 111wxyz
* *
* For further information see John C. Bellamy's Digital Telephony, 1982, * For further information see John C. Bellamy's Digital Telephony, 1982,
* John Wiley & Sons, pps 98-111 and 472-476. * John Wiley & Sons, pps 98-111 and 472-476.

View file

@ -328,7 +328,7 @@ gst_level_calculate_##TYPE (TYPE * in, guint num, gint channels, \
{ \ { \
register int j; \ register int j; \
double squaresum = 0.0; /* square sum of the integer samples */ \ 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 */ \ register double peaksquare = 0.0; /* Peak Square Sample */ \
gdouble normalizer; /* divisor to get a [-1.0, 1.0] range */ \ gdouble normalizer; /* divisor to get a [-1.0, 1.0] range */ \
\ \

View file

@ -50,27 +50,27 @@ typedef struct _GstLevelClass GstLevelClass;
struct _GstLevel { struct _GstLevel {
GstBaseTransform element; GstBaseTransform element;
gboolean message; /* whether or not to post messages */ gboolean message; /* whether or not to post messages */
gdouble interval; /* how many seconds between emits */ gdouble interval; /* how many seconds between emits */
gint rate; /* caps variables */ gint rate; /* caps variables */
gint width; gint width;
gint channels; gint channels;
gdouble decay_peak_ttl; /* time to live for peak in seconds */ gdouble decay_peak_ttl; /* time to live for peak in seconds */
gdouble decay_peak_falloff; /* falloff in dB/sec */ gdouble decay_peak_falloff; /* falloff in dB/sec */
gint num_frames; /* frame count (1 sample per channel) gint num_frames; /* frame count (1 sample per channel)
* since last emit */ * since last emit */
/* per-channel arrays for intermediate values */ /* per-channel arrays for intermediate values */
gdouble *CS; /* normalized Cumulative Square */ gdouble *CS; /* normalized Cumulative Square */
gdouble *peak; /* normalized Peak value over buffer */ gdouble *peak; /* normalized Peak value over buffer */
gdouble *last_peak; /* last normalized Peak value over interval */ gdouble *last_peak; /* last normalized Peak value over interval */
gdouble *decay_peak; /* running decaying normalized Peak */ gdouble *decay_peak; /* running decaying normalized Peak */
gdouble *decay_peak_base; /* value of last peak we are decaying from */ gdouble *decay_peak_base; /* value of last peak we are decaying from */
gdouble *MS; /* normalized Mean Square of buffer */ gdouble *MS; /* normalized Mean Square of buffer */
gdouble *RMS_dB; /* RMS in dB to emit */ gdouble *RMS_dB; /* RMS in dB to emit */
GstClockTime *decay_peak_age; /* age of last peak */ GstClockTime *decay_peak_age; /* age of last peak */
}; };
struct _GstLevelClass { struct _GstLevelClass {

View file

@ -77,56 +77,56 @@ GstFlowReturn gst_ebml_last_write_result (GstEbmlWrite *ebml);
* each element, but fill this one until a flush. * each element, but fill this one until a flush.
*/ */
void gst_ebml_write_set_cache (GstEbmlWrite *ebml, void gst_ebml_write_set_cache (GstEbmlWrite *ebml,
guint size); guint size);
void gst_ebml_write_flush_cache (GstEbmlWrite *ebml); void gst_ebml_write_flush_cache (GstEbmlWrite *ebml);
/* /*
* Seeking. * Seeking.
*/ */
void gst_ebml_write_seek (GstEbmlWrite *ebml, void gst_ebml_write_seek (GstEbmlWrite *ebml,
guint64 pos); guint64 pos);
/* /*
* Data writing. * Data writing.
*/ */
void gst_ebml_write_uint (GstEbmlWrite *ebml, void gst_ebml_write_uint (GstEbmlWrite *ebml,
guint32 id, guint32 id,
guint64 num); guint64 num);
void gst_ebml_write_sint (GstEbmlWrite *ebml, void gst_ebml_write_sint (GstEbmlWrite *ebml,
guint32 id, guint32 id,
gint64 num); gint64 num);
void gst_ebml_write_float (GstEbmlWrite *ebml, void gst_ebml_write_float (GstEbmlWrite *ebml,
guint32 id, guint32 id,
gdouble num); gdouble num);
void gst_ebml_write_ascii (GstEbmlWrite *ebml, void gst_ebml_write_ascii (GstEbmlWrite *ebml,
guint32 id, guint32 id,
const gchar *str); const gchar *str);
void gst_ebml_write_utf8 (GstEbmlWrite *ebml, void gst_ebml_write_utf8 (GstEbmlWrite *ebml,
guint32 id, guint32 id,
const gchar *str); const gchar *str);
void gst_ebml_write_date (GstEbmlWrite *ebml, void gst_ebml_write_date (GstEbmlWrite *ebml,
guint32 id, guint32 id,
gint64 date); gint64 date);
guint64 gst_ebml_write_master_start (GstEbmlWrite *ebml, guint64 gst_ebml_write_master_start (GstEbmlWrite *ebml,
guint32 id); guint32 id);
void gst_ebml_write_master_finish (GstEbmlWrite *ebml, void gst_ebml_write_master_finish (GstEbmlWrite *ebml,
guint64 startpos); guint64 startpos);
void gst_ebml_write_binary (GstEbmlWrite *ebml, void gst_ebml_write_binary (GstEbmlWrite *ebml,
guint32 id, guint32 id,
guchar *binary, guchar *binary,
guint64 length); guint64 length);
void gst_ebml_write_header (GstEbmlWrite *ebml, void gst_ebml_write_header (GstEbmlWrite *ebml,
gchar *doctype, gchar *doctype,
guint version); guint version);
/* /*
* Note: this is supposed to be used only for media data. * Note: this is supposed to be used only for media data.
*/ */
void gst_ebml_write_buffer_header (GstEbmlWrite *ebml, void gst_ebml_write_buffer_header (GstEbmlWrite *ebml,
guint32 id, guint32 id,
guint64 length); guint64 length);
void gst_ebml_write_buffer (GstEbmlWrite *ebml, void gst_ebml_write_buffer (GstEbmlWrite *ebml,
GstBuffer *data); GstBuffer *data);
/* /*
* A hack, basically... See matroska-mux.c. I should actually * A hack, basically... See matroska-mux.c. I should actually
@ -134,8 +134,8 @@ void gst_ebml_write_buffer (GstEbmlWrite *ebml,
* works for now. * works for now.
*/ */
void gst_ebml_replace_uint (GstEbmlWrite *ebml, void gst_ebml_replace_uint (GstEbmlWrite *ebml,
guint64 pos, guint64 pos,
guint64 num); guint64 num);
G_END_DECLS G_END_DECLS

View file

@ -40,7 +40,7 @@ G_BEGIN_DECLS
#define GST_IS_MATROSKA_DEMUX_CLASS(obj) \ #define GST_IS_MATROSKA_DEMUX_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_DEMUX)) (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 { typedef enum {
GST_MATROSKA_DEMUX_STATE_START, GST_MATROSKA_DEMUX_STATE_START,

View file

@ -218,7 +218,7 @@ typedef enum {
typedef struct _GstMatroskaTrackContext { typedef struct _GstMatroskaTrackContext {
GstPad *pad; GstPad *pad;
GstCaps *caps; GstCaps *caps;
guint index; guint index;
/* some often-used info */ /* some often-used info */
gchar *codec_id, *codec_name, *name, *language; 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 /* Special flag for Vorbis, we need to send codec_priv first before
* sending any data, and just testing for time == 0 is not enough * sending any data, and just testing for time == 0 is not enough
* to detect that */ * to detect that */
gboolean first_frame; gboolean first_frame;
} GstMatroskaTrackAudioContext; } GstMatroskaTrackAudioContext;
typedef struct _GstMatroskaTrackComplexContext { typedef struct _GstMatroskaTrackComplexContext {

View file

@ -84,7 +84,7 @@ typedef struct _GstMatroskaMux {
GstElement element; GstElement element;
/* pads */ /* pads */
GstPad *srcpad; GstPad *srcpad;
GstCollectPads *collect; GstCollectPads *collect;
GstEbmlWrite *ebml_write; GstEbmlWrite *ebml_write;

View file

@ -19,7 +19,7 @@
* *
* *
* Note: 7th December 2004: This file used to be licensed under the GPL, * 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$ * $Id$
* *
@ -288,7 +288,7 @@ convolve_match (const int *lastchoice,
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
right[i] -= avg; right[i] -= avg;
/* End-of-stack marker. */ /* 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; top[1].b.null = scratch;
#endif #endif
top[1].b.main = NULL; top[1].b.main = NULL;

View file

@ -44,8 +44,8 @@ convolve_state *convolve_init (void);
void convolve_close (convolve_state * state); void convolve_close (convolve_state * state);
int convolve_match (const int * lastchoice, int convolve_match (const int * lastchoice,
const short int * input, const short int * input,
convolve_state * state); convolve_state * state);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -80,7 +80,7 @@ GST_ELEMENT_DETAILS ("multipart muxer",
"mux multipart streams", "mux multipart streams",
"Wim Taymans <wim@fluendo.com>"); "Wim Taymans <wim@fluendo.com>");
#define DEFAULT_BOUNDARY "ThisRandomString" #define DEFAULT_BOUNDARY "ThisRandomString"
enum enum
{ {

View file

@ -82,7 +82,7 @@ gst_aggregator_sched_get_type (void)
return aggregator_sched_type; 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, static GstPad *gst_aggregator_request_new_pad (GstElement * element,
GstPadTemplate * temp, const gchar * unused); GstPadTemplate * temp, const gchar * unused);

View file

@ -30,7 +30,7 @@ G_BEGIN_DECLS
typedef enum { typedef enum {
AGGREGATOR_LOOP = 1, AGGREGATOR_LOOP = 1,
AGGREGATOR_LOOP_SELECT, AGGREGATOR_LOOP_SELECT,
AGGREGATOR_CHAIN AGGREGATOR_CHAIN
} GstAggregatorSchedType; } GstAggregatorSchedType;
@ -46,8 +46,8 @@ typedef enum {
#define GST_IS_AGGREGATOR_CLASS(obj) \ #define GST_IS_AGGREGATOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AGGREGATOR))
typedef struct _GstAggregator GstAggregator; typedef struct _GstAggregator GstAggregator;
typedef struct _GstAggregatorClass GstAggregatorClass; typedef struct _GstAggregatorClass GstAggregatorClass;
struct _GstAggregator { struct _GstAggregator {
GstElement element; GstElement element;
@ -67,7 +67,7 @@ struct _GstAggregatorClass {
GstElementClass parent_class; GstElementClass parent_class;
}; };
GType gst_aggregator_get_type (void); GType gst_aggregator_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -66,8 +66,8 @@ GST_BOILERPLATE_FULL (GstMD5Sink, gst_md5sink, GstElement, GST_TYPE_ELEMENT,
_do_init); _do_init);
/* GObject stuff */ /* GObject stuff */
/*static void gst_md5sink_set_property (GObject *object, guint prop_id, /*static void gst_md5sink_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);*/ const GValue *value, GParamSpec *pspec);*/
static void gst_md5sink_get_property (GObject * object, guint prop_id, static void gst_md5sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); 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 before the computation. To reduce the work for the next steps
we store the swapped words in the array CORRECT_WORDS. */ we store the swapped words in the array CORRECT_WORDS. */
#define OP(a, b, c, d, s, T) \ #define OP(a, b, c, d, s, T) \
do \ do \
{ \ { \
a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \ a += FF (b, c, d) + (*cwp++ = GUINT32_TO_LE (*words)) + T; \
++words; \ ++words; \
CYCLIC (a, s); \ CYCLIC (a, s); \
a += b; \ a += b; \
} \ } \
while (0) while (0)
/* It is unfortunate that C does not provide an operator for /* 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 in CORRECT_WORDS. Redefine the macro to take an additional first
argument specifying the function to use. */ argument specifying the function to use. */
#undef OP #undef OP
#define OP(f, a, b, c, d, k, s, T) \ #define OP(f, a, b, c, d, k, s, T) \
do \ do \
{ \ { \
a += f (b, c, d) + correct_words[k] + T; \ a += f (b, c, d) + correct_words[k] + T; \
CYCLIC (a, s); \ CYCLIC (a, s); \
a += b; \ a += b; \
} \ } \
while (0) while (0)
/* Round 2. */ /* Round 2. */

View file

@ -67,7 +67,7 @@ struct _GstMD5SinkClass {
}; };
GType gst_md5sink_get_type (void); GType gst_md5sink_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -78,7 +78,7 @@ static void gst_multifilesrc_get_property (GObject * object, guint prop_id,
static GstData *gst_multifilesrc_get (GstPad * pad); 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 * static GstStateChangeReturn gst_multifilesrc_change_state (GstElement *
element); element);

View file

@ -41,10 +41,10 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIFILESRC)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIFILESRC))
typedef enum { 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_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; } GstMultiFileSrcFlags;
typedef struct _GstMultiFileSrc GstMultiFileSrc; typedef struct _GstMultiFileSrc GstMultiFileSrc;
@ -67,7 +67,7 @@ struct _GstMultiFileSrc {
gint curfileindex; /* how many files have we done so far */ gint curfileindex; /* how many files have we done so far */
gboolean have_newmedia_events; /* tunable parameter to say whether new media gboolean have_newmedia_events; /* tunable parameter to say whether new media
disconts should be generated */ disconts should be generated */
gboolean new_seek; gboolean new_seek;
}; };

View file

@ -42,9 +42,9 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PIPEFILTER))
typedef enum { 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; } GstPipeFilterFlags;
typedef struct _GstPipefilter GstPipefilter; typedef struct _GstPipefilter GstPipefilter;

View file

@ -50,22 +50,22 @@ typedef struct _GstShaper GstShaper;
typedef struct _GstShaperClass GstShaperClass; typedef struct _GstShaperClass GstShaperClass;
struct _GstShaper { struct _GstShaper {
GstElement element; GstElement element;
GSList *connections; GSList *connections;
gint nconnections; gint nconnections;
GstShaperPolicyType policy; GstShaperPolicyType policy;
gboolean silent; gboolean silent;
gchar *last_message; gchar *last_message;
}; };
struct _GstShaperClass { struct _GstShaperClass {
GstElementClass parent_class; GstElementClass parent_class;
}; };
GType gst_shaper_get_type (void); GType gst_shaper_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -27,7 +27,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
/* Definition of structure storing data for this element. */ /* Definition of structure storing data for this element. */
typedef struct _GstRtpL16Depay GstRtpL16Depay; typedef struct _GstRtpL16Depay GstRtpL16Depay;
@ -67,7 +67,7 @@ gboolean gst_rtp_L16depay_plugin_init (GstPlugin * plugin);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __GST_RTP_L16_DEPAY_H__ */ #endif /* __GST_RTP_L16_DEPAY_H__ */

View file

@ -69,4 +69,4 @@ gboolean gst_rtpL16pay_plugin_init (GstPlugin * plugin);
G_END_DECLS G_END_DECLS
#endif /* __GST_RTP_L16_PAY_H__ */ #endif /* __GST_RTP_L16_PAY_H__ */

View file

@ -24,11 +24,11 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_RTP_DEPAY (gst_rtp_depay_get_type()) #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(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_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(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_RTP_DEPAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_DEPAY, GstRTPDepayClass))
typedef struct _GstRTPDepay GstRTPDepay; typedef struct _GstRTPDepay GstRTPDepay;
typedef struct _GstRTPDepayClass GstRTPDepayClass; typedef struct _GstRTPDepayClass GstRTPDepayClass;

View file

@ -54,7 +54,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
) )
); );
#define DEFAULT_SEND_CONFIG FALSE #define DEFAULT_SEND_CONFIG FALSE
enum enum
{ {
@ -255,12 +255,12 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
return ret; return ret;
} }
#define VOS_STARTCODE 0x000001B0 #define VOS_STARTCODE 0x000001B0
#define VOS_ENDCODE 0x000001B1 #define VOS_ENDCODE 0x000001B1
#define USER_DATA_STARTCODE 0x000001B2 #define USER_DATA_STARTCODE 0x000001B2
#define GOP_STARTCODE 0x000001B3 #define GOP_STARTCODE 0x000001B3
#define VISUAL_OBJECT_STARTCODE 0x000001B5 #define VISUAL_OBJECT_STARTCODE 0x000001B5
#define VOP_STARTCODE 0x000001B6 #define VOP_STARTCODE 0x000001B6
static gboolean static gboolean
gst_rtp_mp4v_pay_depay_data (GstRtpMP4VPay * enc, guint8 * data, guint size, gst_rtp_mp4v_pay_depay_data (GstRtpMP4VPay * enc, guint8 * data, guint size,

View file

@ -48,8 +48,8 @@ struct _GstRtpMP4VPay
GstClockTime first_ts; GstClockTime first_ts;
GstClockTime duration; GstClockTime duration;
gint rate; gint rate;
gint profile; gint profile;
GstBuffer *config; GstBuffer *config;
gboolean send_config; gboolean send_config;
}; };

View file

@ -52,9 +52,9 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_LOCATION NULL #define DEFAULT_LOCATION NULL
#define DEFAULT_PROTOCOLS GST_RTSP_PROTO_UDP_UNICAST | GST_RTSP_PROTO_UDP_MULTICAST | GST_RTSP_PROTO_TCP #define DEFAULT_PROTOCOLS GST_RTSP_PROTO_UDP_UNICAST | GST_RTSP_PROTO_UDP_MULTICAST | GST_RTSP_PROTO_TCP
#define DEFAULT_DEBUG FALSE #define DEFAULT_DEBUG FALSE
enum enum
{ {
@ -300,34 +300,34 @@ done:
return ret; return ret;
} }
#define PARSE_INT(p, del, res) \ #define PARSE_INT(p, del, res) \
G_STMT_START { \ G_STMT_START { \
gchar *t = p; \ gchar *t = p; \
p = strstr (p, del); \ p = strstr (p, del); \
if (p == NULL) \ if (p == NULL) \
res = -1; \ res = -1; \
else { \ else { \
*p = '\0'; \ *p = '\0'; \
p++; \ p++; \
res = atoi (t); \ res = atoi (t); \
} \ } \
} G_STMT_END } G_STMT_END
#define PARSE_STRING(p, del, res) \ #define PARSE_STRING(p, del, res) \
G_STMT_START { \ G_STMT_START { \
gchar *t = p; \ gchar *t = p; \
p = strstr (p, del); \ p = strstr (p, del); \
if (p == NULL) \ if (p == NULL) \
res = NULL; \ res = NULL; \
else { \ else { \
*p = '\0'; \ *p = '\0'; \
p++; \ p++; \
res = t; \ res = t; \
} \ } \
} G_STMT_END } G_STMT_END
#define SKIP_SPACES(p) \ #define SKIP_SPACES(p) \
while (*p && g_ascii_isspace (*p)) \ while (*p && g_ascii_isspace (*p)) \
p++; p++;
static gboolean static gboolean

View file

@ -47,18 +47,18 @@ typedef struct _GstRTSPSrcClass GstRTSPSrcClass;
/* flags with allowed protocols */ /* flags with allowed protocols */
typedef enum typedef enum
{ {
GST_RTSP_PROTO_UDP_UNICAST = (1 << 0), GST_RTSP_PROTO_UDP_UNICAST = (1 << 0),
GST_RTSP_PROTO_UDP_MULTICAST = (1 << 1), GST_RTSP_PROTO_UDP_MULTICAST = (1 << 1),
GST_RTSP_PROTO_TCP = (1 << 2), GST_RTSP_PROTO_TCP = (1 << 2),
} GstRTSPProto; } GstRTSPProto;
typedef struct _GstRTSPStream GstRTSPStream; typedef struct _GstRTSPStream GstRTSPStream;
struct _GstRTSPStream { struct _GstRTSPStream {
gint id; gint id;
gint rtpchannel; gint rtpchannel;
gint rtcpchannel; gint rtcpchannel;
GstRTSPSrc *parent; GstRTSPSrc *parent;
@ -78,22 +78,22 @@ struct _GstRTSPStream {
struct _GstRTSPSrc { struct _GstRTSPSrc {
GstElement element; GstElement element;
gboolean interleaved; gboolean interleaved;
GstTask *task; GstTask *task;
gint numstreams; gint numstreams;
GList *streams; GList *streams;
gchar *location; gchar *location;
gboolean debug; gboolean debug;
GstRTSPProto protocols; GstRTSPProto protocols;
/* supported options */ /* supported options */
gint options; gint options;
RTSPConnection *connection; RTSPConnection *connection;
RTSPMessage *request; RTSPMessage *request;
RTSPMessage *response; RTSPMessage *response;
}; };
struct _GstRTSPSrcClass { struct _GstRTSPSrcClass {

View file

@ -30,23 +30,23 @@ G_BEGIN_DECLS
typedef struct _RTSPConnection typedef struct _RTSPConnection
{ {
gint fd; /* our socket */ gint fd; /* our socket */
gint cseq; /* sequence number */ gint cseq; /* sequence number */
gchar session_id[512]; /* session id */ gchar session_id[512]; /* session id */
RTSPState state; /* state of the connection */ RTSPState state; /* state of the connection */
} RTSPConnection; } RTSPConnection;
/* opening/closing a connection */ /* opening/closing a connection */
RTSPResult rtsp_connection_open (RTSPUrl *url, RTSPConnection **conn); RTSPResult rtsp_connection_open (RTSPUrl *url, RTSPConnection **conn);
RTSPResult rtsp_connection_create (gint fd, RTSPConnection **conn); RTSPResult rtsp_connection_create (gint fd, RTSPConnection **conn);
RTSPResult rtsp_connection_close (RTSPConnection *conn); RTSPResult rtsp_connection_close (RTSPConnection *conn);
RTSPResult rtsp_connection_free (RTSPConnection *conn); RTSPResult rtsp_connection_free (RTSPConnection *conn);
/* sending/receiving messages */ /* sending/receiving messages */
RTSPResult rtsp_connection_send (RTSPConnection *conn, RTSPMessage *message); RTSPResult rtsp_connection_send (RTSPConnection *conn, RTSPMessage *message);
RTSPResult rtsp_connection_receive (RTSPConnection *conn, RTSPMessage *message); RTSPResult rtsp_connection_receive (RTSPConnection *conn, RTSPMessage *message);
G_END_DECLS G_END_DECLS

View file

@ -25,14 +25,14 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef enum { typedef enum {
RTSP_OK = 0, RTSP_OK = 0,
/* errors */ /* errors */
RTSP_EINVAL = -1, RTSP_EINVAL = -1,
RTSP_ENOMEM = -2, RTSP_ENOMEM = -2,
RTSP_ERESOLV = -3, RTSP_ERESOLV = -3,
RTSP_ENOTIMPL = -4, RTSP_ENOTIMPL = -4,
RTSP_ESYS = -5, RTSP_ESYS = -5,
RTSP_EPARSE = -6, RTSP_EPARSE = -6,
} RTSPResult; } RTSPResult;
typedef enum { typedef enum {
@ -54,17 +54,17 @@ typedef enum {
} RTSPState; } RTSPState;
typedef enum { typedef enum {
RTSP_DESCRIBE = (1 << 0), RTSP_DESCRIBE = (1 << 0),
RTSP_ANNOUNCE = (1 << 1), RTSP_ANNOUNCE = (1 << 1),
RTSP_GET_PARAMETER = (1 << 2), RTSP_GET_PARAMETER = (1 << 2),
RTSP_OPTIONS = (1 << 3), RTSP_OPTIONS = (1 << 3),
RTSP_PAUSE = (1 << 4), RTSP_PAUSE = (1 << 4),
RTSP_PLAY = (1 << 5), RTSP_PLAY = (1 << 5),
RTSP_RECORD = (1 << 6), RTSP_RECORD = (1 << 6),
RTSP_REDIRECT = (1 << 7), RTSP_REDIRECT = (1 << 7),
RTSP_SETUP = (1 << 8), RTSP_SETUP = (1 << 8),
RTSP_SET_PARAMETER = (1 << 9), RTSP_SET_PARAMETER = (1 << 9),
RTSP_TEARDOWN = (1 << 10), RTSP_TEARDOWN = (1 << 10),
} RTSPMethod; } RTSPMethod;
typedef enum { typedef enum {
@ -74,102 +74,102 @@ typedef enum {
* g = general * g = general
* e = entity * e = entity
*/ */
RTSP_HDR_ACCEPT, /* Accept R opt. entity */ RTSP_HDR_ACCEPT, /* Accept R opt. entity */
RTSP_HDR_ACCEPT_ENCODING, /* Accept-Encoding R opt. entity */ RTSP_HDR_ACCEPT_ENCODING, /* Accept-Encoding R opt. entity */
RTSP_HDR_ACCEPT_LANGUAGE, /* Accept-Language R opt. all */ RTSP_HDR_ACCEPT_LANGUAGE, /* Accept-Language R opt. all */
RTSP_HDR_ALLOW, /* Allow r opt. all */ RTSP_HDR_ALLOW, /* Allow r opt. all */
RTSP_HDR_AUTHORIZATION, /* Authorization R opt. all */ RTSP_HDR_AUTHORIZATION, /* Authorization R opt. all */
RTSP_HDR_BANDWIDTH, /* Bandwidth R opt. all */ RTSP_HDR_BANDWIDTH, /* Bandwidth R opt. all */
RTSP_HDR_BLOCKSIZE, /* Blocksize R opt. all but OPTIONS, TEARDOWN */ RTSP_HDR_BLOCKSIZE, /* Blocksize R opt. all but OPTIONS, TEARDOWN */
RTSP_HDR_CACHE_CONTROL, /* Cache-Control g opt. SETUP */ RTSP_HDR_CACHE_CONTROL, /* Cache-Control g opt. SETUP */
RTSP_HDR_CONFERENCE, /* Conference R opt. SETUP */ RTSP_HDR_CONFERENCE, /* Conference R opt. SETUP */
RTSP_HDR_CONNECTION, /* Connection g req. all */ RTSP_HDR_CONNECTION, /* Connection g req. all */
RTSP_HDR_CONTENT_BASE, /* Content-Base e opt. entity */ RTSP_HDR_CONTENT_BASE, /* Content-Base e opt. entity */
RTSP_HDR_CONTENT_ENCODING, /* Content-Encoding e req. SET_PARAMETER, DESCRIBE, ANNOUNCE */ 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_LANGUAGE, /* Content-Language e req. DESCRIBE, ANNOUNCE */
RTSP_HDR_CONTENT_LENGTH, /* Content-Length e req. SET_PARAMETER, ANNOUNCE, entity */ RTSP_HDR_CONTENT_LENGTH, /* Content-Length e req. SET_PARAMETER, ANNOUNCE, entity */
RTSP_HDR_CONTENT_LOCATION, /* Content-Location e opt. entity */ RTSP_HDR_CONTENT_LOCATION, /* Content-Location e opt. entity */
RTSP_HDR_CONTENT_TYPE, /* Content-Type e req. SET_PARAMETER, ANNOUNCE, entity */ RTSP_HDR_CONTENT_TYPE, /* Content-Type e req. SET_PARAMETER, ANNOUNCE, entity */
RTSP_HDR_CSEQ, /* CSeq g req. all */ RTSP_HDR_CSEQ, /* CSeq g req. all */
RTSP_HDR_DATE, /* Date g opt. all */ RTSP_HDR_DATE, /* Date g opt. all */
RTSP_HDR_EXPIRES, /* Expires e opt. DESCRIBE, ANNOUNCE */ RTSP_HDR_EXPIRES, /* Expires e opt. DESCRIBE, ANNOUNCE */
RTSP_HDR_FROM, /* From R opt. all */ RTSP_HDR_FROM, /* From R opt. all */
RTSP_HDR_IF_MODIFIED_SINCE, /* If-Modified-Since R opt. DESCRIBE, SETUP */ RTSP_HDR_IF_MODIFIED_SINCE, /* If-Modified-Since R opt. DESCRIBE, SETUP */
RTSP_HDR_LAST_MODIFIED, /* Last-Modified e opt. entity */ RTSP_HDR_LAST_MODIFIED, /* Last-Modified e opt. entity */
RTSP_HDR_PROXY_AUTHENTICATE, /* Proxy-Authenticate */ RTSP_HDR_PROXY_AUTHENTICATE, /* Proxy-Authenticate */
RTSP_HDR_PROXY_REQUIRE, /* Proxy-Require R req. all */ RTSP_HDR_PROXY_REQUIRE, /* Proxy-Require R req. all */
RTSP_HDR_PUBLIC, /* Public r opt. all */ RTSP_HDR_PUBLIC, /* Public r opt. all */
RTSP_HDR_RANGE, /* Range Rr opt. PLAY, PAUSE, RECORD */ RTSP_HDR_RANGE, /* Range Rr opt. PLAY, PAUSE, RECORD */
RTSP_HDR_REFERER, /* Referer R opt. all */ RTSP_HDR_REFERER, /* Referer R opt. all */
RTSP_HDR_REQUIRE, /* Require R req. all */ RTSP_HDR_REQUIRE, /* Require R req. all */
RTSP_HDR_RETRY_AFTER, /* Retry-After r opt. all */ RTSP_HDR_RETRY_AFTER, /* Retry-After r opt. all */
RTSP_HDR_RTP_INFO, /* RTP-Info r req. PLAY */ RTSP_HDR_RTP_INFO, /* RTP-Info r req. PLAY */
RTSP_HDR_SCALE, /* Scale Rr opt. PLAY, RECORD */ RTSP_HDR_SCALE, /* Scale Rr opt. PLAY, RECORD */
RTSP_HDR_SESSION, /* Session Rr req. all but SETUP, OPTIONS */ RTSP_HDR_SESSION, /* Session Rr req. all but SETUP, OPTIONS */
RTSP_HDR_SERVER, /* Server r opt. all */ RTSP_HDR_SERVER, /* Server r opt. all */
RTSP_HDR_SPEED, /* Speed Rr opt. PLAY */ RTSP_HDR_SPEED, /* Speed Rr opt. PLAY */
RTSP_HDR_TRANSPORT, /* Transport Rr req. SETUP */ RTSP_HDR_TRANSPORT, /* Transport Rr req. SETUP */
RTSP_HDR_UNSUPPORTED, /* Unsupported r req. all */ RTSP_HDR_UNSUPPORTED, /* Unsupported r req. all */
RTSP_HDR_USER_AGENT, /* User-Agent R opt. all */ RTSP_HDR_USER_AGENT, /* User-Agent R opt. all */
RTSP_HDR_VIA, /* Via g opt. all */ RTSP_HDR_VIA, /* Via g opt. all */
RTSP_HDR_WWW_AUTHENTICATE, /* WWW-Authenticate r opt. all */ RTSP_HDR_WWW_AUTHENTICATE, /* WWW-Authenticate r opt. all */
} RTSPHeaderField; } RTSPHeaderField;
typedef enum { typedef enum {
RTSP_STS_CONTINUE = 100, RTSP_STS_CONTINUE = 100,
RTSP_STS_OK = 200, RTSP_STS_OK = 200,
RTSP_STS_CREATED = 201, RTSP_STS_CREATED = 201,
RTSP_STS_LOW_ON_STORAGE = 250, RTSP_STS_LOW_ON_STORAGE = 250,
RTSP_STS_MULTIPLE_CHOICES = 300, RTSP_STS_MULTIPLE_CHOICES = 300,
RTSP_STS_MOVED_PERMANENTLY = 301, RTSP_STS_MOVED_PERMANENTLY = 301,
RTSP_STS_MOVE_TEMPORARILY = 302, RTSP_STS_MOVE_TEMPORARILY = 302,
RTSP_STS_SEE_OTHER = 303, RTSP_STS_SEE_OTHER = 303,
RTSP_STS_NOT_MODIFIED = 304, RTSP_STS_NOT_MODIFIED = 304,
RTSP_STS_USE_PROXY = 305, RTSP_STS_USE_PROXY = 305,
RTSP_STS_BAD_REQUEST = 400, RTSP_STS_BAD_REQUEST = 400,
RTSP_STS_UNAUTHORIZED = 401, RTSP_STS_UNAUTHORIZED = 401,
RTSP_STS_PAYMENT_REQUIRED = 402, RTSP_STS_PAYMENT_REQUIRED = 402,
RTSP_STS_FORBIDDEN = 403, RTSP_STS_FORBIDDEN = 403,
RTSP_STS_NOT_FOUND = 404, RTSP_STS_NOT_FOUND = 404,
RTSP_STS_METHOD_NOT_ALLOWED = 405, RTSP_STS_METHOD_NOT_ALLOWED = 405,
RTSP_STS_NOT_ACCEPTABLE = 406, RTSP_STS_NOT_ACCEPTABLE = 406,
RTSP_STS_PROXY_AUTH_REQUIRED = 407, RTSP_STS_PROXY_AUTH_REQUIRED = 407,
RTSP_STS_REQUEST_TIMEOUT = 408, RTSP_STS_REQUEST_TIMEOUT = 408,
RTSP_STS_GONE = 410, RTSP_STS_GONE = 410,
RTSP_STS_LENGTH_REQUIRED = 411, RTSP_STS_LENGTH_REQUIRED = 411,
RTSP_STS_PRECONDITION_FAILED = 412, RTSP_STS_PRECONDITION_FAILED = 412,
RTSP_STS_REQUEST_ENTITY_TOO_LARGE = 413, RTSP_STS_REQUEST_ENTITY_TOO_LARGE = 413,
RTSP_STS_REQUEST_URI_TOO_LARGE = 414, RTSP_STS_REQUEST_URI_TOO_LARGE = 414,
RTSP_STS_UNSUPPORTED_MEDIA_TYPE = 415, RTSP_STS_UNSUPPORTED_MEDIA_TYPE = 415,
RTSP_STS_PARAMETER_NOT_UNDERSTOOD = 451, RTSP_STS_PARAMETER_NOT_UNDERSTOOD = 451,
RTSP_STS_CONFERENCE_NOT_FOUND = 452, RTSP_STS_CONFERENCE_NOT_FOUND = 452,
RTSP_STS_NOT_ENOUGH_BANDWIDTH = 453, RTSP_STS_NOT_ENOUGH_BANDWIDTH = 453,
RTSP_STS_SESSION_NOT_FOUND = 454, RTSP_STS_SESSION_NOT_FOUND = 454,
RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE = 455, RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE = 455,
RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE = 456, RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE = 456,
RTSP_STS_INVALID_RANGE = 457, RTSP_STS_INVALID_RANGE = 457,
RTSP_STS_PARAMETER_IS_READONLY = 458, RTSP_STS_PARAMETER_IS_READONLY = 458,
RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED = 459, RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED = 459,
RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED = 460, RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED = 460,
RTSP_STS_UNSUPPORTED_TRANSPORT = 461, RTSP_STS_UNSUPPORTED_TRANSPORT = 461,
RTSP_STS_DESTINATION_UNREACHABLE = 462, RTSP_STS_DESTINATION_UNREACHABLE = 462,
RTSP_STS_INTERNAL_SERVER_ERROR = 500, RTSP_STS_INTERNAL_SERVER_ERROR = 500,
RTSP_STS_NOT_IMPLEMENTED = 501, RTSP_STS_NOT_IMPLEMENTED = 501,
RTSP_STS_BAD_GATEWAY = 502, RTSP_STS_BAD_GATEWAY = 502,
RTSP_STS_SERVICE_UNAVAILABLE = 503, RTSP_STS_SERVICE_UNAVAILABLE = 503,
RTSP_STS_GATEWAY_TIMEOUT = 504, RTSP_STS_GATEWAY_TIMEOUT = 504,
RTSP_STS_RTSP_VERSION_NOT_SUPPORTED = 505, RTSP_STS_RTSP_VERSION_NOT_SUPPORTED = 505,
RTSP_STS_OPTION_NOT_SUPPORTED = 551, RTSP_STS_OPTION_NOT_SUPPORTED = 551,
} RTSPStatusCode; } RTSPStatusCode;
const gchar* rtsp_method_as_text (RTSPMethod method); const gchar* rtsp_method_as_text (RTSPMethod method);
const gchar* rtsp_header_as_text (RTSPHeaderField field); const gchar* rtsp_header_as_text (RTSPHeaderField field);
const gchar* rtsp_status_as_text (RTSPStatusCode code); const gchar* rtsp_status_as_text (RTSPStatusCode code);
const gchar* rtsp_status_to_string (RTSPStatusCode code); const gchar* rtsp_status_to_string (RTSPStatusCode code);
RTSPHeaderField rtsp_find_header_field (gchar *header); RTSPHeaderField rtsp_find_header_field (gchar *header);
RTSPMethod rtsp_find_method (gchar *method); RTSPMethod rtsp_find_method (gchar *method);
G_END_DECLS G_END_DECLS

View file

@ -35,50 +35,50 @@ typedef enum
typedef struct _RTSPMessage typedef struct _RTSPMessage
{ {
RTSPMsgType type; RTSPMsgType type;
union { union {
struct { struct {
RTSPMethod method; RTSPMethod method;
gchar *uri; gchar *uri;
} request; } request;
struct { struct {
RTSPStatusCode code; RTSPStatusCode code;
gchar *reason; gchar *reason;
} response; } response;
struct { struct {
gint channel; gint channel;
} data; } data;
} type_data; } type_data;
GHashTable *hdr_fields; GHashTable *hdr_fields;
guint8 *body; guint8 *body;
guint body_size; guint body_size;
} RTSPMessage; } RTSPMessage;
RTSPResult rtsp_message_new_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_init_request (RTSPMethod method, gchar *uri, RTSPMessage *msg);
RTSPResult rtsp_message_new_response (RTSPStatusCode code, gchar *reason, RTSPResult rtsp_message_new_response (RTSPStatusCode code, gchar *reason,
RTSPMessage *request, RTSPMessage **msg); RTSPMessage *request, RTSPMessage **msg);
RTSPResult rtsp_message_init_response (RTSPStatusCode code, gchar *reason, RTSPResult rtsp_message_init_response (RTSPStatusCode code, gchar *reason,
RTSPMessage *request, RTSPMessage *msg); RTSPMessage *request, RTSPMessage *msg);
RTSPResult rtsp_message_init_data (gint channel, 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_add_header (RTSPMessage *msg, RTSPHeaderField field, gchar *value);
RTSPResult rtsp_message_remove_header (RTSPMessage *msg, RTSPHeaderField field); RTSPResult rtsp_message_remove_header (RTSPMessage *msg, RTSPHeaderField field);
RTSPResult rtsp_message_get_header (RTSPMessage *msg, RTSPHeaderField field, gchar **value); 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_set_body (RTSPMessage *msg, guint8 *data, guint size);
RTSPResult rtsp_message_take_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_get_body (RTSPMessage *msg, guint8 **data, guint *size);
RTSPResult rtsp_message_dump (RTSPMessage *msg); RTSPResult rtsp_message_dump (RTSPMessage *msg);
G_END_DECLS G_END_DECLS

View file

@ -45,34 +45,34 @@ typedef struct
} RTSPRange; } RTSPRange;
typedef struct _RTSPTransport { typedef struct _RTSPTransport {
RTSPTransMode trans; RTSPTransMode trans;
RTSPProfile profile; RTSPProfile profile;
RTSPLowerTrans lower_transport; RTSPLowerTrans lower_transport;
gboolean multicast; gboolean multicast;
gchar *destination; gchar *destination;
gchar *source; gchar *source;
gint layers; gint layers;
gboolean mode_play; gboolean mode_play;
gboolean mode_record; gboolean mode_record;
gboolean append; gboolean append;
RTSPRange interleaved; RTSPRange interleaved;
/* mulitcast specific */ /* mulitcast specific */
gint ttl; gint ttl;
/* RTP specific */ /* RTP specific */
RTSPRange port; RTSPRange port;
RTSPRange client_port; RTSPRange client_port;
RTSPRange server_port; RTSPRange server_port;
gchar *ssrc; gchar *ssrc;
} RTSPTransport; } RTSPTransport;
RTSPResult rtsp_transport_new (RTSPTransport **transport); RTSPResult rtsp_transport_new (RTSPTransport **transport);
RTSPResult rtsp_transport_init (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); RTSPResult rtsp_transport_free (RTSPTransport *transport);

View file

@ -21,10 +21,10 @@
#include "rtspurl.h" #include "rtspurl.h"
#define RTSP_PROTO "rtsp://" #define RTSP_PROTO "rtsp://"
#define RTSP_PROTO_LEN 7 #define RTSP_PROTO_LEN 7
#define RTSPU_PROTO "rtspu://" #define RTSPU_PROTO "rtspu://"
#define RTSPU_PROTO_LEN 8 #define RTSPU_PROTO_LEN 8
/* format is rtsp[u]://[user:passwd@]host[:port]/abspath */ /* format is rtsp[u]://[user:passwd@]host[:port]/abspath */

View file

@ -26,7 +26,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define RTSP_DEFAULT_PORT 554 #define RTSP_DEFAULT_PORT 554
typedef struct _RTSPUrl { typedef struct _RTSPUrl {
RTSPProto protocol; RTSPProto protocol;
@ -38,8 +38,8 @@ typedef struct _RTSPUrl {
gchar *abspath; gchar *abspath;
} RTSPUrl; } RTSPUrl;
RTSPResult rtsp_url_parse (const gchar *urlstr, RTSPUrl **url); RTSPResult rtsp_url_parse (const gchar *urlstr, RTSPUrl **url);
void rtsp_url_free (RTSPUrl *url); void rtsp_url_free (RTSPUrl *url);
G_END_DECLS G_END_DECLS

View file

@ -22,51 +22,51 @@
#include "sdpmessage.h" #include "sdpmessage.h"
#define FREE_STRING(field) g_free ((field)); (field) = NULL; #define FREE_STRING(field) g_free ((field)); (field) = NULL;
#define FREE_ARRAY(field) \ #define FREE_ARRAY(field) \
G_STMT_START { \ G_STMT_START { \
if (field) \ if (field) \
g_array_free (field, TRUE); \ g_array_free (field, TRUE); \
field = NULL; \ field = NULL; \
} G_STMT_END } G_STMT_END
#define REPLACE_STRING(field,val) FREE_STRING(field);field=g_strdup (val); #define REPLACE_STRING(field,val) FREE_STRING(field);field=g_strdup (val);
#define INIT_ARRAY(field,type) \ #define INIT_ARRAY(field,type) \
G_STMT_START { \ G_STMT_START { \
if (field) \ if (field) \
g_array_set_size (field,0); \ g_array_set_size (field,0); \
else \ else \
field = g_array_new (FALSE, TRUE, sizeof(type)); \ field = g_array_new (FALSE, TRUE, sizeof(type)); \
} G_STMT_END } G_STMT_END
#define DEFINE_STRING_SETTER(field) \ #define DEFINE_STRING_SETTER(field) \
RTSPResult sdp_message_set_##field (SDPMessage *msg, gchar *val) { \ RTSPResult sdp_message_set_##field (SDPMessage *msg, gchar *val) { \
g_free (msg->field); \ g_free (msg->field); \
msg->field = g_strdup (val); \ msg->field = g_strdup (val); \
return RTSP_OK; \ return RTSP_OK; \
} }
#define DEFINE_STRING_GETTER(field) \ #define DEFINE_STRING_GETTER(field) \
char* sdp_message_get_##field (SDPMessage *msg) { \ char* sdp_message_get_##field (SDPMessage *msg) { \
return msg->field; \ return msg->field; \
} }
#define DEFINE_ARRAY_LEN(field) \ #define DEFINE_ARRAY_LEN(field) \
gint sdp_message_##field##_len (SDPMessage *msg) { \ gint sdp_message_##field##_len (SDPMessage *msg) { \
return ((msg)->field->len); \ return ((msg)->field->len); \
} }
#define DEFINE_ARRAY_GETTER(method,field,type) \ #define DEFINE_ARRAY_GETTER(method,field,type) \
type sdp_message_get_##method (SDPMessage *msg, gint i) { \ type sdp_message_get_##method (SDPMessage *msg, gint i) { \
return g_array_index ((msg)->field, type, i); \ return g_array_index ((msg)->field, type, i); \
} }
#define DEFINE_ARRAY_P_GETTER(method,field,type) \ #define DEFINE_ARRAY_P_GETTER(method,field,type) \
type * sdp_message_get_##method (SDPMessage *msg, gint i) { \ type * sdp_message_get_##method (SDPMessage *msg, gint i) { \
return &g_array_index ((msg)->field, type, i); \ return &g_array_index ((msg)->field, type, i); \
} }
#define DEFINE_ARRAY_ADDER(method,field,type,dup_method) \ #define DEFINE_ARRAY_ADDER(method,field,type,dup_method) \
RTSPResult sdp_message_add_##method (SDPMessage *msg, type val) { \ RTSPResult sdp_message_add_##method (SDPMessage *msg, type val) { \
type v = dup_method(val); \ type v = dup_method(val); \
g_array_append_val((msg)->field, v); \ g_array_append_val((msg)->field, v); \
return RTSP_OK; \ return RTSP_OK; \
} }

View file

@ -71,94 +71,94 @@ typedef struct {
} SDPAttribute; } SDPAttribute;
typedef struct { typedef struct {
gchar *media; gchar *media;
gint port; gint port;
gint num_ports; gint num_ports;
gchar *proto; gchar *proto;
GArray *fmts; GArray *fmts;
gchar *information; gchar *information;
GArray *connections; GArray *connections;
GArray *bandwidths; GArray *bandwidths;
SDPKey key; SDPKey key;
GArray *attributes; GArray *attributes;
} SDPMedia; } SDPMedia;
typedef struct { typedef struct {
gchar *version; gchar *version;
SDPOrigin origin; SDPOrigin origin;
gchar *session_name; gchar *session_name;
gchar *information; gchar *information;
gchar *uri; gchar *uri;
GArray *emails; GArray *emails;
GArray *phones; GArray *phones;
SDPConnection connection; SDPConnection connection;
GArray *bandwidths; GArray *bandwidths;
GArray *times; GArray *times;
GArray *zones; GArray *zones;
SDPKey key; SDPKey key;
GArray *attributes; GArray *attributes;
GArray *medias; GArray *medias;
} SDPMessage; } SDPMessage;
/* Session descriptions */ /* Session descriptions */
RTSPResult sdp_message_new (SDPMessage **msg); RTSPResult sdp_message_new (SDPMessage **msg);
RTSPResult sdp_message_init (SDPMessage *msg); RTSPResult sdp_message_init (SDPMessage *msg);
RTSPResult sdp_message_clean (SDPMessage *msg); RTSPResult sdp_message_clean (SDPMessage *msg);
RTSPResult sdp_message_free (SDPMessage *msg); RTSPResult sdp_message_free (SDPMessage *msg);
RTSPResult sdp_message_parse_buffer (guint8 *data, guint size, SDPMessage *msg); RTSPResult sdp_message_parse_buffer (guint8 *data, guint size, SDPMessage *msg);
RTSPResult sdp_message_set_version (SDPMessage *msg, gchar *version); RTSPResult sdp_message_set_version (SDPMessage *msg, gchar *version);
gchar* sdp_message_get_version (SDPMessage *msg); gchar* sdp_message_get_version (SDPMessage *msg);
RTSPResult sdp_message_set_origin (SDPMessage *msg, gchar *username, gchar *sess_id, RTSPResult sdp_message_set_origin (SDPMessage *msg, gchar *username, gchar *sess_id,
gchar *sess_version, gchar *nettype, gchar *sess_version, gchar *nettype,
gchar *addrtype, gchar *addr); gchar *addrtype, gchar *addr);
SDPOrigin* sdp_message_get_origin (SDPMessage *msg); SDPOrigin* sdp_message_get_origin (SDPMessage *msg);
RTSPResult sdp_message_set_session_name (SDPMessage *msg, gchar *session_name); RTSPResult sdp_message_set_session_name (SDPMessage *msg, gchar *session_name);
gchar* sdp_message_get_session_name (SDPMessage *msg); gchar* sdp_message_get_session_name (SDPMessage *msg);
RTSPResult sdp_message_set_information (SDPMessage *msg, gchar *information); RTSPResult sdp_message_set_information (SDPMessage *msg, gchar *information);
gchar* sdp_message_get_information (SDPMessage *msg); gchar* sdp_message_get_information (SDPMessage *msg);
RTSPResult sdp_message_set_uri (SDPMessage *msg, gchar *uri); RTSPResult sdp_message_set_uri (SDPMessage *msg, gchar *uri);
gchar* sdp_message_get_uri (SDPMessage *msg); gchar* sdp_message_get_uri (SDPMessage *msg);
gint sdp_message_emails_len (SDPMessage *msg); gint sdp_message_emails_len (SDPMessage *msg);
gchar* sdp_message_get_email (SDPMessage *msg, gint i); gchar* sdp_message_get_email (SDPMessage *msg, gint i);
RTSPResult sdp_message_add_email (SDPMessage *msg, gchar *email); RTSPResult sdp_message_add_email (SDPMessage *msg, gchar *email);
gint sdp_message_phones_len (SDPMessage *msg); gint sdp_message_phones_len (SDPMessage *msg);
gchar* sdp_message_get_phone (SDPMessage *msg, gint i); gchar* sdp_message_get_phone (SDPMessage *msg, gint i);
RTSPResult sdp_message_add_phone (SDPMessage *msg, gchar *phone); RTSPResult sdp_message_add_phone (SDPMessage *msg, gchar *phone);
RTSPResult sdp_message_set_connection (SDPMessage *msg, gchar *nettype, gchar *addrtype, RTSPResult sdp_message_set_connection (SDPMessage *msg, gchar *nettype, gchar *addrtype,
gchar *address, gint ttl, gint addr_number); gchar *address, gint ttl, gint addr_number);
SDPConnection* sdp_message_get_connection (SDPMessage *msg); SDPConnection* sdp_message_get_connection (SDPMessage *msg);
gint sdp_message_bandwidths_len (SDPMessage *msg); gint sdp_message_bandwidths_len (SDPMessage *msg);
SDPBandwidth* sdp_message_get_bandwidth (SDPMessage *msg, gint i); SDPBandwidth* sdp_message_get_bandwidth (SDPMessage *msg, gint i);
RTSPResult sdp_message_add_bandwidth (SDPMessage *msg, gchar *bwtype, gint bandwidth); RTSPResult sdp_message_add_bandwidth (SDPMessage *msg, gchar *bwtype, gint bandwidth);
gint sdp_message_times_len (SDPMessage *msg); gint sdp_message_times_len (SDPMessage *msg);
SDPTime* sdp_message_get_time (SDPMessage *msg, gint i); SDPTime* sdp_message_get_time (SDPMessage *msg, gint i);
RTSPResult sdp_message_add_time (SDPMessage *msg, gchar *time); RTSPResult sdp_message_add_time (SDPMessage *msg, gchar *time);
gint sdp_message_zones_len (SDPMessage *msg); gint sdp_message_zones_len (SDPMessage *msg);
SDPZone* sdp_message_get_zone (SDPMessage *msg, gint i); SDPZone* sdp_message_get_zone (SDPMessage *msg, gint i);
RTSPResult sdp_message_add_zone (SDPMessage *msg, gchar *time, gchar *typed_time); RTSPResult sdp_message_add_zone (SDPMessage *msg, gchar *time, gchar *typed_time);
RTSPResult sdp_message_set_key (SDPMessage *msg, gchar *type, gchar *data); RTSPResult sdp_message_set_key (SDPMessage *msg, gchar *type, gchar *data);
SDPKey* sdp_message_get_key (SDPMessage *msg); SDPKey* sdp_message_get_key (SDPMessage *msg);
gint sdp_message_attributes_len (SDPMessage *msg); gint sdp_message_attributes_len (SDPMessage *msg);
SDPAttribute* sdp_message_get_attribute (SDPMessage *msg, gint i); SDPAttribute* sdp_message_get_attribute (SDPMessage *msg, gint i);
gchar* sdp_message_get_attribute_val (SDPMessage *msg, gchar *key); gchar* sdp_message_get_attribute_val (SDPMessage *msg, gchar *key);
RTSPResult sdp_message_add_attribute (SDPMessage *msg, gchar *key, gchar *value); RTSPResult sdp_message_add_attribute (SDPMessage *msg, gchar *key, gchar *value);
gint sdp_message_medias_len (SDPMessage *msg); gint sdp_message_medias_len (SDPMessage *msg);
SDPMedia* sdp_message_get_media (SDPMessage *msg, gint i); SDPMedia* sdp_message_get_media (SDPMessage *msg, gint i);
RTSPResult sdp_message_add_media (SDPMessage *msg, SDPMedia *media); RTSPResult sdp_message_add_media (SDPMessage *msg, SDPMedia *media);
RTSPResult sdp_message_dump (SDPMessage *msg); RTSPResult sdp_message_dump (SDPMessage *msg);
/* Media descriptions */ /* Media descriptions */
RTSPResult sdp_media_new (SDPMedia **media); RTSPResult sdp_media_new (SDPMedia **media);
RTSPResult sdp_media_init (SDPMedia *media); RTSPResult sdp_media_init (SDPMedia *media);
RTSPResult sdp_media_clean (SDPMedia *media); RTSPResult sdp_media_clean (SDPMedia *media);
RTSPResult sdp_media_free (SDPMedia *media); RTSPResult sdp_media_free (SDPMedia *media);
gchar* sdp_media_get_attribute_val (SDPMedia *media, gchar *key); gchar* sdp_media_get_attribute_val (SDPMedia *media, gchar *key);
gchar* sdp_media_get_format (SDPMedia *media, gint i); gchar* sdp_media_get_format (SDPMedia *media, gint i);
G_END_DECLS G_END_DECLS

View file

@ -33,150 +33,150 @@ enum
}; };
static gint boxes_1b[][7] = { static gint boxes_1b[][7] = {
#define WIPE_B1_1 0 #define WIPE_B1_1 0
{BOX_VERTICAL, 0, 0, 0, 1, 1, 1}, {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} {BOX_HORIZONTAL, 0, 0, 0, 1, 1, 1}
}; };
static gint boxes_2b[][7 * 2] = { 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, 0, 0, 1, 1, 2, 0,
BOX_VERTICAL, 1, 0, 0, 2, 2, 1}, 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, 0, 1, 2, 1, 0,
BOX_HORIZONTAL, 0, 1, 0, 2, 2, 1}, BOX_HORIZONTAL, 0, 1, 0, 2, 2, 1},
}; };
static gint box_clock_1b[][1 * 10] = { 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}, {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}, {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}, {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}, {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] = { 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, 2, 0, 0, 1, 2, 1,
BOX_CLOCK, 1, 0, 0, 1, 2, 1, 0, 0, 2}, 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, 2, 2, 0, 0, 1, 1,
BOX_CLOCK, 2, 1, 0, 0, 1, 1, 2, 0, 2}, 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, 0, 2, 0, 1, 0, 1,
BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2}, 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, 0, 0, 0, 2, 1, 1,
BOX_CLOCK, 0, 1, 0, 2, 1, 1, 0, 2, 2}, 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, 0, 0, 2, 0, 0, 1, 2, 1,
BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 0, 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, 0, 1, 0, 0, 0, 0, 2, 1, 1,
BOX_CLOCK, 2, 1, 0, 2, 2, 0, 0, 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, 2, 0, 1,
BOX_CLOCK, 1, 0, 0, 1, 2, 0, 0, 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, 0, 1,
BOX_CLOCK, 2, 1, 0, 0, 1, 0, 2, 2, 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, 2, 2, 1,
BOX_CLOCK, 1, 2, 0, 1, 0, 0, 0, 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, 0, 1,
BOX_CLOCK, 0, 1, 0, 2, 1, 0, 0, 2, 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, 0, 0, 0, 1, 0, 0, 0, 2, 1,
BOX_CLOCK, 2, 0, 0, 1, 0, 0, 2, 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, 0, 0, 0, 1, 0, 2, 0, 1,
BOX_CLOCK, 0, 2, 0, 0, 1, 0, 2, 2, 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, 0, 2, 0, 1, 2, 0, 0, 0, 1,
BOX_CLOCK, 2, 2, 0, 1, 2, 0, 2, 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, 0, 0, 2, 1, 0, 0, 0, 1,
BOX_CLOCK, 2, 2, 0, 2, 1, 0, 0, 2, 1}, BOX_CLOCK, 2, 2, 0, 2, 1, 0, 0, 2, 1},
}; };
static gint box_clock_4b[][4 * 10] = { 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, 1, 0, 0, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2, 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, 1, 2, 2, 0, 1, 3,
BOX_CLOCK, 1, 1, 0, 0, 1, 3, 1, 0, 4}, 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, 1, 0, 3, 2, 1, 4,
BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, 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, 1, 2, 1, 0, 1, 2,
BOX_CLOCK, 1, 1, 0, 0, 1, 2, 1, 0, 3}, 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, 1, 0, 2, 2, 1, 3,
BOX_CLOCK, 1, 1, 0, 2, 1, 3, 1, 2, 4, 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, 1, 2, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 0, 2}, 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, 1, 0, 1, 2, 1, 2,
BOX_CLOCK, 1, 1, 0, 2, 1, 2, 1, 2, 3, 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, 1, 2, 3, 0, 1, 4,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1}, 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, 1, 0, 0, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2, 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, 1, 2, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 0, 2}, 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, 1, 0, 1, 2, 1, 2,
BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 1, 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, 1, 2, 1, 0, 1, 2,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 1}, 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, 1, 0, 0, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 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, 1, 2, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 0, 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, 1, 0, 0, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 2, 1, 1, 1, 2, 2, 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, 1, 0, 0, 0, 1, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 1, 1, 2, 2}, 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, 2, 1, 0, 1, 0, 1,
BOX_CLOCK, 1, 1, 0, 1, 0, 1, 0, 1, 2, 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, 2, 1, 0, 1, 2, 1,
BOX_CLOCK, 1, 1, 0, 1, 2, 1, 0, 1, 2}, 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, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 1, 0, 0, 0, 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, 2, 1, 1,
BOX_CLOCK, 1, 1, 0, 1, 2, 0, 0, 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, 0, 1,
BOX_CLOCK, 1, 1, 0, 2, 1, 0, 1, 2, 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, 0, 1,
BOX_CLOCK, 1, 1, 0, 0, 1, 0, 1, 2, 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, 2, 0, 0, 1, 1, 1,
BOX_CLOCK, 1, 0, 0, 1, 1, 1, 0, 0, 2, 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, 2, 2, 0, 1, 1, 1,
BOX_CLOCK, 1, 2, 0, 1, 1, 1, 0, 2, 2}, 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, 0, 0, 0, 1, 1, 1,
BOX_CLOCK, 0, 1, 0, 1, 1, 1, 0, 2, 2, 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, 2, 0, 0, 1, 1, 1,
BOX_CLOCK, 2, 1, 0, 1, 1, 1, 2, 2, 2}, 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, 0, 0, 1,
BOX_CLOCK, 1, 0, 0, 1, 1, 0, 2, 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, 2, 2, 1,
BOX_CLOCK, 1, 2, 0, 1, 1, 0, 0, 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, 0, 1,
BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 2, 1, BOX_CLOCK, 0, 1, 0, 1, 1, 0, 0, 2, 1,
BOX_CLOCK, 2, 1, 0, 1, 1, 0, 2, 0, 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] = { 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, 2, 2, 0, 4, 1, 1,
BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 0, 2, BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 0, 2,
BOX_CLOCK, 2, 1, 0, 2, 0, 2, 0, 1, 3, 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, 4, 3, 1, 2, 4, 2,
BOX_CLOCK, 2, 3, 0, 2, 4, 2, 0, 3, 3, BOX_CLOCK, 2, 3, 0, 2, 4, 2, 0, 3, 3,
BOX_CLOCK, 2, 3, 0, 0, 3, 3, 2, 2, 4}, 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, 2, 2, 0, 1, 0, 1,
BOX_CLOCK, 1, 2, 0, 1, 0, 1, 0, 2, 2, BOX_CLOCK, 1, 2, 0, 1, 0, 1, 0, 2, 2,
BOX_CLOCK, 1, 2, 0, 0, 2, 2, 1, 4, 3, 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, 3, 0, 1, 4, 2, 2,
BOX_CLOCK, 3, 2, 0, 4, 2, 2, 3, 4, 3, BOX_CLOCK, 3, 2, 0, 4, 2, 2, 3, 4, 3,
BOX_CLOCK, 3, 2, 0, 3, 4, 3, 2, 2, 4}, 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, 2, 0, 0, 4, 1, 1,
BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 2, 2, BOX_CLOCK, 2, 1, 0, 4, 1, 1, 2, 2, 2,
BOX_CLOCK, 2, 1, 0, 2, 0, 0, 0, 1, 1, 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, 4, 3, 1, 2, 2, 2,
BOX_CLOCK, 2, 3, 0, 2, 4, 0, 0, 3, 1, BOX_CLOCK, 2, 3, 0, 2, 4, 0, 0, 3, 1,
BOX_CLOCK, 2, 3, 0, 0, 3, 1, 2, 2, 2}, 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, 0, 2, 0, 1, 0, 1,
BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2, BOX_CLOCK, 1, 2, 0, 1, 0, 1, 2, 2, 2,
BOX_CLOCK, 1, 2, 0, 0, 2, 0, 1, 4, 1, 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] = { static gint triangles_2t[][2 * 9] = {
/* 3 -> 6 */ /* 3 -> 6 */
#define WIPE_T2_3 0 #define WIPE_T2_3 0
{0, 0, 0, 0, 1, 1, 1, 1, 1, {0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 0, 1, 0, 0, 0, 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, {0, 0, 1, 1, 0, 0, 0, 1, 1,
1, 0, 0, 0, 1, 1, 1, 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, {0, 0, 1, 0, 1, 1, 1, 1, 0,
1, 0, 1, 0, 0, 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, {0, 0, 1, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 1, 1}, 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, {0, 0, 0, 1, 0, 1, 0, 1, 1,
1, 0, 1, 0, 1, 1, 1, 1, 2}, 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, 1, 0, 0, 1, 1, 1,
0, 0, 1, 0, 1, 2, 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, {0, 0, 1, 1, 0, 0, 0, 1, 0,
1, 0, 0, 0, 1, 0, 1, 1, 1}, 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, 1, 0, 1, 1, 1, 0,
0, 0, 0, 0, 1, 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, {0, 0, 0, 2, 0, 0, 2, 2, 1,
2, 2, 0, 0, 2, 0, 0, 0, 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, {0, 2, 0, 0, 0, 0, 2, 0, 1,
2, 0, 0, 2, 2, 0, 0, 2, 1}, 2, 0, 0, 2, 2, 0, 0, 2, 1},
}; };
static gint triangles_3t[][3 * 9] = { static gint triangles_3t[][3 * 9] = {
/* 23 -> 26 */ /* 23 -> 26 */
#define WIPE_T3_23 0 #define WIPE_T3_23 0
{0, 0, 1, 1, 0, 0, 0, 2, 1, {0, 0, 1, 1, 0, 0, 0, 2, 1,
1, 0, 0, 0, 2, 1, 2, 2, 1, 1, 0, 0, 0, 2, 1, 2, 2, 1,
1, 0, 0, 2, 0, 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, 0, 1, 2, 1, 0,
0, 0, 1, 2, 1, 0, 0, 2, 1, 0, 0, 1, 2, 1, 0, 0, 2, 1,
2, 1, 0, 0, 2, 1, 2, 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, 0, 2, 1, 1, 2, 0,
0, 0, 1, 2, 0, 1, 1, 2, 0, 0, 0, 1, 2, 0, 1, 1, 2, 0,
2, 0, 1, 1, 2, 0, 2, 2, 1}, 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, {0, 0, 1, 2, 0, 1, 0, 1, 0,
2, 0, 1, 0, 1, 0, 2, 2, 1, 2, 0, 1, 0, 1, 0, 2, 2, 1,
0, 1, 0, 0, 2, 1, 2, 2, 1}, 0, 1, 0, 0, 2, 1, 2, 2, 1},
}; };
static gint triangles_4t[][4 * 9] = { 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, 1, 0, 0, 1, 2, 1,
0, 0, 1, 0, 2, 2, 1, 2, 1, 0, 0, 1, 0, 2, 2, 1, 2, 1,
1, 0, 0, 2, 0, 1, 1, 2, 1, 1, 0, 0, 2, 0, 1, 1, 2, 1,
2, 0, 1, 1, 2, 1, 2, 2, 2}, 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, {0, 0, 2, 2, 0, 1, 0, 1, 1,
2, 0, 1, 0, 1, 1, 2, 1, 0, 2, 0, 1, 0, 1, 1, 2, 1, 0,
0, 1, 1, 2, 1, 0, 2, 2, 1, 0, 1, 1, 2, 1, 0, 2, 2, 1,
0, 1, 1, 0, 2, 2, 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, {0, 0, 2, 1, 0, 1, 0, 2, 1,
1, 0, 1, 0, 2, 1, 1, 2, 0, 1, 0, 1, 0, 2, 1, 1, 2, 0,
1, 0, 1, 1, 2, 0, 2, 2, 1, 1, 0, 1, 1, 2, 0, 2, 2, 1,
1, 0, 1, 2, 0, 2, 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, 2, 0, 2, 2, 1, 1,
0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 0, 1, 0, 1, 0, 2, 1, 1,
0, 1, 0, 2, 1, 1, 0, 2, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1,
2, 1, 1, 0, 2, 1, 2, 2, 2}, 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, 1, 0, 1, 1, 2, 0,
0, 0, 0, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0,
1, 0, 1, 2, 0, 0, 1, 2, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0,
2, 0, 0, 1, 2, 0, 2, 2, 1}, 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, {0, 0, 1, 2, 0, 0, 0, 1, 0,
2, 0, 0, 0, 1, 0, 2, 1, 1, 2, 0, 0, 0, 1, 0, 2, 1, 1,
0, 1, 0, 2, 1, 1, 2, 2, 0, 0, 1, 0, 2, 1, 1, 2, 2, 0,
0, 1, 0, 0, 2, 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, {0, 0, 1, 1, 0, 0, 0, 2, 0,
1, 0, 0, 0, 2, 0, 1, 2, 1, 1, 0, 0, 0, 2, 0, 1, 2, 1,
1, 0, 0, 1, 2, 1, 2, 2, 0, 1, 0, 0, 1, 2, 1, 2, 2, 0,
1, 0, 0, 2, 0, 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, 2, 0, 1, 2, 1, 0,
0, 0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 0, 0, 1, 1, 2, 1, 0,
0, 1, 1, 2, 1, 0, 0, 2, 0, 0, 1, 1, 2, 1, 0, 0, 2, 0,
2, 1, 0, 0, 2, 0, 2, 2, 1}, 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, 2, 0, 1, 1, 1, 0,
0, 0, 1, 1, 1, 0, 0, 2, 1, 0, 0, 1, 1, 1, 0, 0, 2, 1,
1, 1, 0, 0, 2, 1, 2, 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] = { static gint triangles_8t[][8 * 9] = {
/* 7 */ /* 7 */
#define WIPE_T8_7 0 #define WIPE_T8_7 0
{0, 0, 0, 1, 0, 1, 1, 1, 1, {0, 0, 0, 1, 0, 1, 1, 1, 1,
1, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1, 1,
2, 0, 0, 1, 1, 1, 2, 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, 1, 1, 1, 0, 2, 0, 1, 2, 1,
0, 1, 1, 1, 1, 1, 0, 2, 0, 0, 1, 1, 1, 1, 1, 0, 2, 0,
0, 0, 0, 0, 1, 1, 1, 1, 1}, 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, {0, 0, 1, 1, 0, 0, 1, 1, 1,
1, 0, 0, 2, 0, 1, 1, 1, 1, 1, 0, 0, 2, 0, 1, 1, 1, 1,
2, 0, 1, 1, 1, 1, 2, 1, 2, 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, 1, 1, 1, 0, 2, 1, 1, 2, 0,
0, 1, 2, 1, 1, 1, 0, 2, 1, 0, 1, 2, 1, 1, 1, 0, 2, 1,
0, 0, 1, 0, 1, 2, 1, 1, 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, {0, 0, 1, 1, 0, 2, 1, 1, 1,
1, 0, 2, 2, 0, 1, 1, 1, 1, 1, 0, 2, 2, 0, 1, 1, 1, 1,
2, 0, 1, 1, 1, 1, 2, 1, 0, 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, 1, 1, 1, 0, 2, 1, 1, 2, 2,
0, 1, 0, 1, 1, 1, 0, 2, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1,
0, 0, 1, 0, 1, 0, 1, 1, 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, {0, 0, 0, 1, 0, 1, 1, 1, 0,
1, 0, 1, 2, 0, 0, 1, 1, 0, 1, 0, 1, 2, 0, 0, 1, 1, 0,
2, 0, 0, 1, 1, 0, 2, 1, 1, 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, 1, 1, 0, 0, 2, 0, 1, 2, 1,
0, 1, 1, 1, 1, 0, 0, 2, 0, 0, 1, 1, 1, 1, 0, 0, 2, 0,
0, 0, 0, 0, 1, 1, 1, 1, 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, {0, 0, 1, 1, 0, 0, 0, 1, 0,
1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1,
1, 0, 0, 2, 0, 1, 2, 1, 0, 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] = { static gint triangles_16t[][16 * 9] = {
/* 8 */ /* 8 */
#define WIPE_T16_8 0 #define WIPE_T16_8 0
{0, 0, 1, 2, 0, 1, 1, 1, 0, {0, 0, 1, 2, 0, 1, 1, 1, 0,
2, 0, 1, 1, 1, 0, 2, 2, 1, 2, 0, 1, 1, 1, 0, 2, 2, 1,
1, 1, 0, 0, 2, 1, 2, 2, 1, 1, 1, 0, 0, 2, 1, 2, 2, 1,
@ -406,148 +406,148 @@ struct _GstWipeConfig
}; };
static GstWipeConfig wipe_config[] = { static GstWipeConfig wipe_config[] = {
#define WIPE_CONFIG_1 0 #define WIPE_CONFIG_1 0
{boxes_1b[WIPE_B1_1], 1, 0, 0, 0}, /* 1 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {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 */ {box_clock_8b[WIPE_B8_264], 8, 2, 2, 1}, /* 264 */
}; };

View file

@ -27,37 +27,37 @@
typedef struct _GstMask GstMask; typedef struct _GstMask GstMask;
typedef struct _GstMaskDefinition GstMaskDefinition; typedef struct _GstMaskDefinition GstMaskDefinition;
typedef void (*GstMaskDrawFunc) (GstMask *mask); typedef void (*GstMaskDrawFunc) (GstMask *mask);
typedef void (*GstMaskDestroyFunc) (GstMask *mask); typedef void (*GstMaskDestroyFunc) (GstMask *mask);
struct _GstMaskDefinition { struct _GstMaskDefinition {
gint type; gint type;
gchar *short_name; gchar *short_name;
gchar *long_name; gchar *long_name;
GstMaskDrawFunc draw_func; GstMaskDrawFunc draw_func;
GstMaskDestroyFunc destroy_func; GstMaskDestroyFunc destroy_func;
gpointer user_data; gpointer user_data;
}; };
struct _GstMask { struct _GstMask {
gint type; gint type;
guint32 *data; guint32 *data;
gpointer user_data; gpointer user_data;
gint width; gint width;
gint height; gint height;
gint bpp; gint bpp;
GstMaskDestroyFunc destroy_func; GstMaskDestroyFunc destroy_func;
}; };
void _gst_mask_init (void); void _gst_mask_init (void);
void _gst_mask_register (GstMaskDefinition *definition); 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); const GList* gst_mask_get_definitions (void);
GstMask* gst_mask_factory_new (gint type, gint bpp, gint width, gint height); GstMask* gst_mask_factory_new (gint type, gint bpp, gint width, gint height);
void gst_mask_destroy (GstMask *mask); void gst_mask_destroy (GstMask *mask);
#endif /* __GST_MASK_H__ */ #endif /* __GST_MASK_H__ */

View file

@ -41,26 +41,26 @@ typedef struct _GstSMPTE GstSMPTE;
typedef struct _GstSMPTEClass GstSMPTEClass; typedef struct _GstSMPTEClass GstSMPTEClass;
struct _GstSMPTE { struct _GstSMPTE {
GstElement element; GstElement element;
gint format; gint format;
gint width; gint width;
gint height; gint height;
gdouble fps; gdouble fps;
gint duration; gint duration;
gint position; gint position;
GstPad *srcpad, GstPad *srcpad,
*sinkpad1, *sinkpad1,
*sinkpad2; *sinkpad2;
GstCollectPads *collect; GstCollectPads *collect;
gint type; gint type;
gint border; gint border;
gint depth; gint depth;
GstMask *mask; GstMask *mask;
}; };
struct _GstSMPTEClass { struct _GstSMPTEClass {

View file

@ -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) \ #define STEP_3D_LINE(dxabs,dyabs,dzabs,sdx,sdy,sdz,xr,yr,zr,px,py,pz) \
G_STMT_START { \ G_STMT_START { \
if (dxabs >= dyabs && dxabs >= dzabs) { \ if (dxabs >= dyabs && dxabs >= dzabs) { \
yr += dyabs; \ yr += dyabs; \
zr += dzabs; \ zr += dzabs; \
if (yr >= dxabs) { \ if (yr >= dxabs) { \
py += sdy; \ py += sdy; \
yr -= dxabs; \ yr -= dxabs; \
} \ } \
if (zr >= dzabs) { \ if (zr >= dzabs) { \
pz += sdz; \ pz += sdz; \
zr -= dxabs; \ zr -= dxabs; \
} \ } \
px += sdx; \ px += sdx; \
} else if (dyabs >= dxabs && dyabs >= dzabs) { \ } else if (dyabs >= dxabs && dyabs >= dzabs) { \
xr += dxabs; \ xr += dxabs; \
zr += dzabs; \ zr += dzabs; \
if (xr >= dyabs) { \ if (xr >= dyabs) { \
px += sdx; \ px += sdx; \
xr -= dyabs; \ xr -= dyabs; \
} \ } \
if (zr >= dzabs) { \ if (zr >= dzabs) { \
pz += sdz; \ pz += sdz; \
zr -= dyabs; \ zr -= dyabs; \
} \ } \
py += sdy; \ py += sdy; \
} else { \ } else { \
yr += dyabs; \ yr += dyabs; \
xr += dxabs; \ xr += dxabs; \
if (yr >= dyabs) { \ if (yr >= dyabs) { \
py += sdy; \ py += sdy; \
yr -= dzabs; \ yr -= dzabs; \
} \ } \
if (xr >= dyabs) { \ if (xr >= dyabs) { \
px += sdx; \ px += sdx; \
xr -= dzabs; \ xr -= dzabs; \
} \ } \
pz += sdz; \ pz += sdz; \
} \ } \
} G_STMT_END } G_STMT_END
#define SWAP_INT(a,b) \ #define SWAP_INT(a,b) \
G_STMT_START { \ G_STMT_START { \
gint tmp; \ gint tmp; \
tmp = (a); \ tmp = (a); \
(a) = (b); \ (a) = (b); \
(b) = (tmp); \ (b) = (tmp); \
} G_STMT_END } G_STMT_END
#define SIGN(a) ((a) < 0 ? -1 : 1) #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)\ #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 { \ G_STMT_START { \
gint dx, dy, dz; \ gint dx, dy, dz; \
dx = x1 - x0; \ dx = x1 - x0; \
dy = y1 - y0; \ dy = y1 - y0; \
dz = z1 - z0; \ dz = z1 - z0; \
dxabs = abs (dx); \ dxabs = abs (dx); \
dyabs = abs (dy); \ dyabs = abs (dy); \
dzabs = abs (dz); \ dzabs = abs (dz); \
sdx = SIGN (dx); \ sdx = SIGN (dx); \
sdy = SIGN (dy); \ sdy = SIGN (dy); \
sdz = SIGN (dz); \ sdz = SIGN (dz); \
xr = dxabs >> 1; \ xr = dxabs >> 1; \
yr = dyabs >> 1; \ yr = dyabs >> 1; \
zr = dzabs >> 1; \ zr = dzabs >> 1; \
px = x0; \ px = x0; \
py = y0; \ py = y0; \
pz = z0; \ pz = z0; \
} G_STMT_END } G_STMT_END
void void

View file

@ -22,26 +22,26 @@
#include <glib.h> #include <glib.h>
void gst_smpte_paint_vbox (guint32 *dest, gint stride, void gst_smpte_paint_vbox (guint32 *dest, gint stride,
gint x0, gint y0, gint c0, gint x0, gint y0, gint c0,
gint x1, gint y1, gint c1); gint x1, gint y1, gint c1);
void gst_smpte_paint_hbox (guint32 *dest, gint stride, void gst_smpte_paint_hbox (guint32 *dest, gint stride,
gint x0, gint y0, gint c0, gint x0, gint y0, gint c0,
gint x1, gint y1, gint c1); gint x1, gint y1, gint c1);
void gst_smpte_paint_triangle_linear (guint32 *dest, gint stride, void gst_smpte_paint_triangle_linear (guint32 *dest, gint stride,
gint x0, gint y0, gint c0, gint x0, gint y0, gint c0,
gint x1, gint y1, gint c1, gint x1, gint y1, gint c1,
gint x2, gint y2, gint c2); gint x2, gint y2, gint c2);
void gst_smpte_paint_triangle_clock (guint32 *dest, gint stride, void gst_smpte_paint_triangle_clock (guint32 *dest, gint stride,
gint x0, gint y0, gint c0, gint x0, gint y0, gint c0,
gint x1, gint y1, gint c1, gint x1, gint y1, gint c1,
gint x2, gint y2, gint c2); gint x2, gint y2, gint c2);
void gst_smpte_paint_box_clock (guint32 *dest, gint stride, void gst_smpte_paint_box_clock (guint32 *dest, gint stride,
gint x0, gint y0, gint c0, gint x0, gint y0, gint c0,
gint x1, gint y1, gint c1, gint x1, gint y1, gint c1,
gint x2, gint y2, gint c2); gint x2, gint y2, gint c2);
#endif /* __GST_SMPTE_PAINT_H__ */ #endif /* __GST_SMPTE_PAINT_H__ */

View file

@ -40,11 +40,11 @@ G_BEGIN_DECLS
#include <arpa/inet.h> #include <arpa/inet.h>
#include "gstudp.h" #include "gstudp.h"
#define GST_TYPE_DYNUDPSINK (gst_dynudpsink_get_type()) #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(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_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(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_IS_DYNUDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DYNUDPSINK))
typedef struct _GstDynUDPSink GstDynUDPSink; typedef struct _GstDynUDPSink GstDynUDPSink;
typedef struct _GstDynUDPSinkClass GstDynUDPSinkClass; typedef struct _GstDynUDPSinkClass GstDynUDPSinkClass;
@ -69,7 +69,7 @@ struct _GstDynUDPSinkClass {
GType gst_dynudpsink_get_type(void); 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 G_END_DECLS

View file

@ -40,11 +40,11 @@ G_BEGIN_DECLS
#include <arpa/inet.h> #include <arpa/inet.h>
#include "gstudp.h" #include "gstudp.h"
#define GST_TYPE_MULTIUDPSINK (gst_multiudpsink_get_type()) #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(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_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(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_IS_MULTIUDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIUDPSINK))
typedef struct _GstMultiUDPSink GstMultiUDPSink; typedef struct _GstMultiUDPSink GstMultiUDPSink;
typedef struct _GstMultiUDPSinkClass GstMultiUDPSinkClass; typedef struct _GstMultiUDPSinkClass GstMultiUDPSinkClass;
@ -66,8 +66,8 @@ struct _GstMultiUDPSink {
int sock; int sock;
GMutex *client_lock; GMutex *client_lock;
GList *clients; GList *clients;
}; };
struct _GstMultiUDPSinkClass { struct _GstMultiUDPSinkClass {
@ -80,16 +80,16 @@ struct _GstMultiUDPSinkClass {
GValueArray* (*get_stats) (GstMultiUDPSink *sink, const gchar *host, gint port); GValueArray* (*get_stats) (GstMultiUDPSink *sink, const gchar *host, gint port);
/* signals */ /* signals */
void (*client_added) (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); void (*client_removed) (GstElement *element, const gchar *host, gint port);
}; };
GType gst_multiudpsink_get_type(void); GType gst_multiudpsink_get_type(void);
void gst_multiudpsink_add (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_remove (GstMultiUDPSink *sink, const gchar *host, gint port);
void gst_multiudpsink_clear (GstMultiUDPSink *sink); void gst_multiudpsink_clear (GstMultiUDPSink *sink);
GValueArray* gst_multiudpsink_get_stats (GstMultiUDPSink *sink, const gchar *host, gint port); GValueArray* gst_multiudpsink_get_stats (GstMultiUDPSink *sink, const gchar *host, gint port);
G_END_DECLS G_END_DECLS

View file

@ -22,8 +22,8 @@
#endif #endif
#include "gstudpsink.h" #include "gstudpsink.h"
#define UDP_DEFAULT_HOST "localhost" #define UDP_DEFAULT_HOST "localhost"
#define UDP_DEFAULT_PORT 4951 #define UDP_DEFAULT_PORT 4951
/* elementfactory information */ /* elementfactory information */
static GstElementDetails gst_udpsink_details = static GstElementDetails gst_udpsink_details =

View file

@ -41,11 +41,11 @@ G_BEGIN_DECLS
#include <arpa/inet.h> #include <arpa/inet.h>
#include "gstudp.h" #include "gstudp.h"
#define GST_TYPE_UDPSINK (gst_udpsink_get_type()) #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(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_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(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_IS_UDPSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_UDPSINK))
typedef struct _GstUDPSink GstUDPSink; typedef struct _GstUDPSink GstUDPSink;
typedef struct _GstUDPSinkClass GstUDPSinkClass; typedef struct _GstUDPSinkClass GstUDPSinkClass;

View file

@ -42,14 +42,14 @@ GST_DEBUG_CATEGORY (udpsrc_debug);
#define WRITE_SOCKET(src) src->control_sock[1] #define WRITE_SOCKET(src) src->control_sock[1]
#define READ_SOCKET(src) src->control_sock[0] #define READ_SOCKET(src) src->control_sock[0]
#define SEND_COMMAND(src, command) \ #define SEND_COMMAND(src, command) \
G_STMT_START { \ G_STMT_START { \
unsigned char c; c = command; \ unsigned char c; c = command; \
write (WRITE_SOCKET(src), &c, 1); \ write (WRITE_SOCKET(src), &c, 1); \
} G_STMT_END } G_STMT_END
#define READ_COMMAND(src, command, res) \ #define READ_COMMAND(src, command, res) \
G_STMT_START { \ G_STMT_START { \
res = read(READ_SOCKET(src), &command, 1); \ res = read(READ_SOCKET(src), &command, 1); \
} G_STMT_END } G_STMT_END
@ -64,10 +64,10 @@ GST_ELEMENT_DETAILS ("UDP packet receiver",
"Receive data over the network via UDP", "Receive data over the network via UDP",
"Wim Taymans <wim@fluendo.com>"); "Wim Taymans <wim@fluendo.com>");
#define UDP_DEFAULT_PORT 4951 #define UDP_DEFAULT_PORT 4951
#define UDP_DEFAULT_MULTICAST_GROUP "0.0.0.0" #define UDP_DEFAULT_MULTICAST_GROUP "0.0.0.0"
#define UDP_DEFAULT_URI "udp://0.0.0.0:4951" #define UDP_DEFAULT_URI "udp://0.0.0.0:4951"
#define UDP_DEFAULT_CAPS NULL #define UDP_DEFAULT_CAPS NULL
enum enum
{ {

View file

@ -31,13 +31,13 @@ GST_DEBUG_CATEGORY_STATIC (gst_videomixer_debug);
#define GST_TYPE_VIDEO_MIXER_PAD (gst_videomixer_pad_get_type()) #define GST_TYPE_VIDEO_MIXER_PAD (gst_videomixer_pad_get_type())
#define GST_VIDEO_MIXER_PAD(obj) \ #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) \ #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) \ #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) \ #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 _GstVideoMixerPad GstVideoMixerPad;
typedef struct _GstVideoMixerPadClass GstVideoMixerPadClass; typedef struct _GstVideoMixerPadClass GstVideoMixerPadClass;
@ -45,13 +45,13 @@ typedef struct _GstVideoMixerCollect GstVideoMixerCollect;
#define GST_TYPE_VIDEO_MIXER (gst_videomixer_get_type()) #define GST_TYPE_VIDEO_MIXER (gst_videomixer_get_type())
#define GST_VIDEO_MIXER(obj) \ #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) \ #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) \ #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) \ #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); static GType gst_videomixer_get_type (void);
@ -604,139 +604,139 @@ gst_videomixer_request_new_pad (GstElement * element,
return GST_PAD (mixpad); return GST_PAD (mixpad);
} }
#define BLEND_NORMAL(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_NORMAL(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \
U = ((U1*(255-alpha))+(U2*alpha))>>8; \ U = ((U1*(255-alpha))+(U2*alpha))>>8; \
V = ((V1*(255-alpha))+(V2*alpha))>>8; V = ((V1*(255-alpha))+(V2*alpha))>>8;
#define BLEND_ADD(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_ADD(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = Y1+((Y2*alpha)>>8); \ Y = Y1+((Y2*alpha)>>8); \
U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \ U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \
V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \ V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \
if (Y>255) { \ if (Y>255) { \
gint mult = MAX (0, 288-Y); \ gint mult = MAX (0, 288-Y); \
U = ((U*mult) + (127*(32-mult)))>>5; \ U = ((U*mult) + (127*(32-mult)))>>5; \
V = ((V*mult) + (127*(32-mult)))>>5; \ V = ((V*mult) + (127*(32-mult)))>>5; \
Y = 255; \ Y = 255; \
} \ } \
U = MIN (U,255); \ U = MIN (U,255); \
V = MIN (V,255); V = MIN (V,255);
#define BLEND_SUBTRACT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_SUBTRACT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = Y1-((Y2*alpha)>>8); \ Y = Y1-((Y2*alpha)>>8); \
U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \ U = U1+(((127*(255-alpha)+(U2*alpha)))>>8)-127; \
V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \ V = V1+(((127*(255-alpha)+(V2*alpha)))>>8)-127; \
if (Y<0) { \ if (Y<0) { \
gint mult = MIN (32, -Y); \ gint mult = MIN (32, -Y); \
U = ((U*(32-mult)) + (127*mult))>>5; \ U = ((U*(32-mult)) + (127*mult))>>5; \
V = ((V*(32-mult)) + (127*mult))>>5; \ V = ((V*(32-mult)) + (127*mult))>>5; \
Y = 0; \ Y = 0; \
} }
#define BLEND_DARKEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_DARKEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
if (Y1 < Y2) { \ if (Y1 < Y2) { \
Y = Y1; U = U1; V = V1; \ Y = Y1; U = U1; V = V1; \
} \ } \
else { \ else { \
Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \
U = ((U1*(255-alpha))+(U2*alpha))>>8; \ U = ((U1*(255-alpha))+(U2*alpha))>>8; \
V = ((V1*(255-alpha))+(V2*alpha))>>8; \ V = ((V1*(255-alpha))+(V2*alpha))>>8; \
} }
#define BLEND_LIGHTEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_LIGHTEN(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
if (Y1 > Y2) { \ if (Y1 > Y2) { \
Y = Y1; U = U1; V = V1; \ Y = Y1; U = U1; V = V1; \
} \ } \
else { \ else { \
Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \ Y = ((Y1*(255-alpha))+(Y2*alpha))>>8; \
U = ((U1*(255-alpha))+(U2*alpha))>>8; \ U = ((U1*(255-alpha))+(U2*alpha))>>8; \
V = ((V1*(255-alpha))+(V2*alpha))>>8; \ V = ((V1*(255-alpha))+(V2*alpha))>>8; \
} }
#define BLEND_MULTIPLY(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_MULTIPLY(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = (Y1*(256*(255-alpha) +(Y2*alpha)))>>16; \ Y = (Y1*(256*(255-alpha) +(Y2*alpha)))>>16; \
U = ((U1*(255-alpha)*256)+(alpha*(U1*Y2+128*(256-Y2))))>>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; 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) \ #define BLEND_DIFFERENCE(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = ABS((gint)Y1-(gint)Y2)+127; \ Y = ABS((gint)Y1-(gint)Y2)+127; \
U = ABS((gint)U1-(gint)U2)+127; \ U = ABS((gint)U1-(gint)U2)+127; \
V = ABS((gint)V1-(gint)V2)+127; \ V = ABS((gint)V1-(gint)V2)+127; \
Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \
U = ((U*alpha)+(U1*(255-alpha)))>>8; \ U = ((U*alpha)+(U1*(255-alpha)))>>8; \
V = ((V*alpha)+(V1*(255-alpha)))>>8; \ V = ((V*alpha)+(V1*(255-alpha)))>>8; \
if (Y>255) { \ if (Y>255) { \
gint mult = MAX (0, 288-Y); \ gint mult = MAX (0, 288-Y); \
U = ((U*mult) + (127*(32-mult)))>>5; \ U = ((U*mult) + (127*(32-mult)))>>5; \
V = ((V*mult) + (127*(32-mult)))>>5; \ V = ((V*mult) + (127*(32-mult)))>>5; \
Y = 255; \ Y = 255; \
} else if (Y<0) { \ } else if (Y<0) { \
gint mult = MIN (32, -Y); \ gint mult = MIN (32, -Y); \
U = ((U*(32-mult)) + (127*mult))>>5; \ U = ((U*(32-mult)) + (127*mult))>>5; \
V = ((V*(32-mult)) + (127*mult))>>5; \ V = ((V*(32-mult)) + (127*mult))>>5; \
Y = 0; \ Y = 0; \
} \ } \
U = CLAMP(U, 0, 255); \ U = CLAMP(U, 0, 255); \
V = CLAMP(V, 0, 255); V = CLAMP(V, 0, 255);
#define BLEND_EXCLUSION(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_EXCLUSION(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = ((gint)(Y1^0xff)*Y2+(gint)(Y2^0xff)*Y1)>>8; \ Y = ((gint)(Y1^0xff)*Y2+(gint)(Y2^0xff)*Y1)>>8; \
U = ((gint)(U1^0xff)*Y2+(gint)(Y2^0xff)*U1)>>8; \ U = ((gint)(U1^0xff)*Y2+(gint)(Y2^0xff)*U1)>>8; \
V = ((gint)(V1^0xff)*Y2+(gint)(Y2^0xff)*V1)>>8; \ V = ((gint)(V1^0xff)*Y2+(gint)(Y2^0xff)*V1)>>8; \
Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \
U = ((U*alpha)+(U1*(255-alpha)))>>8; \ U = ((U*alpha)+(U1*(255-alpha)))>>8; \
V = ((V*alpha)+(V1*(255-alpha)))>>8; \ V = ((V*alpha)+(V1*(255-alpha)))>>8; \
if (Y>255) { \ if (Y>255) { \
gint mult = MAX (0, 288-Y); \ gint mult = MAX (0, 288-Y); \
U = ((U*mult) + (127*(32-mult)))>>5; \ U = ((U*mult) + (127*(32-mult)))>>5; \
V = ((V*mult) + (127*(32-mult)))>>5; \ V = ((V*mult) + (127*(32-mult)))>>5; \
Y = 255; \ Y = 255; \
} else if (Y<0) { \ } else if (Y<0) { \
gint mult = MIN (32, -Y); \ gint mult = MIN (32, -Y); \
U = ((U*(32-mult)) + (127*mult))>>5; \ U = ((U*(32-mult)) + (127*mult))>>5; \
V = ((V*(32-mult)) + (127*mult))>>5; \ V = ((V*(32-mult)) + (127*mult))>>5; \
Y = 0; \ Y = 0; \
} \ } \
U = CLAMP(U, 0, 255); \ U = CLAMP(U, 0, 255); \
V = CLAMP(V, 0, 255); V = CLAMP(V, 0, 255);
#define BLEND_SOFTLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_SOFTLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = (gint)Y1+(gint)Y2 - 127; \ Y = (gint)Y1+(gint)Y2 - 127; \
U = (gint)U1+(gint)U2 - 127; \ U = (gint)U1+(gint)U2 - 127; \
V = (gint)V1+(gint)V2 - 127; \ V = (gint)V1+(gint)V2 - 127; \
Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \
U = ((U*alpha)+(U1*(255-alpha)))>>8; \ U = ((U*alpha)+(U1*(255-alpha)))>>8; \
V = ((V*alpha)+(V1*(255-alpha)))>>8; \ V = ((V*alpha)+(V1*(255-alpha)))>>8; \
if (Y>255) { \ if (Y>255) { \
gint mult = MAX (0, 288-Y); \ gint mult = MAX (0, 288-Y); \
U = ((U*mult) + (127*(32-mult)))>>5; \ U = ((U*mult) + (127*(32-mult)))>>5; \
V = ((V*mult) + (127*(32-mult)))>>5; \ V = ((V*mult) + (127*(32-mult)))>>5; \
Y = 255; \ Y = 255; \
} else if (Y<0) { \ } else if (Y<0) { \
gint mult = MIN (32, -Y); \ gint mult = MIN (32, -Y); \
U = ((U*(32-mult)) + (127*mult))>>5; \ U = ((U*(32-mult)) + (127*mult))>>5; \
V = ((V*(32-mult)) + (127*mult))>>5; \ V = ((V*(32-mult)) + (127*mult))>>5; \
Y = 0; \ Y = 0; \
} \ } \
#define BLEND_HARDLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \ #define BLEND_HARDLIGHT(Y1,U1,V1,Y2,U2,V2,alpha,Y,U,V) \
Y = (gint)Y1+(gint)Y2*2 - 255; \ Y = (gint)Y1+(gint)Y2*2 - 255; \
U = (gint)U1+(gint)U2 - 127; \ U = (gint)U1+(gint)U2 - 127; \
V = (gint)V1+(gint)V2 - 127; \ V = (gint)V1+(gint)V2 - 127; \
Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \ Y = ((Y*alpha)+(Y1*(255-alpha)))>>8; \
U = ((U*alpha)+(U1*(255-alpha)))>>8; \ U = ((U*alpha)+(U1*(255-alpha)))>>8; \
V = ((V*alpha)+(V1*(255-alpha)))>>8; \ V = ((V*alpha)+(V1*(255-alpha)))>>8; \
if (Y>255) { \ if (Y>255) { \
gint mult = MAX (0, 288-Y); \ gint mult = MAX (0, 288-Y); \
U = ((U*mult) + (127*(32-mult)))>>5; \ U = ((U*mult) + (127*(32-mult)))>>5; \
V = ((V*mult) + (127*(32-mult)))>>5; \ V = ((V*mult) + (127*(32-mult)))>>5; \
Y = 255; \ Y = 255; \
} else if (Y<0) { \ } else if (Y<0) { \
gint mult = MIN (32, -Y); \ gint mult = MIN (32, -Y); \
U = ((U*(32-mult)) + (127*mult))>>5; \ U = ((U*(32-mult)) + (127*mult))>>5; \
V = ((V*(32-mult)) + (127*mult))>>5; \ V = ((V*(32-mult)) + (127*mult))>>5; \
Y = 0; \ Y = 0; \
} \ } \
#define BLEND_MODE BLEND_NORMAL #define BLEND_MODE BLEND_NORMAL
#if 0 #if 0

View file

@ -25,7 +25,7 @@
#include <gst/gst.h> #include <gst/gst.h>
typedef enum { typedef enum {
GST_RIFF_OK = 0, GST_RIFF_OK = 0,
GST_RIFF_ENOTRIFF = -1, GST_RIFF_ENOTRIFF = -1,
GST_RIFF_EINVAL = -2, GST_RIFF_EINVAL = -2,
GST_RIFF_ENOMEM = -3 GST_RIFF_ENOMEM = -3
@ -411,10 +411,10 @@ struct _gst_riff_chunk {
struct _gst_riff_index_entry { struct _gst_riff_index_entry {
guint32 id; guint32 id;
guint32 flags; guint32 flags;
#define GST_RIFF_IF_LIST (0x00000001L) #define GST_RIFF_IF_LIST (0x00000001L)
#define GST_RIFF_IF_KEYFRAME (0x00000010L) #define GST_RIFF_IF_KEYFRAME (0x00000010L)
#define GST_RIFF_IF_NO_TIME (0x00000100L) #define GST_RIFF_IF_NO_TIME (0x00000100L)
#define GST_RIFF_IF_COMPUSE (0x0FFF0000L) #define GST_RIFF_IF_COMPUSE (0x0FFF0000L)
guint32 offset; guint32 offset;
guint32 size; guint32 size;
}; };
@ -423,18 +423,18 @@ struct _gst_riff_dmlh {
guint32 totalframes; guint32 totalframes;
}; };
typedef struct _gst_riff_riff gst_riff_riff; typedef struct _gst_riff_riff gst_riff_riff;
typedef struct _gst_riff_list gst_riff_list; typedef struct _gst_riff_list gst_riff_list;
typedef struct _gst_riff_chunk gst_riff_chunk; typedef struct _gst_riff_chunk gst_riff_chunk;
typedef struct _gst_riff_index_entry gst_riff_index_entry; typedef struct _gst_riff_index_entry gst_riff_index_entry;
typedef struct _gst_riff_avih gst_riff_avih; typedef struct _gst_riff_avih gst_riff_avih;
typedef struct _gst_riff_strh gst_riff_strh; typedef struct _gst_riff_strh gst_riff_strh;
typedef struct _gst_riff_strf_vids gst_riff_strf_vids; 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_auds gst_riff_strf_auds;
typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs; typedef struct _gst_riff_strf_iavs gst_riff_strf_iavs;
typedef struct _gst_riff_dmlh gst_riff_dmlh; typedef struct _gst_riff_dmlh gst_riff_dmlh;
typedef struct _GstRiffChunk GstRiffChunk; typedef struct _GstRiffChunk GstRiffChunk;
struct _GstRiffChunk { struct _GstRiffChunk {
gulong offset; gulong offset;

View file

@ -56,7 +56,7 @@ struct _GstWavParse {
/* WAVE decoding state */ /* WAVE decoding state */
GstWavParseState state; GstWavParseState state;
guint64 offset; guint64 offset;
/* format of audio, see defines below */ /* format of audio, see defines below */
gint format; gint format;

View file

@ -39,15 +39,15 @@ G_BEGIN_DECLS
#define GST_OSSELEMENT_GET(obj) GST_OSSELEMENT (obj->element) #define GST_OSSELEMENT_GET(obj) GST_OSSELEMENT (obj->element)
typedef enum { typedef enum {
GST_OSSDMABUFFER_OPEN = (1 << 0), GST_OSSDMABUFFER_OPEN = (1 << 0),
} GstOssDMABufferFlags; } GstOssDMABufferFlags;
typedef struct _GstOssDMABuffer GstOssDMABuffer; typedef struct _GstOssDMABuffer GstOssDMABuffer;
typedef struct _GstOssDMABufferClass GstOssDMABufferClass; typedef struct _GstOssDMABufferClass GstOssDMABufferClass;
#define GST_OSSDMABUFFER_THREAD(buf) (GST_OSSDMABUFFER(buf)->thread) #define GST_OSSDMABUFFER_THREAD(buf) (GST_OSSDMABUFFER(buf)->thread)
#define GST_OSSDMABUFFER_LOCK GST_OBJECT_LOCK #define GST_OSSDMABUFFER_LOCK GST_OBJECT_LOCK
#define GST_OSSDMABUFFER_UNLOCK GST_OBJECT_UNLOCK #define GST_OSSDMABUFFER_UNLOCK GST_OBJECT_UNLOCK
#define GST_OSSDMABUFFER_COND(buf) (GST_OSSDMABUFFER(buf)->cond) #define GST_OSSDMABUFFER_COND(buf) (GST_OSSDMABUFFER(buf)->cond)
#define GST_OSSDMABUFFER_SIGNAL(buf) (g_cond_signal (GST_OSSDMABUFFER_COND (buf))) #define GST_OSSDMABUFFER_SIGNAL(buf) (g_cond_signal (GST_OSSDMABUFFER_COND (buf)))
#define GST_OSSDMABUFFER_WAIT(buf) (g_cond_wait (GST_OSSDMABUFFER_COND (buf), GST_OBJECT_GET_LOCK (buf))) #define GST_OSSDMABUFFER_WAIT(buf) (g_cond_wait (GST_OSSDMABUFFER_COND (buf), GST_OBJECT_GET_LOCK (buf)))
@ -55,7 +55,7 @@ typedef struct _GstOssDMABufferClass GstOssDMABufferClass;
struct _GstOssDMABuffer { struct _GstOssDMABuffer {
GstRingBuffer buffer; GstRingBuffer buffer;
GstOssElement *element; GstOssElement *element;
int fd; int fd;
int caps; int caps;

View file

@ -33,7 +33,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_OSS_MIXER(obj) ((GstOssMixer*)(obj)) #define GST_OSS_MIXER(obj) ((GstOssMixer*)(obj))
typedef enum { typedef enum {
@ -47,38 +47,38 @@ typedef struct _GstOssMixer GstOssMixer;
struct _GstOssMixer { struct _GstOssMixer {
GList * tracklist; /* list of available tracks */ GList * tracklist; /* list of available tracks */
gint mixer_fd; gint mixer_fd;
gchar * device; gchar * device;
gchar * cardname; gchar * cardname;
gint recmask; gint recmask;
gint recdevs; gint recdevs;
gint stereomask; gint stereomask;
gint devmask; gint devmask;
gint mixcaps; gint mixcaps;
GstOssMixerDirection dir; GstOssMixerDirection dir;
}; };
GstOssMixer* gst_ossmixer_new (const gchar *device, GstOssMixer* gst_ossmixer_new (const gchar *device,
GstOssMixerDirection dir); GstOssMixerDirection dir);
void gst_ossmixer_free (GstOssMixer *mixer); void gst_ossmixer_free (GstOssMixer *mixer);
const GList* gst_ossmixer_list_tracks (GstOssMixer * mixer); const GList* gst_ossmixer_list_tracks (GstOssMixer * mixer);
void gst_ossmixer_set_volume (GstOssMixer * mixer, void gst_ossmixer_set_volume (GstOssMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gint * volumes); gint * volumes);
void gst_ossmixer_get_volume (GstOssMixer * mixer, void gst_ossmixer_get_volume (GstOssMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gint * volumes); gint * volumes);
void gst_ossmixer_set_record (GstOssMixer * mixer, void gst_ossmixer_set_record (GstOssMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gboolean record); gboolean record);
void gst_ossmixer_set_mute (GstOssMixer * mixer, void gst_ossmixer_set_mute (GstOssMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gboolean mute); gboolean mute);

View file

@ -27,11 +27,11 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_OSS_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSS_MIXER_ELEMENT,GstOssMixerElement)) #define GST_OSS_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSS_MIXER_ELEMENT,GstOssMixerElement))
#define GST_OSS_MIXER_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSS_MIXER_ELEMENT,GstOssMixerElementClass)) #define GST_OSS_MIXER_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSS_MIXER_ELEMENT,GstOssMixerElementClass))
#define GST_IS_OSS_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSS_MIXER_ELEMENT)) #define GST_IS_OSS_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSS_MIXER_ELEMENT))
#define GST_IS_OSS_MIXER_ELEMENT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSS_MIXER_ELEMENT)) #define GST_IS_OSS_MIXER_ELEMENT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSS_MIXER_ELEMENT))
#define GST_TYPE_OSS_MIXER_ELEMENT (gst_oss_mixer_element_get_type()) #define GST_TYPE_OSS_MIXER_ELEMENT (gst_oss_mixer_element_get_type())
typedef struct _GstOssMixerElement GstOssMixerElement; typedef struct _GstOssMixerElement GstOssMixerElement;
@ -39,17 +39,17 @@ typedef struct _GstOssMixerElementClass GstOssMixerElementClass;
struct _GstOssMixerElement { struct _GstOssMixerElement {
GstElement parent; GstElement parent;
GstOssMixer *mixer; GstOssMixer *mixer;
}; };
struct _GstOssMixerElementClass { struct _GstOssMixerElementClass {
GstElementClass parent; GstElementClass parent;
}; };
GType gst_oss_mixer_element_get_type (void); GType gst_oss_mixer_element_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -33,10 +33,10 @@ G_BEGIN_DECLS
(gst_ossmixer_track_get_type ()) (gst_ossmixer_track_get_type ())
#define GST_OSSMIXER_TRACK(obj) \ #define GST_OSSMIXER_TRACK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OSSMIXER_TRACK, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_OSSMIXER_TRACK, \
GstOssMixerTrack)) GstOssMixerTrack))
#define GST_OSSMIXER_TRACK_CLASS(klass) \ #define GST_OSSMIXER_TRACK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_OSSMIXER_TRACK, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_OSSMIXER_TRACK, \
GstOssMixerTrackClass)) GstOssMixerTrackClass))
#define GST_IS_OSSMIXER_TRACK(obj) \ #define GST_IS_OSSMIXER_TRACK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OSSMIXER_TRACK)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_OSSMIXER_TRACK))
#define GST_IS_OSSMIXER_TRACK_CLASS(klass) \ #define GST_IS_OSSMIXER_TRACK_CLASS(klass) \
@ -53,8 +53,8 @@ typedef struct _GstOssMixerTrackClass {
GstMixerTrackClass parent; GstMixerTrackClass parent;
} GstOssMixerTrackClass; } GstOssMixerTrackClass;
GType gst_ossmixer_track_get_type (void); GType gst_ossmixer_track_get_type (void);
GstMixerTrack* gst_ossmixer_track_new (gint mixer_fd, GstMixerTrack* gst_ossmixer_track_new (gint mixer_fd,
gint track_num, gint max_chans, gint flags); gint track_num, gint max_chans, gint flags);
G_END_DECLS G_END_DECLS

View file

@ -72,7 +72,7 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_DEVICE "/dev/dsp" #define DEFAULT_DEVICE "/dev/dsp"
enum enum
{ {
PROP_0, PROP_0,
@ -275,28 +275,28 @@ ilog2 (gint x)
return (x & 0x0000003f) - 1; return (x & 0x0000003f) - 1;
} }
#define SET_PARAM(_oss, _name, _val, _detail) \ #define SET_PARAM(_oss, _name, _val, _detail) \
G_STMT_START { \ G_STMT_START { \
int _tmp = _val; \ int _tmp = _val; \
if (ioctl(_oss->fd, _name, &_tmp) == -1) { \ if (ioctl(_oss->fd, _name, &_tmp) == -1) { \
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE, \ GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE, \
("Unable to set param " _detail ": %s", \ ("Unable to set param " _detail ": %s", \
g_strerror (errno)), \ g_strerror (errno)), \
(NULL)); \ (NULL)); \
return FALSE; \ return FALSE; \
} \ } \
GST_DEBUG(_detail " %d", _tmp); \ GST_DEBUG(_detail " %d", _tmp); \
} G_STMT_END } G_STMT_END
#define GET_PARAM(_oss, _name, _val, _detail) \ #define GET_PARAM(_oss, _name, _val, _detail) \
G_STMT_START { \ G_STMT_START { \
if (ioctl(oss->fd, _name, _val) == -1) { \ if (ioctl(oss->fd, _name, _val) == -1) { \
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE, \ GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE, \
("Unable to get param " _detail ": %s", \ ("Unable to get param " _detail ": %s", \
g_strerror (errno)), \ g_strerror (errno)), \
(NULL)); \ (NULL)); \
return FALSE; \ return FALSE; \
} \ } \
} G_STMT_END } G_STMT_END
static gint static gint

View file

@ -45,7 +45,7 @@ struct _GstOssSink {
GstAudioSink sink; GstAudioSink sink;
gchar *device; gchar *device;
gint fd; gint fd;
gint bytes_per_sample; gint bytes_per_sample;
GstCaps *probed_caps; GstCaps *probed_caps;

View file

@ -41,8 +41,8 @@ GST_ELEMENT_DETAILS ("Audio Source (OSS)",
"Capture from a sound card via OSS", "Capture from a sound card via OSS",
"Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>"); "Erik Walthinsen <omega@cse.ogi.edu>, " "Wim Taymans <wim@fluendo.com>");
#define DEFAULT_DEVICE "/dev/dsp" #define DEFAULT_DEVICE "/dev/dsp"
#define DEFAULT_DEVICE_NAME "" #define DEFAULT_DEVICE_NAME ""
enum enum
{ {
@ -234,29 +234,29 @@ ilog2 (gint x)
return (x & 0x0000003f) - 1; return (x & 0x0000003f) - 1;
} }
#define SET_PARAM(_oss, _name, _val) \ #define SET_PARAM(_oss, _name, _val) \
G_STMT_START { \ G_STMT_START { \
int _tmp = _val; \ int _tmp = _val; \
if (ioctl(_oss->fd, _name, &_tmp) == -1) { \ if (ioctl(_oss->fd, _name, &_tmp) == -1) { \
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ, \ GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ, \
("Unable to set param "G_STRINGIFY (_name)": %s", \ ("Unable to set param "G_STRINGIFY (_name)": %s", \
g_strerror (errno)), \ g_strerror (errno)), \
(NULL)); \ (NULL)); \
return FALSE; \ return FALSE; \
} \ } \
GST_DEBUG_OBJECT (_oss, G_STRINGIFY (_name)" %d", _tmp); \ GST_DEBUG_OBJECT (_oss, G_STRINGIFY (_name)" %d", _tmp); \
} G_STMT_END } G_STMT_END
#define GET_PARAM(_oss, _name, _val) \ #define GET_PARAM(_oss, _name, _val) \
G_STMT_START { \ G_STMT_START { \
if (ioctl(oss->fd, _name, _val) == -1) { \ if (ioctl(oss->fd, _name, _val) == -1) { \
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ, \ GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ, \
("Unable to get param "G_STRINGIFY (_name)": %s", \ ("Unable to get param "G_STRINGIFY (_name)": %s", \
g_strerror (errno)), \ g_strerror (errno)), \
(NULL)); \ (NULL)); \
return FALSE; \ return FALSE; \
} \ } \
GST_DEBUG_OBJECT (_oss, G_STRINGIFY (_name)" %d", _val); \ GST_DEBUG_OBJECT (_oss, G_STRINGIFY (_name)" %d", _val); \
} G_STMT_END } G_STMT_END
static gint static gint

View file

@ -46,7 +46,7 @@ struct _GstOssSrc {
GstAudioSrc src; GstAudioSrc src;
gint fd; gint fd;
gint bytes_per_sample; gint bytes_per_sample;
gchar *device; gchar *device;
gchar *device_name; gchar *device_name;

View file

@ -80,10 +80,10 @@ struct _GstOsxAudioElement
struct _GstOsxAudioElementClass { struct _GstOsxAudioElementClass {
GstElementClass klass; GstElementClass klass;
GList *device_combinations; GList *device_combinations;
}; };
GType gst_osxaudioelement_get_type (void); GType gst_osxaudioelement_get_type (void);
int read_buffer(GstOsxAudioElement* osxaudio, unsigned char* data); int read_buffer(GstOsxAudioElement* osxaudio, unsigned char* data);
int write_buffer(GstOsxAudioElement* osxaudio, unsigned char* data, int len); int write_buffer(GstOsxAudioElement* osxaudio, unsigned char* data, int len);
G_END_DECLS G_END_DECLS

View file

@ -44,28 +44,28 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSXAUDIOSINK)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSXAUDIOSINK))
typedef enum { typedef enum {
GST_OSXAUDIOSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0), GST_OSXAUDIOSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_OSXAUDIOSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) GST_OSXAUDIOSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} GstOsxAudioSinkFlags; } GstOsxAudioSinkFlags;
typedef struct _GstOsxAudioSink GstOsxAudioSink; typedef struct _GstOsxAudioSink GstOsxAudioSink;
typedef struct _GstOsxAudioSinkClass GstOsxAudioSinkClass; typedef struct _GstOsxAudioSinkClass GstOsxAudioSinkClass;
struct _GstOsxAudioSink { struct _GstOsxAudioSink {
GstOsxAudioElement element; GstOsxAudioElement element;
GstPad *sinkpad; GstPad *sinkpad;
/* GstClock *provided_clock; /* GstClock *provided_clock;
GstClock *clock; GstClock *clock;
gboolean resync; gboolean resync;
gboolean sync; gboolean sync;
guint64 handled; guint64 handled;
gboolean mute; gboolean mute;
guint bufsize; guint bufsize;
guint chunk_size;*/ guint chunk_size;*/
}; };
struct _GstOsxAudioSinkClass { struct _GstOsxAudioSinkClass {

View file

@ -42,9 +42,9 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSXAUDIOSRC)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSXAUDIOSRC))
typedef enum { typedef enum {
GST_OSXAUDIOSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0), GST_OSXAUDIOSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_OSXAUDIOSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2) GST_OSXAUDIOSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} GstOsxAudioSrcFlags; } GstOsxAudioSrcFlags;
typedef struct _GstOsxAudioSrc GstOsxAudioSrc; typedef struct _GstOsxAudioSrc GstOsxAudioSrc;
@ -54,13 +54,13 @@ struct _GstOsxAudioSrc {
GstOsxAudioElement element; GstOsxAudioElement element;
/* pads */ /* pads */
GstPad *srcpad; GstPad *srcpad;
gboolean need_eos; /* Do we need to emit an EOS? */ gboolean need_eos; /* Do we need to emit an EOS? */
/* blocking */ /* blocking */
gulong curoffset; gulong curoffset;
gulong buffersize; gulong buffersize;
}; };