expand tabs

Original commit message from CVS:
expand tabs
This commit is contained in:
Thomas Vander Stichele 2005-12-06 19:42:02 +00:00
parent 510adea20f
commit 5f83aa7dfa
104 changed files with 1247 additions and 1139 deletions

108
ChangeLog
View file

@ -1,3 +1,111 @@
2005-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/alsa/gstalsamixer.h:
* ext/alsa/gstalsamixerelement.h:
* ext/alsa/gstalsamixeroptions.h:
* ext/alsa/gstalsamixertrack.h:
* ext/alsa/gstalsasink.c:
* ext/alsa/gstalsasink.h:
* ext/alsa/gstalsasrc.c:
* ext/alsa/gstalsasrc.h:
* ext/cdparanoia/gstcdparanoia.h:
* ext/gnomevfs/gstgnomevfsuri.h:
* ext/ogg/gstoggdemux.c:
* ext/ogg/gstoggmux.c:
* ext/pango/gsttextoverlay.h:
* ext/theora/theoradec.c:
* ext/theora/theoraenc.c:
* ext/vorbis/vorbisdec.h:
* ext/vorbis/vorbisenc.c:
* ext/vorbis/vorbisenc.h:
* ext/vorbis/vorbisparse.h:
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstaudiosink.c:
* gst-libs/gst/audio/gstaudiosink.h:
* gst-libs/gst/audio/gstaudiosrc.c:
* gst-libs/gst/audio/gstaudiosrc.h:
* gst-libs/gst/audio/gstbaseaudiosink.c:
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstbaseaudiosrc.c:
* gst-libs/gst/audio/gstbaseaudiosrc.h:
* gst-libs/gst/audio/gstringbuffer.h:
* gst-libs/gst/audio/multichannel.h:
* gst-libs/gst/floatcast/floatcast.h:
* gst-libs/gst/interfaces/colorbalance.c:
* gst-libs/gst/interfaces/colorbalance.h:
* gst-libs/gst/interfaces/colorbalancechannel.h:
* gst-libs/gst/interfaces/mixer.h:
* gst-libs/gst/interfaces/mixeroptions.h:
* gst-libs/gst/interfaces/mixertrack.h:
* gst-libs/gst/interfaces/navigation.h:
* gst-libs/gst/interfaces/propertyprobe.h:
* gst-libs/gst/interfaces/tuner.h:
* gst-libs/gst/interfaces/tunerchannel.h:
* gst-libs/gst/interfaces/tunernorm.h:
* gst-libs/gst/interfaces/xoverlay.h:
* gst-libs/gst/netbuffer/gstnetbuffer.h:
* gst-libs/gst/riff/riff-ids.h:
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.h:
* gst-libs/gst/rtp/gstbasertpdepayload.h:
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstbasertppayload.h:
* gst-libs/gst/rtp/gstrtpbuffer.c:
* gst-libs/gst/rtp/gstrtpbuffer.h:
* gst-libs/gst/tag/gsttageditingprivate.h:
* gst-libs/gst/tag/gstvorbistag.c:
(gst_tag_list_from_vorbiscomment_buffer):
* gst-libs/gst/tag/tag.h:
* gst-libs/gst/video/video.h:
* gst/adder/gstadder.c:
* gst/adder/gstadder.h:
* gst/audioconvert/audioconvert.c:
* gst/audioconvert/audioconvert.h:
* gst/audioconvert/gstaudioconvert.c:
* gst/audioconvert/gstchannelmix.c:
* gst/audioconvert/gstchannelmix.h:
* gst/audiorate/gstaudiorate.c:
* gst/audioresample/buffer.h:
* gst/audioresample/functable.h:
* gst/audioresample/gstaudioresample.c:
* gst/audioresample/resample.h:
* gst/ffmpegcolorspace/avcodec.h:
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
* gst/ffmpegcolorspace/gstffmpegcodecmap.h:
* gst/ffmpegcolorspace/imgconvert.c:
* gst/ffmpegcolorspace/imgconvert_template.h:
* gst/playback/gstdecodebin.c:
* gst/playback/gstplaybasebin.h:
* gst/playback/gstplaybin.c:
* gst/playback/gststreaminfo.h:
* gst/tcp/gstfdset.c:
* gst/tcp/gstfdset.h:
* gst/tcp/gstmultifdsink.c:
* gst/tcp/gstmultifdsink.h:
* gst/tcp/gsttcp.h:
* gst/tcp/gsttcpclientsrc.c:
* gst/tcp/gsttcpclientsrc.h:
* gst/tcp/gsttcpplugin.h:
* gst/tcp/gsttcpserversink.c:
* gst/tcp/gsttcpserversrc.c:
* gst/typefind/gsttypefindfunctions.c:
* gst/videorate/gstvideorate.c:
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.h:
* sys/v4l/gstv4lcolorbalance.h:
* sys/v4l/gstv4ltuner.h:
* sys/v4l/gstv4lxoverlay.h:
* sys/v4l/v4l_calls.h:
* sys/v4l/videodev_mjpeg.h:
* tests/check/elements/audioconvert.c:
* tests/check/elements/audioresample.c:
* tests/check/elements/audiotestsrc.c:
* tests/check/elements/videotestsrc.c:
* tests/check/elements/volume.c:
* tests/examples/seek/scrubby.c:
* tests/examples/seek/seek.c:
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

@ -31,7 +31,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_ALSA_MIXER(obj) ((GstAlsaMixer*)(obj)) #define GST_ALSA_MIXER(obj) ((GstAlsaMixer*)(obj))
typedef enum { typedef enum {
@ -45,38 +45,38 @@ typedef struct _GstAlsaMixer GstAlsaMixer;
struct _GstAlsaMixer { struct _GstAlsaMixer {
GList * tracklist; /* list of available tracks */ GList * tracklist; /* list of available tracks */
snd_mixer_t * handle; snd_mixer_t * handle;
gchar * device; gchar * device;
gchar * cardname; gchar * cardname;
GstAlsaMixerDirection dir; GstAlsaMixerDirection dir;
}; };
GstAlsaMixer* gst_alsa_mixer_new (const gchar *device, GstAlsaMixer* gst_alsa_mixer_new (const gchar *device,
GstAlsaMixerDirection dir); GstAlsaMixerDirection dir);
void gst_alsa_mixer_free (GstAlsaMixer *mixer); void gst_alsa_mixer_free (GstAlsaMixer *mixer);
const GList* gst_alsa_mixer_list_tracks (GstAlsaMixer * mixer); const GList* gst_alsa_mixer_list_tracks (GstAlsaMixer * mixer);
void gst_alsa_mixer_set_volume (GstAlsaMixer * mixer, void gst_alsa_mixer_set_volume (GstAlsaMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gint * volumes); gint * volumes);
void gst_alsa_mixer_get_volume (GstAlsaMixer * mixer, void gst_alsa_mixer_get_volume (GstAlsaMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gint * volumes); gint * volumes);
void gst_alsa_mixer_set_record (GstAlsaMixer * mixer, void gst_alsa_mixer_set_record (GstAlsaMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gboolean record); gboolean record);
void gst_alsa_mixer_set_mute (GstAlsaMixer * mixer, void gst_alsa_mixer_set_mute (GstAlsaMixer * mixer,
GstMixerTrack * track, GstMixerTrack * track,
gboolean mute); gboolean mute);
void gst_alsa_mixer_set_option (GstAlsaMixer * mixer, void gst_alsa_mixer_set_option (GstAlsaMixer * mixer,
GstMixerOptions * opts, GstMixerOptions * opts,
gchar * value); gchar * value);
const gchar* gst_alsa_mixer_get_option (GstAlsaMixer * mixer, const gchar* gst_alsa_mixer_get_option (GstAlsaMixer * mixer,
GstMixerOptions * opts); GstMixerOptions * opts);

View file

@ -28,11 +28,11 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_ALSA_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER_ELEMENT,GstAlsaMixerElement)) #define GST_ALSA_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER_ELEMENT,GstAlsaMixerElement))
#define GST_ALSA_MIXER_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER_ELEMENT,GstAlsaMixerElementClass)) #define GST_ALSA_MIXER_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER_ELEMENT,GstAlsaMixerElementClass))
#define GST_IS_ALSA_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER_ELEMENT)) #define GST_IS_ALSA_MIXER_ELEMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER_ELEMENT))
#define GST_IS_ALSA_MIXER_ELEMENT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER_ELEMENT)) #define GST_IS_ALSA_MIXER_ELEMENT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER_ELEMENT))
#define GST_TYPE_ALSA_MIXER_ELEMENT (gst_alsa_mixer_element_get_type()) #define GST_TYPE_ALSA_MIXER_ELEMENT (gst_alsa_mixer_element_get_type())
typedef struct _GstAlsaMixerElement GstAlsaMixerElement; typedef struct _GstAlsaMixerElement GstAlsaMixerElement;
@ -40,17 +40,17 @@ typedef struct _GstAlsaMixerElementClass GstAlsaMixerElementClass;
struct _GstAlsaMixerElement { struct _GstAlsaMixerElement {
GstElement parent; GstElement parent;
GstAlsaMixer *mixer; GstAlsaMixer *mixer;
}; };
struct _GstAlsaMixerElementClass { struct _GstAlsaMixerElementClass {
GstElementClass parent; GstElementClass parent;
}; };
GType gst_alsa_mixer_element_get_type (void); GType gst_alsa_mixer_element_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -28,12 +28,12 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_ALSA_MIXER_OPTIONS_TYPE (gst_alsa_mixer_options_get_type ()) #define GST_ALSA_MIXER_OPTIONS_TYPE (gst_alsa_mixer_options_get_type ())
#define GST_ALSA_MIXER_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER_OPTIONS,GstAlsaMixerOptions)) #define GST_ALSA_MIXER_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER_OPTIONS,GstAlsaMixerOptions))
#define GST_ALSA_MIXER_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER_OPTIONS,GstAlsaMixerOptionsClass)) #define GST_ALSA_MIXER_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER_OPTIONS,GstAlsaMixerOptionsClass))
#define GST_IS_ALSA_MIXER_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER_OPTIONS)) #define GST_IS_ALSA_MIXER_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER_OPTIONS))
#define GST_IS_ALSA_MIXER_OPTIONS_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER_OPTIONS)) #define GST_IS_ALSA_MIXER_OPTIONS_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER_OPTIONS))
#define GST_TYPE_ALSA_MIXER_OPTIONS (gst_alsa_mixer_options_get_type()) #define GST_TYPE_ALSA_MIXER_OPTIONS (gst_alsa_mixer_options_get_type())
typedef struct _GstAlsaMixerOptions GstAlsaMixerOptions; typedef struct _GstAlsaMixerOptions GstAlsaMixerOptions;
@ -41,9 +41,9 @@ typedef struct _GstAlsaMixerOptionsClass GstAlsaMixerOptionsClass;
struct _GstAlsaMixerOptions { struct _GstAlsaMixerOptions {
GstMixerOptions parent; GstMixerOptions parent;
snd_mixer_elem_t *element; /* the ALSA mixer element for this track */ snd_mixer_elem_t *element; /* the ALSA mixer element for this track */
gint track_num; gint track_num;
}; };
struct _GstAlsaMixerOptionsClass { struct _GstAlsaMixerOptionsClass {
@ -51,9 +51,9 @@ struct _GstAlsaMixerOptionsClass {
}; };
GType gst_alsa_mixer_options_get_type (void); GType gst_alsa_mixer_options_get_type (void);
GstMixerOptions *gst_alsa_mixer_options_new (snd_mixer_elem_t * element, GstMixerOptions *gst_alsa_mixer_options_new (snd_mixer_elem_t * element,
gint track_num); gint track_num);
G_END_DECLS G_END_DECLS

View file

@ -28,12 +28,12 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_ALSA_MIXER_TRACK_TYPE (gst_alsa_mixer_track_get_type ()) #define GST_ALSA_MIXER_TRACK_TYPE (gst_alsa_mixer_track_get_type ())
#define GST_ALSA_MIXER_TRACK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER_TRACK,GstAlsaMixerTrack)) #define GST_ALSA_MIXER_TRACK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER_TRACK,GstAlsaMixerTrack))
#define GST_ALSA_MIXER_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER_TRACK,GstAlsaMixerTrackClass)) #define GST_ALSA_MIXER_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER_TRACK,GstAlsaMixerTrackClass))
#define GST_IS_ALSA_MIXER_TRACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER_TRACK)) #define GST_IS_ALSA_MIXER_TRACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER_TRACK))
#define GST_IS_ALSA_MIXER_TRACK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER_TRACK)) #define GST_IS_ALSA_MIXER_TRACK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER_TRACK))
#define GST_TYPE_ALSA_MIXER_TRACK (gst_alsa_mixer_track_get_type()) #define GST_TYPE_ALSA_MIXER_TRACK (gst_alsa_mixer_track_get_type())
typedef struct _GstAlsaMixerTrack GstAlsaMixerTrack; typedef struct _GstAlsaMixerTrack GstAlsaMixerTrack;
typedef struct _GstAlsaMixerTrackClass GstAlsaMixerTrackClass; typedef struct _GstAlsaMixerTrackClass GstAlsaMixerTrackClass;
@ -41,26 +41,26 @@ typedef struct _GstAlsaMixerTrackClass GstAlsaMixerTrackClass;
#define GST_ALSA_MIXER_TRACK_CAPTURE (1<<0) #define GST_ALSA_MIXER_TRACK_CAPTURE (1<<0)
#define GST_ALSA_MIXER_TRACK_PLAYBACK (1<<1) #define GST_ALSA_MIXER_TRACK_PLAYBACK (1<<1)
#define GST_ALSA_MAX_CHANNELS 32 /* tracks can have up to 32 channels */ #define GST_ALSA_MAX_CHANNELS 32 /* tracks can have up to 32 channels */
struct _GstAlsaMixerTrack { struct _GstAlsaMixerTrack {
GstMixerTrack parent; GstMixerTrack parent;
snd_mixer_elem_t *element; /* the ALSA mixer element for this track */ snd_mixer_elem_t *element; /* the ALSA mixer element for this track */
gint track_num; gint track_num;
gint alsa_flags; gint alsa_flags;
gint volumes[GST_ALSA_MAX_CHANNELS]; gint volumes[GST_ALSA_MAX_CHANNELS];
}; };
struct _GstAlsaMixerTrackClass { struct _GstAlsaMixerTrackClass {
GstMixerTrackClass parent; GstMixerTrackClass parent;
}; };
GType gst_alsa_mixer_track_get_type (void); GType gst_alsa_mixer_track_get_type (void);
GstMixerTrack * gst_alsa_mixer_track_new (snd_mixer_elem_t * element, GstMixerTrack * gst_alsa_mixer_track_new (snd_mixer_elem_t * element,
gint num, gint num,
gint track_num, gint track_num,
gint channels, gint channels,
gint flags, gint flags,
gint alsa_flags); gint alsa_flags);
G_END_DECLS G_END_DECLS

View file

@ -248,9 +248,9 @@ gst_alsasink_getcaps (GstBaseSink * bsink)
} }
#define CHECK(call, error) \ #define CHECK(call, error) \
G_STMT_START { \ G_STMT_START { \
if ((err = call) < 0) \ if ((err = call) < 0) \
goto error; \ goto error; \
} G_STMT_END; } G_STMT_END;
static int static int

View file

@ -43,11 +43,11 @@ typedef struct _GstAlsaSinkClass GstAlsaSinkClass;
struct _GstAlsaSink { struct _GstAlsaSink {
GstAudioSink sink; GstAudioSink sink;
gchar *device; gchar *device;
snd_pcm_t *handle; snd_pcm_t *handle;
snd_pcm_hw_params_t *hwparams; snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams; snd_pcm_sw_params_t *swparams;
snd_pcm_access_t access; snd_pcm_access_t access;
snd_pcm_format_t format; snd_pcm_format_t format;

View file

@ -213,9 +213,9 @@ gst_alsasrc_getcaps (GstBaseSrc * bsrc)
} }
#define CHECK(call, error) \ #define CHECK(call, error) \
G_STMT_START { \ G_STMT_START { \
if ((err = call) < 0) \ if ((err = call) < 0) \
goto error; \ goto error; \
} G_STMT_END; } G_STMT_END;
static int static int

View file

