Commit bf07c7cc authored by Johan Dahlin's avatar Johan Dahlin

*.h: Revert indenting

Original commit message from CVS:
* *.h: Revert indenting
parent f369c03c
2004-03-15 Johan Dahlin <johan@gnome.org>
* *.h: Revert indenting
2004-03-15 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
......
......@@ -72,8 +72,8 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
#define GST_ALSA_MIN_RATE 8000
#define GST_ALSA_MAX_RATE 192000
#define GST_ALSA_MAX_TRACKS 64 /* we don't support more than 64 tracks */
#define GST_ALSA_MAX_CHANNELS 32 /* tracks can have up to 32 channels */
#define GST_ALSA_MAX_TRACKS 64 /* we don't support more than 64 tracks */
#define GST_ALSA_MAX_CHANNELS 32 /* tracks can have up to 32 channels */
/* Mono is 1 channel ; the 5.1 standard is 6 channels. The value for
GST_ALSA_MAX_CHANNELS comes from alsa/mixer.h. */
......@@ -84,28 +84,27 @@ GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
#define GST_ALSA_DEFAULT_DISCONT (GST_SECOND / 10)
G_BEGIN_DECLS
#define GST_ALSA(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_ALSA, GstAlsa))
#define GST_ALSA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, GST_TYPE_ALSA, GstAlsaClass))
#define GST_ALSA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_ALSA, GstAlsaClass))
#define GST_IS_ALSA(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_ALSA))
#define GST_IS_ALSA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_ALSA))
#define GST_TYPE_ALSA (gst_alsa_get_type())
enum
{
enum {
GST_ALSA_OPEN = GST_ELEMENT_FLAG_LAST,
GST_ALSA_RUNNING,
GST_ALSA_CAPS_NEGO,
GST_ALSA_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 3,
};
typedef enum
{
typedef enum {
GST_ALSA_CAPS_PAUSE = 0,
GST_ALSA_CAPS_RESUME,
GST_ALSA_CAPS_SYNC_START
/* add more */
}
GstAlsaPcmCaps;
/* add more */
} GstAlsaPcmCaps;
#define GST_ALSA_CAPS_IS_SET(obj, flag) (GST_ALSA (obj)->pcm_caps & (1<<(flag)))
#define GST_ALSA_CAPS_SET(obj, flag, set) G_STMT_START{ \
......@@ -119,62 +118,56 @@ typedef struct _GstAlsaClockClass GstAlsaClockClass;
typedef struct _GstAlsa GstAlsa;
typedef struct _GstAlsaClass GstAlsaClass;
typedef int (*GstAlsaTransmitFunction) (GstAlsa * this,
snd_pcm_sframes_t * avail);
typedef int (*GstAlsaTransmitFunction) (GstAlsa *this, snd_pcm_sframes_t *avail);
typedef struct
{
snd_pcm_format_t format;
guint rate;
gint channels;
}
GstAlsaFormat;
typedef struct {
snd_pcm_format_t format;
guint rate;
gint channels;
} GstAlsaFormat;
struct _GstAlsa
{
GstElement parent;
struct _GstAlsa {
GstElement parent;
/* array of GstAlsaPads */
GstPad *pad[GST_ALSA_MAX_TRACKS];
GstPad * pad[GST_ALSA_MAX_TRACKS];
gchar *device;
gchar *cardname;
snd_pcm_t *handle;
snd_pcm_info_t *info;
guint pcm_caps; /* capabilities of the pcm device, see GstAlsaPcmCaps */
snd_output_t *out;
gchar * device;
snd_pcm_t * handle;
snd_pcm_info_t * info;
guint pcm_caps; /* capabilities of the pcm device, see GstAlsaPcmCaps */
snd_output_t * out;
GstAlsaFormat *format; /* NULL if undefined */
gboolean mmap; /* use mmap transmit (fast) or read/write (sloooow) */
GstAlsaTransmitFunction transmit;
GstAlsaFormat * format; /* NULL if undefined */
gboolean mmap; /* use mmap transmit (fast) or read/write (sloooow) */
GstAlsaTransmitFunction transmit;
/* latency / performance parameters */
snd_pcm_uframes_t period_size;
unsigned int period_count;
snd_pcm_uframes_t period_size;
unsigned int period_count;
gboolean autorecover;
gboolean autorecover;
/* clocking */
GstAlsaClock *clock; /* our provided clock */
snd_pcm_uframes_t transmitted; /* samples transmitted since last sync
This thing actually is our master clock.
We will event insert silent samples or
drop some to sync to incoming timestamps.
*/
GstClockTime max_discont; /* max difference between current
playback timestamp and buffers timestamps
*/
GstAlsaClock * clock; /* our provided clock */
snd_pcm_uframes_t transmitted; /* samples transmitted since last sync
This thing actually is our master clock.
We will event insert silent samples or
drop some to sync to incoming timestamps.
*/
GstClockTime max_discont; /* max difference between current
playback timestamp and buffers timestamps
*/
};
struct _GstAlsaClass
{
GstElementClass parent_class;
struct _GstAlsaClass {
GstElementClass parent_class;
snd_pcm_stream_t stream;
snd_pcm_stream_t stream;
/* different transmit functions */
GstAlsaTransmitFunction transmit_mmap;
GstAlsaTransmitFunction transmit_rw;
GstAlsaTransmitFunction transmit_mmap;
GstAlsaTransmitFunction transmit_rw;
/* autodetected devices available */
GList *devices;
......@@ -182,29 +175,36 @@ struct _GstAlsaClass
GType gst_alsa_get_type (void);
void gst_alsa_set_eos (GstAlsa * this);
GstPadLinkReturn gst_alsa_link (GstPad * pad, const GstCaps * caps);
GstCaps *gst_alsa_get_caps (GstPad * pad);
GstCaps *gst_alsa_fixate (GstPad * pad, const GstCaps * caps);
GstCaps *gst_alsa_caps (snd_pcm_format_t format, gint rate, gint channels);
void gst_alsa_set_eos (GstAlsa * this);
GstPadLinkReturn gst_alsa_link (GstPad * pad,
const GstCaps * caps);
GstCaps * gst_alsa_get_caps (GstPad * pad);
GstCaps * gst_alsa_fixate (GstPad * pad,
const GstCaps * caps);
GstCaps * gst_alsa_caps (snd_pcm_format_t format,
gint rate,
gint channels);
/* audio processing functions */
inline snd_pcm_sframes_t gst_alsa_update_avail (GstAlsa * this);
inline gboolean gst_alsa_pcm_wait (GstAlsa * this);
inline gboolean gst_alsa_start (GstAlsa * this);
gboolean gst_alsa_xrun_recovery (GstAlsa * this);
inline snd_pcm_sframes_t gst_alsa_update_avail (GstAlsa * this);
inline gboolean gst_alsa_pcm_wait (GstAlsa * this);
inline gboolean gst_alsa_start (GstAlsa * this);
gboolean gst_alsa_xrun_recovery (GstAlsa * this);
/* format conversions */
inline snd_pcm_uframes_t gst_alsa_timestamp_to_samples (GstAlsa * this,
GstClockTime time);
inline GstClockTime gst_alsa_samples_to_timestamp (GstAlsa * this,
snd_pcm_uframes_t samples);
inline snd_pcm_uframes_t gst_alsa_bytes_to_samples (GstAlsa * this,
guint bytes);
inline guint gst_alsa_samples_to_bytes (GstAlsa * this,
snd_pcm_uframes_t samples);
inline GstClockTime gst_alsa_bytes_to_timestamp (GstAlsa * this, guint bytes);
inline guint gst_alsa_timestamp_to_bytes (GstAlsa * this, GstClockTime time);
inline snd_pcm_uframes_t gst_alsa_timestamp_to_samples (GstAlsa * this,
GstClockTime time);
inline GstClockTime gst_alsa_samples_to_timestamp (GstAlsa * this,
snd_pcm_uframes_t samples);
inline snd_pcm_uframes_t gst_alsa_bytes_to_samples (GstAlsa * this,
guint bytes);
inline guint gst_alsa_samples_to_bytes (GstAlsa * this,
snd_pcm_uframes_t samples);
inline GstClockTime gst_alsa_bytes_to_timestamp (GstAlsa * this,
guint bytes);
inline guint gst_alsa_timestamp_to_bytes (GstAlsa * this,
GstClockTime time);
G_END_DECLS
#endif /* __GST_ALSA_H__ */
......@@ -25,36 +25,38 @@
#include "gstalsa.h"
G_BEGIN_DECLS
#define GST_ALSA_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_CLOCK,GstAlsaClock))
#define GST_ALSA_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_CLOCK,GstAlsaClockClass))
#define GST_IS_ALSA_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_CLOCK))
#define GST_IS_ALSA_CLOCK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_CLOCK))
#define GST_TYPE_ALSA_CLOCK (gst_alsa_clock_get_type())
typedef GstClockTime (*GstAlsaClockGetTimeFunc) (GstAlsa *);
struct _GstAlsaClock
{
GstSystemClock parent;
struct _GstAlsaClock {
GstSystemClock parent;
GstAlsaClockGetTimeFunc get_time;
GstAlsa *owner;
GstAlsaClockGetTimeFunc get_time;
GstAlsa * owner;
GstClockTimeDiff adjust; /* adjustment to real clock (recalculated when stopping) */
GstClockTime start_time; /* time when the stream started (NONE when stopped) */
GstClockTime last_unlock; /* time of last unlock request */
GstClockTimeDiff adjust; /* adjustment to real clock (recalculated when stopping) */
GstClockTime start_time; /* time when the stream started (NONE when stopped) */
GstClockTime last_unlock; /* time of last unlock request */
};
struct _GstAlsaClockClass
{
struct _GstAlsaClockClass {
GstSystemClockClass parent_class;
};
GType gst_alsa_clock_get_type (void);
GstAlsaClock *gst_alsa_clock_new (gchar * name,
GstAlsaClockGetTimeFunc func, GstAlsa * owner);
GType gst_alsa_clock_get_type (void);
GstAlsaClock * gst_alsa_clock_new (gchar * name,
GstAlsaClockGetTimeFunc func,
GstAlsa * owner);
void gst_alsa_clock_start (GstAlsaClock * clock);
void gst_alsa_clock_stop (GstAlsaClock * clock);
void gst_alsa_clock_start (GstAlsaClock * clock);
void gst_alsa_clock_stop (GstAlsaClock * clock);
G_END_DECLS
#endif /* __GST_ALSA_CLOCK_H__ */
......@@ -24,27 +24,28 @@
#include <gst/mixer/mixer.h>
G_BEGIN_DECLS
#define GST_ALSA_MIXER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ALSA_MIXER,GstAlsaMixer))
#define GST_ALSA_MIXER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ALSA_MIXER,GstAlsaMixerClass))
#define GST_IS_ALSA_MIXER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ALSA_MIXER))
#define GST_IS_ALSA_MIXER_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ALSA_MIXER))
#define GST_TYPE_ALSA_MIXER (gst_alsa_mixer_get_type())
typedef struct _GstAlsaMixer GstAlsaMixer;
typedef struct _GstAlsaMixerClass GstAlsaMixerClass;
struct _GstAlsaMixer
{
GstAlsa parent;
GList *tracklist; /* list of available tracks */
snd_mixer_t *mixer_handle;
struct _GstAlsaMixer {
GstAlsa parent;
GList * tracklist; /* list of available tracks */
snd_mixer_t * mixer_handle;
};
struct _GstAlsaMixerClass
{
GstAlsaClass parent;
struct _GstAlsaMixerClass {
GstAlsaClass parent;
};
GType gst_alsa_mixer_get_type (void);
GType gst_alsa_mixer_get_type (void);
G_END_DECLS
#endif /* __GST_ALSA_MIXER_H__ */
......@@ -23,32 +23,35 @@
#include <gst/mixer/mixertrack.h>
G_BEGIN_DECLS
#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_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_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())
typedef struct _GstAlsaMixerTrack GstAlsaMixerTrack;
typedef struct _GstAlsaMixerTrackClass GstAlsaMixerTrackClass;
struct _GstAlsaMixerTrack
{
GstMixerTrack parent;
snd_mixer_elem_t *element; /* the ALSA mixer element for this track */
gint track_num;
gint min_rec_volume, max_rec_volume;
gint volumes[GST_ALSA_MAX_CHANNELS];
struct _GstAlsaMixerTrack {
GstMixerTrack parent;
snd_mixer_elem_t *element; /* the ALSA mixer element for this track */
gint track_num;
gint min_rec_volume, max_rec_volume;
gint volumes[GST_ALSA_MAX_CHANNELS];
};
struct _GstAlsaMixerTrackClass
{
struct _GstAlsaMixerTrackClass {
GstMixerTrackClass parent;
};
GType gst_alsa_mixer_track_get_type (void);
GstMixerTrack *gst_alsa_mixer_track_new (snd_mixer_elem_t * element,
gint track_num, gint channels, gint flags);
GType gst_alsa_mixer_track_get_type (void);
GstMixerTrack * gst_alsa_mixer_track_new (snd_mixer_elem_t * element,
gint track_num,
gint channels,
gint flags);
G_END_DECLS
#endif /* __GST_ALSA_MIXER_TRACK_H__ */
......@@ -25,34 +25,35 @@
#include "gstalsa.h"
G_BEGIN_DECLS
#define GST_ALSA_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_ALSA_SINK, GstAlsaSink))
#define GST_ALSA_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, GST_TYPE_ALSA_SINK, GstAlsaSinkClass))
#define GST_IS_ALSA_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_ALSA_SINK))
#define GST_IS_ALSA_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_ALSA_SINK))
#define GST_TYPE_ALSA_SINK (gst_alsa_sink_get_type())
typedef struct _GstAlsaSink GstAlsaSink;
typedef struct _GstAlsaSinkClass GstAlsaSinkClass;
struct _GstAlsaSink
{
GstAlsa parent;
struct _GstAlsaSink {
GstAlsa parent;
/* array of the data on the channels */
guint8 *data[GST_ALSA_MAX_TRACKS]; /* pointer into buffer */
guint size[GST_ALSA_MAX_TRACKS]; /* sink: bytes left in buffer */
GstBuffer *buf[GST_ALSA_MAX_TRACKS]; /* current buffer */
guint behaviour[GST_ALSA_MAX_TRACKS]; /* 0 = data points into buffer (so unref when size == 0),
1 = data should be freed, use buffer after that */
guint8 *data[GST_ALSA_MAX_TRACKS]; /* pointer into buffer */
guint size[GST_ALSA_MAX_TRACKS]; /* sink: bytes left in buffer */
GstBuffer *buf[GST_ALSA_MAX_TRACKS]; /* current buffer */
guint behaviour[GST_ALSA_MAX_TRACKS]; /* 0 = data points into buffer (so unref when size == 0),
1 = data should be freed, use buffer after that */
};
struct _GstAlsaSinkClass
{
struct _GstAlsaSinkClass {
GstAlsaClass parent_class;
};
GType gst_alsa_sink_get_type (void);
gboolean gst_alsa_sink_factory_init (GstPlugin * plugin);
gboolean gst_alsa_sink_factory_init (GstPlugin *plugin);
G_END_DECLS
#endif /* __GST_ALSA_SINK_H__ */
......@@ -25,28 +25,29 @@
#include "gstalsa.h"
G_BEGIN_DECLS
#define GST_ALSA_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_ALSA_SRC, GstAlsaSrc))
#define GST_ALSA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, GST_TYPE_ALSA_SRC, GstAlsaSrcClass))
#define GST_IS_ALSA_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_ALSA_SRC))
#define GST_IS_ALSA_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_ALSA_SRC))
#define GST_TYPE_ALSA_SRC (gst_alsa_src_get_type())
typedef struct _GstAlsaSrc GstAlsaSrc;
typedef struct _GstAlsaSrcClass GstAlsaSrcClass;
struct _GstAlsaSrc
{
GstAlsa parent;
GstBuffer *buf[GST_ALSA_MAX_TRACKS];
struct _GstAlsaSrc {
GstAlsa parent;
GstBuffer *buf[GST_ALSA_MAX_TRACKS];
};
struct _GstAlsaSrcClass
{
struct _GstAlsaSrcClass {
GstAlsaClass parent_class;
};
GType gst_alsa_src_get_type (void);
gboolean gst_alsa_src_factory_init (GstPlugin * plugin);
gboolean gst_alsa_src_factory_init (GstPlugin *plugin);
G_END_DECLS
#endif /* __GST_ALSA_SRC_H__ */
......@@ -26,21 +26,20 @@
#include <gst/gst.h>
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
extern "C" {
#endif /* __cplusplus */
#define size16 gint16
#define size32 gint32
#ifdef CDPARANOIA_HEADERS_IN_DIR
#include <cdda/cdda_interface.h>
#include <cdda/cdda_paranoia.h>
#include <cdda/cdda_interface.h>
#include <cdda/cdda_paranoia.h>
#else
#include <cdda_interface.h>
#include <cdda_paranoia.h>
#include <cdda_interface.h>
#include <cdda_paranoia.h>
#endif
/*#define CDPARANOIA_BASEOFFSET 0xf1d2 */
......@@ -58,72 +57,69 @@ extern "C"
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPARANOIA))
/* NOTE: per-element flags start with 16 for now */
typedef enum
{
CDPARANOIA_OPEN = GST_ELEMENT_FLAG_LAST,
CDPARANOIA_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} CDParanoiaFlags;
typedef struct _CDParanoia CDParanoia;
typedef struct _CDParanoiaClass CDParanoiaClass;
struct _CDParanoia
{
GstElement element;
/* pads */
GstPad *srcpad;
/* Index */
GstIndex *index;
int index_id;
gchar *device;
gchar *generic_device;
gint default_sectors;
gint search_overlap;
gint endian;
gint read_speed;
gint toc_offset;
gboolean toc_bias;
gint never_skip;
gboolean abort_on_skip;
gint paranoia_mode;
cdrom_drive *d;
cdrom_paranoia *p;
gint cur_sector;
gint segment_start_sector;
gint segment_end_sector;
gint first_sector;
gint last_sector;
/* hacks by Gordon Irving */
gchar discid[20];
gint64 offsets[MAXTRK];
gint64 total_seconds;
gint seq;
gboolean discont_pending;
};
struct _CDParanoiaClass
{
GstElementClass parent_class;
/* signal callbacks */
void (*smilie_change) (CDParanoia * cdparanoia, gchar * smilie);
void (*transport_error) (CDParanoia * cdparanoia, gint offset);
void (*uncorrected_error) (CDParanoia * cdparanoia, gint offset);
};
GType cdparanoia_get_type (void);
typedef enum {
CDPARANOIA_OPEN = GST_ELEMENT_FLAG_LAST,
CDPARANOIA_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
} CDParanoiaFlags;
typedef struct _CDParanoia CDParanoia;
typedef struct _CDParanoiaClass CDParanoiaClass;
struct _CDParanoia {
GstElement element;
/* pads */
GstPad *srcpad;
/* Index */
GstIndex *index;
int index_id;
gchar *device;
gchar *generic_device;
gint default_sectors;
gint search_overlap;
gint endian;
gint read_speed;
gint toc_offset;
gboolean toc_bias;
gint never_skip;
gboolean abort_on_skip;
gint paranoia_mode;
cdrom_drive *d;
cdrom_paranoia *p;
gint cur_sector;
gint segment_start_sector;
gint segment_end_sector;
gint first_sector;
gint last_sector;
/* hacks by Gordon Irving */
gchar discid[20];
gint64 offsets[MAXTRK];
gint64 total_seconds;
gint seq;
gboolean discont_pending;
};
struct _CDParanoiaClass {
GstElementClass parent_class;
/* signal callbacks */
void (*smilie_change) (CDParanoia *cdparanoia, gchar *smilie);
void (*transport_error) (CDParanoia *cdparanoia, gint offset);
void (*uncorrected_error) (CDParanoia *cdparanoia, gint offset);
};
GType cdparanoia_get_type(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* __CDPARANOIA_H__ */
#endif /* __CDPARANOIA_H__ */
......@@ -23,9 +23,13 @@
#include <glib-object.h>
G_BEGIN_DECLS GType gst_gnomevfssink_get_type (void);
G_BEGIN_DECLS
GType gst_gnomevfssink_get_type (void);
GType gst_gnomevfssrc_get_type (void);
G_END_DECLS
#endif /* __GST_GNOME_VFS_H__ */
......@@ -6,6 +6,7 @@
#include <pango/pangoft2.h>
G_BEGIN_DECLS
#define GST_TYPE_TEXTOVERLAY (gst_textoverlay_get_type())
#define GST_TEXTOVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
GST_TYPE_TEXTOVERLAY, GstTextOverlay))
......@@ -17,60 +18,56 @@ G_BEGIN_DECLS
GST_TYPE_TEXTOVERLAY))
#define GST_IS_TEXTOVERLAY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),\
GST_TYPE_TEXTOVERLAY))
typedef struct _GstTextOverlay GstTextOverlay;
typedef struct _GstTextOverlay GstTextOverlay;
typedef struct _GstTextOverlayClass GstTextOverlayClass;
typedef enum _GstTextOverlayVAlign GstTextOverlayVAlign;
typedef enum _GstTextOverlayHAlign GstTextOverlayHAlign;
enum _GstTextOverlayVAlign
{
GST_TEXT_OVERLAY_VALIGN_BASELINE,
GST_TEXT_OVERLAY_VALIGN_BOTTOM,
GST_TEXT_OVERLAY_VALIGN_TOP,
enum _GstTextOverlayVAlign {
GST_TEXT_OVERLAY_VALIGN_BASELINE,
GST_TEXT_OVERLAY_VALIGN_BOTTOM,
GST_TEXT_OVERLAY_VALIGN_TOP,
};
enum _GstTextOverlayHAlign
{
GST_TEXT_OVERLAY_HALIGN_LEFT,
GST_TEXT_OVERLAY_HALIGN_CENTER,
GST_TEXT_OVERLAY_HALIGN_RIGHT,
enum _GstTextOverlayHAlign {
GST_TEXT_OVERLAY_HALIGN_LEFT,
GST_TEXT_OVERLAY_HALIGN_CENTER,
GST_TEXT_OVERLAY_HALIGN_RIGHT,
};
struct _GstTextOverlay
{
GstElement element;
struct _GstTextOverlay {
GstElement element;
GstPad *video_sinkpad;
GstPad *text_sinkpad;
GstPad *srcpad;
gint width;
gint height;
PangoLayout *layout;
FT_Bitmap bitmap;
gint bitmap_buffer_size;
gint baseline_y;
GstTextOverlayVAlign valign;
GstTextOverlayHAlign halign;
gint x0;
gint y0;
GstBuffer *current_buffer;
GstBuffer *next_buffer;
gchar *default_text;
gboolean need_render;
GstPad *video_sinkpad;
GstPad *text_sinkpad;
GstPad *srcpad;
gint width;
gint height;
PangoLayout *layout;
FT_Bitmap bitmap;
gint bitmap_buffer_size;
gint baseline_y;
GstTextOverlayVAlign valign;
GstTextOverlayHAlign halign;
gint x0;
gint y0;
GstBuffer *current_buffer;
GstBuffer *next_buffer;
gchar *default_text;
gboolean need_render;
};
struct _GstTextOverlayClass
{
GstElementClass parent_class;
struct _GstTextOverlayClass {
GstElementClass parent_class;
PangoContext *pango_context;