@ -41,26 +41,26 @@ typedef struct _GstAlsaSrc GstAlsaSrc;
typedef struct _GstAlsaSrcClass GstAlsaSrcClass; typedef struct _GstAlsaSrcClass GstAlsaSrcClass;
struct _GstAlsaSrc { struct _GstAlsaSrc {
GstAudioSrc src; GstAudioSrc src;
gchar *device; gchar *device;
snd_pcm_t *handle; snd_pcm_t *handle;
snd_pcm_hw_params_t *hwparams; snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams; snd_pcm_sw_params_t *swparams;
snd_pcm_access_t access; snd_pcm_access_t access;
snd_pcm_format_t format; snd_pcm_format_t format;
guint rate; guint rate;
guint channels; guint channels;
gint bytes_per_sample; gint bytes_per_sample;
guint buffer_time; guint buffer_time;
guint period_time; guint period_time;
snd_pcm_uframes_t buffer_size; snd_pcm_uframes_t buffer_size;
snd_pcm_uframes_t period_size; snd_pcm_uframes_t period_size;
GstAlsaMixer *mixer; GstAlsaMixer *mixer;
}; };
struct _GstAlsaSrcClass { struct _GstAlsaSrcClass {

View file

@ -58,9 +58,9 @@ extern "C" {
/* NOTE: per-element flags start with 16 for now */ /* NOTE: per-element flags start with 16 for now */
typedef enum { typedef enum {
CDPARANOIA_OPEN = (GST_ELEMENT_FLAG_LAST << 0), CDPARANOIA_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
CDPARANOIA_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2), CDPARANOIA_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} CDParanoiaFlags; } CDParanoiaFlags;
typedef struct _CDParanoia CDParanoia; typedef struct _CDParanoia CDParanoia;
@ -113,9 +113,9 @@ struct _CDParanoiaClass {
GstElementClass parent_class; GstElementClass parent_class;
/* signal callbacks */ /* signal callbacks */
void (*smilie_change) (CDParanoia *cdparanoia, gchar *smilie); void (*smilie_change) (CDParanoia *cdparanoia, gchar *smilie);
void (*transport_error) (CDParanoia *cdparanoia, gint offset); void (*transport_error) (CDParanoia *cdparanoia, gint offset);
void (*uncorrected_error) (CDParanoia *cdparanoia, gint offset); void (*uncorrected_error) (CDParanoia *cdparanoia, gint offset);
}; };
GType cdparanoia_get_type(void); GType cdparanoia_get_type(void);

View file

@ -25,7 +25,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
gchar **gst_gnomevfs_get_supported_uris (void); gchar **gst_gnomevfs_get_supported_uris (void);
G_END_DECLS G_END_DECLS

View file

@ -128,8 +128,8 @@ struct _GstOggPadClass
PARENTCLASS parent_class; PARENTCLASS parent_class;
}; };
#define GST_CHAIN_LOCK(ogg) g_mutex_lock((ogg)->chain_lock) #define GST_CHAIN_LOCK(ogg) g_mutex_lock((ogg)->chain_lock)
#define GST_CHAIN_UNLOCK(ogg) g_mutex_unlock((ogg)->chain_lock) #define GST_CHAIN_UNLOCK(ogg) g_mutex_unlock((ogg)->chain_lock)
struct _GstOggDemux struct _GstOggDemux
{ {

View file

@ -137,8 +137,8 @@ enum
}; };
/* set to 0.5 seconds by default */ /* set to 0.5 seconds by default */
#define DEFAULT_MAX_DELAY G_GINT64_CONSTANT(500000000) #define DEFAULT_MAX_DELAY G_GINT64_CONSTANT(500000000)
#define DEFAULT_MAX_PAGE_DELAY G_GINT64_CONSTANT(500000000) #define DEFAULT_MAX_PAGE_DELAY G_GINT64_CONSTANT(500000000)
enum enum
{ {
ARG_0, ARG_0,

View file

@ -78,7 +78,7 @@ struct _GstTextOverlay {
gint bitmap_buffer_size; gint bitmap_buffer_size;
gint baseline_y; gint baseline_y;
gboolean need_render; gboolean need_render;
gint shading_value; /* for timeoverlay subclass */ gint shading_value; /* for timeoverlay subclass */
}; };

View file

@ -78,7 +78,7 @@ struct _GstTheoraDecClass
GstElementClass parent_class; GstElementClass parent_class;
}; };
#define THEORA_DEF_CROP TRUE #define THEORA_DEF_CROP TRUE
enum enum
{ {
ARG_0, ARG_0,

View file

@ -69,18 +69,18 @@ gst_border_mode_get_type (void)
#define ROUND_UP_4(x) (((x) + 3) & ~3) #define ROUND_UP_4(x) (((x) + 3) & ~3)
#define ROUND_UP_8(x) (((x) + 7) & ~7) #define ROUND_UP_8(x) (((x) + 7) & ~7)
#define THEORA_DEF_CENTER TRUE #define THEORA_DEF_CENTER TRUE
#define THEORA_DEF_BORDER BORDER_BLACK #define THEORA_DEF_BORDER BORDER_BLACK
#define THEORA_DEF_BITRATE 0 #define THEORA_DEF_BITRATE 0
#define THEORA_DEF_QUALITY 16 #define THEORA_DEF_QUALITY 16
#define THEORA_DEF_QUICK TRUE #define THEORA_DEF_QUICK TRUE
#define THEORA_DEF_KEYFRAME_AUTO TRUE #define THEORA_DEF_KEYFRAME_AUTO TRUE
#define THEORA_DEF_KEYFRAME_FREQ 64 #define THEORA_DEF_KEYFRAME_FREQ 64
#define THEORA_DEF_KEYFRAME_FREQ_FORCE 64 #define THEORA_DEF_KEYFRAME_FREQ_FORCE 64
#define THEORA_DEF_KEYFRAME_THRESHOLD 80 #define THEORA_DEF_KEYFRAME_THRESHOLD 80
#define THEORA_DEF_KEYFRAME_MINDISTANCE 8 #define THEORA_DEF_KEYFRAME_MINDISTANCE 8
#define THEORA_DEF_NOISE_SENSITIVITY 1 #define THEORA_DEF_NOISE_SENSITIVITY 1
#define THEORA_DEF_SHARPNESS 0 #define THEORA_DEF_SHARPNESS 0
enum enum
{ {

View file

@ -43,21 +43,21 @@ typedef struct _GstVorbisDec GstVorbisDec;
typedef struct _GstVorbisDecClass GstVorbisDecClass; typedef struct _GstVorbisDecClass GstVorbisDecClass;
struct _GstVorbisDec { struct _GstVorbisDec {
GstElement element; GstElement element;
GstPad * sinkpad; GstPad * sinkpad;
GstPad * srcpad; GstPad * srcpad;
vorbis_dsp_state vd; vorbis_dsp_state vd;
vorbis_info vi; vorbis_info vi;
vorbis_comment vc; vorbis_comment vc;
vorbis_block vb; vorbis_block vb;
guint packetno; guint packetno;
guint64 granulepos; guint64 granulepos;
gboolean initialized; gboolean initialized;
GList *queued; GList *queued;
gdouble segment_rate; gdouble segment_rate;
gint64 segment_start; gint64 segment_start;

View file

@ -131,12 +131,12 @@ gst_vorbisenc_get_formats (GstPad * pad)
} }
#endif #endif
#define MAX_BITRATE_DEFAULT -1 #define MAX_BITRATE_DEFAULT -1
#define BITRATE_DEFAULT -1 #define BITRATE_DEFAULT -1
#define MIN_BITRATE_DEFAULT -1 #define MIN_BITRATE_DEFAULT -1
#define QUALITY_DEFAULT 0.3 #define QUALITY_DEFAULT 0.3
#define LOWEST_BITRATE 6000 /* lowest allowed for a 8 kHz stream */ #define LOWEST_BITRATE 6000 /* lowest allowed for a 8 kHz stream */
#define HIGHEST_BITRATE 250001 /* highest allowed for a 44 kHz stream */ #define HIGHEST_BITRATE 250001 /* highest allowed for a 44 kHz stream */
static void gst_vorbisenc_base_init (gpointer g_class); static void gst_vorbisenc_base_init (gpointer g_class);
static void gst_vorbisenc_class_init (GstVorbisEncClass * klass); static void gst_vorbisenc_class_init (GstVorbisEncClass * klass);

View file

@ -45,13 +45,13 @@ typedef struct _GstVorbisEnc GstVorbisEnc;
typedef struct _GstVorbisEncClass GstVorbisEncClass; typedef struct _GstVorbisEncClass GstVorbisEncClass;
struct _GstVorbisEnc { struct _GstVorbisEnc {
GstElement element; GstElement element;
GstPad *sinkpad; GstPad *sinkpad;
GstPad *srcpad; GstPad *srcpad;
vorbis_info vi; /* struct that stores all the static vorbis bitstream vorbis_info vi; /* struct that stores all the static vorbis bitstream
settings */ settings */
vorbis_comment vc; /* struct that stores all the user comments */ vorbis_comment vc; /* struct that stores all the user comments */
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
@ -62,20 +62,20 @@ struct _GstVorbisEnc {
gint min_bitrate; gint min_bitrate;
gint max_bitrate; gint max_bitrate;
gfloat quality; gfloat quality;
gboolean quality_set; gboolean quality_set;
gint channels; gint channels;
gint frequency; gint frequency;
guint64 samples_in; guint64 samples_in;
guint64 bytes_out; guint64 bytes_out;
GstClockTime prev_ts; GstClockTime prev_ts;
GstTagList * tags; GstTagList * tags;
gboolean setup; gboolean setup;
gboolean header_sent; gboolean header_sent;
gchar *last_message; gchar *last_message;
}; };
struct _GstVorbisEncClass { struct _GstVorbisEncClass {

View file

@ -45,14 +45,14 @@ typedef struct _GstVorbisParse GstVorbisParse;
typedef struct _GstVorbisParseClass GstVorbisParseClass; typedef struct _GstVorbisParseClass GstVorbisParseClass;
struct _GstVorbisParse { struct _GstVorbisParse {
GstElement element; GstElement element;
GstPad * sinkpad; GstPad * sinkpad;
GstPad * srcpad; GstPad * srcpad;
guint packetno; guint packetno;
gboolean streamheader_sent; gboolean streamheader_sent;
GList * streamheader; GList * streamheader;
}; };
struct _GstVorbisParseClass { struct _GstVorbisParseClass {

View file

@ -64,8 +64,8 @@ struct _GstAudioClockClass {
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_audio_clock_get_type (void); GType gst_audio_clock_get_type (void);
GstClock* gst_audio_clock_new (gchar *name, GstAudioClockGetTimeFunc func, GstClock* gst_audio_clock_new (gchar *name, GstAudioClockGetTimeFunc func,
gpointer user_data); gpointer user_data);
G_END_DECLS G_END_DECLS

View file

@ -27,18 +27,18 @@
GST_DEBUG_CATEGORY_STATIC (gst_audio_sink_debug); GST_DEBUG_CATEGORY_STATIC (gst_audio_sink_debug);
#define GST_CAT_DEFAULT gst_audio_sink_debug #define GST_CAT_DEFAULT gst_audio_sink_debug
#define GST_TYPE_AUDIORING_BUFFER \ #define GST_TYPE_AUDIORING_BUFFER \
(gst_audioringbuffer_get_type()) (gst_audioringbuffer_get_type())
#define GST_AUDIORING_BUFFER(obj) \ #define GST_AUDIORING_BUFFER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBuffer)) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBuffer))
#define GST_AUDIORING_BUFFER_CLASS(klass) \ #define GST_AUDIORING_BUFFER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBufferClass)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBufferClass))
#define GST_AUDIORING_BUFFER_GET_CLASS(obj) \ #define GST_AUDIORING_BUFFER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AUDIORING_BUFFER, GstAudioRingBufferClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AUDIORING_BUFFER, GstAudioRingBufferClass))
#define GST_IS_AUDIORING_BUFFER(obj) \ #define GST_IS_AUDIORING_BUFFER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIORING_BUFFER)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIORING_BUFFER))
#define GST_IS_AUDIORING_BUFFER_CLASS(obj)\ #define GST_IS_AUDIORING_BUFFER_CLASS(obj)\
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIORING_BUFFER)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIORING_BUFFER))
typedef struct _GstAudioRingBuffer GstAudioRingBuffer; typedef struct _GstAudioRingBuffer GstAudioRingBuffer;
typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass; typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass;

View file

@ -44,18 +44,18 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_AUDIO_SINK (gst_audio_sink_get_type()) #define GST_TYPE_AUDIO_SINK (gst_audio_sink_get_type())
#define GST_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_SINK,GstAudioSink)) #define GST_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_SINK,GstAudioSink))
#define GST_AUDIO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_SINK,GstAudioSinkClass)) #define GST_AUDIO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_SINK,GstAudioSinkClass))
#define GST_AUDIO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AUDIO_SINK,GstAudioSinkClass)) #define GST_AUDIO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AUDIO_SINK,GstAudioSinkClass))
#define GST_IS_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_SINK)) #define GST_IS_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_SINK))
#define GST_IS_AUDIO_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_SINK)) #define GST_IS_AUDIO_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_SINK))
typedef struct _GstAudioSink GstAudioSink; typedef struct _GstAudioSink GstAudioSink;
typedef struct _GstAudioSinkClass GstAudioSinkClass; typedef struct _GstAudioSinkClass GstAudioSinkClass;
struct _GstAudioSink { struct _GstAudioSink {
GstBaseAudioSink element; GstBaseAudioSink element;
/*< private >*/ /* with LOCK */ /*< private >*/ /* with LOCK */
GThread *thread; GThread *thread;

View file

@ -27,18 +27,18 @@
GST_DEBUG_CATEGORY_STATIC (gst_audio_src_debug); GST_DEBUG_CATEGORY_STATIC (gst_audio_src_debug);
#define GST_CAT_DEFAULT gst_audio_src_debug #define GST_CAT_DEFAULT gst_audio_src_debug
#define GST_TYPE_AUDIORING_BUFFER \ #define GST_TYPE_AUDIORING_BUFFER \
(gst_audioringbuffer_get_type()) (gst_audioringbuffer_get_type())
#define GST_AUDIORING_BUFFER(obj) \ #define GST_AUDIORING_BUFFER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBuffer)) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBuffer))
#define GST_AUDIORING_BUFFER_CLASS(klass) \ #define GST_AUDIORING_BUFFER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBufferClass)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIORING_BUFFER,GstAudioRingBufferClass))
#define GST_AUDIORING_BUFFER_GET_CLASS(obj) \ #define GST_AUDIORING_BUFFER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AUDIORING_BUFFER, GstAudioRingBufferClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_AUDIORING_BUFFER, GstAudioRingBufferClass))
#define GST_IS_AUDIORING_BUFFER(obj) \ #define GST_IS_AUDIORING_BUFFER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIORING_BUFFER)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIORING_BUFFER))
#define GST_IS_AUDIORING_BUFFER_CLASS(obj)\ #define GST_IS_AUDIORING_BUFFER_CLASS(obj)\
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIORING_BUFFER)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIORING_BUFFER))
typedef struct _GstAudioRingBuffer GstAudioRingBuffer; typedef struct _GstAudioRingBuffer GstAudioRingBuffer;
typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass; typedef struct _GstAudioRingBufferClass GstAudioRingBufferClass;

View file

@ -43,18 +43,18 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_AUDIO_SRC (gst_audio_src_get_type()) #define GST_TYPE_AUDIO_SRC (gst_audio_src_get_type())
#define GST_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_SRC,GstAudioSrc)) #define GST_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_SRC,GstAudioSrc))
#define GST_AUDIO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_SRC,GstAudioSrcClass)) #define GST_AUDIO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_SRC,GstAudioSrcClass))
#define GST_AUDIO_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AUDIO_SRC,GstAudioSrcClass)) #define GST_AUDIO_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_AUDIO_SRC,GstAudioSrcClass))
#define GST_IS_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_SRC)) #define GST_IS_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_SRC))
#define GST_IS_AUDIO_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_SRC)) #define GST_IS_AUDIO_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_SRC))
typedef struct _GstAudioSrc GstAudioSrc; typedef struct _GstAudioSrc GstAudioSrc;
typedef struct _GstAudioSrcClass GstAudioSrcClass; typedef struct _GstAudioSrcClass GstAudioSrcClass;
struct _GstAudioSrc { struct _GstAudioSrc {
GstBaseAudioSrc element; GstBaseAudioSrc element;
/*< private >*/ /* with LOCK */ /*< private >*/ /* with LOCK */
GThread *thread; GThread *thread;

View file

@ -37,11 +37,11 @@ enum
/* we tollerate a 10th of a second diff before we start resyncing. This /* we tollerate a 10th of a second diff before we start resyncing. This
* should be enough to compensate for various rounding errors in the timestamp * should be enough to compensate for various rounding errors in the timestamp
* and sample offset position. */ * and sample offset position. */
#define DIFF_TOLERANCE 10 #define DIFF_TOLERANCE 10
#define DEFAULT_BUFFER_TIME 500 * GST_USECOND #define DEFAULT_BUFFER_TIME 500 * GST_USECOND
#define DEFAULT_LATENCY_TIME 10 * GST_USECOND #define DEFAULT_LATENCY_TIME 10 * GST_USECOND
#define DEFAULT_PROVIDE_CLOCK TRUE #define DEFAULT_PROVIDE_CLOCK TRUE
enum enum
{ {

View file

@ -56,21 +56,21 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_BASE_AUDIO_SINK (gst_base_audio_sink_get_type()) #define GST_TYPE_BASE_AUDIO_SINK (gst_base_audio_sink_get_type())
#define GST_BASE_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_AUDIO_SINK,GstBaseAudioSink)) #define GST_BASE_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_AUDIO_SINK,GstBaseAudioSink))
#define GST_BASE_AUDIO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_AUDIO_SINK,GstBaseAudioSinkClass)) #define GST_BASE_AUDIO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_AUDIO_SINK,GstBaseAudioSinkClass))
#define GST_BASE_AUDIO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_AUDIO_SINK, GstBaseAudioSinkClass)) #define GST_BASE_AUDIO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_AUDIO_SINK, GstBaseAudioSinkClass))
#define GST_IS_BASE_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_AUDIO_SINK)) #define GST_IS_BASE_AUDIO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_AUDIO_SINK))
#define GST_IS_BASE_AUDIO_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_AUDIO_SINK)) #define GST_IS_BASE_AUDIO_SINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_AUDIO_SINK))
#define GST_BASE_AUDIO_SINK_CLOCK(obj) (GST_BASE_AUDIO_SINK (obj)->clock) #define GST_BASE_AUDIO_SINK_CLOCK(obj) (GST_BASE_AUDIO_SINK (obj)->clock)
#define GST_BASE_AUDIO_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad) #define GST_BASE_AUDIO_SINK_PAD(obj) (GST_BASE_SINK (obj)->sinkpad)
typedef struct _GstBaseAudioSink GstBaseAudioSink; typedef struct _GstBaseAudioSink GstBaseAudioSink;
typedef struct _GstBaseAudioSinkClass GstBaseAudioSinkClass; typedef struct _GstBaseAudioSinkClass GstBaseAudioSinkClass;
struct _GstBaseAudioSink { struct _GstBaseAudioSink {
GstBaseSink element; GstBaseSink element;
/*< protected >*/ /* with LOCK */ /*< protected >*/ /* with LOCK */
/* our ringbuffer */ /* our ringbuffer */
@ -81,11 +81,11 @@ struct _GstBaseAudioSink {
GstClockTime latency_time; GstClockTime latency_time;
/* the next sample to write */ /* the next sample to write */
guint64 next_sample; guint64 next_sample;
/* clock */ /* clock */
gboolean provide_clock; gboolean provide_clock;
GstClock *provided_clock; GstClock *provided_clock;
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];

View file

@ -34,8 +34,8 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_BUFFER_TIME 500 * GST_USECOND #define DEFAULT_BUFFER_TIME 500 * GST_USECOND
#define DEFAULT_LATENCY_TIME 10 * GST_USECOND #define DEFAULT_LATENCY_TIME 10 * GST_USECOND
enum enum
{ {
PROP_0, PROP_0,

View file

@ -33,21 +33,21 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_BASE_AUDIO_SRC (gst_base_audio_src_get_type()) #define GST_TYPE_BASE_AUDIO_SRC (gst_base_audio_src_get_type())
#define GST_BASE_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_AUDIO_SRC,GstBaseAudioSrc)) #define GST_BASE_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_AUDIO_SRC,GstBaseAudioSrc))
#define GST_BASE_AUDIO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_AUDIO_SRC,GstBaseAudioSrcClass)) #define GST_BASE_AUDIO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_AUDIO_SRC,GstBaseAudioSrcClass))
#define GST_BASE_AUDIO_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_AUDIO_SRC, GstBaseAudioSrcClass)) #define GST_BASE_AUDIO_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_AUDIO_SRC, GstBaseAudioSrcClass))
#define GST_IS_BASE_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_AUDIO_SRC)) #define GST_IS_BASE_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_AUDIO_SRC))
#define GST_IS_BASE_AUDIO_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_AUDIO_SRC)) #define GST_IS_BASE_AUDIO_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_AUDIO_SRC))
#define GST_BASE_AUDIO_SRC_CLOCK(obj) (GST_BASE_AUDIO_SRC (obj)->clock) #define GST_BASE_AUDIO_SRC_CLOCK(obj) (GST_BASE_AUDIO_SRC (obj)->clock)
#define GST_BASE_AUDIO_SRC_PAD(obj) (GST_BASE_SRC (obj)->srcpad) #define GST_BASE_AUDIO_SRC_PAD(obj) (GST_BASE_SRC (obj)->srcpad)
typedef struct _GstBaseAudioSrc GstBaseAudioSrc; typedef struct _GstBaseAudioSrc GstBaseAudioSrc;
typedef struct _GstBaseAudioSrcClass GstBaseAudioSrcClass; typedef struct _GstBaseAudioSrcClass GstBaseAudioSrcClass;
struct _GstBaseAudioSrc { struct _GstBaseAudioSrc {
GstPushSrc element; GstPushSrc element;
/*< protected >*/ /* with LOCK */ /*< protected >*/ /* with LOCK */
/* our ringbuffer */ /* our ringbuffer */
@ -58,10 +58,10 @@ struct _GstBaseAudioSrc {
GstClockTime latency_time; GstClockTime latency_time;
/* the next sample to write */ /* the next sample to write */
guint64 next_sample; guint64 next_sample;
/* clock */ /* clock */
GstClock *clock; GstClock *clock;
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];

View file

@ -27,11 +27,11 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_RING_BUFFER (gst_ring_buffer_get_type()) #define GST_TYPE_RING_BUFFER (gst_ring_buffer_get_type())
#define GST_RING_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RING_BUFFER,GstRingBuffer)) #define GST_RING_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RING_BUFFER,GstRingBuffer))
#define GST_RING_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RING_BUFFER,GstRingBufferClass)) #define GST_RING_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RING_BUFFER,GstRingBufferClass))
#define GST_RING_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RING_BUFFER, GstRingBufferClass)) #define GST_RING_BUFFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RING_BUFFER, GstRingBufferClass))
#define GST_IS_RING_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RING_BUFFER)) #define GST_IS_RING_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RING_BUFFER))
#define GST_IS_RING_BUFFER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RING_BUFFER)) #define GST_IS_RING_BUFFER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RING_BUFFER))
typedef struct _GstRingBuffer GstRingBuffer; typedef struct _GstRingBuffer GstRingBuffer;
@ -169,25 +169,25 @@ struct _GstRingBufferSpec
{ {
/*< public >*/ /*< public >*/
/* in */ /* in */
GstCaps *caps; /* the caps of the buffer */ GstCaps *caps; /* the caps of the buffer */
/* in/out */ /* in/out */
GstBufferFormatType type; GstBufferFormatType type;
GstBufferFormat format; GstBufferFormat format;
gboolean sign; gboolean sign;
gboolean bigend; gboolean bigend;
gint width; gint width;
gint depth; gint depth;
gint rate; gint rate;
gint channels; gint channels;
GstClockTime latency_time; /* the required/actual latency time */ GstClockTime latency_time; /* the required/actual latency time */
GstClockTime buffer_time; /* the required/actual time of the buffer */ GstClockTime buffer_time; /* the required/actual time of the buffer */
gint segsize; /* size of one buffer segement */ gint segsize; /* size of one buffer segement */
gint segtotal; /* total number of segments */ gint segtotal; /* total number of segments */
/* out */ /* out */
gint bytes_per_sample; /* number of bytes of one sample */ gint bytes_per_sample; /* number of bytes of one sample */
guint8 silence_sample[32]; /* bytes representing silence */ guint8 silence_sample[32]; /* bytes representing silence */
/*< private >*/ /*< private >*/
@ -200,7 +200,7 @@ struct _GstRingBufferSpec
#define GST_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_RING_BUFFER_GET_COND (buf))) #define GST_RING_BUFFER_BROADCAST(buf)(g_cond_broadcast (GST_RING_BUFFER_GET_COND (buf)))
struct _GstRingBuffer { struct _GstRingBuffer {
GstObject object; GstObject object;
/*< public >*/ /* with LOCK */ /*< public >*/ /* with LOCK */
GCond *cond; GCond *cond;
@ -209,14 +209,14 @@ struct _GstRingBuffer {
GstBuffer *data; GstBuffer *data;
GstRingBufferSpec spec; GstRingBufferSpec spec;
GstRingBufferSegState *segstate; GstRingBufferSegState *segstate;
gint samples_per_seg; /* number of samples per segment */ gint samples_per_seg; /* number of samples per segment */
guint8 *empty_seg; guint8 *empty_seg;
/*< public >*/ /* ATOMIC */ /*< public >*/ /* ATOMIC */
gint state; /* state of the buffer */ gint state; /* state of the buffer */
gint segdone; /* number of segments processed since last start */ gint segdone; /* number of segments processed since last start */
gint segbase; /* segment corresponding to segment 0 */ gint segbase; /* segment corresponding to segment 0 */
gint waiting; /* when waiting for a segment to be freed */ gint waiting; /* when waiting for a segment to be freed */
/*< private >*/ /*< private >*/
GstRingBufferCallback callback; GstRingBufferCallback callback;
@ -225,7 +225,7 @@ struct _GstRingBuffer {
/*< private >*/ /*< private >*/
union { union {
struct { struct {
gboolean flushing; gboolean flushing;
}; };
/* adding + 0 to mark ABI change to be undone later */ /* adding + 0 to mark ABI change to be undone later */
gpointer _gst_reserved[GST_PADDING + 0]; gpointer _gst_reserved[GST_PADDING + 0];
@ -261,54 +261,54 @@ struct _GstRingBufferClass {
GType gst_ring_buffer_get_type(void); GType gst_ring_buffer_get_type(void);
/* callback stuff */ /* callback stuff */
void gst_ring_buffer_set_callback (GstRingBuffer *buf, GstRingBufferCallback cb, void gst_ring_buffer_set_callback (GstRingBuffer *buf, GstRingBufferCallback cb,
gpointer user_data); gpointer user_data);
gboolean gst_ring_buffer_parse_caps (GstRingBufferSpec *spec, GstCaps *caps); gboolean gst_ring_buffer_parse_caps (GstRingBufferSpec *spec, GstCaps *caps);
void gst_ring_buffer_debug_spec_caps (GstRingBufferSpec *spec); void gst_ring_buffer_debug_spec_caps (GstRingBufferSpec *spec);
void gst_ring_buffer_debug_spec_buff (GstRingBufferSpec *spec); void gst_ring_buffer_debug_spec_buff (GstRingBufferSpec *spec);
/* device state */ /* device state */
gboolean gst_ring_buffer_open_device (GstRingBuffer *buf); gboolean gst_ring_buffer_open_device (GstRingBuffer *buf);
gboolean gst_ring_buffer_close_device (GstRingBuffer *buf); gboolean gst_ring_buffer_close_device (GstRingBuffer *buf);
gboolean gst_ring_buffer_device_is_open (GstRingBuffer *buf); gboolean gst_ring_buffer_device_is_open (GstRingBuffer *buf);
/* allocate resources */ /* allocate resources */
gboolean gst_ring_buffer_acquire (GstRingBuffer *buf, GstRingBufferSpec *spec); gboolean gst_ring_buffer_acquire (GstRingBuffer *buf, GstRingBufferSpec *spec);
gboolean gst_ring_buffer_release (GstRingBuffer *buf); gboolean gst_ring_buffer_release (GstRingBuffer *buf);
gboolean gst_ring_buffer_is_acquired (GstRingBuffer *buf); gboolean gst_ring_buffer_is_acquired (GstRingBuffer *buf);
/* flushing */ /* flushing */
void gst_ring_buffer_set_flushing (GstRingBuffer *buf, gboolean flushing); void gst_ring_buffer_set_flushing (GstRingBuffer *buf, gboolean flushing);
/* playback/pause */ /* playback/pause */
gboolean gst_ring_buffer_start (GstRingBuffer *buf); gboolean gst_ring_buffer_start (GstRingBuffer *buf);
gboolean gst_ring_buffer_pause (GstRingBuffer *buf); gboolean gst_ring_buffer_pause (GstRingBuffer *buf);
gboolean gst_ring_buffer_stop (GstRingBuffer *buf); gboolean gst_ring_buffer_stop (GstRingBuffer *buf);
/* get status */ /* get status */
guint gst_ring_buffer_delay (GstRingBuffer *buf); guint gst_ring_buffer_delay (GstRingBuffer *buf);
guint64 gst_ring_buffer_samples_done (GstRingBuffer *buf); guint64 gst_ring_buffer_samples_done (GstRingBuffer *buf);
void gst_ring_buffer_set_sample (GstRingBuffer *buf, guint64 sample); void gst_ring_buffer_set_sample (GstRingBuffer *buf, guint64 sample);
/* clear all segments */ /* clear all segments */
void gst_ring_buffer_clear_all (GstRingBuffer *buf); void gst_ring_buffer_clear_all (GstRingBuffer *buf);
/* commit samples */ /* commit samples */
guint gst_ring_buffer_commit (GstRingBuffer *buf, guint64 sample, guint gst_ring_buffer_commit (GstRingBuffer *buf, guint64 sample,
guchar *data, guint len); guchar *data, guint len);
/* read samples */ /* read samples */
guint gst_ring_buffer_read (GstRingBuffer *buf, guint64 sample, guint gst_ring_buffer_read (GstRingBuffer *buf, guint64 sample,
guchar *data, guint len); guchar *data, guint len);
/* mostly protected */ /* mostly protected */
gboolean gst_ring_buffer_prepare_write (GstRingBuffer *buf, gint *segment, guint8 **writeptr, gint *len); gboolean gst_ring_buffer_prepare_write (GstRingBuffer *buf, gint *segment, guint8 **writeptr, gint *len);
gboolean gst_ring_buffer_prepare_read (GstRingBuffer *buf, gint *segment, guint8 **readptr, gint *len); gboolean gst_ring_buffer_prepare_read (GstRingBuffer *buf, gint *segment, guint8 **readptr, gint *len);
void gst_ring_buffer_clear (GstRingBuffer *buf, gint segment); void gst_ring_buffer_clear (GstRingBuffer *buf, gint segment);
void gst_ring_buffer_advance (GstRingBuffer *buf, guint advance); void gst_ring_buffer_advance (GstRingBuffer *buf, guint advance);
G_END_DECLS G_END_DECLS

View file

@ -59,22 +59,22 @@ typedef enum {
* works with fixed caps, caller should check for that! Caller * works with fixed caps, caller should check for that! Caller
* g_free()s result of the getter. */ * g_free()s result of the getter. */
GstAudioChannelPosition * GstAudioChannelPosition *
gst_audio_get_channel_positions (GstStructure *str); gst_audio_get_channel_positions (GstStructure *str);
void gst_audio_set_channel_positions (GstStructure *str, void gst_audio_set_channel_positions (GstStructure *str,
const GstAudioChannelPosition *pos); const GstAudioChannelPosition *pos);
/* Sets a (non-fixed) list of possible audio channel positions /* Sets a (non-fixed) list of possible audio channel positions
* on a structure (this requires the "channels" property to * on a structure (this requires the "channels" property to
* be fixed!) or on a caps (here, the "channels" property may be * be fixed!) or on a caps (here, the "channels" property may be
* unfixed and the caps may even contain multiple structures). */ * unfixed and the caps may even contain multiple structures). */
void gst_audio_set_structure_channel_positions_list void gst_audio_set_structure_channel_positions_list
(GstStructure *str, (GstStructure *str,
const GstAudioChannelPosition *pos, const GstAudioChannelPosition *pos,
gint num_positions); gint num_positions);
void gst_audio_set_caps_channel_positions_list void gst_audio_set_caps_channel_positions_list
(GstCaps *caps, (GstCaps *caps,
const GstAudioChannelPosition *pos, const GstAudioChannelPosition *pos,
gint num_positions); gint num_positions);
/* Custom fixate function. Elements that implement some sort of /* Custom fixate function. Elements that implement some sort of
* channel conversion algorhithm should use this function for * channel conversion algorhithm should use this function for
@ -83,7 +83,7 @@ void gst_audio_set_caps_channel_positions_list
* the return value. The input properties may be (and are supposed * the return value. The input properties may be (and are supposed
* to be) unfixed. */ * to be) unfixed. */
GstAudioChannelPosition * GstAudioChannelPosition *
gst_audio_fixate_channel_positions (GstStructure *str); gst_audio_fixate_channel_positions (GstStructure *str);
G_END_DECLS G_END_DECLS

View file

@ -32,28 +32,28 @@ G_BEGIN_DECLS
#if (HAVE_LRINT && HAVE_LRINTF) #if (HAVE_LRINT && HAVE_LRINTF)
/* These defines enable functionality introduced with the 1999 ISO C /* These defines enable functionality introduced with the 1999 ISO C
** standard. They must be defined before the inclusion of math.h to ** standard. They must be defined before the inclusion of math.h to
** engage them. If optimisation is enabled, these functions will be ** engage them. If optimisation is enabled, these functions will be
** inlined. With optimisation switched off, you have to link in the ** inlined. With optimisation switched off, you have to link in the
** maths library using -lm. ** maths library using -lm.
*/ */
#define _ISOC9X_SOURCE 1 #define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1 #define _ISOC99_SOURCE 1
#define __USE_ISOC9X 1 #define __USE_ISOC9X 1
#define __USE_ISOC99 1 #define __USE_ISOC99 1
#include <math.h> #include <math.h>
#define gst_cast_float(x) ((gint)lrintf(x)) #define gst_cast_float(x) ((gint)lrintf(x))
#define gst_cast_double(x) ((gint)lrint(x)) #define gst_cast_double(x) ((gint)lrint(x))
#else #else
/* use a standard c cast, but do rounding correctly */ /* use a standard c cast, but do rounding correctly */
#define gst_cast_float(x) ((gint)floor((x)+0.5)) #define gst_cast_float(x) ((gint)floor((x)+0.5))
#define gst_cast_double(x) ((gint)floor((x)+0.5)) #define gst_cast_double(x) ((gint)floor((x)+0.5))
#endif #endif

View file

@ -2,7 +2,7 @@
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net> * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* *
* colorbalance.c: image color balance interface design * colorbalance.c: image color balance interface design
* virtual class function wrappers * virtual class function wrappers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public

View file

@ -32,10 +32,10 @@ G_BEGIN_DECLS
(gst_color_balance_get_type ()) (gst_color_balance_get_type ())
#define GST_COLOR_BALANCE(obj) \ #define GST_COLOR_BALANCE(obj) \
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE, \ (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE, \
GstColorBalance)) GstColorBalance))
#define GST_COLOR_BALANCE_CLASS(klass) \ #define GST_COLOR_BALANCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_COLOR_BALANCE, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_COLOR_BALANCE, \
GstColorBalanceClass)) GstColorBalanceClass))
#define GST_IS_COLOR_BALANCE(obj) \ #define GST_IS_COLOR_BALANCE(obj) \
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE)) (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE))
#define GST_IS_COLOR_BALANCE_CLASS(klass) \ #define GST_IS_COLOR_BALANCE_CLASS(klass) \
@ -62,34 +62,34 @@ typedef struct _GstColorBalanceClass {
const GList * (* list_channels) (GstColorBalance *balance); const GList * (* list_channels) (GstColorBalance *balance);
void (* set_value) (GstColorBalance *balance, void (* set_value) (GstColorBalance *balance,
GstColorBalanceChannel *channel, GstColorBalanceChannel *channel,
gint value); gint value);
gint (* get_value) (GstColorBalance *balance, gint (* get_value) (GstColorBalance *balance,
GstColorBalanceChannel *channel); GstColorBalanceChannel *channel);
/* signals */ /* signals */
void (* value_changed) (GstColorBalance *balance, void (* value_changed) (GstColorBalance *balance,
GstColorBalanceChannel *channel, GstColorBalanceChannel *channel,
gint value); gint value);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstColorBalanceClass; } GstColorBalanceClass;
GType gst_color_balance_get_type (void); GType gst_color_balance_get_type (void);
/* virtual class function wrappers */ /* virtual class function wrappers */
const GList * const GList *
gst_color_balance_list_channels (GstColorBalance *balance); gst_color_balance_list_channels (GstColorBalance *balance);
void gst_color_balance_set_value (GstColorBalance *balance, void gst_color_balance_set_value (GstColorBalance *balance,
GstColorBalanceChannel *channel, GstColorBalanceChannel *channel,
gint value); gint value);
gint gst_color_balance_get_value (GstColorBalance *balance, gint gst_color_balance_get_value (GstColorBalance *balance,
GstColorBalanceChannel *channel); GstColorBalanceChannel *channel);
/* trigger signal */ /* trigger signal */
void gst_color_balance_value_changed (GstColorBalance *balance, void gst_color_balance_value_changed (GstColorBalance *balance,
GstColorBalanceChannel *channel, GstColorBalanceChannel *channel,
gint value); gint value);
G_END_DECLS G_END_DECLS

View file

@ -30,10 +30,10 @@ G_BEGIN_DECLS
(gst_color_balance_channel_get_type ()) (gst_color_balance_channel_get_type ())
#define GST_COLOR_BALANCE_CHANNEL(obj) \ #define GST_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL, \
GstColorBalanceChannel)) GstColorBalanceChannel))
#define GST_COLOR_BALANCE_CHANNEL_CLASS(klass) \ #define GST_COLOR_BALANCE_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_COLOR_BALANCE_CHANNEL, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_COLOR_BALANCE_CHANNEL, \
GstColorBalanceChannelClass)) GstColorBalanceChannelClass))
#define GST_IS_COLOR_BALANCE_CHANNEL(obj) \ #define GST_IS_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL))
#define GST_IS_COLOR_BALANCE_CHANNEL_CLASS(klass) \ #define GST_IS_COLOR_BALANCE_CHANNEL_CLASS(klass) \
@ -44,7 +44,7 @@ typedef struct _GstColorBalanceChannel {
gchar *label; gchar *label;
gint min_value, gint min_value,
max_value; max_value;
} GstColorBalanceChannel; } GstColorBalanceChannel;
typedef struct _GstColorBalanceChannelClass { typedef struct _GstColorBalanceChannelClass {
@ -52,12 +52,12 @@ typedef struct _GstColorBalanceChannelClass {
/* signals */ /* signals */
void (* value_changed) (GstColorBalanceChannel *channel, void (* value_changed) (GstColorBalanceChannel *channel,
gint value); gint value);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstColorBalanceChannelClass; } GstColorBalanceChannelClass;
GType gst_color_balance_channel_get_type (void); GType gst_color_balance_channel_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -62,79 +62,79 @@ struct _GstMixerClass {
const GList * (* list_tracks) (GstMixer *mixer); const GList * (* list_tracks) (GstMixer *mixer);
void (* set_volume) (GstMixer *mixer, void (* set_volume) (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gint *volumes); gint *volumes);
void (* get_volume) (GstMixer *mixer, void (* get_volume) (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gint *volumes); gint *volumes);
void (* set_mute) (GstMixer *mixer, void (* set_mute) (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gboolean mute); gboolean mute);
void (* set_record) (GstMixer *mixer, void (* set_record) (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gboolean record); gboolean record);
/* signals */ /* signals */
void (* mute_toggled) (GstMixer *mixer, void (* mute_toggled) (GstMixer *mixer,
GstMixerTrack *channel, GstMixerTrack *channel,
gboolean mute); gboolean mute);
void (* record_toggled) (GstMixer *mixer, void (* record_toggled) (GstMixer *mixer,
GstMixerTrack *channel, GstMixerTrack *channel,
gboolean record); gboolean record);
void (* volume_changed) (GstMixer *mixer, void (* volume_changed) (GstMixer *mixer,
GstMixerTrack *channel, GstMixerTrack *channel,
gint *volumes); gint *volumes);
void (* set_option) (GstMixer *mixer, void (* set_option) (GstMixer *mixer,
GstMixerOptions *opts, GstMixerOptions *opts,
gchar *value); gchar *value);
const gchar * (* get_option) (GstMixer *mixer, const gchar * (* get_option) (GstMixer *mixer,
GstMixerOptions *opts); GstMixerOptions *opts);
void (* option_changed) (GstMixer *mixer, void (* option_changed) (GstMixer *mixer,
GstMixerOptions *opts, GstMixerOptions *opts,
gchar *option); gchar *option);
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_mixer_get_type (void); GType gst_mixer_get_type (void);
/* virtual class function wrappers */ /* virtual class function wrappers */
const GList * gst_mixer_list_tracks (GstMixer *mixer); const GList * gst_mixer_list_tracks (GstMixer *mixer);
void gst_mixer_set_volume (GstMixer *mixer, void gst_mixer_set_volume (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gint *volumes); gint *volumes);
void gst_mixer_get_volume (GstMixer *mixer, void gst_mixer_get_volume (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gint *volumes); gint *volumes);
void gst_mixer_set_mute (GstMixer *mixer, void gst_mixer_set_mute (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gboolean mute); gboolean mute);
void gst_mixer_set_record (GstMixer *mixer, void gst_mixer_set_record (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gboolean record); gboolean record);
void gst_mixer_set_option (GstMixer *mixer, void gst_mixer_set_option (GstMixer *mixer,
GstMixerOptions *opts, GstMixerOptions *opts,
gchar *value); gchar *value);
const gchar * gst_mixer_get_option (GstMixer *mixer, const gchar * gst_mixer_get_option (GstMixer *mixer,
GstMixerOptions *opts); GstMixerOptions *opts);
/* trigger signals */ /* trigger signals */
void gst_mixer_mute_toggled (GstMixer *mixer, void gst_mixer_mute_toggled (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gboolean mute); gboolean mute);
void gst_mixer_record_toggled (GstMixer *mixer, void gst_mixer_record_toggled (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gboolean record); gboolean record);
void gst_mixer_volume_changed (GstMixer *mixer, void gst_mixer_volume_changed (GstMixer *mixer,
GstMixerTrack *track, GstMixerTrack *track,
gint *volumes); gint *volumes);
void gst_mixer_option_changed (GstMixer *mixer, void gst_mixer_option_changed (GstMixer *mixer,
GstMixerOptions *opts, GstMixerOptions *opts,
gchar *value); gchar *value);
G_END_DECLS G_END_DECLS

View file

@ -33,10 +33,10 @@ G_BEGIN_DECLS
(gst_mixer_options_get_type ()) (gst_mixer_options_get_type ())
#define GST_MIXER_OPTIONS(obj) \ #define GST_MIXER_OPTIONS(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_OPTIONS, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_OPTIONS, \
GstMixerOptions)) GstMixerOptions))
#define GST_MIXER_OPTIONS_CLASS(klass) \ #define GST_MIXER_OPTIONS_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_OPTIONS, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_OPTIONS, \
GstMixerOptionsClass)) GstMixerOptionsClass))
#define GST_IS_MIXER_OPTIONS(obj) \ #define GST_IS_MIXER_OPTIONS(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_OPTIONS)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_OPTIONS))
#define GST_IS_MIXER_OPTIONS_CLASS(klass) \ #define GST_IS_MIXER_OPTIONS_CLASS(klass) \
@ -59,12 +59,12 @@ struct _GstMixerOptionsClass {
/* signals */ /* signals */
void (* option_changed) (GstMixerOptions *opts, void (* option_changed) (GstMixerOptions *opts,
gchar *value); gchar *value);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_mixer_options_get_type (void); GType gst_mixer_options_get_type (void);
GList * gst_mixer_options_get_values (GstMixerOptions *mixer_options); GList * gst_mixer_options_get_values (GstMixerOptions *mixer_options);

View file

@ -30,10 +30,10 @@ G_BEGIN_DECLS
(gst_mixer_track_get_type ()) (gst_mixer_track_get_type ())
#define GST_MIXER_TRACK(obj) \ #define GST_MIXER_TRACK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_TRACK, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_TRACK, \
GstMixerTrack)) GstMixerTrack))
#define GST_MIXER_TRACK_CLASS(klass) \ #define GST_MIXER_TRACK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_TRACK, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_TRACK, \
GstMixerTrackClass)) GstMixerTrackClass))
#define GST_IS_MIXER_TRACK(obj) \ #define GST_IS_MIXER_TRACK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_TRACK)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_TRACK))
#define GST_IS_MIXER_TRACK_CLASS(klass) \ #define GST_IS_MIXER_TRACK_CLASS(klass) \
@ -77,8 +77,8 @@ struct _GstMixerTrack {
/* FIXME: flags should be guint32. Change in 0.9 */ /* FIXME: flags should be guint32. Change in 0.9 */
GstMixerTrackFlags flags; GstMixerTrackFlags flags;
gint num_channels, gint num_channels,
min_volume, min_volume,
max_volume; max_volume;
}; };
struct _GstMixerTrackClass { struct _GstMixerTrackClass {
@ -86,16 +86,16 @@ struct _GstMixerTrackClass {
/* signals */ /* signals */
void (* mute_toggled) (GstMixerTrack *channel, void (* mute_toggled) (GstMixerTrack *channel,
gboolean mute); gboolean mute);
void (* record_toggled) (GstMixerTrack *channel, void (* record_toggled) (GstMixerTrack *channel,
gboolean record); gboolean record);
void (* volume_changed) (GstMixerTrack *channel, void (* volume_changed) (GstMixerTrack *channel,
gint *volumes); gint *volumes);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_mixer_track_get_type (void); GType gst_mixer_track_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -47,15 +47,15 @@ typedef struct _GstNavigationInterface {
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstNavigationInterface; } GstNavigationInterface;
GType gst_navigation_get_type (void); GType gst_navigation_get_type (void);
/* virtual class function wrappers */ /* virtual class function wrappers */
void gst_navigation_send_event (GstNavigation *navigation, GstStructure *structure); void gst_navigation_send_event (GstNavigation *navigation, GstStructure *structure);
void gst_navigation_send_key_event (GstNavigation *navigation, void gst_navigation_send_key_event (GstNavigation *navigation,
const char *event, const char *key); const char *event, const char *key);
void gst_navigation_send_mouse_event (GstNavigation *navigation, void gst_navigation_send_mouse_event (GstNavigation *navigation,
const char *event, int button, double x, double y); const char *event, int button, double x, double y);
G_END_DECLS G_END_DECLS

View file

@ -42,55 +42,55 @@ typedef struct _GstPropertyProbeInterface {
/* signals */ /* signals */
void (*probe_needed) (GstPropertyProbe *probe, void (*probe_needed) (GstPropertyProbe *probe,
const GParamSpec *pspec); const GParamSpec *pspec);
/* virtual functions */ /* virtual functions */
const GList * (*get_properties) (GstPropertyProbe *probe); const GList * (*get_properties) (GstPropertyProbe *probe);
gboolean (*needs_probe) (GstPropertyProbe *probe, gboolean (*needs_probe) (GstPropertyProbe *probe,
guint prop_id, guint prop_id,
const GParamSpec *pspec); const GParamSpec *pspec);
void (*probe_property) (GstPropertyProbe *probe, void (*probe_property) (GstPropertyProbe *probe,
guint prop_id, guint prop_id,
const GParamSpec *pspec); const GParamSpec *pspec);
GValueArray * (*get_values) (GstPropertyProbe *probe, GValueArray * (*get_values) (GstPropertyProbe *probe,
guint prop_id, guint prop_id,
const GParamSpec *pspec); const GParamSpec *pspec);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstPropertyProbeInterface; } GstPropertyProbeInterface;
GType gst_property_probe_get_type (void); GType gst_property_probe_get_type (void);
/* virtual class function wrappers */ /* virtual class function wrappers */
/* returns list of GParamSpecs */ /* returns list of GParamSpecs */
const GList * gst_property_probe_get_properties (GstPropertyProbe *probe); const GList * gst_property_probe_get_properties (GstPropertyProbe *probe);
const GParamSpec *gst_property_probe_get_property (GstPropertyProbe *probe, const GParamSpec *gst_property_probe_get_property (GstPropertyProbe *probe,
const gchar *name); const gchar *name);
/* probe one property */ /* probe one property */
void gst_property_probe_probe_property (GstPropertyProbe *probe, void gst_property_probe_probe_property (GstPropertyProbe *probe,
const GParamSpec *pspec); const GParamSpec *pspec);
void gst_property_probe_probe_property_name (GstPropertyProbe *probe, void gst_property_probe_probe_property_name (GstPropertyProbe *probe,
const gchar *name); const gchar *name);
/* do we need a probe? */ /* do we need a probe? */
gboolean gst_property_probe_needs_probe (GstPropertyProbe *probe, gboolean gst_property_probe_needs_probe (GstPropertyProbe *probe,
const GParamSpec *pspec); const GParamSpec *pspec);
gboolean gst_property_probe_needs_probe_name (GstPropertyProbe *probe, gboolean gst_property_probe_needs_probe_name (GstPropertyProbe *probe,
const gchar *name); const gchar *name);
/* returns list of GValues */ /* returns list of GValues */
GValueArray * gst_property_probe_get_values (GstPropertyProbe *probe, GValueArray * gst_property_probe_get_values (GstPropertyProbe *probe,
const GParamSpec *pspec); const GParamSpec *pspec);
GValueArray * gst_property_probe_get_values_name (GstPropertyProbe *probe, GValueArray * gst_property_probe_get_values_name (GstPropertyProbe *probe,
const gchar *name); const gchar *name);
/* sugar */ /* sugar */
GValueArray * gst_property_probe_probe_and_get_values (GstPropertyProbe *probe, GValueArray * gst_property_probe_probe_and_get_values (GstPropertyProbe *probe,
const GParamSpec *pspec); const GParamSpec *pspec);
GValueArray * gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe, GValueArray * gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe,
const gchar *name); const gchar *name);
G_END_DECLS G_END_DECLS

View file

@ -50,77 +50,77 @@ typedef struct _GstTunerClass {
/* virtual functions */ /* virtual functions */
const GList * (* list_channels) (GstTuner *tuner); const GList * (* list_channels) (GstTuner *tuner);
void (* set_channel) (GstTuner *tuner, void (* set_channel) (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
GstTunerChannel * GstTunerChannel *
(* get_channel) (GstTuner *tuner); (* get_channel) (GstTuner *tuner);
const GList * (* list_norms) (GstTuner *tuner); const GList * (* list_norms) (GstTuner *tuner);
void (* set_norm) (GstTuner *tuner, void (* set_norm) (GstTuner *tuner,
GstTunerNorm *norm); GstTunerNorm *norm);
GstTunerNorm *(* get_norm) (GstTuner *tuner); GstTunerNorm *(* get_norm) (GstTuner *tuner);
void (* set_frequency) (GstTuner *tuner, void (* set_frequency) (GstTuner *tuner,
GstTunerChannel *channel, GstTunerChannel *channel,
gulong frequency); gulong frequency);
gulong (* get_frequency) (GstTuner *tuner, gulong (* get_frequency) (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
gint (* signal_strength) (GstTuner *tuner, gint (* signal_strength) (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
/* signals */ /* signals */
void (*channel_changed) (GstTuner *tuner, void (*channel_changed) (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
void (*norm_changed) (GstTuner *tuner, void (*norm_changed) (GstTuner *tuner,
GstTunerNorm *norm); GstTunerNorm *norm);
void (*frequency_changed) (GstTuner *tuner, void (*frequency_changed) (GstTuner *tuner,
GstTunerChannel *channel, GstTunerChannel *channel,
gulong frequency); gulong frequency);
void (*signal_changed) (GstTuner *tuner, void (*signal_changed) (GstTuner *tuner,
GstTunerChannel *channel, GstTunerChannel *channel,
gint signal); gint signal);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstTunerClass; } GstTunerClass;
GType gst_tuner_get_type (void); GType gst_tuner_get_type (void);
/* virtual class function wrappers */ /* virtual class function wrappers */
const GList * gst_tuner_list_channels (GstTuner *tuner); const GList * gst_tuner_list_channels (GstTuner *tuner);
void gst_tuner_set_channel (GstTuner *tuner, void gst_tuner_set_channel (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
GstTunerChannel * GstTunerChannel *
gst_tuner_get_channel (GstTuner *tuner); gst_tuner_get_channel (GstTuner *tuner);
const GList * gst_tuner_list_norms (GstTuner *tuner); const GList * gst_tuner_list_norms (GstTuner *tuner);
void gst_tuner_set_norm (GstTuner *tuner, void gst_tuner_set_norm (GstTuner *tuner,
GstTunerNorm *norm); GstTunerNorm *norm);
GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner); GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner);
void gst_tuner_set_frequency (GstTuner *tuner, void gst_tuner_set_frequency (GstTuner *tuner,
GstTunerChannel *channel, GstTunerChannel *channel,
gulong frequency); gulong frequency);
gulong gst_tuner_get_frequency (GstTuner *tuner, gulong gst_tuner_get_frequency (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
gint gst_tuner_signal_strength (GstTuner *tuner, gint gst_tuner_signal_strength (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
/* helper functions */ /* helper functions */
GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner, GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner,
gchar *norm); gchar *norm);
GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner, GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner,
gchar *channel); gchar *channel);
/* trigger signals */ /* trigger signals */
void gst_tuner_channel_changed (GstTuner *tuner, void gst_tuner_channel_changed (GstTuner *tuner,
GstTunerChannel *channel); GstTunerChannel *channel);
void gst_tuner_norm_changed (GstTuner *tuner, void gst_tuner_norm_changed (GstTuner *tuner,
GstTunerNorm *norm); GstTunerNorm *norm);
void gst_tuner_frequency_changed (GstTuner *tuner, void gst_tuner_frequency_changed (GstTuner *tuner,
GstTunerChannel *channel, GstTunerChannel *channel,
gulong frequency); gulong frequency);
void gst_tuner_signal_changed (GstTuner *tuner, void gst_tuner_signal_changed (GstTuner *tuner,
GstTunerChannel *channel, GstTunerChannel *channel,
gint signal); gint signal);
G_END_DECLS G_END_DECLS

View file

@ -30,10 +30,10 @@ G_BEGIN_DECLS
(gst_tuner_channel_get_type ()) (gst_tuner_channel_get_type ())
#define GST_TUNER_CHANNEL(obj) \ #define GST_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER_CHANNEL, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER_CHANNEL, \
GstTunerChannel)) GstTunerChannel))
#define GST_TUNER_CHANNEL_CLASS(klass) \ #define GST_TUNER_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER_CHANNEL, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER_CHANNEL, \
GstTunerChannelClass)) GstTunerChannelClass))
#define GST_IS_TUNER_CHANNEL(obj) \ #define GST_IS_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_CHANNEL)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_CHANNEL))
#define GST_IS_TUNER_CHANNEL_CLASS(klass) \ #define GST_IS_TUNER_CHANNEL_CLASS(klass) \
@ -56,9 +56,9 @@ typedef struct _GstTunerChannel {
GstTunerChannelFlags flags; GstTunerChannelFlags flags;
gfloat freq_multiplicator; gfloat freq_multiplicator;
gulong min_frequency, gulong min_frequency,
max_frequency; max_frequency;
gint min_signal, gint min_signal,
max_signal; max_signal;
} GstTunerChannel; } GstTunerChannel;
typedef struct _GstTunerChannelClass { typedef struct _GstTunerChannelClass {
@ -66,14 +66,14 @@ typedef struct _GstTunerChannelClass {
/* signals */ /* signals */
void (*frequency_changed) (GstTunerChannel *channel, void (*frequency_changed) (GstTunerChannel *channel,
gulong frequency); gulong frequency);
void (*signal_changed) (GstTunerChannel *channel, void (*signal_changed) (GstTunerChannel *channel,
gint signal); gint signal);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstTunerChannelClass; } GstTunerChannelClass;
GType gst_tuner_channel_get_type (void); GType gst_tuner_channel_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -50,7 +50,7 @@ typedef struct _GstTunerNormClass {
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstTunerNormClass; } GstTunerNormClass;
GType gst_tuner_norm_get_type (void); GType gst_tuner_norm_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -31,7 +31,7 @@ G_BEGIN_DECLS
(gst_x_overlay_get_type ()) (gst_x_overlay_get_type ())
#define GST_X_OVERLAY(obj) \ #define GST_X_OVERLAY(obj) \
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, \ (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, \
GstXOverlay)) GstXOverlay))
#define GST_X_OVERLAY_CLASS(klass) \ #define GST_X_OVERLAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_X_OVERLAY, GstXOverlayClass)) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_X_OVERLAY, GstXOverlayClass))
#define GST_IS_X_OVERLAY(obj) \ #define GST_IS_X_OVERLAY(obj) \
@ -56,7 +56,7 @@ typedef struct _GstXOverlayClass {
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstXOverlayClass; } GstXOverlayClass;
GType gst_x_overlay_get_type (void); GType gst_x_overlay_get_type (void);
/* virtual class function wrappers */ /* virtual class function wrappers */
void gst_x_overlay_set_xwindow_id (GstXOverlay *overlay, gulong xwindow_id); void gst_x_overlay_set_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);

View file

@ -46,12 +46,12 @@ typedef enum {
typedef struct typedef struct
{ {
GstNetType type; GstNetType type;
union { union {
guint8 ip6[16]; guint8 ip6[16];
guint32 ip4; guint32 ip4;
} address; } address;
guint16 port; guint16 port;
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
} GstNetAddress; } GstNetAddress;
@ -74,17 +74,17 @@ struct _GstNetBufferClass {
}; };
/* creating buffers */ /* creating buffers */
GType gst_netbuffer_get_type (void); GType gst_netbuffer_get_type (void);
GstNetBuffer* gst_netbuffer_new (void); GstNetBuffer* gst_netbuffer_new (void);
/* address operations */ /* address operations */
void gst_netaddress_set_ip4_address (GstNetAddress *nadd, guint32 address, guint16 port); void gst_netaddress_set_ip4_address (GstNetAddress *nadd, guint32 address, guint16 port);
void gst_netaddress_set_ip6_address (GstNetAddress *nadd, guint8 address[16], guint16 port); void gst_netaddress_set_ip6_address (GstNetAddress *nadd, guint8 address[16], guint16 port);
GstNetType gst_netaddress_get_net_type (GstNetAddress *nadd); GstNetType gst_netaddress_get_net_type (GstNetAddress *nadd);
gboolean gst_netaddress_get_ip4_address (GstNetAddress *nadd, guint32 *address, guint16 *port); gboolean gst_netaddress_get_ip4_address (GstNetAddress *nadd, guint32 *address, guint16 *port);
gboolean gst_netaddress_get_ip6_address (GstNetAddress *nadd, guint8 address[16], guint16 *port); gboolean gst_netaddress_get_ip6_address (GstNetAddress *nadd, guint8 address[16], guint16 *port);
G_END_DECLS G_END_DECLS

View file

@ -318,10 +318,10 @@ typedef struct _gst_riff_strf_iavs {
typedef struct _gst_riff_index_entry { typedef 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;
} gst_riff_index_entry; } gst_riff_index_entry;

View file

@ -33,25 +33,25 @@ G_BEGIN_DECLS
*/ */
GstCaps * gst_riff_create_video_caps (guint32 codec_fcc, GstCaps * gst_riff_create_video_caps (guint32 codec_fcc,
gst_riff_strh * strh, gst_riff_strh * strh,
gst_riff_strf_vids * strf, gst_riff_strf_vids * strf,
GstBuffer * strf_data, GstBuffer * strf_data,
GstBuffer * strd_data, GstBuffer * strd_data,
char ** codec_name); char ** codec_name);
GstCaps * gst_riff_create_audio_caps (guint16 codec_id, GstCaps * gst_riff_create_audio_caps (guint16 codec_id,
gst_riff_strh * strh, gst_riff_strh * strh,
gst_riff_strf_auds * strf, gst_riff_strf_auds * strf,
GstBuffer * strf_data, GstBuffer * strf_data,
GstBuffer * strd_data, GstBuffer * strd_data,
char ** codec_name); char ** codec_name);
GstCaps * gst_riff_create_iavs_caps (guint32 codec_fcc, GstCaps * gst_riff_create_iavs_caps (guint32 codec_fcc,
gst_riff_strh * strh, gst_riff_strh * strh,
gst_riff_strf_iavs * strf, gst_riff_strf_iavs * strf,
GstBuffer * strf_data, GstBuffer * strf_data,
GstBuffer * strd_data, GstBuffer * strd_data,
char ** codec_name); char ** codec_name);
/* /*
* Create template caps (includes all known types). * Create template caps (includes all known types).
*/ */

View file

@ -34,10 +34,10 @@ G_BEGIN_DECLS
*/ */
GstFlowReturn gst_riff_read_chunk (GstElement * element, GstFlowReturn gst_riff_read_chunk (GstElement * element,
GstPad * pad, GstPad * pad,
guint64 * offset, guint64 * offset,
guint32 * fourcc, guint32 * fourcc,
GstBuffer ** chunk_data); GstBuffer ** chunk_data);
/* /*
* These functions operate on provided data (the caller is * These functions operate on provided data (the caller is
@ -46,41 +46,41 @@ GstFlowReturn gst_riff_read_chunk (GstElement * element,
* by the function. * by the function.
*/ */
gboolean gst_riff_parse_chunk (GstElement * element, gboolean gst_riff_parse_chunk (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
guint * offset, guint * offset,
guint32 * fourcc, guint32 * fourcc,
GstBuffer ** chunk_data); GstBuffer ** chunk_data);
gboolean gst_riff_parse_file_header (GstElement * element, gboolean gst_riff_parse_file_header (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
guint32 * doctype); guint32 * doctype);
gboolean gst_riff_parse_strh (GstElement * element, gboolean gst_riff_parse_strh (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
gst_riff_strh ** strh); gst_riff_strh ** strh);
gboolean gst_riff_parse_strf_vids (GstElement * element, gboolean gst_riff_parse_strf_vids (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
gst_riff_strf_vids ** strf, gst_riff_strf_vids ** strf,
GstBuffer ** data); GstBuffer ** data);
gboolean gst_riff_parse_strf_auds (GstElement * element, gboolean gst_riff_parse_strf_auds (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
gst_riff_strf_auds ** strf, gst_riff_strf_auds ** strf,
GstBuffer ** data); GstBuffer ** data);
gboolean gst_riff_parse_strf_iavs (GstElement * element, gboolean gst_riff_parse_strf_iavs (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
gst_riff_strf_iavs ** strf, gst_riff_strf_iavs ** strf,
GstBuffer ** data); GstBuffer ** data);
void gst_riff_parse_info (GstElement * element, void gst_riff_parse_info (GstElement * element,
GstBuffer * buf, GstBuffer * buf,
GstTagList ** taglist); GstTagList ** taglist);
/* /*
* Init. * Init.
*/ */
void gst_riff_init (void); void gst_riff_init (void);
G_END_DECLS G_END_DECLS

View file

@ -32,7 +32,7 @@ G_BEGIN_DECLS
#define GST_BASE_RTP_DEPAYLOAD_CLASS(klass) \ #define GST_BASE_RTP_DEPAYLOAD_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_RTP_DEPAYLOAD,GstBaseRTPDepayload)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_RTP_DEPAYLOAD,GstBaseRTPDepayload))
#define GST_BASE_RTP_DEPAYLOAD_GET_CLASS(obj) \ #define GST_BASE_RTP_DEPAYLOAD_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_BASE_RTP_DEPAYLOAD,GstBaseRTPDepayloadClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_BASE_RTP_DEPAYLOAD,GstBaseRTPDepayloadClass))
#define GST_IS_BASE_RTP_DEPAYLOAD(obj) \ #define GST_IS_BASE_RTP_DEPAYLOAD(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_DEPAYLOAD)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_DEPAYLOAD))
#define GST_IS_BASE_RTP_DEPAYLOAD_CLASS(obj) \ #define GST_IS_BASE_RTP_DEPAYLOAD_CLASS(obj) \
@ -44,10 +44,10 @@ G_BEGIN_DECLS
/* in milliseconds */ /* in milliseconds */
#define RTP_QUEUE_DELAY 100; #define RTP_QUEUE_DELAY 100;
#define QUEUE_LOCK_INIT(base) (g_static_rec_mutex_init(&base->queuelock)) #define QUEUE_LOCK_INIT(base) (g_static_rec_mutex_init(&base->queuelock))
#define QUEUE_LOCK_FREE(base) (g_static_rec_mutex_free(&base->queuelock)) #define QUEUE_LOCK_FREE(base) (g_static_rec_mutex_free(&base->queuelock))
#define QUEUE_LOCK(base) (g_static_rec_mutex_lock(&base->queuelock)) #define QUEUE_LOCK(base) (g_static_rec_mutex_lock(&base->queuelock))
#define QUEUE_UNLOCK(base) (g_static_rec_mutex_unlock(&base->queuelock)) #define QUEUE_UNLOCK(base) (g_static_rec_mutex_unlock(&base->queuelock))
typedef struct _GstBaseRTPDepayload GstBaseRTPDepayload; typedef struct _GstBaseRTPDepayload GstBaseRTPDepayload;
typedef struct _GstBaseRTPDepayloadClass GstBaseRTPDepayloadClass; typedef struct _GstBaseRTPDepayloadClass GstBaseRTPDepayloadClass;

View file

@ -32,12 +32,12 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_MTU 1024 #define DEFAULT_MTU 1024
#define DEFAULT_PT 96 #define DEFAULT_PT 96
#define DEFAULT_SSRC -1 #define DEFAULT_SSRC -1
#define DEFAULT_TIMESTAMP_OFFSET -1 #define DEFAULT_TIMESTAMP_OFFSET -1
#define DEFAULT_SEQNUM_OFFSET -1 #define DEFAULT_SEQNUM_OFFSET -1
#define DEFAULT_MAX_PTIME -1 #define DEFAULT_MAX_PTIME -1
enum enum
{ {

View file

@ -25,17 +25,17 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_BASE_RTP_PAYLOAD \ #define GST_TYPE_BASE_RTP_PAYLOAD \
(gst_basertppayload_get_type()) (gst_basertppayload_get_type())
#define GST_BASE_RTP_PAYLOAD(obj) \ #define GST_BASE_RTP_PAYLOAD(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_RTP_PAYLOAD,GstBaseRTPPayload)) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_RTP_PAYLOAD,GstBaseRTPPayload))
#define GST_BASE_RTP_PAYLOAD_CLASS(klass) \ #define GST_BASE_RTP_PAYLOAD_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_RTP_PAYLOAD,GstBaseRTPPayload)) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_RTP_PAYLOAD,GstBaseRTPPayload))
#define GST_BASE_RTP_PAYLOAD_GET_CLASS(obj) \ #define GST_BASE_RTP_PAYLOAD_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_RTP_PAYLOAD, GstBaseRTPPayloadClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_RTP_PAYLOAD, GstBaseRTPPayloadClass))
#define GST_IS_BASE_RTP_PAYLOAD(obj) \ #define GST_IS_BASE_RTP_PAYLOAD(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_PAYLOAD)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_RTP_PAYLOAD))
#define GST_IS_BASE_RTP_PAYLOAD_CLASS(obj) \ #define GST_IS_BASE_RTP_PAYLOAD_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_PAYLOAD)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_RTP_PAYLOAD))
typedef struct _GstBaseRTPPayload GstBaseRTPPayload; typedef struct _GstBaseRTPPayload GstBaseRTPPayload;
typedef struct _GstBaseRTPPayloadClass GstBaseRTPPayloadClass; typedef struct _GstBaseRTPPayloadClass GstBaseRTPPayloadClass;
@ -87,31 +87,31 @@ struct _GstBaseRTPPayloadClass
GstElementClass parent_class; GstElementClass parent_class;
/* receive caps on the sink pad, configure the payloader. */ /* receive caps on the sink pad, configure the payloader. */
gboolean (*set_caps) (GstBaseRTPPayload *payload, GstCaps *caps); gboolean (*set_caps) (GstBaseRTPPayload *payload, GstCaps *caps);
/* handle a buffer, perform 0 or more gst_basertppayload_push() on /* handle a buffer, perform 0 or more gst_basertppayload_push() on
* the RTP buffers */ * the RTP buffers */
GstFlowReturn (*handle_buffer) (GstBaseRTPPayload *payload, GstFlowReturn (*handle_buffer) (GstBaseRTPPayload *payload,
GstBuffer *buffer); GstBuffer *buffer);
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_basertppayload_get_type (void); GType gst_basertppayload_get_type (void);
void gst_basertppayload_set_options (GstBaseRTPPayload *payload, void gst_basertppayload_set_options (GstBaseRTPPayload *payload,
gchar *media, gboolean dynamic, gchar *media, gboolean dynamic,
gchar *encoding_name, gchar *encoding_name,
guint32 clock_rate); guint32 clock_rate);
gboolean gst_basertppayload_set_outcaps (GstBaseRTPPayload *payload, gboolean gst_basertppayload_set_outcaps (GstBaseRTPPayload *payload,
gchar *fieldname, ...); gchar *fieldname, ...);
gboolean gst_basertppayload_is_filled (GstBaseRTPPayload *payload, gboolean gst_basertppayload_is_filled (GstBaseRTPPayload *payload,
guint size, GstClockTime duration); guint size, GstClockTime duration);
GstFlowReturn gst_basertppayload_push (GstBaseRTPPayload *payload, GstFlowReturn gst_basertppayload_push (GstBaseRTPPayload *payload,
GstBuffer *buffer); GstBuffer *buffer);
G_END_DECLS G_END_DECLS

View file

@ -46,18 +46,18 @@ typedef struct _GstRTPHeader
guint32 csrc[1]; /* optional CSRC list */ guint32 csrc[1]; /* optional CSRC list */
} GstRTPHeader; } GstRTPHeader;
#define GST_RTP_HEADER_VERSION(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->version) #define GST_RTP_HEADER_VERSION(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->version)
#define GST_RTP_HEADER_PADDING(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->padding) #define GST_RTP_HEADER_PADDING(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->padding)
#define GST_RTP_HEADER_EXTENSION(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->extension) #define GST_RTP_HEADER_EXTENSION(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->extension)
#define GST_RTP_HEADER_CSRC_COUNT(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->csrc_count) #define GST_RTP_HEADER_CSRC_COUNT(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->csrc_count)
#define GST_RTP_HEADER_MARKER(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->marker) #define GST_RTP_HEADER_MARKER(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->marker)
#define GST_RTP_HEADER_PAYLOAD_TYPE(buf)(((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->payload_type) #define GST_RTP_HEADER_PAYLOAD_TYPE(buf)(((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->payload_type)
#define GST_RTP_HEADER_SEQ(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->seq) #define GST_RTP_HEADER_SEQ(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->seq)
#define GST_RTP_HEADER_TIMESTAMP(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->timestamp) #define GST_RTP_HEADER_TIMESTAMP(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->timestamp)
#define GST_RTP_HEADER_SSRC(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->ssrc) #define GST_RTP_HEADER_SSRC(buf) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->ssrc)
#define GST_RTP_HEADER_CSRC(buf,i) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->csrc[i]) #define GST_RTP_HEADER_CSRC(buf,i) (((GstRTPHeader *)(GST_BUFFER_DATA (buf)))->csrc[i])
#define GST_RTP_HEADER_CSRC_SIZE(buf) (GST_RTP_HEADER_CSRC_COUNT(buf) * sizeof (guint32)) #define GST_RTP_HEADER_CSRC_SIZE(buf) (GST_RTP_HEADER_CSRC_COUNT(buf) * sizeof (guint32))
void void
gst_rtp_buffer_allocate_data (GstBuffer * buffer, guint payload_len, gst_rtp_buffer_allocate_data (GstBuffer * buffer, guint payload_len,

View file

@ -72,57 +72,57 @@ typedef enum
#define GST_RTP_PAYLOAD_H263_STRING "34" #define GST_RTP_PAYLOAD_H263_STRING "34"
/* creating buffers */ /* creating buffers */
GstBuffer* gst_rtp_buffer_new (void); GstBuffer* gst_rtp_buffer_new (void);
void gst_rtp_buffer_allocate_data (GstBuffer *buffer, guint payload_len, void gst_rtp_buffer_allocate_data (GstBuffer *buffer, guint payload_len,
guint8 pad_len, guint8 csrc_count); guint8 pad_len, guint8 csrc_count);
GstBuffer* gst_rtp_buffer_new_take_data (gpointer data, guint len); GstBuffer* gst_rtp_buffer_new_take_data (gpointer data, guint len);
GstBuffer* gst_rtp_buffer_new_copy_data (gpointer data, guint len); GstBuffer* gst_rtp_buffer_new_copy_data (gpointer data, guint len);
GstBuffer* gst_rtp_buffer_new_allocate (guint payload_len, guint8 pad_len, guint8 csrc_count); GstBuffer* gst_rtp_buffer_new_allocate (guint payload_len, guint8 pad_len, guint8 csrc_count);
GstBuffer* gst_rtp_buffer_new_allocate_len (guint packet_len, guint8 pad_len, guint8 csrc_count); GstBuffer* gst_rtp_buffer_new_allocate_len (guint packet_len, guint8 pad_len, guint8 csrc_count);
guint gst_rtp_buffer_calc_header_len (guint8 csrc_count); guint gst_rtp_buffer_calc_header_len (guint8 csrc_count);
guint gst_rtp_buffer_calc_packet_len (guint payload_len, guint8 pad_len, guint8 csrc_count); guint gst_rtp_buffer_calc_packet_len (guint payload_len, guint8 pad_len, guint8 csrc_count);
guint gst_rtp_buffer_calc_payload_len (guint packet_len, guint8 pad_len, guint8 csrc_count); guint gst_rtp_buffer_calc_payload_len (guint packet_len, guint8 pad_len, guint8 csrc_count);
gboolean gst_rtp_buffer_validate_data (guint8 *data, guint len); gboolean gst_rtp_buffer_validate_data (guint8 *data, guint len);
gboolean gst_rtp_buffer_validate (GstBuffer *buffer); gboolean gst_rtp_buffer_validate (GstBuffer *buffer);
void gst_rtp_buffer_set_packet_len (GstBuffer *buffer, guint len); void gst_rtp_buffer_set_packet_len (GstBuffer *buffer, guint len);
guint gst_rtp_buffer_get_packet_len (GstBuffer *buffer); guint gst_rtp_buffer_get_packet_len (GstBuffer *buffer);
guint8 gst_rtp_buffer_get_version (GstBuffer *buffer); guint8 gst_rtp_buffer_get_version (GstBuffer *buffer);
void gst_rtp_buffer_set_version (GstBuffer *buffer, guint8 version); void gst_rtp_buffer_set_version (GstBuffer *buffer, guint8 version);
gboolean gst_rtp_buffer_get_padding (GstBuffer *buffer); gboolean gst_rtp_buffer_get_padding (GstBuffer *buffer);
void gst_rtp_buffer_set_padding (GstBuffer *buffer, gboolean padding); void gst_rtp_buffer_set_padding (GstBuffer *buffer, gboolean padding);
void gst_rtp_buffer_pad_to (GstBuffer *buffer, guint len); void gst_rtp_buffer_pad_to (GstBuffer *buffer, guint len);
gboolean gst_rtp_buffer_get_extension (GstBuffer *buffer); gboolean gst_rtp_buffer_get_extension (GstBuffer *buffer);
void gst_rtp_buffer_set_extension (GstBuffer *buffer, gboolean extension); void gst_rtp_buffer_set_extension (GstBuffer *buffer, gboolean extension);
guint32 gst_rtp_buffer_get_ssrc (GstBuffer *buffer); guint32 gst_rtp_buffer_get_ssrc (GstBuffer *buffer);
void gst_rtp_buffer_set_ssrc (GstBuffer *buffer, guint32 ssrc); void gst_rtp_buffer_set_ssrc (GstBuffer *buffer, guint32 ssrc);
guint8 gst_rtp_buffer_get_csrc_count (GstBuffer *buffer); guint8 gst_rtp_buffer_get_csrc_count (GstBuffer *buffer);
guint32 gst_rtp_buffer_get_csrc (GstBuffer *buffer, guint8 idx); guint32 gst_rtp_buffer_get_csrc (GstBuffer *buffer, guint8 idx);
void gst_rtp_buffer_set_csrc (GstBuffer *buffer, guint8 idx, guint32 csrc); void gst_rtp_buffer_set_csrc (GstBuffer *buffer, guint8 idx, guint32 csrc);
gboolean gst_rtp_buffer_get_marker (GstBuffer *buffer); gboolean gst_rtp_buffer_get_marker (GstBuffer *buffer);
void gst_rtp_buffer_set_marker (GstBuffer *buffer, gboolean marker); void gst_rtp_buffer_set_marker (GstBuffer *buffer, gboolean marker);
guint8 gst_rtp_buffer_get_payload_type (GstBuffer *buffer); guint8 gst_rtp_buffer_get_payload_type (GstBuffer *buffer);
void gst_rtp_buffer_set_payload_type (GstBuffer *buffer, guint8 payload_type); void gst_rtp_buffer_set_payload_type (GstBuffer *buffer, guint8 payload_type);
guint16 gst_rtp_buffer_get_seq (GstBuffer *buffer); guint16 gst_rtp_buffer_get_seq (GstBuffer *buffer);
void gst_rtp_buffer_set_seq (GstBuffer *buffer, guint16 seq); void gst_rtp_buffer_set_seq (GstBuffer *buffer, guint16 seq);
guint32 gst_rtp_buffer_get_timestamp (GstBuffer *buffer); guint32 gst_rtp_buffer_get_timestamp (GstBuffer *buffer);
void gst_rtp_buffer_set_timestamp (GstBuffer *buffer, guint32 timestamp); void gst_rtp_buffer_set_timestamp (GstBuffer *buffer, guint32 timestamp);
GstBuffer* gst_rtp_buffer_get_payload_buffer (GstBuffer *buffer); GstBuffer* gst_rtp_buffer_get_payload_buffer (GstBuffer *buffer);
guint gst_rtp_buffer_get_payload_len (GstBuffer *buffer); guint gst_rtp_buffer_get_payload_len (GstBuffer *buffer);
gpointer gst_rtp_buffer_get_payload (GstBuffer *buffer); gpointer gst_rtp_buffer_get_payload (GstBuffer *buffer);
G_END_DECLS G_END_DECLS

View file

@ -28,8 +28,8 @@ G_BEGIN_DECLS
typedef struct _GstTagEntryMatch GstTagEntryMatch; typedef struct _GstTagEntryMatch GstTagEntryMatch;
struct _GstTagEntryMatch { struct _GstTagEntryMatch {
gchar * gstreamer_tag; gchar * gstreamer_tag;
gchar * original_tag; gchar * original_tag;
}; };

View file

@ -201,27 +201,27 @@ gst_vorbis_tag_add (GstTagList * list, const gchar * tag, const gchar * value)
* @id_data: identification data at start of stream * @id_data: identification data at start of stream
* @id_data_length: length of identification data * @id_data_length: length of identification data
* @ vendor_string: pointer to a string that should take the vendor string of this * @ vendor_string: pointer to a string that should take the vendor string of this
* vorbis comment or NULL if you don't need it. * vorbis comment or NULL if you don't need it.
* *
* Creates a new tag list that contains the information parsed out of a * Creates a new tag list that contains the information parsed out of a
* vorbiscomment packet. * vorbiscomment packet.
* *
* Returns: A new #GstTagList with all tags that could be extracted from the * Returns: A new #GstTagList with all tags that could be extracted from the
* given vorbiscomment buffer or NULL on error. * given vorbiscomment buffer or NULL on error.
*/ */
GstTagList * GstTagList *
gst_tag_list_from_vorbiscomment_buffer (const GstBuffer * buffer, gst_tag_list_from_vorbiscomment_buffer (const GstBuffer * buffer,
const guint8 * id_data, const guint id_data_length, gchar ** vendor_string) const guint8 * id_data, const guint id_data_length, gchar ** vendor_string)
{ {
#define ADVANCE(x) G_STMT_START{ \ #define ADVANCE(x) G_STMT_START{ \
data += x; \ data += x; \
size -= x; \ size -= x; \
if (size < 4) goto error; \ if (size < 4) goto error; \
cur_size = GST_READ_UINT32_LE (data); \ cur_size = GST_READ_UINT32_LE (data); \
data += 4; \ data += 4; \
size -= 4; \ size -= 4; \
if (cur_size > size) goto error; \ if (cur_size > size) goto error; \
cur = (gchar*)data; \ cur = (gchar*)data; \
}G_STMT_END }G_STMT_END
gchar *cur, *value; gchar *cur, *value;
guint cur_size; guint cur_size;
@ -376,7 +376,7 @@ write_one_tag (const GstTagList * list, const gchar * tag, gpointer user_data)
* Creates a new vorbiscomment buffer from a tag list. * Creates a new vorbiscomment buffer from a tag list.
* *
* Returns: A new #GstBuffer containing a vorbiscomment buffer with all tags that * Returns: A new #GstBuffer containing a vorbiscomment buffer with all tags that
* could be converted from the given tag list. * could be converted from the given tag list.
*/ */
GstBuffer * GstBuffer *
gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list, gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list,

View file

@ -28,33 +28,33 @@ G_BEGIN_DECLS
/* functions for vorbis comment manipulation */ /* functions for vorbis comment manipulation */
G_CONST_RETURN gchar * gst_tag_from_vorbis_tag (const gchar * vorbis_tag); G_CONST_RETURN gchar * gst_tag_from_vorbis_tag (const gchar * vorbis_tag);
G_CONST_RETURN gchar * gst_tag_to_vorbis_tag (const gchar * gst_tag); G_CONST_RETURN gchar * gst_tag_to_vorbis_tag (const gchar * gst_tag);
void gst_vorbis_tag_add (GstTagList * list, void gst_vorbis_tag_add (GstTagList * list,
const gchar * tag, const gchar * tag,
const gchar * value); const gchar * value);
GList * gst_tag_to_vorbis_comments (const GstTagList * list, GList * gst_tag_to_vorbis_comments (const GstTagList * list,
const gchar * tag); const gchar * tag);
/* functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back */ /* functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back */
GstTagList * gst_tag_list_from_vorbiscomment_buffer (const GstBuffer * buffer, GstTagList * gst_tag_list_from_vorbiscomment_buffer (const GstBuffer * buffer,
const guint8 * id_data, const guint8 * id_data,
const guint id_data_length, const guint id_data_length,
gchar ** vendor_string); gchar ** vendor_string);
GstBuffer * gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list, GstBuffer * gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list,
const guint8 * id_data, const guint8 * id_data,
const guint id_data_length, const guint id_data_length,
const gchar * vendor_string); const gchar * vendor_string);
/* functions for ID3 tag manipulation */ /* functions for ID3 tag manipulation */
guint gst_tag_id3_genre_count (void); guint gst_tag_id3_genre_count (void);
G_CONST_RETURN gchar * gst_tag_id3_genre_get (const guint id); G_CONST_RETURN gchar * gst_tag_id3_genre_get (const guint id);
GstTagList * gst_tag_list_new_from_id3v1 (const guint8 * data); GstTagList * gst_tag_list_new_from_id3v1 (const guint8 * data);
G_CONST_RETURN gchar * gst_tag_from_id3_tag (const gchar * vorbis_tag); G_CONST_RETURN gchar * gst_tag_from_id3_tag (const gchar * vorbis_tag);
G_CONST_RETURN gchar * gst_tag_to_id3_tag (const gchar * gst_tag); G_CONST_RETURN gchar * gst_tag_to_id3_tag (const gchar * gst_tag);
G_END_DECLS G_END_DECLS

View file

@ -63,41 +63,41 @@ G_BEGIN_DECLS
#define GST_VIDEO_FPS_RANGE "(fraction) [ 0, max ]" #define GST_VIDEO_FPS_RANGE "(fraction) [ 0, max ]"
/* consider the next 2 protected */ /* consider the next 2 protected */
#define __GST_VIDEO_CAPS_MAKE_32A(R, G, B, A) \ #define __GST_VIDEO_CAPS_MAKE_32A(R, G, B, A) \
"video/x-raw-rgb, " \ "video/x-raw-rgb, " \
"bpp = (int) 32, " \ "bpp = (int) 32, " \
"depth = (int) 32, " \ "depth = (int) 32, " \
"endianness = (int) BIG_ENDIAN, " \ "endianness = (int) BIG_ENDIAN, " \
"red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \ "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \
"green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \ "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \
"blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \ "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \
"alpha_mask = (int) " GST_VIDEO_BYTE ## A ## _MASK_32 ", " \ "alpha_mask = (int) " GST_VIDEO_BYTE ## A ## _MASK_32 ", " \
"width = " GST_VIDEO_SIZE_RANGE ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \
"height = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \
"framerate = " GST_VIDEO_FPS_RANGE "framerate = " GST_VIDEO_FPS_RANGE
#define __GST_VIDEO_CAPS_MAKE_32(R, G, B) \ #define __GST_VIDEO_CAPS_MAKE_32(R, G, B) \
"video/x-raw-rgb, " \ "video/x-raw-rgb, " \
"bpp = (int) 32, " \ "bpp = (int) 32, " \
"depth = (int) 24, " \ "depth = (int) 24, " \
"endianness = (int) BIG_ENDIAN, " \ "endianness = (int) BIG_ENDIAN, " \
"red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \ "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_32 ", " \
"green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \ "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_32 ", " \
"blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \ "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_32 ", " \
"width = " GST_VIDEO_SIZE_RANGE ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \
"height = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \
"framerate = " GST_VIDEO_FPS_RANGE "framerate = " GST_VIDEO_FPS_RANGE
#define __GST_VIDEO_CAPS_MAKE_24(R, G, B) \ #define __GST_VIDEO_CAPS_MAKE_24(R, G, B) \
"video/x-raw-rgb, " \ "video/x-raw-rgb, " \
"bpp = (int) 24, " \ "bpp = (int) 24, " \
"depth = (int) 24, " \ "depth = (int) 24, " \
"endianness = (int) BIG_ENDIAN, " \ "endianness = (int) BIG_ENDIAN, " \
"red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_24 ", " \ "red_mask = (int) " GST_VIDEO_BYTE ## R ## _MASK_24 ", " \
"green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_24 ", " \ "green_mask = (int) " GST_VIDEO_BYTE ## G ## _MASK_24 ", " \
"blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_24 ", " \ "blue_mask = (int) " GST_VIDEO_BYTE ## B ## _MASK_24 ", " \
"width = " GST_VIDEO_SIZE_RANGE ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \
"height = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \
"framerate = " GST_VIDEO_FPS_RANGE "framerate = " GST_VIDEO_FPS_RANGE
@ -152,36 +152,36 @@ G_BEGIN_DECLS
/* 15/16 bit */ /* 15/16 bit */
#define GST_VIDEO_CAPS_RGB_16 \ #define GST_VIDEO_CAPS_RGB_16 \
"video/x-raw-rgb, " \ "video/x-raw-rgb, " \
"bpp = (int) 16, " \ "bpp = (int) 16, " \
"depth = (int) 16, " \ "depth = (int) 16, " \
"endianness = (int) BYTE_ORDER, " \ "endianness = (int) BYTE_ORDER, " \
"red_mask = (int) " GST_VIDEO_RED_MASK_16 ", " \ "red_mask = (int) " GST_VIDEO_RED_MASK_16 ", " \
"green_mask = (int) " GST_VIDEO_GREEN_MASK_16 ", " \ "green_mask = (int) " GST_VIDEO_GREEN_MASK_16 ", " \
"blue_mask = (int) " GST_VIDEO_BLUE_MASK_16 ", " \ "blue_mask = (int) " GST_VIDEO_BLUE_MASK_16 ", " \
"width = " GST_VIDEO_SIZE_RANGE ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \
"height = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \
"framerate = " GST_VIDEO_FPS_RANGE "framerate = " GST_VIDEO_FPS_RANGE
#define GST_VIDEO_CAPS_RGB_15 \ #define GST_VIDEO_CAPS_RGB_15 \
"video/x-raw-rgb, " \ "video/x-raw-rgb, " \
"bpp = (int) 16, " \ "bpp = (int) 16, " \
"depth = (int) 15, " \ "depth = (int) 15, " \
"endianness = (int) BYTE_ORDER, " \ "endianness = (int) BYTE_ORDER, " \
"red_mask = (int) " GST_VIDEO_RED_MASK_15 ", " \ "red_mask = (int) " GST_VIDEO_RED_MASK_15 ", " \
"green_mask = (int) " GST_VIDEO_GREEN_MASK_15 ", " \ "green_mask = (int) " GST_VIDEO_GREEN_MASK_15 ", " \
"blue_mask = (int) " GST_VIDEO_BLUE_MASK_15 ", " \ "blue_mask = (int) " GST_VIDEO_BLUE_MASK_15 ", " \
"width = " GST_VIDEO_SIZE_RANGE ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \
"height = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \
"framerate = " GST_VIDEO_FPS_RANGE "framerate = " GST_VIDEO_FPS_RANGE
#define GST_VIDEO_CAPS_YUV(fourcc) \ #define GST_VIDEO_CAPS_YUV(fourcc) \
"video/x-raw-yuv, " \ "video/x-raw-yuv, " \
"format = (fourcc) " fourcc ", " \ "format = (fourcc) " fourcc ", " \
"width = " GST_VIDEO_SIZE_RANGE ", " \ "width = " GST_VIDEO_SIZE_RANGE ", " \
"height = " GST_VIDEO_SIZE_RANGE ", " \ "height = " GST_VIDEO_SIZE_RANGE ", " \
"framerate = " GST_VIDEO_FPS_RANGE "framerate = " GST_VIDEO_FPS_RANGE
/* functions */ /* functions */
const GValue *gst_video_frame_rate (GstPad *pad); const GValue *gst_video_frame_rate (GstPad *pad);

View file

@ -106,11 +106,11 @@ gst_adder_get_type (void)
return adder_type; return adder_type;
} }
#define MAKE_FUNC(name,type,ttype,min,max) \ #define MAKE_FUNC(name,type,ttype,min,max) \
static void name (type *out, type *in, gint bytes) { \ static void name (type *out, type *in, gint bytes) { \
gint i; \ gint i; \
for (i = 0; i < bytes / sizeof (type); i++) \ for (i = 0; i < bytes / sizeof (type); i++) \
out[i] = CLAMP ((ttype)out[i] + (ttype)in[i], min, max); \ out[i] = CLAMP ((ttype)out[i] + (ttype)in[i], min, max); \
} }
MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32) MAKE_FUNC (add_int32, gint32, gint64, MIN_INT_32, MAX_INT_32)

View file

@ -58,7 +58,7 @@ struct _GstAdder {
GstPad *srcpad; GstPad *srcpad;
GstCollectPads *collect; GstCollectPads *collect;
gint numpads; gint numpads;
/* the next are valid for both int and float */ /* the next are valid for both int and float */
GstAdderFormat format; GstAdderFormat format;
@ -75,8 +75,8 @@ struct _GstAdder {
GstAdderFunction func; GstAdderFunction func;
/* counters to keep track of timestamps */ /* counters to keep track of timestamps */
gint64 timestamp; gint64 timestamp;
gint64 offset; gint64 offset;
}; };
struct _GstAdderClass { struct _GstAdderClass {

View file

@ -32,24 +32,24 @@
#define INT2FLOAT(i) (4.6566128752457969e-10 * ((gfloat)i)) #define INT2FLOAT(i) (4.6566128752457969e-10 * ((gfloat)i))
/* sign bit in the intermediate format */ /* sign bit in the intermediate format */
#define SIGNED (1<<31) #define SIGNED (1<<31)
/*** /***
* unpack code * unpack code
*/ */
#define MAKE_UNPACK_FUNC_NAME(name) \ #define MAKE_UNPACK_FUNC_NAME(name) \
audio_convert_unpack_##name audio_convert_unpack_##name
#define MAKE_UNPACK_FUNC(name, stride, sign, READ_FUNC) \ #define MAKE_UNPACK_FUNC(name, stride, sign, READ_FUNC) \
static void \ static void \
MAKE_UNPACK_FUNC_NAME (name) (gpointer src, gint32 *dst, \ MAKE_UNPACK_FUNC_NAME (name) (gpointer src, gint32 *dst, \
gint scale, gint count) \ gint scale, gint count) \
{ \ { \
guint8* p = (guint8 *) src; \ guint8* p = (guint8 *) src; \
for (;count; count--) { \ for (;count; count--) { \
*dst++ = (((gint32) READ_FUNC (p)) << scale) ^ (sign); \ *dst++ = (((gint32) READ_FUNC (p)) << scale) ^ (sign); \
p+=stride; \ p+=stride; \
} \ } \
} }
/* special unpack code for float */ /* special unpack code for float */
@ -92,21 +92,21 @@ MAKE_UNPACK_FUNC (s32_be, 4, 0, READ32_FROM_BE);
/*** /***
* packing code * packing code
*/ */
#define MAKE_PACK_FUNC_NAME(name) \ #define MAKE_PACK_FUNC_NAME(name) \
audio_convert_pack_##name audio_convert_pack_##name
#define MAKE_PACK_FUNC(name, stride, sign, WRITE_FUNC) \ #define MAKE_PACK_FUNC(name, stride, sign, WRITE_FUNC) \
static void \ static void \
MAKE_PACK_FUNC_NAME (name) (gint32 *src, gpointer dst, \ MAKE_PACK_FUNC_NAME (name) (gint32 *src, gpointer dst, \
gint scale, gint count) \ gint scale, gint count) \
{ \ { \
guint8 *p = (guint8 *)dst; \ guint8 *p = (guint8 *)dst; \
guint32 tmp; \ guint32 tmp; \
for (;count; count--) { \ for (;count; count--) { \
tmp = (*src++ ^ (sign)) >> scale; \ tmp = (*src++ ^ (sign)) >> scale; \
WRITE_FUNC (p, tmp); \ WRITE_FUNC (p, tmp); \
p+=stride; \ p+=stride; \
} \ } \
} }
/* special float pack function */ /* special float pack function */

View file

@ -73,16 +73,16 @@ struct _AudioConvertCtx
gint out_scale; gint out_scale;
}; };
gboolean audio_convert_clean_fmt (AudioConvertFmt *fmt); gboolean audio_convert_clean_fmt (AudioConvertFmt *fmt);
gboolean audio_convert_prepare_context (AudioConvertCtx *ctx, AudioConvertFmt *in, gboolean audio_convert_prepare_context (AudioConvertCtx *ctx, AudioConvertFmt *in,
AudioConvertFmt *out); AudioConvertFmt *out);
gboolean audio_convert_get_sizes (AudioConvertCtx *ctx, gint samples, gint *srcsize, gboolean audio_convert_get_sizes (AudioConvertCtx *ctx, gint samples, gint *srcsize,
gint *dstsize); gint *dstsize);
gboolean audio_convert_clean_context (AudioConvertCtx *ctx); gboolean audio_convert_clean_context (AudioConvertCtx *ctx);
gboolean audio_convert_convert (AudioConvertCtx *ctx, gpointer src, gboolean audio_convert_convert (AudioConvertCtx *ctx, gpointer src,
gpointer dst, gint samples, gboolean src_writable); gpointer dst, gint samples, gboolean src_writable);
#endif /* __AUDIO_CONVERT_H__ */ #endif /* __AUDIO_CONVERT_H__ */

View file

@ -131,12 +131,12 @@ GST_STATIC_CAPS ( \
"width = (int) 32, " \ "width = (int) 32, " \
"depth = (int) [ 1, 32 ], " \ "depth = (int) [ 1, 32 ], " \
"signed = (boolean) { true, false }; " \ "signed = (boolean) { true, false }; " \
"audio/x-raw-int, " \ "audio/x-raw-int, " \
"rate = (int) [ 1, MAX ], " \ "rate = (int) [ 1, MAX ], " \
"channels = (int) [ 1, 8 ], " \ "channels = (int) [ 1, 8 ], " \
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \ "endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
"width = (int) 24, " \ "width = (int) 24, " \
"depth = (int) [ 1, 24 ], " "signed = (boolean) { true, false }; " \ "depth = (int) [ 1, 24 ], " "signed = (boolean) { true, false }; " \
"audio/x-raw-int, " \ "audio/x-raw-int, " \
"rate = (int) [ 1, MAX ], " \ "rate = (int) [ 1, MAX ], " \
"channels = (int) [ 1, 8 ], " \ "channels = (int) [ 1, 8 ], " \

View file

@ -31,11 +31,11 @@
/* GLib < 2.4 compatibility */ /* GLib < 2.4 compatibility */
#ifndef G_MININT32 #ifndef G_MININT32
#define G_MININT32 ((gint32) 0x80000000) #define G_MININT32 ((gint32) 0x80000000)
#endif #endif
#ifndef G_MAXINT32 #ifndef G_MAXINT32
#define G_MAXINT32 ((gint32) 0x7fffffff) #define G_MAXINT32 ((gint32) 0x7fffffff)
#endif #endif
/* /*

View file

@ -31,24 +31,24 @@ GST_DEBUG_CATEGORY_EXTERN (audio_convert_debug);
/* /*
* Delete channel mixer matrix. * Delete channel mixer matrix.
*/ */
void gst_channel_mix_unset_matrix (AudioConvertCtx * this); void gst_channel_mix_unset_matrix (AudioConvertCtx * this);
/* /*
* Setup channel mixer matrix. * Setup channel mixer matrix.
*/ */
void gst_channel_mix_setup_matrix (AudioConvertCtx * this); void gst_channel_mix_setup_matrix (AudioConvertCtx * this);
/* /*
* Checks for passthrough (= identity matrix). * Checks for passthrough (= identity matrix).
*/ */
gboolean gst_channel_mix_passthrough (AudioConvertCtx * this); gboolean gst_channel_mix_passthrough (AudioConvertCtx * this);
/* /*
* Do actual mixing. * Do actual mixing.
*/ */
void gst_channel_mix_mix (AudioConvertCtx * this, void gst_channel_mix_mix (AudioConvertCtx * this,
gint32 * in_data, gint32 * in_data,
gint32 * out_data, gint32 * out_data,
gint samples); gint samples);
#endif /* __GST_CHANNEL_MIX_H__ */ #endif /* __GST_CHANNEL_MIX_H__ */

View file

@ -73,7 +73,7 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_SILENT TRUE #define DEFAULT_SILENT TRUE
enum enum
{ {

View file

@ -28,24 +28,24 @@ struct _AudioresampleBufferQueue
int offset; int offset;
}; };
AudioresampleBuffer * audioresample_buffer_new (void); AudioresampleBuffer * audioresample_buffer_new (void);
AudioresampleBuffer * audioresample_buffer_new_and_alloc (int size); AudioresampleBuffer * audioresample_buffer_new_and_alloc (int size);
AudioresampleBuffer * audioresample_buffer_new_with_data (void *data, int size); AudioresampleBuffer * audioresample_buffer_new_with_data (void *data, int size);
AudioresampleBuffer * audioresample_buffer_new_subbuffer (AudioresampleBuffer * buffer, AudioresampleBuffer * audioresample_buffer_new_subbuffer (AudioresampleBuffer * buffer,
int offset, int offset,
int length); int length);
void audioresample_buffer_ref (AudioresampleBuffer * buffer); void audioresample_buffer_ref (AudioresampleBuffer * buffer);
void audioresample_buffer_unref (AudioresampleBuffer * buffer); void audioresample_buffer_unref (AudioresampleBuffer * buffer);
AudioresampleBufferQueue * AudioresampleBufferQueue *
audioresample_buffer_queue_new (void); audioresample_buffer_queue_new (void);
void audioresample_buffer_queue_free (AudioresampleBufferQueue * queue); void audioresample_buffer_queue_free (AudioresampleBufferQueue * queue);
int audioresample_buffer_queue_get_depth (AudioresampleBufferQueue * queue); int audioresample_buffer_queue_get_depth (AudioresampleBufferQueue * queue);
int audioresample_buffer_queue_get_offset (AudioresampleBufferQueue * queue); int audioresample_buffer_queue_get_offset (AudioresampleBufferQueue * queue);
void audioresample_buffer_queue_push (AudioresampleBufferQueue * queue, void audioresample_buffer_queue_push (AudioresampleBufferQueue * queue,
AudioresampleBuffer * buffer); AudioresampleBuffer * buffer);
AudioresampleBuffer * audioresample_buffer_queue_pull (AudioresampleBufferQueue * queue, int len); AudioresampleBuffer * audioresample_buffer_queue_pull (AudioresampleBufferQueue * queue, int len);
AudioresampleBuffer * audioresample_buffer_queue_peek (AudioresampleBufferQueue * queue, int len); AudioresampleBuffer * audioresample_buffer_queue_peek (AudioresampleBufferQueue * queue, int len);
void audioresample_buffer_queue_flush (AudioresampleBufferQueue * queue); void audioresample_buffer_queue_flush (AudioresampleBufferQueue * queue);
#endif #endif

View file

@ -51,7 +51,7 @@ double functable_evaluate (Functable *t,double x);
double functable_fir(Functable *t,double x0,int n,double *data,int len); double functable_fir(Functable *t,double x0,int n,double *data,int len);
void functable_fir2(Functable *t,double *r0, double *r1, double x0, void functable_fir2(Functable *t,double *r0, double *r1, double x0,
int n,double *data,int len); int n,double *data,int len);
void functable_func_sinc(double *fx, double *dfx, double x, void *closure); void functable_func_sinc(double *fx, double *dfx, double x, void *closure);
void functable_func_boxcar(double *fx, double *dfx, double x, void *closure); void functable_func_boxcar(double *fx, double *dfx, double x, void *closure);

View file

@ -48,7 +48,7 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_FILTERLEN 16 #define DEFAULT_FILTERLEN 16
enum enum
{ {

View file

@ -25,9 +25,9 @@
#include "buffer.h" #include "buffer.h"
typedef enum { typedef enum {
RESAMPLE_FORMAT_S16 = 0, RESAMPLE_FORMAT_S16 = 0,
RESAMPLE_FORMAT_S32, RESAMPLE_FORMAT_S32,
RESAMPLE_FORMAT_F32, RESAMPLE_FORMAT_F32,
RESAMPLE_FORMAT_F64 RESAMPLE_FORMAT_F64
} ResampleFormat; } ResampleFormat;
@ -36,25 +36,25 @@ typedef void (*ResampleCallback) (void *);
typedef struct _ResampleState ResampleState; typedef struct _ResampleState ResampleState;
struct _ResampleState { struct _ResampleState {
/* parameters */ /* parameters */
int n_channels; int n_channels;
ResampleFormat format; ResampleFormat format;
int filter_length; int filter_length;
double i_rate; double i_rate;
double o_rate; double o_rate;
int method; int method;
/* internal parameters */ /* internal parameters */
int need_reinit; int need_reinit;
double halftaps; double halftaps;
/* filter state */ /* filter state */
void *o_buf; void *o_buf;
int o_size; int o_size;
@ -63,27 +63,27 @@ struct _ResampleState {
int eos; int eos;
int started; int started;
int sample_size; int sample_size;
void *buffer; void *buffer;
int buffer_len; int buffer_len;
int buffer_filled; int buffer_filled;
double i_start; double i_start;
double o_start; double o_start;
double i_inc; double i_inc;
double o_inc; double o_inc;
double sinc_scale; double sinc_scale;
double i_end; double i_end;
double o_end; double o_end;
int i_samples; int i_samples;
int o_samples; int o_samples;
//void *i_buf; //void *i_buf;
Functable *ft; Functable *ft;

View file

@ -22,9 +22,9 @@ extern "C" {
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION #define LIBAVCODEC_VERSION FFMPEG_VERSION
#define AV_STRINGIFY(s) AV_TOSTRING(s) #define AV_STRINGIFY(s) AV_TOSTRING(s)
#define AV_TOSTRING(s) #s #define AV_TOSTRING(s) #s
#define LIBAVCODEC_IDENT "FFmpeg" LIBAVCODEC_VERSION "b" AV_STRINGIFY(LIBAVCODEC_BUILD) #define LIBAVCODEC_IDENT "FFmpeg" LIBAVCODEC_VERSION "b" AV_STRINGIFY(LIBAVCODEC_BUILD)
enum CodecType { enum CodecType {
CODEC_TYPE_UNKNOWN = -1, CODEC_TYPE_UNKNOWN = -1,
@ -224,7 +224,7 @@ int avcodec_find_best_pix_fmt(int pix_fmt_mask, int src_pix_fmt,
#define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */ #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
#define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */ #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
int img_get_alpha_info(const AVPicture *src, int img_get_alpha_info(const AVPicture *src,
int pix_fmt, int width, int height); int pix_fmt, int width, int height);
/* convert among pixel formats */ /* convert among pixel formats */
int img_convert(AVPicture *dst, int dst_pix_fmt, int img_convert(AVPicture *dst, int dst_pix_fmt,

View file

@ -78,33 +78,33 @@ gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
* but I'm too lazy today. Maybe later. * but I'm too lazy today. Maybe later.
*/ */
#define GST_FF_VID_CAPS_NEW(mimetype, ...) \ #define GST_FF_VID_CAPS_NEW(mimetype, ...) \
(context != NULL) ? \ (context != NULL) ? \
gst_caps_new_simple (mimetype, \ gst_caps_new_simple (mimetype, \
"width", G_TYPE_INT, context->width, \ "width", G_TYPE_INT, context->width, \
"height", G_TYPE_INT, context->height, \ "height", G_TYPE_INT, context->height, \
"framerate", GST_TYPE_FRACTION, \ "framerate", GST_TYPE_FRACTION, \
(gint) context->frame_rate, (gint) context->frame_rate_base, \ (gint) context->frame_rate, (gint) context->frame_rate_base, \
__VA_ARGS__, NULL) \ __VA_ARGS__, NULL) \
: \ : \
gst_caps_new_simple (mimetype, \ gst_caps_new_simple (mimetype, \
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT, \ "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, \
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, \ "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, \
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1,\ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1,\
__VA_ARGS__, NULL) __VA_ARGS__, NULL)
/* same for audio - now with channels/sample rate /* same for audio - now with channels/sample rate
*/ */
#define GST_FF_AUD_CAPS_NEW(mimetype, ...) \ #define GST_FF_AUD_CAPS_NEW(mimetype, ...) \
(context != NULL) ? \ (context != NULL) ? \
gst_caps_new_simple (mimetype, \ gst_caps_new_simple (mimetype, \
"rate", G_TYPE_INT, context->sample_rate, \ "rate", G_TYPE_INT, context->sample_rate, \
"channels", G_TYPE_INT, context->channels, \ "channels", G_TYPE_INT, context->channels, \
__VA_ARGS__, NULL) \ __VA_ARGS__, NULL) \
: \ : \
gst_caps_new_simple (mimetype, \ gst_caps_new_simple (mimetype, \
__VA_ARGS__, NULL) __VA_ARGS__, NULL)
/* Convert a FFMPEG Pixel Format and optional AVCodecContext /* Convert a FFMPEG Pixel Format and optional AVCodecContext
* to a GstCaps. If the context is ommitted, no fixed values * to a GstCaps. If the context is ommitted, no fixed values

View file

@ -48,10 +48,10 @@ gst_ffmpegcsp_caps_with_codectype (enum CodecType type,
int int
gst_ffmpegcsp_avpicture_fill (AVPicture * picture, gst_ffmpegcsp_avpicture_fill (AVPicture * picture,
uint8_t * ptr, uint8_t * ptr,
enum PixelFormat pix_fmt, enum PixelFormat pix_fmt,
int width, int width,
int height); int height);
#endif /* __GST_FFMPEG_CODECMAP_H__ */ #endif /* __GST_FFMPEG_CODECMAP_H__ */

View file

@ -1027,7 +1027,7 @@ yuv420p_to_yuv422 (AVPicture * dst, const AVPicture * src,
#define SCALEBITS 10 #define SCALEBITS 10
#define ONE_HALF (1 << (SCALEBITS - 1)) #define ONE_HALF (1 << (SCALEBITS - 1))
#define FIX(x) ((int) ((x) * (1<<SCALEBITS) + 0.5)) #define FIX(x) ((int) ((x) * (1<<SCALEBITS) + 0.5))
#define YUV_TO_RGB1_CCIR(cb1, cr1)\ #define YUV_TO_RGB1_CCIR(cb1, cr1)\
{\ {\

View file

@ -488,7 +488,7 @@ static void ayuv4444_to_rgba32(AVPicture *dst, const AVPicture *src,
d1 = d; d1 = d;
s1 = s; s1 = s;
for(w = width; w > 0; w--) { for(w = width; w > 0; w--) {
a = s1[0]; a = s1[0];
YUV_TO_RGB1_CCIR(s1[2], s1[3]); YUV_TO_RGB1_CCIR(s1[2], s1[3]);
YUV_TO_RGB2_CCIR(r, g, b, s1[1]); YUV_TO_RGB2_CCIR(r, g, b, s1[1]);
@ -516,12 +516,12 @@ static void rgba32_to_ayuv4444(AVPicture *dst, const AVPicture *src,
for(y=0;y<height;y++) { for(y=0;y<height;y++) {
for(x=0;x<width;x++) { for(x=0;x<width;x++) {
RGBA_IN(r, g, b, a, p); RGBA_IN(r, g, b, a, p);
d[0] = a; d[0] = a;
d[1] = RGB_TO_Y_CCIR(r, g, b); d[1] = RGB_TO_Y_CCIR(r, g, b);
d[2] = RGB_TO_U_CCIR(r, g, b, 0); d[2] = RGB_TO_U_CCIR(r, g, b, 0);
d[3] = RGB_TO_V_CCIR(r, g, b, 0); d[3] = RGB_TO_V_CCIR(r, g, b, 0);
p += BPP; p += BPP;
d += 4; d += 4;
} }
p += src_wrap; p += src_wrap;
d += dst_wrap; d += dst_wrap;
@ -537,7 +537,7 @@ static void rgba32_to_ayuv4444(AVPicture *dst, const AVPicture *src,
#define bgra32_fcts_done #define bgra32_fcts_done
static void bgra32_to_ayuv4444(AVPicture *dst, const AVPicture *src, static void bgra32_to_ayuv4444(AVPicture *dst, const AVPicture *src,
int width, int height) int width, int height)
{ {
int src_wrap, dst_wrap, x, y; int src_wrap, dst_wrap, x, y;
int r, g, b, a; int r, g, b, a;
@ -907,12 +907,12 @@ static void rgb24_to_ayuv4444(AVPicture *dst, const AVPicture *src,
for(y=0;y<height;y++) { for(y=0;y<height;y++) {
for(x=0;x<width;x++) { for(x=0;x<width;x++) {
RGB_IN(r, g, b, p); RGB_IN(r, g, b, p);
d[0] = 0xff; d[0] = 0xff;
d[1] = RGB_TO_Y_CCIR(r, g, b); d[1] = RGB_TO_Y_CCIR(r, g, b);
d[2] = RGB_TO_U_CCIR(r, g, b, 0); d[2] = RGB_TO_U_CCIR(r, g, b, 0);
d[3] = RGB_TO_V_CCIR(r, g, b, 0); d[3] = RGB_TO_V_CCIR(r, g, b, 0);
p += BPP; p += BPP;
d += 4; d += 4;
} }
p += src_wrap; p += src_wrap;
d += dst_wrap; d += dst_wrap;
@ -971,7 +971,7 @@ static void glue(RGB_NAME, _to_pal8)(AVPicture *dst, const AVPicture *src,
#ifdef RGBA_IN #ifdef RGBA_IN
static int glue(get_alpha_info_, RGB_NAME)(const AVPicture *src, static int glue(get_alpha_info_, RGB_NAME)(const AVPicture *src,
int width, int height) int width, int height)
{ {
const unsigned char *p; const unsigned char *p;
int src_wrap, ret, x, y; int src_wrap, ret, x, y;

View file

@ -42,11 +42,11 @@ GST_STATIC_PAD_TEMPLATE ("src%d",
GST_DEBUG_CATEGORY_STATIC (gst_decode_bin_debug); GST_DEBUG_CATEGORY_STATIC (gst_decode_bin_debug);
#define GST_CAT_DEFAULT gst_decode_bin_debug #define GST_CAT_DEFAULT gst_decode_bin_debug
#define GST_TYPE_DECODE_BIN (gst_decode_bin_get_type()) #define GST_TYPE_DECODE_BIN (gst_decode_bin_get_type())
#define GST_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECODE_BIN,GstDecodeBin)) #define GST_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DECODE_BIN,GstDecodeBin))
#define GST_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECODE_BIN,GstDecodeBinClass)) #define GST_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DECODE_BIN,GstDecodeBinClass))
#define GST_IS_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECODE_BIN)) #define GST_IS_DECODE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DECODE_BIN))
#define GST_IS_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECODE_BIN)) #define GST_IS_DECODE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DECODE_BIN))
typedef struct _GstDecodeBin GstDecodeBin; typedef struct _GstDecodeBin GstDecodeBin;
typedef struct _GstDecodeBinClass GstDecodeBinClass; typedef struct _GstDecodeBinClass GstDecodeBinClass;

View file

@ -25,14 +25,14 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_PLAY_BASE_BIN (gst_play_base_bin_get_type()) #define GST_TYPE_PLAY_BASE_BIN (gst_play_base_bin_get_type())
#define GST_PLAY_BASE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_BASE_BIN,GstPlayBaseBin)) #define GST_PLAY_BASE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_BASE_BIN,GstPlayBaseBin))
#define GST_PLAY_BASE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_BASE_BIN,GstPlayBaseBinClass)) #define GST_PLAY_BASE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_BASE_BIN,GstPlayBaseBinClass))
#define GST_IS_PLAY_BASE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_BASE_BIN)) #define GST_IS_PLAY_BASE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_BASE_BIN))
#define GST_IS_PLAY_BASE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_BASE_BIN)) #define GST_IS_PLAY_BASE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_BASE_BIN))
#define GST_PLAY_BASE_BIN_GET_CLASS(obj) \ #define GST_PLAY_BASE_BIN_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLAY_BASE_BIN, \ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLAY_BASE_BIN, \
GstPlayBaseBinClass)) GstPlayBaseBinClass))
typedef struct _GstPlayBaseBin GstPlayBaseBin; typedef struct _GstPlayBaseBin GstPlayBaseBin;
typedef struct _GstPlayBaseBinClass GstPlayBaseBinClass; typedef struct _GstPlayBaseBinClass GstPlayBaseBinClass;
@ -49,51 +49,51 @@ typedef struct _GstPlayBaseBinClass GstPlayBaseBinClass;
*/ */
typedef struct typedef struct
{ {
GstPlayBaseBin *bin; /* ref to the owner */ GstPlayBaseBin *bin; /* ref to the owner */
gint nstreams; gint nstreams;
GList *streaminfo; GList *streaminfo;
/* contained decoded elementary streams */ /* contained decoded elementary streams */
struct { struct {
gint npads; gint npads;
GstBin *bin; GstBin *bin;
GstElement *preroll; GstElement *preroll;
GstElement *selector; GstElement *selector;
gboolean done; gboolean done;
#define NUM_TYPES 3 #define NUM_TYPES 3
} type[NUM_TYPES]; /* AUDIO, VIDEO, TEXT */ } type[NUM_TYPES]; /* AUDIO, VIDEO, TEXT */
} GstPlayBaseGroup; } GstPlayBaseGroup;
struct _GstPlayBaseBin { struct _GstPlayBaseBin {
GstPipeline pipeline; GstPipeline pipeline;
/* properties */ /* properties */
guint64 queue_size; guint64 queue_size;
guint queue_threshold; guint queue_threshold;
/* currently loaded media */ /* currently loaded media */
gint current[NUM_TYPES]; gint current[NUM_TYPES];
gchar *uri, *suburi; gchar *uri, *suburi;
gboolean is_stream; gboolean is_stream;
GstElement *source; GstElement *source;
GstElement *decoder; GstElement *decoder;
GstElement *subtitle; /* additional filesrc ! subparse bin */ GstElement *subtitle; /* additional filesrc ! subparse bin */
gboolean need_rebuild; gboolean need_rebuild;
/* group management - using own lock */ /* group management - using own lock */
GMutex *group_lock; /* lock and mutex to signal availability of new group */ GMutex *group_lock; /* lock and mutex to signal availability of new group */
GCond *group_cond; GCond *group_cond;
GstPlayBaseGroup *building_group; /* the group that we are constructing */ GstPlayBaseGroup *building_group; /* the group that we are constructing */
GList *queued_groups; /* the constructed groups, head is the active one */ GList *queued_groups; /* the constructed groups, head is the active one */
}; };
struct _GstPlayBaseBinClass { struct _GstPlayBaseBinClass {
GstPipelineClass parent_class; GstPipelineClass parent_class;
/* virtual fuctions */ /* virtual fuctions */
gboolean (*setup_output_pads) (GstPlayBaseBin *play_base_bin, gboolean (*setup_output_pads) (GstPlayBaseBin *play_base_bin,
GstPlayBaseGroup *group); GstPlayBaseGroup *group);
}; };
GType gst_play_base_bin_get_type (void); GType gst_play_base_bin_get_type (void);

View file

@ -31,11 +31,11 @@
GST_DEBUG_CATEGORY_STATIC (gst_play_bin_debug); GST_DEBUG_CATEGORY_STATIC (gst_play_bin_debug);
#define GST_CAT_DEFAULT gst_play_bin_debug #define GST_CAT_DEFAULT gst_play_bin_debug
#define GST_TYPE_PLAY_BIN (gst_play_bin_get_type()) #define GST_TYPE_PLAY_BIN (gst_play_bin_get_type())
#define GST_PLAY_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_BIN,GstPlayBin)) #define GST_PLAY_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_BIN,GstPlayBin))
#define GST_PLAY_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_BIN,GstPlayBinClass)) #define GST_PLAY_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_BIN,GstPlayBinClass))
#define GST_IS_PLAY_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_BIN)) #define GST_IS_PLAY_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_BIN))
#define GST_IS_PLAY_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_BIN)) #define GST_IS_PLAY_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_BIN))
#define VOLUME_MAX_DOUBLE 4.0 #define VOLUME_MAX_DOUBLE 4.0

View file

@ -25,43 +25,43 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_STREAM_INFO (gst_stream_info_get_type()) #define GST_TYPE_STREAM_INFO (gst_stream_info_get_type())
#define GST_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_INFO,GstStreamInfo)) #define GST_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_INFO,GstStreamInfo))
#define GST_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_INFO,GstStreamInfoClass)) #define GST_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_INFO,GstStreamInfoClass))
#define GST_IS_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_INFO)) #define GST_IS_STREAM_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_INFO))
#define GST_IS_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_INFO)) #define GST_IS_STREAM_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_INFO))
typedef struct _GstStreamInfo GstStreamInfo; typedef struct _GstStreamInfo GstStreamInfo;
typedef struct _GstStreamInfoClass GstStreamInfoClass; typedef struct _GstStreamInfoClass GstStreamInfoClass;
typedef enum { typedef enum {
GST_STREAM_TYPE_UNKNOWN = 0, GST_STREAM_TYPE_UNKNOWN = 0,
GST_STREAM_TYPE_AUDIO = 1, /* an audio stream */ GST_STREAM_TYPE_AUDIO = 1, /* an audio stream */
GST_STREAM_TYPE_VIDEO = 2, /* a video stream */ GST_STREAM_TYPE_VIDEO = 2, /* a video stream */
GST_STREAM_TYPE_TEXT = 3, /* a subtitle/text stream */ GST_STREAM_TYPE_TEXT = 3, /* a subtitle/text stream */
GST_STREAM_TYPE_ELEMENT = 4, /* stream handled by an element */ GST_STREAM_TYPE_ELEMENT = 4, /* stream handled by an element */
} GstStreamType; } GstStreamType;
struct _GstStreamInfo { struct _GstStreamInfo {
GObject parent; GObject parent;
GstObject *object; /* pad/element providing/handling this stream */ GstObject *object; /* pad/element providing/handling this stream */
GstStreamType type; /* the type of the provided stream */ GstStreamType type; /* the type of the provided stream */
gchar *decoder; /* string describing the decoder */ gchar *decoder; /* string describing the decoder */
gboolean mute; /* is the stream muted or not */ gboolean mute; /* is the stream muted or not */
GstObject *origin; /* the real object providing this stream, this can GstObject *origin; /* the real object providing this stream, this can
be different from the object as the object can be be different from the object as the object can be
a queue pad, inserted for preroll. */ a queue pad, inserted for preroll. */
GstCaps *caps; /* the caps of the stream */ GstCaps *caps; /* the caps of the stream */
/* this is tream information cached here because the streaminfo may be /* this is tream information cached here because the streaminfo may be
* created before the app can know about it. */ * created before the app can know about it. */
gchar *langcode, gchar *langcode,
*codec; *codec;
}; };
struct _GstStreamInfoClass { struct _GstStreamInfoClass {
GObjectClass parent_class; GObjectClass parent_class;
/* signals */ /* signals */
void (*muted) (GstStreamInfo *info, gboolean mute); void (*muted) (GstStreamInfo *info, gboolean mute);
@ -69,14 +69,14 @@ struct _GstStreamInfoClass {
GType gst_stream_info_get_type (void); GType gst_stream_info_get_type (void);
GstStreamInfo* gst_stream_info_new (GstObject *object, GstStreamInfo* gst_stream_info_new (GstObject *object,
GstStreamType type, GstStreamType type,
const gchar *decoder, const gchar *decoder,
const GstCaps *caps); const GstCaps *caps);
gboolean gst_stream_info_set_mute (GstStreamInfo *stream_info, gboolean gst_stream_info_set_mute (GstStreamInfo *stream_info,
gboolean mute); gboolean mute);
gboolean gst_stream_info_is_mute (GstStreamInfo *stream_info); gboolean gst_stream_info_is_mute (GstStreamInfo *stream_info);
G_END_DECLS G_END_DECLS

View file

@ -20,8 +20,8 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#define MIN_POLLFDS 32 #define MIN_POLLFDS 32
#define INIT_POLLFDS MIN_POLLFDS #define INIT_POLLFDS MIN_POLLFDS
#include <sys/poll.h> #include <sys/poll.h>
#include <sys/time.h> #include <sys/time.h>

View file

@ -45,24 +45,24 @@ typedef enum {
GType gst_fdset_mode_get_type (void); GType gst_fdset_mode_get_type (void);
GstFDSet* gst_fdset_new (GstFDSetMode mode); GstFDSet* gst_fdset_new (GstFDSetMode mode);
void gst_fdset_free (GstFDSet *set); void gst_fdset_free (GstFDSet *set);
void gst_fdset_set_mode (GstFDSet *set, GstFDSetMode mode); void gst_fdset_set_mode (GstFDSet *set, GstFDSetMode mode);
GstFDSetMode gst_fdset_get_mode (GstFDSet *set); GstFDSetMode gst_fdset_get_mode (GstFDSet *set);
gboolean gst_fdset_add_fd (GstFDSet *set, GstFD *fd); gboolean gst_fdset_add_fd (GstFDSet *set, GstFD *fd);
gboolean gst_fdset_remove_fd (GstFDSet *set, GstFD *fd); gboolean gst_fdset_remove_fd (GstFDSet *set, GstFD *fd);
void gst_fdset_fd_ctl_write (GstFDSet *set, GstFD *fd, gboolean active); void gst_fdset_fd_ctl_write (GstFDSet *set, GstFD *fd, gboolean active);
void gst_fdset_fd_ctl_read (GstFDSet *set, GstFD *fd, gboolean active); void gst_fdset_fd_ctl_read (GstFDSet *set, GstFD *fd, gboolean active);
gboolean gst_fdset_fd_has_closed (GstFDSet *set, GstFD *fd); gboolean gst_fdset_fd_has_closed (GstFDSet *set, GstFD *fd);
gboolean gst_fdset_fd_has_error (GstFDSet *set, GstFD *fd); gboolean gst_fdset_fd_has_error (GstFDSet *set, GstFD *fd);
gboolean gst_fdset_fd_can_read (GstFDSet *set, GstFD *fd); gboolean gst_fdset_fd_can_read (GstFDSet *set, GstFD *fd);
gboolean gst_fdset_fd_can_write (GstFDSet *set, GstFD *fd); gboolean gst_fdset_fd_can_write (GstFDSet *set, GstFD *fd);
gint gst_fdset_wait (GstFDSet *set, int timeout); gint gst_fdset_wait (GstFDSet *set, int timeout);
G_END_DECLS G_END_DECLS

View file

@ -46,21 +46,21 @@
/* the select call is also performed on the control sockets, that way /* the select call is also performed on the control sockets, that way
* we can send special commands to unblock or restart the select call */ * we can send special commands to unblock or restart the select call */
#define CONTROL_RESTART 'R' /* restart the select call */ #define CONTROL_RESTART 'R' /* restart the select call */
#define CONTROL_STOP 'S' /* stop the select call */ #define CONTROL_STOP 'S' /* stop the select call */
#define CONTROL_SOCKETS(sink) sink->control_sock #define CONTROL_SOCKETS(sink) sink->control_sock
#define WRITE_SOCKET(sink) sink->control_sock[1] #define WRITE_SOCKET(sink) sink->control_sock[1]
#define READ_SOCKET(sink) sink->control_sock[0] #define READ_SOCKET(sink) sink->control_sock[0]
#define SEND_COMMAND(sink, command) \ #define SEND_COMMAND(sink, command) \
G_STMT_START { \ G_STMT_START { \
unsigned char c; c = command; \ unsigned char c; c = command; \
write (WRITE_SOCKET(sink).fd, &c, 1); \ write (WRITE_SOCKET(sink).fd, &c, 1); \
} G_STMT_END } G_STMT_END
#define READ_COMMAND(sink, command, res) \ #define READ_COMMAND(sink, command, res) \
G_STMT_START { \ G_STMT_START { \
res = read(READ_SOCKET(sink).fd, &command, 1); \ res = read(READ_SOCKET(sink).fd, &command, 1); \
} G_STMT_END } G_STMT_END
/* elementfactory information */ /* elementfactory information */
@ -96,16 +96,16 @@ enum
}; };
/* this is really arbitrarily chosen */ /* this is really arbitrarily chosen */
#define DEFAULT_PROTOCOL GST_TCP_PROTOCOL_NONE #define DEFAULT_PROTOCOL GST_TCP_PROTOCOL_NONE
#define DEFAULT_MODE GST_FDSET_MODE_POLL #define DEFAULT_MODE GST_FDSET_MODE_POLL
#define DEFAULT_BUFFERS_MAX -1 #define DEFAULT_BUFFERS_MAX -1
#define DEFAULT_BUFFERS_SOFT_MAX -1 #define DEFAULT_BUFFERS_SOFT_MAX -1
#define DEFAULT_UNIT_TYPE GST_UNIT_TYPE_BUFFERS #define DEFAULT_UNIT_TYPE GST_UNIT_TYPE_BUFFERS
#define DEFAULT_UNITS_MAX -1 #define DEFAULT_UNITS_MAX -1
#define DEFAULT_UNITS_SOFT_MAX -1 #define DEFAULT_UNITS_SOFT_MAX -1
#define DEFAULT_RECOVER_POLICY GST_RECOVER_POLICY_NONE #define DEFAULT_RECOVER_POLICY GST_RECOVER_POLICY_NONE
#define DEFAULT_TIMEOUT 0 #define DEFAULT_TIMEOUT 0
#define DEFAULT_SYNC_METHOD GST_SYNC_METHOD_LATEST #define DEFAULT_SYNC_METHOD GST_SYNC_METHOD_LATEST
enum enum
{ {

View file

@ -42,7 +42,7 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTI_FD_SINK)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTI_FD_SINK))
#define GST_MULTI_FD_SINK_GET_CLASS(obj) \ #define GST_MULTI_FD_SINK_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MULTI_FD_SINK, GstMultiFdSinkClass)) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_MULTI_FD_SINK, GstMultiFdSinkClass))
typedef struct _GstMultiFdSink GstMultiFdSink; typedef struct _GstMultiFdSink GstMultiFdSink;
typedef struct _GstMultiFdSinkClass GstMultiFdSinkClass; typedef struct _GstMultiFdSinkClass GstMultiFdSinkClass;
@ -77,12 +77,12 @@ typedef enum
typedef enum typedef enum
{ {
GST_CLIENT_STATUS_OK = 0, GST_CLIENT_STATUS_OK = 0,
GST_CLIENT_STATUS_CLOSED = 1, GST_CLIENT_STATUS_CLOSED = 1,
GST_CLIENT_STATUS_REMOVED = 2, GST_CLIENT_STATUS_REMOVED = 2,
GST_CLIENT_STATUS_SLOW = 3, GST_CLIENT_STATUS_SLOW = 3,
GST_CLIENT_STATUS_ERROR = 4, GST_CLIENT_STATUS_ERROR = 4,
GST_CLIENT_STATUS_DUPLICATE = 5, GST_CLIENT_STATUS_DUPLICATE = 5,
} GstClientStatus; } GstClientStatus;
/* structure for a client /* structure for a client
@ -116,10 +116,10 @@ typedef struct {
} GstTCPClient; } GstTCPClient;
#define CLIENTS_LOCK_INIT(fdsink) (g_static_rec_mutex_init(&fdsink->clientslock)) #define CLIENTS_LOCK_INIT(fdsink) (g_static_rec_mutex_init(&fdsink->clientslock))
#define CLIENTS_LOCK_FREE(fdsink) (g_static_rec_mutex_free(&fdsink->clientslock)) #define CLIENTS_LOCK_FREE(fdsink) (g_static_rec_mutex_free(&fdsink->clientslock))
#define CLIENTS_LOCK(fdsink) (g_static_rec_mutex_lock(&fdsink->clientslock)) #define CLIENTS_LOCK(fdsink) (g_static_rec_mutex_lock(&fdsink->clientslock))
#define CLIENTS_UNLOCK(fdsink) (g_static_rec_mutex_unlock(&fdsink->clientslock)) #define CLIENTS_UNLOCK(fdsink) (g_static_rec_mutex_unlock(&fdsink->clientslock))
struct _GstMultiFdSink { struct _GstMultiFdSink {
GstBaseSink element; GstBaseSink element;
@ -127,8 +127,8 @@ struct _GstMultiFdSink {
guint64 bytes_to_serve; /* how much bytes we must serve */ guint64 bytes_to_serve; /* how much bytes we must serve */
guint64 bytes_served; /* how much bytes have we served */ guint64 bytes_served; /* how much bytes have we served */
GStaticRecMutex clientslock; /* lock to protect the clients list */ GStaticRecMutex clientslock; /* lock to protect the clients list */
GList *clients; /* list of clients we are serving */ GList *clients; /* list of clients we are serving */
GHashTable *fd_hash; /* index on fd to client */ GHashTable *fd_hash; /* index on fd to client */
GstFDSetMode mode; GstFDSetMode mode;
@ -142,32 +142,32 @@ struct _GstMultiFdSink {
GstTCPProtocol protocol; GstTCPProtocol protocol;
guint mtu; guint mtu;
GArray *bufqueue; /* global queue of buffers */ GArray *bufqueue; /* global queue of buffers */
gboolean running; /* the thread state */ gboolean running; /* the thread state */
GThread *thread; /* the sender thread */ GThread *thread; /* the sender thread */
GstUnitType unit_type;/* the type of the units */ GstUnitType unit_type;/* the type of the units */
gint units_max; /* max units to queue */ gint units_max; /* max units to queue */
gint units_soft_max; /* max units a client can lag before recovery starts */ gint units_soft_max; /* max units a client can lag before recovery starts */
GstRecoverPolicy recover_policy; GstRecoverPolicy recover_policy;
GstClockTime timeout; /* max amount of nanoseconds to remain idle */ GstClockTime timeout; /* max amount of nanoseconds to remain idle */
GstSyncMethod sync_method; /* what method to use for connecting clients */ GstSyncMethod sync_method; /* what method to use for connecting clients */
/* stats */ /* stats */
gint buffers_queued; /* number of queued buffers */ gint buffers_queued; /* number of queued buffers */
gint bytes_queued; /* number of queued bytes */ gint bytes_queued; /* number of queued bytes */
gint time_queued; /* number of queued time */ gint time_queued; /* number of queued time */
}; };
struct _GstMultiFdSinkClass { struct _GstMultiFdSinkClass {
GstBaseSinkClass parent_class; GstBaseSinkClass parent_class;
/* element methods */ /* element methods */
void (*add) (GstMultiFdSink *sink, int fd); void (*add) (GstMultiFdSink *sink, int fd);
void (*remove) (GstMultiFdSink *sink, int fd); void (*remove) (GstMultiFdSink *sink, int fd);
void (*clear) (GstMultiFdSink *sink); void (*clear) (GstMultiFdSink *sink);
GValueArray* (*get_stats) (GstMultiFdSink *sink, int fd); GValueArray* (*get_stats) (GstMultiFdSink *sink, int fd);
/* vtable */ /* vtable */
gboolean (*init) (GstMultiFdSink *sink); gboolean (*init) (GstMultiFdSink *sink);

View file

@ -27,7 +27,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/dataprotocol/dataprotocol.h> #include <gst/dataprotocol/dataprotocol.h>
#define TCP_HIGHEST_PORT 65535 #define TCP_HIGHEST_PORT 65535
#define TCP_DEFAULT_HOST "localhost" #define TCP_DEFAULT_HOST "localhost"
#define TCP_DEFAULT_PORT 4953 #define TCP_DEFAULT_PORT 4953

View file

@ -53,7 +53,7 @@ G_STMT_START { \
GST_DEBUG_CATEGORY (tcpclientsrc_debug); GST_DEBUG_CATEGORY (tcpclientsrc_debug);
#define GST_CAT_DEFAULT tcpclientsrc_debug #define GST_CAT_DEFAULT tcpclientsrc_debug
#define MAX_READ_SIZE 4 * 1024 #define MAX_READ_SIZE 4 * 1024
static GstElementDetails gst_tcp_client_src_details = static GstElementDetails gst_tcp_client_src_details =

View file

@ -30,7 +30,7 @@ G_BEGIN_DECLS
#include <netdb.h> /* sockaddr_in */ #include <netdb.h> /* sockaddr_in */
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> /* sockaddr_in */ #include <netinet/in.h> /* sockaddr_in */
#include <unistd.h> #include <unistd.h>
#include "gsttcp.h" #include "gsttcp.h"

View file

@ -24,7 +24,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif /* __cplusplus */ #endif /* __cplusplus */
typedef enum typedef enum
{ {

View file

@ -40,7 +40,7 @@
#include "gsttcpserversink.h" #include "gsttcpserversink.h"
#include "gsttcp-marshal.h" #include "gsttcp-marshal.h"
#define TCP_BACKLOG 5 #define TCP_BACKLOG 5
/* elementfactory information */ /* elementfactory information */
static GstElementDetails gst_tcp_server_sink_details = static GstElementDetails gst_tcp_server_sink_details =

View file

@ -52,8 +52,8 @@ G_STMT_START { \
GST_DEBUG_CATEGORY (tcpserversrc_debug); GST_DEBUG_CATEGORY (tcpserversrc_debug);
#define GST_CAT_DEFAULT tcpserversrc_debug #define GST_CAT_DEFAULT tcpserversrc_debug
#define TCP_DEFAULT_LISTEN_HOST NULL /* listen on all interfaces */ #define TCP_DEFAULT_LISTEN_HOST NULL /* listen on all interfaces */
#define TCP_BACKLOG 1 /* client connection queue */ #define TCP_BACKLOG 1 /* client connection queue */
static GstElementDetails gst_tcp_server_src_details = static GstElementDetails gst_tcp_server_src_details =

View file

@ -82,16 +82,16 @@ static GstStaticCaps uri_caps = GST_STATIC_CAPS ("text/uri-list");
#define URI_CAPS (gst_static_caps_get(&uri_caps)) #define URI_CAPS (gst_static_caps_get(&uri_caps))
#define BUFFER_SIZE 16 /* If the string is < 16 bytes we're screwed */ #define BUFFER_SIZE 16 /* If the string is < 16 bytes we're screwed */
#define INC_BUFFER { \ #define INC_BUFFER { \
pos++; \ pos++; \
if (pos == BUFFER_SIZE) { \ if (pos == BUFFER_SIZE) { \
pos = 0; \ pos = 0; \
offset += BUFFER_SIZE; \ offset += BUFFER_SIZE; \
data = gst_type_find_peek (tf, offset, BUFFER_SIZE); \ data = gst_type_find_peek (tf, offset, BUFFER_SIZE); \
if (data == NULL) return; \ if (data == NULL) return; \
} else { \ } else { \
data++; \ data++; \
} \ } \
} }
static void static void
uri_type_find (GstTypeFind * tf, gpointer unused) uri_type_find (GstTypeFind * tf, gpointer unused)
@ -144,16 +144,16 @@ uri_type_find (GstTypeFind * tf, gpointer unused)
/*** application/xml **********************************************************/ /*** application/xml **********************************************************/
#define XML_BUFFER_SIZE 256 #define XML_BUFFER_SIZE 256
#define XML_INC_BUFFER { \ #define XML_INC_BUFFER { \
pos++; \ pos++; \
if (pos == XML_BUFFER_SIZE) { \ if (pos == XML_BUFFER_SIZE) { \
pos = 0; \ pos = 0; \
offset += XML_BUFFER_SIZE; \ offset += XML_BUFFER_SIZE; \
data = gst_type_find_peek (tf, offset, XML_BUFFER_SIZE); \ data = gst_type_find_peek (tf, offset, XML_BUFFER_SIZE); \
if (data == NULL) return FALSE; \ if (data == NULL) return FALSE; \
} else { \ } else { \
data++; \ data++; \
} \ } \
} }
static gboolean static gboolean
@ -354,12 +354,12 @@ aac_type_find (GstTypeFind * tf, gpointer unused)
* (0.024%) per try. This makes the function for calculating false positives * (0.024%) per try. This makes the function for calculating false positives
* 1 - (1 - ((63 / 2 ^18) ^ GST_MP3_TYPEFIND_MIN_HEADERS)) ^ buffersize) * 1 - (1 - ((63 / 2 ^18) ^ GST_MP3_TYPEFIND_MIN_HEADERS)) ^ buffersize)
* This has the following probabilities of false positives: * This has the following probabilities of false positives:
* datasize MIN_HEADERS * datasize MIN_HEADERS
* (bytes) 1 2 3 4 * (bytes) 1 2 3 4
* 4096 62.6% 0.02% 0% 0% * 4096 62.6% 0.02% 0% 0%
* 16384 98% 0.09% 0% 0% * 16384 98% 0.09% 0% 0%
* 1 MiB 100% 5.88% 0% 0% * 1 MiB 100% 5.88% 0% 0%
* 1 GiB 100% 100% 1.44% 0% * 1 GiB 100% 100% 1.44% 0%
* 1 TiB 100% 100% 100% 0.35% * 1 TiB 100% 100% 100% 0.35%
* This means that the current choice (3 headers by most of the time 4096 byte * This means that the current choice (3 headers by most of the time 4096 byte
* buffers is pretty safe for now. * buffers is pretty safe for now.
@ -469,7 +469,7 @@ static GstStaticCaps mp3_caps = GST_STATIC_CAPS ("audio/mpeg, "
* random values for typefinding * random values for typefinding
* if no more data is available, we will return a probability of * if no more data is available, we will return a probability of
* (found_headers/TRY_HEADERS) * (MAXIMUM * (TRY_SYNC - bytes_skipped) * (found_headers/TRY_HEADERS) * (MAXIMUM * (TRY_SYNC - bytes_skipped)
* / TRY_SYNC) * / TRY_SYNC)
* if found_headers >= MIN_HEADERS * if found_headers >= MIN_HEADERS
*/ */
#define GST_MP3_TYPEFIND_MIN_HEADERS (2) #define GST_MP3_TYPEFIND_MIN_HEADERS (2)
@ -681,24 +681,24 @@ wavpack_type_find (GstTypeFind * tf, gpointer unused)
static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, " static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
"systemstream = (boolean) true, mpegversion = (int) [ 1, 2 ]"); "systemstream = (boolean) true, mpegversion = (int) [ 1, 2 ]");
#define MPEG_SYS_CAPS gst_static_caps_get(&mpeg_sys_caps) #define MPEG_SYS_CAPS gst_static_caps_get(&mpeg_sys_caps)
#define IS_MPEG_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \ #define IS_MPEG_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \
(((guint8 *)data)[1] == 0x00) && \ (((guint8 *)data)[1] == 0x00) && \
(((guint8 *)data)[2] == 0x01) && \ (((guint8 *)data)[2] == 0x01) && \
(((guint8 *)data)[3] == 0xBA)) (((guint8 *)data)[3] == 0xBA))
#define IS_MPEG_SYSTEM_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \ #define IS_MPEG_SYSTEM_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \
(((guint8 *)data)[1] == 0x00) && \ (((guint8 *)data)[1] == 0x00) && \
(((guint8 *)data)[2] == 0x01) && \ (((guint8 *)data)[2] == 0x01) && \
(((guint8 *)data)[3] == 0xBB)) (((guint8 *)data)[3] == 0xBB))
#define IS_MPEG_PACKET_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \ #define IS_MPEG_PACKET_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \
(((guint8 *)data)[1] == 0x00) && \ (((guint8 *)data)[1] == 0x00) && \
(((guint8 *)data)[2] == 0x01) && \ (((guint8 *)data)[2] == 0x01) && \
((((guint8 *)data)[3] & 0x80) == 0x80)) ((((guint8 *)data)[3] & 0x80) == 0x80))
#define IS_MPEG_PES_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \ #define IS_MPEG_PES_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \
(((guint8 *)data)[1] == 0x00) && \ (((guint8 *)data)[1] == 0x00) && \
(((guint8 *)data)[2] == 0x01) && \ (((guint8 *)data)[2] == 0x01) && \
((((guint8 *)data)[3] == 0xE0) || \ ((((guint8 *)data)[3] == 0xE0) || \
(((guint8 *)data)[3] == 0xC0) || \ (((guint8 *)data)[3] == 0xC0) || \
(((guint8 *)data)[3] == 0xBD))) (((guint8 *)data)[3] == 0xBD)))
static void static void
mpeg2_sys_type_find (GstTypeFind * tf, gpointer unused) mpeg2_sys_type_find (GstTypeFind * tf, gpointer unused)
@ -814,15 +814,15 @@ mpeg1_parse_header (GstTypeFind * tf, guint64 offset)
} }
/* calculation of possibility to identify random data as mpeg systemstream: /* calculation of possibility to identify random data as mpeg systemstream:
* bits that must match in header detection: 32 (or more) * bits that must match in header detection: 32 (or more)
* chance that random data is identifed: 1/2^32 * chance that random data is identifed: 1/2^32
* chance that GST_MPEG_TYPEFIND_TRY_HEADERS headers are identified: * chance that GST_MPEG_TYPEFIND_TRY_HEADERS headers are identified:
* 1/2^(32*GST_MPEG_TYPEFIND_TRY_HEADERS) * 1/2^(32*GST_MPEG_TYPEFIND_TRY_HEADERS)
* chance that this happens in GST_MPEG_TYPEFIND_TRY_SYNC bytes: * chance that this happens in GST_MPEG_TYPEFIND_TRY_SYNC bytes:
* 1-(1+1/2^(32*GST_MPEG_TYPEFIND_TRY_HEADERS)^GST_MPEG_TYPEFIND_TRY_SYNC) * 1-(1+1/2^(32*GST_MPEG_TYPEFIND_TRY_HEADERS)^GST_MPEG_TYPEFIND_TRY_SYNC)
* for current values: * for current values:
* 1-(1+1/2^(32*4)^101024) * 1-(1+1/2^(32*4)^101024)
* = <some_number> * = <some_number>
*/ */
#define GST_MPEG_TYPEFIND_TRY_HEADERS 4 #define GST_MPEG_TYPEFIND_TRY_HEADERS 4
#define GST_MPEG_TYPEFIND_TRY_SYNC (100 * 1024) /* 100kB */ #define GST_MPEG_TYPEFIND_TRY_SYNC (100 * 1024) /* 100kB */
@ -1797,17 +1797,17 @@ start_with_type_find (GstTypeFind * tf, gpointer private)
} }
#define TYPE_FIND_REGISTER_START_WITH(plugin,name,rank,ext,_data,_size,_probability)\ #define TYPE_FIND_REGISTER_START_WITH(plugin,name,rank,ext,_data,_size,_probability)\
G_BEGIN_DECLS{ \ G_BEGIN_DECLS{ \
GstTypeFindData *sw_data = g_new (GstTypeFindData, 1); \ GstTypeFindData *sw_data = g_new (GstTypeFindData, 1); \
sw_data->data = (gpointer)_data; \ sw_data->data = (gpointer)_data; \
sw_data->size = _size; \ sw_data->size = _size; \
sw_data->probability = _probability; \ sw_data->probability = _probability; \
sw_data->caps = gst_caps_new_simple (name, NULL); \ sw_data->caps = gst_caps_new_simple (name, NULL); \
if (!gst_type_find_register (plugin, name, rank, start_with_type_find,\ if (!gst_type_find_register (plugin, name, rank, start_with_type_find,\
ext, sw_data->caps, sw_data, (GDestroyNotify) (g_free))) { \ ext, sw_data->caps, sw_data, (GDestroyNotify) (g_free))) { \
gst_caps_unref (sw_data->caps); \ gst_caps_unref (sw_data->caps); \
g_free (sw_data); \ g_free (sw_data); \
} \ } \
}G_END_DECLS }G_END_DECLS
/*** same for riff types ***/ /*** same for riff types ***/
@ -1825,18 +1825,18 @@ riff_type_find (GstTypeFind * tf, gpointer private)
} }
} }
#define TYPE_FIND_REGISTER_RIFF(plugin,name,rank,ext,_data) \ #define TYPE_FIND_REGISTER_RIFF(plugin,name,rank,ext,_data) \
G_BEGIN_DECLS{ \ G_BEGIN_DECLS{ \
GstTypeFindData *sw_data = g_new (GstTypeFindData, 1); \ GstTypeFindData *sw_data = g_new (GstTypeFindData, 1); \
sw_data->data = (gpointer)_data; \ sw_data->data = (gpointer)_data; \
sw_data->size = 4; \ sw_data->size = 4; \
sw_data->probability = GST_TYPE_FIND_MAXIMUM; \ sw_data->probability = GST_TYPE_FIND_MAXIMUM; \
sw_data->caps = gst_caps_new_simple (name, NULL); \ sw_data->caps = gst_caps_new_simple (name, NULL); \
if (!gst_type_find_register (plugin, name, rank, riff_type_find, \ if (!gst_type_find_register (plugin, name, rank, riff_type_find, \
ext, sw_data->caps, sw_data, (GDestroyNotify) (g_free))) { \ ext, sw_data->caps, sw_data, (GDestroyNotify) (g_free))) { \
gst_caps_unref (sw_data->caps); \ gst_caps_unref (sw_data->caps); \
g_free (sw_data); \ g_free (sw_data); \
} \ } \
}G_END_DECLS }G_END_DECLS
/*** plugin initialization ***/ /*** plugin initialization ***/

View file

@ -83,8 +83,8 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
#define DEFAULT_SILENT TRUE #define DEFAULT_SILENT TRUE
#define DEFAULT_NEW_PREF 1.0 #define DEFAULT_NEW_PREF 1.0
enum enum
{ {

View file

@ -62,9 +62,9 @@ struct _GstVideoTestSrc {
gint rate_denominator; gint rate_denominator;
/* private */ /* private */
gint64 timestamp_offset; /* base offset */ gint64 timestamp_offset; /* base offset */
GstClockTime running_time; /* total running time */ GstClockTime running_time; /* total running time */
gint64 n_frames; /* total frames sent */ gint64 n_frames; /* total frames sent */
gint64 segment_start_frame; gint64 segment_start_frame;
gint64 segment_end_frame; gint64 segment_end_frame;
gboolean segment; gboolean segment;

View file

@ -24,17 +24,17 @@
struct vts_color_struct { struct vts_color_struct {
uint8_t Y, U, V; uint8_t Y, U, V;
uint8_t R, G, B; uint8_t R, G, B;
}; };
typedef struct paintinfo_struct paintinfo; typedef struct paintinfo_struct paintinfo;
struct paintinfo_struct struct paintinfo_struct
{ {
unsigned char *dest; /* pointer to first byte of video data */ unsigned char *dest; /* pointer to first byte of video data */
unsigned char *yp, *up, *vp; /* pointers to first byte of each component unsigned char *yp, *up, *vp; /* pointers to first byte of each component
* for both packed/planar YUV and RGB */ * for both packed/planar YUV and RGB */
unsigned char *endptr; /* pointer to byte beyond last video data */ unsigned char *endptr; /* pointer to byte beyond last video data */
int ystride; int ystride;
int ustride; int ustride;
int vstride; int vstride;
@ -59,20 +59,20 @@ struct fourcc_list_struct
}; };
struct fourcc_list_struct * struct fourcc_list_struct *
paintrect_find_fourcc (int find_fourcc); paintrect_find_fourcc (int find_fourcc);
struct fourcc_list_struct * struct fourcc_list_struct *
paintrect_find_name (const char *name); paintrect_find_name (const char *name);
struct fourcc_list_struct * struct fourcc_list_struct *
paintinfo_find_by_structure (const GstStructure *structure); paintinfo_find_by_structure (const GstStructure *structure);
GstStructure * GstStructure *
paint_get_structure (struct fourcc_list_struct *format); paint_get_structure (struct fourcc_list_struct *format);
int gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h); int gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h);
void gst_video_test_src_smpte (GstVideoTestSrc * v, void gst_video_test_src_smpte (GstVideoTestSrc * v,
unsigned char *dest, int w, int h); unsigned char *dest, int w, int h);
void gst_video_test_src_snow (GstVideoTestSrc * v, void gst_video_test_src_snow (GstVideoTestSrc * v,
unsigned char *dest, int w, int h); unsigned char *dest, int w, int h);
void gst_video_test_src_black (GstVideoTestSrc * v, void gst_video_test_src_black (GstVideoTestSrc * v,
unsigned char *dest, int w, int h); unsigned char *dest, int w, int h);
extern struct fourcc_list_struct fourcc_list[]; extern struct fourcc_list_struct fourcc_list[];
extern int n_fourccs; extern int n_fourccs;

View file

@ -33,10 +33,10 @@ G_BEGIN_DECLS
(gst_v4l_color_balance_channel_get_type ()) (gst_v4l_color_balance_channel_get_type ())
#define GST_V4L_COLOR_BALANCE_CHANNEL(obj) \ #define GST_V4L_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL, \
GstV4lColorBalanceChannel)) GstV4lColorBalanceChannel))
#define GST_V4L_COLOR_BALANCE_CHANNEL_CLASS(klass) \ #define GST_V4L_COLOR_BALANCE_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL, \
GstV4lColorBalanceChannelClass)) GstV4lColorBalanceChannelClass))
#define GST_IS_V4L_COLOR_BALANCE_CHANNEL(obj) \ #define GST_IS_V4L_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL))
#define GST_IS_V4L_COLOR_BALANCE_CHANNEL_CLASS(klass) \ #define GST_IS_V4L_COLOR_BALANCE_CHANNEL_CLASS(klass) \
@ -52,8 +52,8 @@ typedef struct _GstV4lColorBalanceChannelClass {
GstColorBalanceChannelClass parent; GstColorBalanceChannelClass parent;
} GstV4lColorBalanceChannelClass; } GstV4lColorBalanceChannelClass;
GType gst_v4l_color_balance_channel_get_type (void); GType gst_v4l_color_balance_channel_get_type (void);
void gst_v4l_color_balance_interface_init (GstColorBalanceClass *klass); void gst_v4l_color_balance_interface_init (GstColorBalanceClass *klass);
#endif /* __GST_V4L_COLOR_BALANCE_H__ */ #endif /* __GST_V4L_COLOR_BALANCE_H__ */

View file

@ -32,10 +32,10 @@ G_BEGIN_DECLS
(gst_v4l_tuner_channel_get_type ()) (gst_v4l_tuner_channel_get_type ())
#define GST_V4L_TUNER_CHANNEL(obj) \ #define GST_V4L_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L_TUNER_CHANNEL, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L_TUNER_CHANNEL, \
GstV4lTunerChannel)) GstV4lTunerChannel))
#define GST_V4L_TUNER_CHANNEL_CLASS(klass) \ #define GST_V4L_TUNER_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L_TUNER_CHANNEL, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L_TUNER_CHANNEL, \
GstV4lTunerChannelClass)) GstV4lTunerChannelClass))
#define GST_IS_V4L_TUNER_CHANNEL(obj) \ #define GST_IS_V4L_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_TUNER_CHANNEL)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_TUNER_CHANNEL))
#define GST_IS_V4L_TUNER_CHANNEL_CLASS(klass) \ #define GST_IS_V4L_TUNER_CHANNEL_CLASS(klass) \
@ -57,10 +57,10 @@ typedef struct _GstV4lTunerChannelClass {
(gst_v4l_tuner_norm_get_type ()) (gst_v4l_tuner_norm_get_type ())
#define GST_V4L_TUNER_NORM(obj) \ #define GST_V4L_TUNER_NORM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L_TUNER_NORM, \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L_TUNER_NORM, \
GstV4lTunerNorm)) GstV4lTunerNorm))
#define GST_V4L_TUNER_NORM_CLASS(klass) \ #define GST_V4L_TUNER_NORM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L_TUNER_NORM, \ (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L_TUNER_NORM, \
GstV4lTunerNormClass)) GstV4lTunerNormClass))
#define GST_IS_V4L_TUNER_NORM(obj) \ #define GST_IS_V4L_TUNER_NORM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_TUNER_NORM)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_TUNER_NORM))
#define GST_IS_V4L_TUNER_NORM_CLASS(klass) \ #define GST_IS_V4L_TUNER_NORM_CLASS(klass) \
@ -76,9 +76,9 @@ typedef struct _GstV4lTunerNormClass {
GstTunerNormClass parent; GstTunerNormClass parent;
} GstV4lTunerNormClass; } GstV4lTunerNormClass;
GType gst_v4l_tuner_channel_get_type (void); GType gst_v4l_tuner_channel_get_type (void);
GType gst_v4l_tuner_norm_get_type (void); GType gst_v4l_tuner_norm_get_type (void);
void gst_v4l_tuner_interface_init (GstTunerClass *klass); void gst_v4l_tuner_interface_init (GstTunerClass *klass);
#endif /* __GST_V4L_TUNER_H__ */ #endif /* __GST_V4L_TUNER_H__ */

View file

@ -30,10 +30,10 @@
G_BEGIN_DECLS G_BEGIN_DECLS
void gst_v4l_xoverlay_interface_init (GstXOverlayClass *klass); void gst_v4l_xoverlay_interface_init (GstXOverlayClass *klass);
void gst_v4l_xoverlay_start (GstV4lElement * v4lelement); void gst_v4l_xoverlay_start (GstV4lElement * v4lelement);
void gst_v4l_xoverlay_stop (GstV4lElement * v4lelement); void gst_v4l_xoverlay_stop (GstV4lElement * v4lelement);
G_END_DECLS G_END_DECLS

View file

@ -42,48 +42,48 @@ G_BEGIN_DECLS
(GST_V4LELEMENT (element)->vcap.type & VID_TYPE_OVERLAY) (GST_V4LELEMENT (element)->vcap.type & VID_TYPE_OVERLAY)
/* checks whether the current v4lelement has already been open()'ed or not */ /* checks whether the current v4lelement has already been open()'ed or not */
#define GST_V4L_CHECK_OPEN(element) \ #define GST_V4L_CHECK_OPEN(element) \
if (!GST_V4L_IS_OPEN (element)) \ if (!GST_V4L_IS_OPEN (element)) \
{ \ { \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is not open.")), (NULL)); \ (_("Device is not open.")), (NULL)); \
return FALSE; \ return FALSE; \
} }
/* checks whether the current v4lelement is close()'ed or whether it is still open */ /* checks whether the current v4lelement is close()'ed or whether it is still open */
#define GST_V4L_CHECK_NOT_OPEN(element) \ #define GST_V4L_CHECK_NOT_OPEN(element) \
if (GST_V4L_IS_OPEN (element)) \ if (GST_V4L_IS_OPEN (element)) \
{ \ { \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is open.")), (NULL)); \ (_("Device is open.")), (NULL)); \
return FALSE; \ return FALSE; \
} }
/* checks whether the current v4lelement does video overlay */ /* checks whether the current v4lelement does video overlay */
#define GST_V4L_CHECK_OVERLAY(element) \ #define GST_V4L_CHECK_OVERLAY(element) \
if (!(element->vcap.type & VID_TYPE_OVERLAY)) \ if (!(element->vcap.type & VID_TYPE_OVERLAY)) \
{ \ { \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(NULL), ("Device cannot handle overlay")); \ (NULL), ("Device cannot handle overlay")); \
return FALSE; \ return FALSE; \
} }
/* checks whether we're in capture mode or not */ /* checks whether we're in capture mode or not */
#define GST_V4L_CHECK_ACTIVE(element) \ #define GST_V4L_CHECK_ACTIVE(element) \
if (!GST_V4L_IS_ACTIVE (element)) \ if (!GST_V4L_IS_ACTIVE (element)) \
{ \ { \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \ GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
(NULL), ("Device is not in streaming mode")); \ (NULL), ("Device is not in streaming mode")); \
return FALSE; \ return FALSE; \
} }
/* checks whether we're out of capture mode or not */ /* checks whether we're out of capture mode or not */
#define GST_V4L_CHECK_NOT_ACTIVE(element) \ #define GST_V4L_CHECK_NOT_ACTIVE(element) \
if (GST_V4L_IS_ACTIVE (element)) \ if (GST_V4L_IS_ACTIVE (element)) \
{ \ { \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \ GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
(NULL), ("Device is in streaming mode")); \ (NULL), ("Device is in streaming mode")); \
return FALSE; \ return FALSE; \
} }
@ -107,41 +107,41 @@ gboolean gst_v4l_close (GstV4lElement *v4lelement);
/* norm control (norm = VIDEO_MODE_{PAL|NTSC|SECAM|AUTO}) */ /* norm control (norm = VIDEO_MODE_{PAL|NTSC|SECAM|AUTO}) */
gboolean gst_v4l_get_chan_norm (GstV4lElement *v4lelement, gboolean gst_v4l_get_chan_norm (GstV4lElement *v4lelement,
gint *channel, gint *channel,
gint *norm); gint *norm);
gboolean gst_v4l_set_chan_norm (GstV4lElement *v4lelement, gboolean gst_v4l_set_chan_norm (GstV4lElement *v4lelement,
gint channel, gint channel,
gint norm); gint norm);
GList *gst_v4l_get_chan_names (GstV4lElement *v4lelement); GList *gst_v4l_get_chan_names (GstV4lElement *v4lelement);
/* frequency control */ /* frequency control */
gboolean gst_v4l_get_signal (GstV4lElement *v4lelement, gboolean gst_v4l_get_signal (GstV4lElement *v4lelement,
gint tunernum, gint tunernum,
guint *signal); guint *signal);
gboolean gst_v4l_get_frequency (GstV4lElement *v4lelement, gboolean gst_v4l_get_frequency (GstV4lElement *v4lelement,
gint tunernum, gint tunernum,
gulong *frequency); gulong *frequency);
gboolean gst_v4l_set_frequency (GstV4lElement *v4lelement, gboolean gst_v4l_set_frequency (GstV4lElement *v4lelement,
gint tunernum, gint tunernum,
gulong frequency); gulong frequency);
/* picture control */ /* picture control */
gboolean gst_v4l_get_picture (GstV4lElement *v4lelement, gboolean gst_v4l_get_picture (GstV4lElement *v4lelement,
GstV4lPictureType type, GstV4lPictureType type,
gint *value); gint *value);
gboolean gst_v4l_set_picture (GstV4lElement *v4lelement, gboolean gst_v4l_set_picture (GstV4lElement *v4lelement,
GstV4lPictureType type, GstV4lPictureType type,
gint value); gint value);
/* audio control */ /* audio control */
gboolean gst_v4l_get_audio (GstV4lElement *v4lelement, gboolean gst_v4l_get_audio (GstV4lElement *v4lelement,
gint audionum, gint audionum,
GstV4lAudioType type, GstV4lAudioType type,
gint *value); gint *value);
gboolean gst_v4l_set_audio (GstV4lElement *v4lelement, gboolean gst_v4l_set_audio (GstV4lElement *v4lelement,
gint audionum, gint audionum,
GstV4lAudioType type, GstV4lAudioType type,
gint value); gint value);
/* functions that v4lsrc needs */ /* functions that v4lsrc needs */
gboolean gst_v4l_set_window_properties (GstV4lElement * v4lelement); gboolean gst_v4l_set_window_properties (GstV4lElement * v4lelement);

View file

@ -84,7 +84,7 @@ struct mjpeg_params
/* Misc */ /* Misc */
char reserved[312]; /* Makes 512 bytes for this structure */ char reserved[312]; /* Makes 512 bytes for this structure */
}; };
struct mjpeg_requestbuffers struct mjpeg_requestbuffers

View file

@ -32,7 +32,7 @@ gboolean have_eos = FALSE;
* get_peer, and then remove references in every test function */ * get_peer, and then remove references in every test function */
GstPad *mysrcpad, *mysinkpad; GstPad *mysrcpad, *mysinkpad;
#define CONVERT_CAPS_TEMPLATE_STRING \ #define CONVERT_CAPS_TEMPLATE_STRING \
"audio/x-raw-float, " \ "audio/x-raw-float, " \
"rate = (int) [ 1, MAX ], " \ "rate = (int) [ 1, MAX ], " \
"channels = (int) [ 1, 8 ], " \ "channels = (int) [ 1, 8 ], " \
@ -190,8 +190,8 @@ verify_convert (void *in, int inlength,
#define RUN_CONVERSION(inarray, in_get_caps, outarray, out_get_caps) \ #define RUN_CONVERSION(inarray, in_get_caps, outarray, out_get_caps) \
verify_convert (inarray, sizeof (inarray), \ verify_convert (inarray, sizeof (inarray), \
in_get_caps, outarray, sizeof (outarray), out_get_caps) in_get_caps, outarray, sizeof (outarray), out_get_caps)
GST_START_TEST (test_int16) GST_START_TEST (test_int16)
{ {

View file

@ -33,13 +33,13 @@ gboolean have_eos = FALSE;
GstPad *mysrcpad, *mysinkpad; GstPad *mysrcpad, *mysinkpad;
#define RESAMPLE_CAPS_TEMPLATE_STRING \ #define RESAMPLE_CAPS_TEMPLATE_STRING \
"audio/x-raw-int, " \ "audio/x-raw-int, " \
"channels = (int) [ 1, MAX ], " \ "channels = (int) [ 1, MAX ], " \
"rate = (int) [ 1, MAX ], " \ "rate = (int) [ 1, MAX ], " \
"endianness = (int) BYTE_ORDER, " \ "endianness = (int) BYTE_ORDER, " \
"width = (int) 16, " \ "width = (int) 16, " \
"depth = (int) 16, " \ "depth = (int) 16, " \
"signed = (bool) TRUE" "signed = (bool) TRUE"
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",

View file

@ -33,13 +33,13 @@ gboolean have_eos = FALSE;
GstPad *mysinkpad; GstPad *mysinkpad;
#define CAPS_TEMPLATE_STRING \ #define CAPS_TEMPLATE_STRING \
"audio/x-raw-int, " \ "audio/x-raw-int, " \
"channels = (int) 1, " \ "channels = (int) 1, " \
"rate = (int) [ 1, MAX ], " \ "rate = (int) [ 1, MAX ], " \
"endianness = (int) BYTE_ORDER, " \ "endianness = (int) BYTE_ORDER, " \
"width = (int) 16, " \ "width = (int) 16, " \
"depth = (int) 16, " \ "depth = (int) 16, " \
"signed = (bool) TRUE" "signed = (bool) TRUE"
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",

Some files were not shown because too many files have changed in this diff Show more