mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
*.h: Revert indenting
Original commit message from CVS: * *.h: Revert indenting
This commit is contained in:
parent
f369c03c32
commit
bf07c7cc9b
85 changed files with 2035 additions and 1809 deletions
|
@ -1,3 +1,7 @@
|
|||
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,
|
||||
typedef enum {
|
||||
CDPARANOIA_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||
|
||||
CDPARANOIA_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
|
||||
} CDParanoiaFlags;
|
||||
CDPARANOIA_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
|
||||
} CDParanoiaFlags;
|
||||
|
||||
typedef struct _CDParanoia CDParanoia;
|
||||
typedef struct _CDParanoiaClass CDParanoiaClass;
|
||||
typedef struct _CDParanoia CDParanoia;
|
||||
typedef struct _CDParanoiaClass CDParanoiaClass;
|
||||
|
||||
struct _CDParanoia
|
||||
{
|
||||
GstElement element;
|
||||
/* pads */
|
||||
GstPad *srcpad;
|
||||
struct _CDParanoia {
|
||||
GstElement element;
|
||||
/* pads */
|
||||
GstPad *srcpad;
|
||||
|
||||
/* Index */
|
||||
GstIndex *index;
|
||||
int index_id;
|
||||
/* 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;
|
||||
|
||||
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;
|
||||
|
||||
cdrom_drive *d;
|
||||
cdrom_paranoia *p;
|
||||
gint cur_sector;
|
||||
gint segment_start_sector;
|
||||
gint segment_end_sector;
|
||||
|
||||
gint cur_sector;
|
||||
gint segment_start_sector;
|
||||
gint segment_end_sector;
|
||||
gint first_sector;
|
||||
gint last_sector;
|
||||
|
||||
gint first_sector;
|
||||
gint last_sector;
|
||||
/* hacks by Gordon Irving */
|
||||
gchar discid[20];
|
||||
gint64 offsets[MAXTRK];
|
||||
gint64 total_seconds;
|
||||
|
||||
/* hacks by Gordon Irving */
|
||||
gchar discid[20];
|
||||
gint64 offsets[MAXTRK];
|
||||
gint64 total_seconds;
|
||||
gint seq;
|
||||
gboolean discont_pending;
|
||||
};
|
||||
|
||||
gint seq;
|
||||
gboolean discont_pending;
|
||||
};
|
||||
struct _CDParanoiaClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
/* 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);
|
||||
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;
|
||||
PangoContext *pango_context;
|
||||
};
|
||||
|
||||
GType
|
||||
gst_textoverlay_get_type (void)
|
||||
G_GNUC_CONST;
|
||||
GType gst_textoverlay_get_type(void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TEXTOVERLAY_H */
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TIMEOVERLAY \
|
||||
(gst_timeoverlay_get_type())
|
||||
#define GST_TIMEOVERLAY(obj) \
|
||||
|
@ -39,11 +40,11 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_TIMEOVERLAY))
|
||||
#define GST_IS_TIMEOVERLAY_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TIMEOVERLAY))
|
||||
|
||||
typedef struct _GstTimeoverlay GstTimeoverlay;
|
||||
typedef struct _GstTimeoverlayClass GstTimeoverlayClass;
|
||||
|
||||
struct _GstTimeoverlay
|
||||
{
|
||||
struct _GstTimeoverlay {
|
||||
GstVideofilter videofilter;
|
||||
|
||||
PangoFontDescription *font_description;
|
||||
|
@ -51,12 +52,13 @@ struct _GstTimeoverlay
|
|||
|
||||
};
|
||||
|
||||
struct _GstTimeoverlayClass
|
||||
{
|
||||
struct _GstTimeoverlayClass {
|
||||
GstVideofilterClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_timeoverlay_get_type (void);
|
||||
GType gst_timeoverlay_get_type(void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TIMEOVERLAY_H__ */
|
||||
|
||||
|
|
|
@ -27,9 +27,8 @@
|
|||
#include <vorbis/codec.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GST_TYPE_VORBIS_DEC \
|
||||
|
@ -43,34 +42,32 @@ extern "C"
|
|||
#define GST_IS_VORBIS_DEC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VORBIS_DEC))
|
||||
|
||||
typedef struct _GstVorbisDec GstVorbisDec;
|
||||
typedef struct _GstVorbisDecClass GstVorbisDecClass;
|
||||
typedef struct _GstVorbisDec GstVorbisDec;
|
||||
typedef struct _GstVorbisDecClass GstVorbisDecClass;
|
||||
|
||||
struct _GstVorbisDec
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstVorbisDec {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad;
|
||||
GstPad *srcpad;
|
||||
GstPad * sinkpad;
|
||||
GstPad * srcpad;
|
||||
|
||||
vorbis_dsp_state vd;
|
||||
vorbis_info vi;
|
||||
vorbis_comment vc;
|
||||
vorbis_block vb;
|
||||
guint packetno;
|
||||
guint64 granulepos;
|
||||
};
|
||||
vorbis_dsp_state vd;
|
||||
vorbis_info vi;
|
||||
vorbis_comment vc;
|
||||
vorbis_block vb;
|
||||
guint packetno;
|
||||
guint64 granulepos;
|
||||
};
|
||||
|
||||
struct _GstVorbisDecClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
struct _GstVorbisDecClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_vorbis_dec_get_type (void);
|
||||
GType gst_vorbis_dec_get_type(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_VORBIS_DEC_H__ */
|
||||
#endif /* __GST_VORBIS_DEC_H__ */
|
||||
|
|
|
@ -27,9 +27,8 @@
|
|||
#include <vorbis/codec.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GST_TYPE_VORBISENC \
|
||||
(vorbisenc_get_type())
|
||||
|
@ -42,61 +41,60 @@ extern "C"
|
|||
#define GST_IS_VORBISENC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VORBISENC))
|
||||
|
||||
typedef struct _VorbisEnc VorbisEnc;
|
||||
typedef struct _VorbisEncClass VorbisEncClass;
|
||||
typedef struct _VorbisEnc VorbisEnc;
|
||||
typedef struct _VorbisEncClass VorbisEncClass;
|
||||
|
||||
struct _VorbisEnc
|
||||
{
|
||||
GstElement element;
|
||||
struct _VorbisEnc {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstPad *sinkpad,
|
||||
*srcpad;
|
||||
|
||||
ogg_stream_state os; /* take physical pages, weld into a logical
|
||||
stream of packets */
|
||||
ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
|
||||
ogg_packet op; /* one raw packet of data for decode */
|
||||
ogg_stream_state os; /* take physical pages, weld into a logical
|
||||
stream of packets */
|
||||
ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
|
||||
ogg_packet op; /* one raw packet of data for decode */
|
||||
|
||||
vorbis_info vi; /* struct that stores all the static vorbis bitstream
|
||||
settings */
|
||||
vorbis_comment vc; /* struct that stores all the user comments */
|
||||
vorbis_info vi; /* struct that stores all the static vorbis bitstream
|
||||
settings */
|
||||
vorbis_comment vc; /* struct that stores all the user comments */
|
||||
|
||||
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
||||
vorbis_block vb; /* local working space for packet->PCM decode */
|
||||
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
||||
vorbis_block vb; /* local working space for packet->PCM decode */
|
||||
|
||||
gboolean eos;
|
||||
gboolean eos;
|
||||
|
||||
gboolean managed;
|
||||
gint bitrate;
|
||||
gint min_bitrate;
|
||||
gint max_bitrate;
|
||||
gfloat quality;
|
||||
gboolean quality_set;
|
||||
gint serial;
|
||||
gboolean managed;
|
||||
gint bitrate;
|
||||
gint min_bitrate;
|
||||
gint max_bitrate;
|
||||
gfloat quality;
|
||||
gboolean quality_set;
|
||||
gint serial;
|
||||
|
||||
gint channels;
|
||||
gint frequency;
|
||||
gint channels;
|
||||
gint frequency;
|
||||
|
||||
guint64 samples_in;
|
||||
guint64 bytes_out;
|
||||
guint64 samples_in;
|
||||
guint64 bytes_out;
|
||||
|
||||
GstTagList *tags;
|
||||
GstTagList * tags;
|
||||
|
||||
gboolean setup;
|
||||
gboolean header_sent;
|
||||
gchar *last_message;
|
||||
};
|
||||
gboolean setup;
|
||||
gboolean header_sent;
|
||||
gchar *last_message;
|
||||
};
|
||||
|
||||
struct _VorbisEncClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
struct _VorbisEncClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType vorbisenc_get_type (void);
|
||||
GType vorbisenc_get_type(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __VORBISENC_H__ */
|
||||
#endif /* __VORBISENC_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#define __GST_AUDIO_AUDIO_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For people that are looking at this source: the purpose of these defines is
|
||||
* to make GstCaps a bit easier, in that you don't have to know all of the
|
||||
* properties that need to be defined. you can just use these macros. currently
|
||||
|
@ -49,7 +50,9 @@ G_BEGIN_DECLS
|
|||
*
|
||||
* Andy Wingo, 18 August 2001
|
||||
* Thomas, 6 September 2002 */
|
||||
|
||||
#define GST_AUDIO_DEF_RATE 44100
|
||||
|
||||
#define GST_AUDIO_INT_PAD_TEMPLATE_CAPS \
|
||||
"audio/x-raw-int, " \
|
||||
"rate = (int) [ 1, MAX ], " \
|
||||
|
@ -57,7 +60,9 @@ G_BEGIN_DECLS
|
|||
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, " \
|
||||
"width = (int) { 8, 16, 32 }, " \
|
||||
"depth = (int) [ 1, 32 ], " \
|
||||
"signed = (boolean) { true, false }"
|
||||
"signed = (boolean) { true, false }"
|
||||
|
||||
|
||||
/* "standard" int audio is native order, 16 bit stereo. */
|
||||
#define GST_AUDIO_INT_STANDARD_PAD_TEMPLATE_CAPS \
|
||||
"audio/x-raw-int, " \
|
||||
|
@ -66,7 +71,8 @@ G_BEGIN_DECLS
|
|||
"endianness = (int) BYTE_ORDER, " \
|
||||
"width = (int) 16, " \
|
||||
"depth = (int) 16, " \
|
||||
"signed = (boolean) true"
|
||||
"signed = (boolean) true"
|
||||
|
||||
#define GST_AUDIO_FLOAT_PAD_TEMPLATE_CAPS \
|
||||
"audio/x-raw-float, " \
|
||||
"rate = (int) [ 1, MAX ], " \
|
||||
|
@ -74,6 +80,7 @@ G_BEGIN_DECLS
|
|||
"endianness = (int) { LITTLE_ENDIAN , BIG_ENDIAN }, " \
|
||||
"width = (int) { 32, 64 }, " \
|
||||
"buffer-frames = (int) [ 1, MAX]"
|
||||
|
||||
/* "standard" float audio is native order, 32 bit mono. */
|
||||
#define GST_AUDIO_FLOAT_STANDARD_PAD_TEMPLATE_CAPS \
|
||||
"audio/x-raw-float, " \
|
||||
|
@ -81,42 +88,43 @@ G_BEGIN_DECLS
|
|||
"channels = (int) 1, " \
|
||||
"endianness = (int) BYTE_ORDER, " \
|
||||
"buffer-frames = (int) [ 1, MAX]"
|
||||
|
||||
/*
|
||||
* this library defines and implements some helper functions for audio
|
||||
* handling
|
||||
*/
|
||||
|
||||
/* get byte size of audio frame (based on caps of pad */
|
||||
int gst_audio_frame_byte_size (GstPad * pad);
|
||||
int gst_audio_frame_byte_size (GstPad* pad);
|
||||
|
||||
/* get length in frames of buffer */
|
||||
long gst_audio_frame_length (GstPad * pad, GstBuffer * buf);
|
||||
long gst_audio_frame_length (GstPad* pad, GstBuffer* buf);
|
||||
|
||||
/* get frame rate based on caps */
|
||||
long gst_audio_frame_rate (GstPad * pad);
|
||||
long gst_audio_frame_rate (GstPad *pad);
|
||||
|
||||
/* calculate length in seconds of audio buffer buf based on caps of pad */
|
||||
double gst_audio_length (GstPad * pad, GstBuffer * buf);
|
||||
double gst_audio_length (GstPad* pad, GstBuffer* buf);
|
||||
|
||||
/* calculate highest possible sample value based on capabilities of pad */
|
||||
long gst_audio_highest_sample_value (GstPad * pad);
|
||||
long gst_audio_highest_sample_value (GstPad* pad);
|
||||
|
||||
/* check if the buffer size is a whole multiple of the frame size */
|
||||
gboolean gst_audio_is_buffer_framed (GstPad * pad, GstBuffer * buf);
|
||||
gboolean gst_audio_is_buffer_framed (GstPad* pad, GstBuffer* buf);
|
||||
|
||||
/* functions useful for _getcaps functions */
|
||||
typedef enum
|
||||
{
|
||||
GST_AUDIO_FIELD_RATE = (1 << 0),
|
||||
GST_AUDIO_FIELD_CHANNELS = (1 << 1),
|
||||
GST_AUDIO_FIELD_ENDIANNESS = (1 << 2),
|
||||
GST_AUDIO_FIELD_WIDTH = (1 << 3),
|
||||
GST_AUDIO_FIELD_DEPTH = (1 << 4),
|
||||
GST_AUDIO_FIELD_SIGNED = (1 << 5),
|
||||
typedef enum {
|
||||
GST_AUDIO_FIELD_RATE = (1 << 0),
|
||||
GST_AUDIO_FIELD_CHANNELS = (1 << 1),
|
||||
GST_AUDIO_FIELD_ENDIANNESS = (1 << 2),
|
||||
GST_AUDIO_FIELD_WIDTH = (1 << 3),
|
||||
GST_AUDIO_FIELD_DEPTH = (1 << 4),
|
||||
GST_AUDIO_FIELD_SIGNED = (1 << 5),
|
||||
GST_AUDIO_FIELD_BUFFER_FRAMES = (1 << 6)
|
||||
} GstAudioFieldFlag;
|
||||
|
||||
void gst_audio_structure_set_int (GstStructure * structure,
|
||||
GstAudioFieldFlag flag);
|
||||
void gst_audio_structure_set_int (GstStructure *structure, GstAudioFieldFlag flag);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_AUDIO_AUDIO_H__ */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/gstsystemclock.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_AUDIO_CLOCK \
|
||||
(gst_audio_clock_get_type())
|
||||
#define GST_AUDIO_CLOCK(obj) \
|
||||
|
@ -37,15 +38,14 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_CLOCK))
|
||||
#define GST_IS_AUDIO_CLOCK_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_CLOCK))
|
||||
|
||||
typedef struct _GstAudioClock GstAudioClock;
|
||||
typedef struct _GstAudioClockClass GstAudioClockClass;
|
||||
|
||||
typedef GstClockTime (*GstAudioClockGetTimeFunc) (GstClock * clock,
|
||||
gpointer user_data);
|
||||
typedef GstClockTime (*GstAudioClockGetTimeFunc) (GstClock *clock, gpointer user_data);
|
||||
|
||||
|
||||
struct _GstAudioClock
|
||||
{
|
||||
struct _GstAudioClock {
|
||||
GstSystemClock clock;
|
||||
|
||||
GstClockTime prev1, prev2;
|
||||
|
@ -63,19 +63,19 @@ struct _GstAudioClock
|
|||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstAudioClockClass
|
||||
{
|
||||
struct _GstAudioClockClass {
|
||||
GstSystemClockClass parent_class;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_audio_clock_get_type (void);
|
||||
GstClock *gst_audio_clock_new (gchar * name, GstAudioClockGetTimeFunc func,
|
||||
gpointer user_data);
|
||||
void gst_audio_clock_set_active (GstAudioClock * aclock, gboolean active);
|
||||
GType gst_audio_clock_get_type (void);
|
||||
GstClock* gst_audio_clock_new (gchar *name, GstAudioClockGetTimeFunc func,
|
||||
gpointer user_data);
|
||||
void gst_audio_clock_set_active (GstAudioClock *aclock, gboolean active);
|
||||
|
||||
void gst_audio_clock_update_time (GstAudioClock * aclock, GstClockTime time);
|
||||
void gst_audio_clock_update_time (GstAudioClock *aclock, GstClockTime time);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_AUDIO_CLOCK_H__ */
|
||||
|
|
|
@ -25,15 +25,17 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS typedef struct _GstAudiofilter GstAudiofilter;
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GstAudiofilter GstAudiofilter;
|
||||
typedef struct _GstAudiofilterClass GstAudiofilterClass;
|
||||
|
||||
typedef void (*GstAudiofilterFilterFunc) (GstAudiofilter * filter,
|
||||
GstBuffer * outbuf, GstBuffer * inbuf);
|
||||
typedef void (*GstAudiofilterInplaceFilterFunc) (GstAudiofilter * filter,
|
||||
GstBuffer * buffer);
|
||||
typedef void (*GstAudiofilterFilterFunc)(GstAudiofilter *filter,
|
||||
GstBuffer *outbuf, GstBuffer *inbuf);
|
||||
typedef void (*GstAudiofilterInplaceFilterFunc)(GstAudiofilter *filter,
|
||||
GstBuffer *buffer);
|
||||
|
||||
typedef void (*GstAudiofilterSetupFunc) (GstAudiofilter * filter);
|
||||
typedef void (*GstAudiofilterSetupFunc) (GstAudiofilter *filter);
|
||||
|
||||
|
||||
#define GST_TYPE_AUDIOFILTER \
|
||||
|
@ -47,11 +49,10 @@ typedef void (*GstAudiofilterSetupFunc) (GstAudiofilter * filter);
|
|||
#define GST_IS_AUDIOFILTER_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOFILTER))
|
||||
|
||||
struct _GstAudiofilter
|
||||
{
|
||||
struct _GstAudiofilter {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
/* audio state */
|
||||
gboolean inited;
|
||||
|
@ -67,8 +68,7 @@ struct _GstAudiofilter
|
|||
int bytes_per_sample;
|
||||
};
|
||||
|
||||
struct _GstAudiofilterClass
|
||||
{
|
||||
struct _GstAudiofilterClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
GstCaps *caps;
|
||||
|
@ -77,10 +77,11 @@ struct _GstAudiofilterClass
|
|||
GstAudiofilterFilterFunc filter;
|
||||
};
|
||||
|
||||
GType gst_audiofilter_get_type (void);
|
||||
GType gst_audiofilter_get_type(void);
|
||||
|
||||
void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *
|
||||
audiofilterclass, const GstCaps * caps);
|
||||
void gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *audiofilterclass, const GstCaps *caps);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_AUDIOFILTER_H__ */
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/colorbalance/colorbalance-enumtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_COLOR_BALANCE \
|
||||
(gst_color_balance_get_type ())
|
||||
#define GST_COLOR_BALANCE(obj) \
|
||||
|
@ -41,48 +42,55 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE))
|
||||
#define GST_COLOR_BALANCE_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceClass))
|
||||
|
||||
#define GST_COLOR_BALANCE_TYPE(klass) (klass->balance_type)
|
||||
typedef struct _GstColorBalance GstColorBalance;
|
||||
|
||||
typedef struct _GstColorBalance GstColorBalance;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_COLOR_BALANCE_HARDWARE,
|
||||
GST_COLOR_BALANCE_SOFTWARE
|
||||
} GstColorBalanceType;
|
||||
|
||||
typedef struct _GstColorBalanceClass
|
||||
{
|
||||
typedef struct _GstColorBalanceClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
GstColorBalanceType balance_type;
|
||||
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*list_channels) (GstColorBalance * balance);
|
||||
const GList * (* list_channels) (GstColorBalance *balance);
|
||||
|
||||
void (*set_value) (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
gint (*get_value) (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel);
|
||||
void (* set_value) (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
gint (* get_value) (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel);
|
||||
|
||||
/* signals */
|
||||
void (*value_changed) (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
void (* value_changed) (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstColorBalanceClass;
|
||||
|
||||
GType gst_color_balance_get_type (void);
|
||||
GType gst_color_balance_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
const GList *gst_color_balance_list_channels (GstColorBalance * balance);
|
||||
void gst_color_balance_set_value (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
gint gst_color_balance_get_value (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel);
|
||||
const GList *
|
||||
gst_color_balance_list_channels (GstColorBalance *balance);
|
||||
void gst_color_balance_set_value (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
gint gst_color_balance_get_value (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel);
|
||||
|
||||
/* trigger signal */
|
||||
void gst_color_balance_value_changed (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
void gst_color_balance_value_changed (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_COLOR_BALANCE_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_COLOR_BALANCE_CHANNEL \
|
||||
(gst_color_balance_channel_get_type ())
|
||||
#define GST_COLOR_BALANCE_CHANNEL(obj) \
|
||||
|
@ -37,25 +38,27 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL))
|
||||
#define GST_IS_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE_CHANNEL))
|
||||
typedef struct _GstColorBalanceChannel
|
||||
{
|
||||
|
||||
typedef struct _GstColorBalanceChannel {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gint min_value, max_value;
|
||||
gchar *label;
|
||||
gint min_value,
|
||||
max_value;
|
||||
} GstColorBalanceChannel;
|
||||
|
||||
typedef struct _GstColorBalanceChannelClass
|
||||
{
|
||||
typedef struct _GstColorBalanceChannelClass {
|
||||
GObjectClass parent;
|
||||
|
||||
/* signals */
|
||||
void (*value_changed) (GstColorBalanceChannel * channel, gint value);
|
||||
void (* value_changed) (GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstColorBalanceChannelClass;
|
||||
|
||||
GType gst_color_balance_channel_get_type (void);
|
||||
GType gst_color_balance_channel_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_COLOR_BALANCE_CHANNEL_H__ */
|
||||
|
|
|
@ -29,46 +29,53 @@
|
|||
#include <glib/gtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#if (HAVE_LRINT && HAVE_LRINTF)
|
||||
/* These defines enable functionality introduced with the 1999 ISO C
|
||||
** standard. They must be defined before the inclusion of math.h to
|
||||
** engage them. If optimisation is enabled, these functions will be
|
||||
** inlined. With optimisation switched off, you have to link in the
|
||||
** maths library using -lm.
|
||||
*/
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC9X 1
|
||||
#define __USE_ISOC99 1
|
||||
#include <math.h>
|
||||
#define gst_cast_float(x) ((gint)lrintf(x))
|
||||
#define gst_cast_double(x) ((gint)lrint(x))
|
||||
|
||||
/* These defines enable functionality introduced with the 1999 ISO C
|
||||
** standard. They must be defined before the inclusion of math.h to
|
||||
** engage them. If optimisation is enabled, these functions will be
|
||||
** inlined. With optimisation switched off, you have to link in the
|
||||
** maths library using -lm.
|
||||
*/
|
||||
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
|
||||
#define __USE_ISOC9X 1
|
||||
#define __USE_ISOC99 1
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define gst_cast_float(x) ((gint)lrintf(x))
|
||||
#define gst_cast_double(x) ((gint)lrint(x))
|
||||
|
||||
#else
|
||||
/* use a standard c cast, but do rounding correctly */
|
||||
#define gst_cast_float(x) ((gint)floor((x)+0.5))
|
||||
#define gst_cast_double(x) ((gint)floor((x)+0.5))
|
||||
/* use a standard c cast, but do rounding correctly */
|
||||
#define gst_cast_float(x) ((gint)floor((x)+0.5))
|
||||
#define gst_cast_double(x) ((gint)floor((x)+0.5))
|
||||
|
||||
#endif
|
||||
|
||||
inline static gfloat
|
||||
GFLOAT_SWAP_LE_BE (gfloat in)
|
||||
GFLOAT_SWAP_LE_BE(gfloat in)
|
||||
{
|
||||
gint32 swap;
|
||||
gfloat out;
|
||||
|
||||
memcpy (&swap, &in, 4);
|
||||
memcpy(&swap, &in, 4);
|
||||
swap = GUINT32_SWAP_LE_BE_CONSTANT (swap);
|
||||
memcpy (&out, &swap, 4);
|
||||
memcpy(&out, &swap, 4);
|
||||
return out;
|
||||
}
|
||||
|
||||
inline static gdouble
|
||||
GDOUBLE_SWAP_LE_BE (gdouble in)
|
||||
GDOUBLE_SWAP_LE_BE(gdouble in)
|
||||
{
|
||||
gint64 swap;
|
||||
gdouble out;
|
||||
|
||||
memcpy (&swap, &in, 8);
|
||||
memcpy(&swap, &in, 8);
|
||||
swap = GUINT64_SWAP_LE_BE_CONSTANT (swap);
|
||||
memcpy (&out, &swap, 8);
|
||||
memcpy(&out, &swap, 8);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -94,4 +101,6 @@ GDOUBLE_SWAP_LE_BE (gdouble in)
|
|||
#define GDOUBLE_FROM_BE(val) (GDOUBLE_TO_BE (val))
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __FLOATCAST_H__ */
|
||||
|
||||
|
|
|
@ -27,16 +27,17 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
|
||||
gchar *gst_gconf_get_string (const gchar * key);
|
||||
void gst_gconf_set_string (const gchar * key, const gchar * value);
|
||||
gchar * gst_gconf_get_string (const gchar *key);
|
||||
void gst_gconf_set_string (const gchar *key,
|
||||
const gchar *value);
|
||||
|
||||
GstElement *gst_gconf_render_bin_from_key (const gchar * key);
|
||||
GstElement *gst_gconf_render_bin_from_description (const gchar * description);
|
||||
GstElement * gst_gconf_render_bin_from_key (const gchar *key);
|
||||
GstElement * gst_gconf_render_bin_from_description (const gchar *description);
|
||||
|
||||
GstElement *gst_gconf_get_default_video_sink (void);
|
||||
GstElement *gst_gconf_get_default_audio_sink (void);
|
||||
GstElement *gst_gconf_get_default_video_src (void);
|
||||
GstElement *gst_gconf_get_default_audio_src (void);
|
||||
GstElement *gst_gconf_get_default_visualization_element (void);
|
||||
GstElement * gst_gconf_get_default_video_sink (void);
|
||||
GstElement * gst_gconf_get_default_audio_sink (void);
|
||||
GstElement * gst_gconf_get_default_video_src (void);
|
||||
GstElement * gst_gconf_get_default_audio_src (void);
|
||||
GstElement * gst_gconf_get_default_visualization_element (void);
|
||||
|
||||
#endif /* GST_GCONF_H */
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
#ifndef __GST_I18N_PLUGIN_H__
|
||||
#define __GST_I18N_PLUGIN_H__
|
||||
|
||||
#include <locale.h> /* some people need it and some people don't */
|
||||
#include "gettext.h" /* included with gettext distribution and copied */
|
||||
#include <locale.h> /* some people need it and some people don't */
|
||||
#include "gettext.h" /* included with gettext distribution and copied */
|
||||
|
||||
#ifndef GETTEXT_PACKAGE
|
||||
#error You must define GETTEXT_PACKAGE before including this header.
|
||||
|
|
|
@ -16,7 +16,7 @@ typedef DCTELEM DCTBLOCK[DCTSIZE2];
|
|||
|
||||
typedef long INT32; /* must be at least 32 bits */
|
||||
|
||||
extern void gst_idct_int_idct ();
|
||||
extern void gst_idct_int_idct();
|
||||
|
||||
extern void gst_idct_init_fast_int_idct (void);
|
||||
extern void gst_idct_fast_int_idct (short *block);
|
||||
|
@ -27,5 +27,6 @@ extern void gst_idct_mmx32_idct (short *block);
|
|||
extern void gst_idct_sse_idct (short *block);
|
||||
#endif /* HAVE_LIBMMX */
|
||||
|
||||
extern void gst_idct_init_float_idct (void);
|
||||
extern void gst_idct_init_float_idct(void);
|
||||
extern void gst_idct_float_idct (short *block);
|
||||
|
||||
|
|
|
@ -23,24 +23,22 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_IDCT_DEFAULT,
|
||||
GST_IDCT_INT,
|
||||
GST_IDCT_FAST_INT,
|
||||
GST_IDCT_FLOAT,
|
||||
GST_IDCT_MMX,
|
||||
typedef enum {
|
||||
GST_IDCT_DEFAULT,
|
||||
GST_IDCT_INT,
|
||||
GST_IDCT_FAST_INT,
|
||||
GST_IDCT_FLOAT,
|
||||
GST_IDCT_MMX,
|
||||
GST_IDCT_MMX32,
|
||||
GST_IDCT_SSE,
|
||||
} GstIDCTMethod;
|
||||
|
||||
typedef struct _GstIDCT GstIDCT;
|
||||
typedef void (*GstIDCTFunction) (gshort * block);
|
||||
typedef void (*GstIDCTFunction) (gshort *block);
|
||||
|
||||
#define GST_IDCT_TRANSPOSE(idct) ((idct)->need_transpose)
|
||||
|
||||
struct _GstIDCT
|
||||
{
|
||||
struct _GstIDCT {
|
||||
/* private */
|
||||
GstIDCTFunction convert;
|
||||
GstIDCTFunction convert_sparse;
|
||||
|
@ -48,10 +46,9 @@ struct _GstIDCT
|
|||
};
|
||||
|
||||
|
||||
GstIDCT *gst_idct_new (GstIDCTMethod method);
|
||||
|
||||
GstIDCT *gst_idct_new(GstIDCTMethod method);
|
||||
#define gst_idct_convert(idct, blocks) (idct)->convert((blocks))
|
||||
#define gst_idct_convert_sparse(idct, blocks) (idct)->convert_sparse((blocks))
|
||||
void gst_idct_destroy (GstIDCT * idct);
|
||||
void gst_idct_destroy(GstIDCT *idct);
|
||||
|
||||
#endif /* __GST_IDCT_H__ */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/colorbalance/colorbalance-enumtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_COLOR_BALANCE \
|
||||
(gst_color_balance_get_type ())
|
||||
#define GST_COLOR_BALANCE(obj) \
|
||||
|
@ -41,48 +42,55 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE))
|
||||
#define GST_COLOR_BALANCE_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceClass))
|
||||
|
||||
#define GST_COLOR_BALANCE_TYPE(klass) (klass->balance_type)
|
||||
typedef struct _GstColorBalance GstColorBalance;
|
||||
|
||||
typedef struct _GstColorBalance GstColorBalance;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_COLOR_BALANCE_HARDWARE,
|
||||
GST_COLOR_BALANCE_SOFTWARE
|
||||
} GstColorBalanceType;
|
||||
|
||||
typedef struct _GstColorBalanceClass
|
||||
{
|
||||
typedef struct _GstColorBalanceClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
GstColorBalanceType balance_type;
|
||||
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*list_channels) (GstColorBalance * balance);
|
||||
const GList * (* list_channels) (GstColorBalance *balance);
|
||||
|
||||
void (*set_value) (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
gint (*get_value) (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel);
|
||||
void (* set_value) (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
gint (* get_value) (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel);
|
||||
|
||||
/* signals */
|
||||
void (*value_changed) (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
void (* value_changed) (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstColorBalanceClass;
|
||||
|
||||
GType gst_color_balance_get_type (void);
|
||||
GType gst_color_balance_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
const GList *gst_color_balance_list_channels (GstColorBalance * balance);
|
||||
void gst_color_balance_set_value (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
gint gst_color_balance_get_value (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel);
|
||||
const GList *
|
||||
gst_color_balance_list_channels (GstColorBalance *balance);
|
||||
void gst_color_balance_set_value (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
gint gst_color_balance_get_value (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel);
|
||||
|
||||
/* trigger signal */
|
||||
void gst_color_balance_value_changed (GstColorBalance * balance,
|
||||
GstColorBalanceChannel * channel, gint value);
|
||||
void gst_color_balance_value_changed (GstColorBalance *balance,
|
||||
GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_COLOR_BALANCE_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_COLOR_BALANCE_CHANNEL \
|
||||
(gst_color_balance_channel_get_type ())
|
||||
#define GST_COLOR_BALANCE_CHANNEL(obj) \
|
||||
|
@ -37,25 +38,27 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE_CHANNEL))
|
||||
#define GST_IS_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE_CHANNEL))
|
||||
typedef struct _GstColorBalanceChannel
|
||||
{
|
||||
|
||||
typedef struct _GstColorBalanceChannel {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gint min_value, max_value;
|
||||
gchar *label;
|
||||
gint min_value,
|
||||
max_value;
|
||||
} GstColorBalanceChannel;
|
||||
|
||||
typedef struct _GstColorBalanceChannelClass
|
||||
{
|
||||
typedef struct _GstColorBalanceChannelClass {
|
||||
GObjectClass parent;
|
||||
|
||||
/* signals */
|
||||
void (*value_changed) (GstColorBalanceChannel * channel, gint value);
|
||||
void (* value_changed) (GstColorBalanceChannel *channel,
|
||||
gint value);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstColorBalanceChannelClass;
|
||||
|
||||
GType gst_color_balance_channel_get_type (void);
|
||||
GType gst_color_balance_channel_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_COLOR_BALANCE_CHANNEL_H__ */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/mixer/mixer-enumtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MIXER \
|
||||
(gst_mixer_get_type ())
|
||||
#define GST_MIXER(obj) \
|
||||
|
@ -39,7 +40,9 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER))
|
||||
#define GST_MIXER_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_MIXER, GstMixerClass))
|
||||
|
||||
#define GST_MIXER_TYPE(klass) (klass->mixer_type)
|
||||
|
||||
typedef struct _GstMixer GstMixer;
|
||||
|
||||
typedef enum
|
||||
|
@ -48,52 +51,70 @@ typedef enum
|
|||
GST_MIXER_SOFTWARE
|
||||
} GstMixerType;
|
||||
|
||||
typedef struct _GstMixerClass
|
||||
{
|
||||
typedef struct _GstMixerClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
GstMixerType mixer_type;
|
||||
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*list_tracks) (GstMixer * mixer);
|
||||
const GList * (* list_tracks) (GstMixer *mixer);
|
||||
|
||||
void (*set_volume) (GstMixer * mixer, GstMixerTrack * track, gint * volumes);
|
||||
void (*get_volume) (GstMixer * mixer, GstMixerTrack * track, gint * volumes);
|
||||
void (* set_volume) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
void (* get_volume) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
|
||||
void (*set_mute) (GstMixer * mixer, GstMixerTrack * track, gboolean mute);
|
||||
void (*set_record) (GstMixer * mixer, GstMixerTrack * track, gboolean record);
|
||||
void (* set_mute) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean mute);
|
||||
void (* set_record) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
|
||||
/* signals */
|
||||
void (*mute_toggled) (GstMixer * mixer,
|
||||
GstMixerTrack * channel, gboolean mute);
|
||||
void (*record_toggled) (GstMixer * mixer,
|
||||
GstMixerTrack * channel, gboolean record);
|
||||
void (*volume_changed) (GstMixer * mixer,
|
||||
GstMixerTrack * channel, gint * volumes);
|
||||
void (* mute_toggled) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gboolean mute);
|
||||
void (* record_toggled) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gboolean record);
|
||||
void (* volume_changed) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gint *volumes);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstMixerClass;
|
||||
|
||||
GType gst_mixer_get_type (void);
|
||||
GType gst_mixer_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
const GList *gst_mixer_list_tracks (GstMixer * mixer);
|
||||
void gst_mixer_set_volume (GstMixer * mixer,
|
||||
GstMixerTrack * track, gint * volumes);
|
||||
void gst_mixer_get_volume (GstMixer * mixer,
|
||||
GstMixerTrack * track, gint * volumes);
|
||||
void gst_mixer_set_mute (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean mute);
|
||||
void gst_mixer_set_record (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean record);
|
||||
const GList * gst_mixer_list_tracks (GstMixer *mixer);
|
||||
void gst_mixer_set_volume (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
void gst_mixer_get_volume (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
void gst_mixer_set_mute (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean mute);
|
||||
void gst_mixer_set_record (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
|
||||
/* trigger signals */
|
||||
void gst_mixer_mute_toggled (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean mute);
|
||||
void gst_mixer_record_toggled (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean record);
|
||||
void gst_mixer_volume_changed (GstMixer * mixer,
|
||||
GstMixerTrack * track, gint * volumes);
|
||||
void gst_mixer_mute_toggled (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean mute);
|
||||
void gst_mixer_record_toggled (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
void gst_mixer_volume_changed (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MIXER_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MIXER_TRACK \
|
||||
(gst_mixer_track_get_type ())
|
||||
#define GST_MIXER_TRACK(obj) \
|
||||
|
@ -37,6 +38,7 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_TRACK))
|
||||
#define GST_IS_MIXER_TRACK_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER_TRACK))
|
||||
|
||||
/*
|
||||
* Naming:
|
||||
*
|
||||
|
@ -52,41 +54,45 @@ G_BEGIN_DECLS
|
|||
* mixer, which means that setting this track will change
|
||||
* the hearable volume on any output.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GST_MIXER_TRACK_INPUT = (1 << 0),
|
||||
GST_MIXER_TRACK_OUTPUT = (1 << 1),
|
||||
GST_MIXER_TRACK_MUTE = (1 << 2),
|
||||
GST_MIXER_TRACK_RECORD = (1 << 3),
|
||||
GST_MIXER_TRACK_MASTER = (1 << 4),
|
||||
GST_MIXER_TRACK_SOFTWARE = (1 << 5)
|
||||
|
||||
typedef enum {
|
||||
GST_MIXER_TRACK_INPUT = (1<<0),
|
||||
GST_MIXER_TRACK_OUTPUT = (1<<1),
|
||||
GST_MIXER_TRACK_MUTE = (1<<2),
|
||||
GST_MIXER_TRACK_RECORD = (1<<3),
|
||||
GST_MIXER_TRACK_MASTER = (1<<4),
|
||||
GST_MIXER_TRACK_SOFTWARE = (1<<5)
|
||||
} GstMixerTrackFlags;
|
||||
|
||||
#define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \
|
||||
((channel)->flags & flag)
|
||||
|
||||
typedef struct _GstMixerTrack
|
||||
{
|
||||
GObject parent;
|
||||
typedef struct _GstMixerTrack {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gchar *label;
|
||||
GstMixerTrackFlags flags;
|
||||
gint num_channels, min_volume, max_volume;
|
||||
gint num_channels,
|
||||
min_volume,
|
||||
max_volume;
|
||||
} GstMixerTrack;
|
||||
|
||||
typedef struct _GstMixerTrackClass
|
||||
{
|
||||
typedef struct _GstMixerTrackClass {
|
||||
GObjectClass parent;
|
||||
|
||||
/* signals */
|
||||
void (*mute_toggled) (GstMixerTrack * channel, gboolean mute);
|
||||
void (*record_toggled) (GstMixerTrack * channel, gboolean record);
|
||||
void (*volume_changed) (GstMixerTrack * channel, gint * volumes);
|
||||
void (* mute_toggled) (GstMixerTrack *channel,
|
||||
gboolean mute);
|
||||
void (* record_toggled) (GstMixerTrack *channel,
|
||||
gboolean record);
|
||||
void (* volume_changed) (GstMixerTrack *channel,
|
||||
gint *volumes);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstMixerTrackClass;
|
||||
|
||||
GType gst_mixer_track_get_type (void);
|
||||
GType gst_mixer_track_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MIXER_TRACK_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_NAVIGATION \
|
||||
(gst_navigation_get_type ())
|
||||
#define GST_NAVIGATION(obj) \
|
||||
|
@ -34,28 +35,28 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NAVIGATION))
|
||||
#define GST_NAVIGATION_GET_IFACE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_NAVIGATION, GstNavigationInterface))
|
||||
|
||||
typedef struct _GstNavigation GstNavigation;
|
||||
|
||||
typedef struct _GstNavigationInterface
|
||||
{
|
||||
typedef struct _GstNavigationInterface {
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* virtual functions */
|
||||
void (*send_event) (GstNavigation * navigation, GstStructure * structure);
|
||||
|
||||
void (*send_event) (GstNavigation *navigation, GstStructure *structure);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstNavigationInterface;
|
||||
|
||||
GType gst_navigation_get_type (void);
|
||||
GType gst_navigation_get_type (void);
|
||||
|
||||
/* 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,
|
||||
const char *event, const char *key);
|
||||
void gst_navigation_send_mouse_event (GstNavigation * navigation,
|
||||
const char *event, int button, double x, double y);
|
||||
void gst_navigation_send_key_event (GstNavigation *navigation,
|
||||
const char *event, const char *key);
|
||||
void gst_navigation_send_mouse_event (GstNavigation *navigation,
|
||||
const char *event, int button, double x, double y);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_NAVIGATION_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_PROPERTY_PROBE \
|
||||
(gst_property_probe_get_type ())
|
||||
#define GST_PROPERTY_PROBE(obj) \
|
||||
|
@ -33,59 +34,64 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PROPERTY_PROBE))
|
||||
#define GST_PROPERTY_PROBE_GET_IFACE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbeInterface))
|
||||
typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */
|
||||
|
||||
typedef struct _GstPropertyProbeInterface
|
||||
{
|
||||
typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */
|
||||
|
||||
typedef struct _GstPropertyProbeInterface {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* signals */
|
||||
void (*probe_needed) (GstPropertyProbe * probe, const GParamSpec * pspec);
|
||||
void (*probe_needed) (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*get_properties) (GstPropertyProbe * probe);
|
||||
gboolean (*needs_probe) (GstPropertyProbe * probe,
|
||||
guint prop_id, const GParamSpec * pspec);
|
||||
void (*probe_property) (GstPropertyProbe * probe,
|
||||
guint prop_id, const GParamSpec * pspec);
|
||||
GValueArray *(*get_values) (GstPropertyProbe * probe,
|
||||
guint prop_id, const GParamSpec * pspec);
|
||||
const GList * (*get_properties) (GstPropertyProbe *probe);
|
||||
gboolean (*needs_probe) (GstPropertyProbe *probe,
|
||||
guint prop_id,
|
||||
const GParamSpec *pspec);
|
||||
void (*probe_property) (GstPropertyProbe *probe,
|
||||
guint prop_id,
|
||||
const GParamSpec *pspec);
|
||||
GValueArray * (*get_values) (GstPropertyProbe *probe,
|
||||
guint prop_id,
|
||||
const GParamSpec *pspec);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstPropertyProbeInterface;
|
||||
|
||||
GType gst_property_probe_get_type (void);
|
||||
GType gst_property_probe_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
|
||||
/* returns list of GParamSpecs */
|
||||
const GList *gst_property_probe_get_properties (GstPropertyProbe * probe);
|
||||
const GParamSpec *gst_property_probe_get_property (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
const GList * gst_property_probe_get_properties (GstPropertyProbe *probe);
|
||||
const GParamSpec *gst_property_probe_get_property (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* probe one property */
|
||||
void gst_property_probe_probe_property (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
void gst_property_probe_probe_property_name (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
void gst_property_probe_probe_property (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
void gst_property_probe_probe_property_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* do we need a probe? */
|
||||
gboolean gst_property_probe_needs_probe (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
gboolean gst_property_probe_needs_probe_name (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
gboolean gst_property_probe_needs_probe (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
gboolean gst_property_probe_needs_probe_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* returns list of GValues */
|
||||
GValueArray *gst_property_probe_get_values (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
GValueArray *gst_property_probe_get_values_name (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
GValueArray * gst_property_probe_get_values (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
GValueArray * gst_property_probe_get_values_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* sugar */
|
||||
GValueArray *gst_property_probe_probe_and_get_values (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
GValueArray *gst_property_probe_probe_and_get_values_name (GstPropertyProbe *
|
||||
probe, const gchar * name);
|
||||
GValueArray * gst_property_probe_probe_and_get_values (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
GValueArray * gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_PROPERTY_PROBE_H__ */
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <gst/tuner/tuner-enumtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TUNER \
|
||||
(gst_tuner_get_type ())
|
||||
#define GST_TUNER(obj) \
|
||||
|
@ -40,65 +41,87 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER))
|
||||
#define GST_TUNER_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_TUNER, GstTunerClass))
|
||||
|
||||
typedef struct _GstTuner GstTuner;
|
||||
|
||||
typedef struct _GstTunerClass
|
||||
{
|
||||
typedef struct _GstTunerClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*list_channels) (GstTuner * tuner);
|
||||
void (*set_channel) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
GstTunerChannel *(*get_channel) (GstTuner * tuner);
|
||||
const GList * (* list_channels) (GstTuner *tuner);
|
||||
void (* set_channel) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
GstTunerChannel *
|
||||
(* get_channel) (GstTuner *tuner);
|
||||
|
||||
const GList *(*list_norms) (GstTuner * tuner);
|
||||
void (*set_norm) (GstTuner * tuner, GstTunerNorm * norm);
|
||||
GstTunerNorm *(*get_norm) (GstTuner * tuner);
|
||||
const GList * (* list_norms) (GstTuner *tuner);
|
||||
void (* set_norm) (GstTuner *tuner,
|
||||
GstTunerNorm *norm);
|
||||
GstTunerNorm *(* get_norm) (GstTuner *tuner);
|
||||
|
||||
void (*set_frequency) (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
gulong (*get_frequency) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
gint (*signal_strength) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void (* set_frequency) (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
gulong (* get_frequency) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
gint (* signal_strength) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
|
||||
/* signals */
|
||||
void (*channel_changed) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void (*norm_changed) (GstTuner * tuner, GstTunerNorm * norm);
|
||||
void (*frequency_changed) (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
void (*signal_changed) (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gint signal);
|
||||
void (*channel_changed) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
void (*norm_changed) (GstTuner *tuner,
|
||||
GstTunerNorm *norm);
|
||||
void (*frequency_changed) (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
void (*signal_changed) (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gint signal);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstTunerClass;
|
||||
|
||||
GType gst_tuner_get_type (void);
|
||||
GType gst_tuner_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
const GList *gst_tuner_list_channels (GstTuner * tuner);
|
||||
void gst_tuner_set_channel (GstTuner * tuner, GstTunerChannel * channel);
|
||||
GstTunerChannel *gst_tuner_get_channel (GstTuner * tuner);
|
||||
const GList * gst_tuner_list_channels (GstTuner *tuner);
|
||||
void gst_tuner_set_channel (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
GstTunerChannel *
|
||||
gst_tuner_get_channel (GstTuner *tuner);
|
||||
|
||||
const GList *gst_tuner_list_norms (GstTuner * tuner);
|
||||
void gst_tuner_set_norm (GstTuner * tuner, GstTunerNorm * channel);
|
||||
GstTunerNorm *gst_tuner_get_norm (GstTuner * tuner);
|
||||
const GList * gst_tuner_list_norms (GstTuner *tuner);
|
||||
void gst_tuner_set_norm (GstTuner *tuner,
|
||||
GstTunerNorm *channel);
|
||||
GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner);
|
||||
|
||||
void gst_tuner_set_frequency (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
gulong gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel);
|
||||
gint gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void gst_tuner_set_frequency (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
gulong gst_tuner_get_frequency (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
gint gst_tuner_signal_strength (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
|
||||
/* helper functions */
|
||||
GstTunerNorm *gst_tuner_find_norm_by_name (GstTuner * tuner, gchar * norm);
|
||||
GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner * tuner,
|
||||
gchar * channel);
|
||||
GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner,
|
||||
gchar *norm);
|
||||
GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner,
|
||||
gchar *channel);
|
||||
|
||||
/* trigger signals */
|
||||
void gst_tuner_channel_changed (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void gst_tuner_norm_changed (GstTuner * tuner, GstTunerNorm * norm);
|
||||
void gst_tuner_frequency_changed (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
void gst_tuner_signal_changed (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gint signal);
|
||||
void gst_tuner_channel_changed (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
void gst_tuner_norm_changed (GstTuner *tuner,
|
||||
GstTunerNorm *norm);
|
||||
void gst_tuner_frequency_changed (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
void gst_tuner_signal_changed (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gint signal);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TUNER_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TUNER_CHANNEL \
|
||||
(gst_tuner_channel_get_type ())
|
||||
#define GST_TUNER_CHANNEL(obj) \
|
||||
|
@ -37,39 +38,42 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_CHANNEL))
|
||||
#define GST_IS_TUNER_CHANNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_CHANNEL))
|
||||
typedef enum
|
||||
{
|
||||
GST_TUNER_CHANNEL_INPUT = (1 << 0),
|
||||
GST_TUNER_CHANNEL_OUTPUT = (1 << 1),
|
||||
GST_TUNER_CHANNEL_FREQUENCY = (1 << 2),
|
||||
GST_TUNER_CHANNEL_AUDIO = (1 << 3),
|
||||
|
||||
typedef enum {
|
||||
GST_TUNER_CHANNEL_INPUT = (1<<0),
|
||||
GST_TUNER_CHANNEL_OUTPUT = (1<<1),
|
||||
GST_TUNER_CHANNEL_FREQUENCY = (1<<2),
|
||||
GST_TUNER_CHANNEL_AUDIO = (1<<3),
|
||||
} GstTunerChannelFlags;
|
||||
|
||||
#define GST_TUNER_CHANNEL_HAS_FLAG(channel, flag) \
|
||||
((channel)->flags & flag)
|
||||
|
||||
typedef struct _GstTunerChannel
|
||||
{
|
||||
GObject parent;
|
||||
typedef struct _GstTunerChannel {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gchar *label;
|
||||
GstTunerChannelFlags flags;
|
||||
gulong min_frequency, max_frequency;
|
||||
gint min_signal, max_signal;
|
||||
gulong min_frequency,
|
||||
max_frequency;
|
||||
gint min_signal,
|
||||
max_signal;
|
||||
} GstTunerChannel;
|
||||
|
||||
typedef struct _GstTunerChannelClass
|
||||
{
|
||||
typedef struct _GstTunerChannelClass {
|
||||
GObjectClass parent;
|
||||
|
||||
/* signals */
|
||||
void (*frequency_changed) (GstTunerChannel * channel, gulong frequency);
|
||||
void (*signal_changed) (GstTunerChannel * channel, gint signal);
|
||||
void (*frequency_changed) (GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
void (*signal_changed) (GstTunerChannel *channel,
|
||||
gint signal);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstTunerChannelClass;
|
||||
|
||||
GType gst_tuner_channel_get_type (void);
|
||||
GType gst_tuner_channel_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TUNER_CHANNEL_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TUNER_NORM \
|
||||
(gst_tuner_norm_get_type ())
|
||||
#define GST_TUNER_NORM(obj) \
|
||||
|
@ -35,22 +36,22 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_NORM))
|
||||
#define GST_IS_TUNER_NORM_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_NORM))
|
||||
typedef struct _GstTunerNorm
|
||||
{
|
||||
|
||||
typedef struct _GstTunerNorm {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gfloat fps;
|
||||
gchar *label;
|
||||
gfloat fps;
|
||||
} GstTunerNorm;
|
||||
|
||||
typedef struct _GstTunerNormClass
|
||||
{
|
||||
typedef struct _GstTunerNormClass {
|
||||
GObjectClass parent;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstTunerNormClass;
|
||||
|
||||
GType gst_tuner_norm_get_type (void);
|
||||
GType gst_tuner_norm_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TUNER_NORM_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_X_OVERLAY \
|
||||
(gst_x_overlay_get_type ())
|
||||
#define GST_X_OVERLAY(obj) \
|
||||
|
@ -39,38 +40,42 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_X_OVERLAY))
|
||||
#define GST_X_OVERLAY_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_X_OVERLAY, GstXOverlayClass))
|
||||
|
||||
typedef struct _GstXOverlay GstXOverlay;
|
||||
|
||||
typedef struct _GstXOverlayClass
|
||||
{
|
||||
typedef struct _GstXOverlayClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* virtual functions */
|
||||
void (*set_xwindow_id) (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void (* set_xwindow_id) (GstXOverlay *overlay,
|
||||
gulong xwindow_id);
|
||||
/* optional virtual functions */
|
||||
void (*get_desired_size) (GstXOverlay * overlay,
|
||||
guint * width, guint * height);
|
||||
void (*expose) (GstXOverlay * overlay);
|
||||
|
||||
void (* get_desired_size) (GstXOverlay *overlay,
|
||||
guint *width,
|
||||
guint *height);
|
||||
void (* expose) (GstXOverlay *overlay);
|
||||
|
||||
/* signals */
|
||||
void (*have_xwindow_id) (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void (*desired_size) (GstXOverlay * overlay, guint width, guint height);
|
||||
void (*have_xwindow_id) (GstXOverlay *overlay,
|
||||
gulong xwindow_id);
|
||||
void (* desired_size) (GstXOverlay *overlay,
|
||||
guint width,
|
||||
guint height);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstXOverlayClass;
|
||||
|
||||
GType gst_x_overlay_get_type (void);
|
||||
GType gst_x_overlay_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
void gst_x_overlay_set_xwindow_id (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_get_desired_size (GstXOverlay * overlay, guint * width,
|
||||
guint * height);
|
||||
void gst_x_overlay_expose (GstXOverlay * overlay);
|
||||
void gst_x_overlay_set_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_get_desired_size (GstXOverlay *overlay, guint *width, guint *height);
|
||||
void gst_x_overlay_expose (GstXOverlay *overlay);
|
||||
|
||||
/* public methods to fire signals */
|
||||
void gst_x_overlay_got_xwindow_id (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_got_desired_size (GstXOverlay * overlay, guint width,
|
||||
guint height);
|
||||
void gst_x_overlay_got_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_got_desired_size (GstXOverlay *overlay, guint width, guint height);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_X_OVERLAY_H__ */
|
||||
|
|
|
@ -72,65 +72,69 @@ struct GstMediaInfoPriv
|
|||
gint metadata_iters;
|
||||
GstTagList *streaminfo;
|
||||
|
||||
GstElement *pipeline; /* will be != NULL during collection */
|
||||
gchar *pipeline_desc; /* will be != NULL during collection */
|
||||
GstElement *fakesink; /* so we can get caps from the
|
||||
decoder sink pad */
|
||||
gchar *source_name; /* type of element used as source */
|
||||
GstElement *pipeline; /* will be != NULL during collection */
|
||||
gchar *pipeline_desc; /* will be != NULL during collection */
|
||||
GstElement *fakesink; /* so we can get caps from the
|
||||
decoder sink pad */
|
||||
gchar *source_name; /* type of element used as source */
|
||||
GstElement *source;
|
||||
GstPad *source_pad; /* pad for querying encoded caps */
|
||||
GstPad *source_pad; /* pad for querying encoded caps */
|
||||
GstElement *decoder;
|
||||
GstPad *decoder_pad; /* pad for querying decoded caps */
|
||||
GstElement *decontainer; /* element to typefind in containers */
|
||||
GstPad *decoder_pad; /* pad for querying decoded caps */
|
||||
GstElement *decontainer; /* element to typefind in containers */
|
||||
|
||||
GstMediaInfoState state; /* current state of state machine */
|
||||
gchar *location; /* location set on the info object */
|
||||
guint16 flags; /* flags supplied for detection */
|
||||
GstMediaInfoTrack *current_track; /* track pointer under inspection */
|
||||
glong current_track_num; /* current track under inspection */
|
||||
GstMediaInfoState state; /* current state of state machine */
|
||||
gchar *location; /* location set on the info object */
|
||||
guint16 flags; /* flags supplied for detection */
|
||||
GstMediaInfoTrack *current_track; /* track pointer under inspection */
|
||||
glong current_track_num; /* current track under inspection */
|
||||
|
||||
GstMediaInfoStream *stream; /* total stream properties */
|
||||
char *cache; /* location of cache */
|
||||
GstMediaInfoStream *stream; /* total stream properties */
|
||||
char *cache; /* location of cache */
|
||||
|
||||
GError *error; /* error for creation problems */
|
||||
GError *error; /* error for creation problems */
|
||||
};
|
||||
|
||||
/* declarations */
|
||||
GstMediaInfoStream *gmi_stream_new (void);
|
||||
void gmi_stream_free (GstMediaInfoStream * stream);
|
||||
GstMediaInfoStream *
|
||||
gmi_stream_new (void);
|
||||
void gmi_stream_free (GstMediaInfoStream *stream);
|
||||
|
||||
GstMediaInfoTrack *gmi_track_new (void);
|
||||
GstMediaInfoTrack *
|
||||
gmi_track_new (void);
|
||||
|
||||
void gmip_reset (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_init (GstMediaInfoPriv * priv, GError ** error);
|
||||
void gmip_reset (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_init (GstMediaInfoPriv *priv, GError **error);
|
||||
|
||||
void gmi_clear_decoder (GstMediaInfo * info);
|
||||
void gmi_clear_decoder (GstMediaInfo *info);
|
||||
|
||||
gboolean gmi_seek_to_track (GstMediaInfo * info, long track);
|
||||
gboolean gmi_seek_to_track (GstMediaInfo *info,
|
||||
long track);
|
||||
|
||||
gboolean gmi_set_mime (GstMediaInfo * info, const char *mime);
|
||||
gboolean gmi_set_mime (GstMediaInfo *info,
|
||||
const char *mime);
|
||||
|
||||
void deep_notify_callback (GObject * object,
|
||||
GstObject * origin, GParamSpec * pspec, GstMediaInfoPriv * priv);
|
||||
void found_tag_callback (GObject * pipeline, GstElement * source,
|
||||
GstTagList * tags, GstMediaInfoPriv * priv);
|
||||
void error_callback (GObject * element, GstElement * source, GError * error,
|
||||
gchar * debug, GstMediaInfoPriv * priv);
|
||||
void deep_notify_callback (GObject *object,
|
||||
GstObject *origin,
|
||||
GParamSpec *pspec,
|
||||
GstMediaInfoPriv *priv);
|
||||
void found_tag_callback (GObject *pipeline, GstElement *source, GstTagList *tags, GstMediaInfoPriv *priv);
|
||||
void error_callback (GObject *element, GstElement *source, GError *error, gchar *debug, GstMediaInfoPriv *priv);
|
||||
|
||||
gboolean gmip_find_type_pre (GstMediaInfoPriv * priv, GError ** error);
|
||||
gboolean gmip_find_type_post (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_type (GstMediaInfoPriv * priv, GError ** error);
|
||||
gboolean gmip_find_stream_pre (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_stream_post (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_stream (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_metadata_pre (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_metadata_post (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_metadata (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_streaminfo_pre (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_streaminfo_post (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_streaminfo (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_format_pre (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_format_post (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_track_format (GstMediaInfoPriv * priv);
|
||||
gboolean gmip_find_type_pre (GstMediaInfoPriv *priv, GError **error);
|
||||
gboolean gmip_find_type_post (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_type (GstMediaInfoPriv *priv, GError **error);
|
||||
gboolean gmip_find_stream_pre (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_stream_post (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_stream (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_metadata_pre (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_metadata_post (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_metadata (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_streaminfo_pre (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_streaminfo_post (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_streaminfo (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_format_pre (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_format_post (GstMediaInfoPriv *priv);
|
||||
gboolean gmip_find_track_format (GstMediaInfoPriv *priv);
|
||||
|
||||
#endif /* __GST_MEDIA_INFO_PRIV_H__ */
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS typedef struct GstMediaInfoPriv GstMediaInfoPriv;
|
||||
typedef struct _GstMediaInfo GstMediaInfo;
|
||||
typedef struct _GstMediaInfoClass GstMediaInfoClass;
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct GstMediaInfoPriv GstMediaInfoPriv;
|
||||
typedef struct _GstMediaInfo GstMediaInfo;
|
||||
typedef struct _GstMediaInfoClass GstMediaInfoClass;
|
||||
|
||||
struct _GstMediaInfo
|
||||
{
|
||||
|
@ -41,9 +43,8 @@ struct _GstMediaInfoClass
|
|||
GObjectClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (*media_info_signal) (GstMediaInfo * gst_media_info);
|
||||
void (*error_signal) (GstMediaInfo * gst_media_info, GError * error,
|
||||
const gchar * debug);
|
||||
void (*media_info_signal) (GstMediaInfo *gst_media_info);
|
||||
void (*error_signal) (GstMediaInfo *gst_media_info, GError *error, const gchar *debug);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
@ -99,25 +100,34 @@ typedef struct
|
|||
#define GST_MEDIA_INFO_FORMAT 1 << 5
|
||||
#define GST_MEDIA_INFO_ALL ((1 << 6) - 1)
|
||||
|
||||
GQuark gst_media_info_error_quark (void);
|
||||
GQuark gst_media_info_error_quark (void);
|
||||
|
||||
void gst_media_info_init (void);
|
||||
GType gst_media_info_get_type (void);
|
||||
void gst_media_info_init (void);
|
||||
GType gst_media_info_get_type (void);
|
||||
|
||||
GstMediaInfo *gst_media_info_new (GError ** error);
|
||||
|
||||
gboolean gst_media_info_set_source (GstMediaInfo * info,
|
||||
const char *source, GError ** error);
|
||||
void gst_media_info_read_with_idler (GstMediaInfo * media_info,
|
||||
const char *location, guint16 GST_MEDIA_INFO_FLAGS, GError ** error);
|
||||
gboolean gst_media_info_read_idler (GstMediaInfo * media_info,
|
||||
GstMediaInfoStream ** streamp, GError ** error);
|
||||
GstMediaInfoStream *gst_media_info_read (GstMediaInfo * media_info,
|
||||
const char *location, guint16 GST_MEDIA_INFO_FLAGS, GError ** error);
|
||||
gboolean gst_media_info_read_many (GstMediaInfo * media_info,
|
||||
GList * locations, guint16 GST_MEDIA_INFO_FLAGS, GError ** error);
|
||||
GstCaps *gst_media_info_get_next (GstMediaInfo * media_info, GError ** error);
|
||||
GstMediaInfo * gst_media_info_new (GError **error);
|
||||
|
||||
gboolean gst_media_info_set_source (GstMediaInfo *info,
|
||||
const char *source,
|
||||
GError **error);
|
||||
void gst_media_info_read_with_idler (GstMediaInfo *media_info,
|
||||
const char *location,
|
||||
guint16 GST_MEDIA_INFO_FLAGS,
|
||||
GError **error);
|
||||
gboolean gst_media_info_read_idler (GstMediaInfo *media_info,
|
||||
GstMediaInfoStream **streamp,
|
||||
GError **error);
|
||||
GstMediaInfoStream *
|
||||
gst_media_info_read (GstMediaInfo *media_info,
|
||||
const char *location,
|
||||
guint16 GST_MEDIA_INFO_FLAGS,
|
||||
GError **error);
|
||||
gboolean gst_media_info_read_many (GstMediaInfo *media_info,
|
||||
GList *locations,
|
||||
guint16 GST_MEDIA_INFO_FLAGS,
|
||||
GError **error);
|
||||
GstCaps * gst_media_info_get_next (GstMediaInfo *media_info,
|
||||
GError **error);
|
||||
/*
|
||||
* FIXME: reset ?
|
||||
gboolean gst_media_info_write (GstMediaInfo *media_info,
|
||||
|
@ -126,4 +136,5 @@ gboolean gst_media_info_write (GstMediaInfo *media_info,
|
|||
*/
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MEDIA_INFO_H__ */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/mixer/mixer-enumtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MIXER \
|
||||
(gst_mixer_get_type ())
|
||||
#define GST_MIXER(obj) \
|
||||
|
@ -39,7 +40,9 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER))
|
||||
#define GST_MIXER_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_MIXER, GstMixerClass))
|
||||
|
||||
#define GST_MIXER_TYPE(klass) (klass->mixer_type)
|
||||
|
||||
typedef struct _GstMixer GstMixer;
|
||||
|
||||
typedef enum
|
||||
|
@ -48,52 +51,70 @@ typedef enum
|
|||
GST_MIXER_SOFTWARE
|
||||
} GstMixerType;
|
||||
|
||||
typedef struct _GstMixerClass
|
||||
{
|
||||
typedef struct _GstMixerClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
GstMixerType mixer_type;
|
||||
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*list_tracks) (GstMixer * mixer);
|
||||
const GList * (* list_tracks) (GstMixer *mixer);
|
||||
|
||||
void (*set_volume) (GstMixer * mixer, GstMixerTrack * track, gint * volumes);
|
||||
void (*get_volume) (GstMixer * mixer, GstMixerTrack * track, gint * volumes);
|
||||
void (* set_volume) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
void (* get_volume) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
|
||||
void (*set_mute) (GstMixer * mixer, GstMixerTrack * track, gboolean mute);
|
||||
void (*set_record) (GstMixer * mixer, GstMixerTrack * track, gboolean record);
|
||||
void (* set_mute) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean mute);
|
||||
void (* set_record) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
|
||||
/* signals */
|
||||
void (*mute_toggled) (GstMixer * mixer,
|
||||
GstMixerTrack * channel, gboolean mute);
|
||||
void (*record_toggled) (GstMixer * mixer,
|
||||
GstMixerTrack * channel, gboolean record);
|
||||
void (*volume_changed) (GstMixer * mixer,
|
||||
GstMixerTrack * channel, gint * volumes);
|
||||
void (* mute_toggled) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gboolean mute);
|
||||
void (* record_toggled) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gboolean record);
|
||||
void (* volume_changed) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gint *volumes);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstMixerClass;
|
||||
|
||||
GType gst_mixer_get_type (void);
|
||||
GType gst_mixer_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
const GList *gst_mixer_list_tracks (GstMixer * mixer);
|
||||
void gst_mixer_set_volume (GstMixer * mixer,
|
||||
GstMixerTrack * track, gint * volumes);
|
||||
void gst_mixer_get_volume (GstMixer * mixer,
|
||||
GstMixerTrack * track, gint * volumes);
|
||||
void gst_mixer_set_mute (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean mute);
|
||||
void gst_mixer_set_record (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean record);
|
||||
const GList * gst_mixer_list_tracks (GstMixer *mixer);
|
||||
void gst_mixer_set_volume (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
void gst_mixer_get_volume (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
void gst_mixer_set_mute (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean mute);
|
||||
void gst_mixer_set_record (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
|
||||
/* trigger signals */
|
||||
void gst_mixer_mute_toggled (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean mute);
|
||||
void gst_mixer_record_toggled (GstMixer * mixer,
|
||||
GstMixerTrack * track, gboolean record);
|
||||
void gst_mixer_volume_changed (GstMixer * mixer,
|
||||
GstMixerTrack * track, gint * volumes);
|
||||
void gst_mixer_mute_toggled (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean mute);
|
||||
void gst_mixer_record_toggled (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
void gst_mixer_volume_changed (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gint *volumes);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MIXER_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MIXER_TRACK \
|
||||
(gst_mixer_track_get_type ())
|
||||
#define GST_MIXER_TRACK(obj) \
|
||||
|
@ -37,6 +38,7 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_TRACK))
|
||||
#define GST_IS_MIXER_TRACK_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER_TRACK))
|
||||
|
||||
/*
|
||||
* Naming:
|
||||
*
|
||||
|
@ -52,41 +54,45 @@ G_BEGIN_DECLS
|
|||
* mixer, which means that setting this track will change
|
||||
* the hearable volume on any output.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GST_MIXER_TRACK_INPUT = (1 << 0),
|
||||
GST_MIXER_TRACK_OUTPUT = (1 << 1),
|
||||
GST_MIXER_TRACK_MUTE = (1 << 2),
|
||||
GST_MIXER_TRACK_RECORD = (1 << 3),
|
||||
GST_MIXER_TRACK_MASTER = (1 << 4),
|
||||
GST_MIXER_TRACK_SOFTWARE = (1 << 5)
|
||||
|
||||
typedef enum {
|
||||
GST_MIXER_TRACK_INPUT = (1<<0),
|
||||
GST_MIXER_TRACK_OUTPUT = (1<<1),
|
||||
GST_MIXER_TRACK_MUTE = (1<<2),
|
||||
GST_MIXER_TRACK_RECORD = (1<<3),
|
||||
GST_MIXER_TRACK_MASTER = (1<<4),
|
||||
GST_MIXER_TRACK_SOFTWARE = (1<<5)
|
||||
} GstMixerTrackFlags;
|
||||
|
||||
#define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \
|
||||
((channel)->flags & flag)
|
||||
|
||||
typedef struct _GstMixerTrack
|
||||
{
|
||||
GObject parent;
|
||||
typedef struct _GstMixerTrack {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gchar *label;
|
||||
GstMixerTrackFlags flags;
|
||||
gint num_channels, min_volume, max_volume;
|
||||
gint num_channels,
|
||||
min_volume,
|
||||
max_volume;
|
||||
} GstMixerTrack;
|
||||
|
||||
typedef struct _GstMixerTrackClass
|
||||
{
|
||||
typedef struct _GstMixerTrackClass {
|
||||
GObjectClass parent;
|
||||
|
||||
/* signals */
|
||||
void (*mute_toggled) (GstMixerTrack * channel, gboolean mute);
|
||||
void (*record_toggled) (GstMixerTrack * channel, gboolean record);
|
||||
void (*volume_changed) (GstMixerTrack * channel, gint * volumes);
|
||||
void (* mute_toggled) (GstMixerTrack *channel,
|
||||
gboolean mute);
|
||||
void (* record_toggled) (GstMixerTrack *channel,
|
||||
gboolean record);
|
||||
void (* volume_changed) (GstMixerTrack *channel,
|
||||
gint *volumes);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstMixerTrackClass;
|
||||
|
||||
GType gst_mixer_track_get_type (void);
|
||||
GType gst_mixer_track_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MIXER_TRACK_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_NAVIGATION \
|
||||
(gst_navigation_get_type ())
|
||||
#define GST_NAVIGATION(obj) \
|
||||
|
@ -34,28 +35,28 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NAVIGATION))
|
||||
#define GST_NAVIGATION_GET_IFACE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_NAVIGATION, GstNavigationInterface))
|
||||
|
||||
typedef struct _GstNavigation GstNavigation;
|
||||
|
||||
typedef struct _GstNavigationInterface
|
||||
{
|
||||
typedef struct _GstNavigationInterface {
|
||||
GTypeInterface g_iface;
|
||||
|
||||
/* virtual functions */
|
||||
void (*send_event) (GstNavigation * navigation, GstStructure * structure);
|
||||
|
||||
void (*send_event) (GstNavigation *navigation, GstStructure *structure);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstNavigationInterface;
|
||||
|
||||
GType gst_navigation_get_type (void);
|
||||
GType gst_navigation_get_type (void);
|
||||
|
||||
/* 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,
|
||||
const char *event, const char *key);
|
||||
void gst_navigation_send_mouse_event (GstNavigation * navigation,
|
||||
const char *event, int button, double x, double y);
|
||||
void gst_navigation_send_key_event (GstNavigation *navigation,
|
||||
const char *event, const char *key);
|
||||
void gst_navigation_send_mouse_event (GstNavigation *navigation,
|
||||
const char *event, int button, double x, double y);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_NAVIGATION_H__ */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_PLAY_H__
|
||||
#define __GST_PLAY_H__
|
||||
|
||||
|
@ -46,43 +46,51 @@ typedef enum
|
|||
typedef struct _GstPlay GstPlay;
|
||||
typedef struct _GstPlayClass GstPlayClass;
|
||||
typedef struct _GstPlayPrivate GstPlayPrivate;
|
||||
|
||||
|
||||
struct _GstPlay
|
||||
{
|
||||
GstPipeline pipeline;
|
||||
|
||||
|
||||
GstPlayPrivate *priv;
|
||||
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
|
||||
struct _GstPlayClass
|
||||
{
|
||||
GstPipelineClass parent_class;
|
||||
|
||||
void (*time_tick) (GstPlay * play, gint64 time_nanos);
|
||||
void (*stream_length) (GstPlay * play, gint64 length_nanos);
|
||||
void (*have_video_size) (GstPlay * play, gint width, gint height);
|
||||
|
||||
|
||||
void (*time_tick) (GstPlay *play, gint64 time_nanos);
|
||||
void (*stream_length) (GstPlay *play, gint64 length_nanos);
|
||||
void (*have_video_size) (GstPlay *play, gint width, gint height);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_play_get_type (void);
|
||||
GstPlay *gst_play_new (GError ** error);
|
||||
GType gst_play_get_type (void);
|
||||
GstPlay * gst_play_new (GError **error);
|
||||
|
||||
gboolean gst_play_set_data_src (GstPlay * play, GstElement * data_src);
|
||||
gboolean gst_play_set_video_sink (GstPlay * play, GstElement * video_sink);
|
||||
gboolean gst_play_set_audio_sink (GstPlay * play, GstElement * audio_sink);
|
||||
gboolean gst_play_set_data_src (GstPlay *play,
|
||||
GstElement *data_src);
|
||||
gboolean gst_play_set_video_sink (GstPlay *play,
|
||||
GstElement *video_sink);
|
||||
gboolean gst_play_set_audio_sink (GstPlay *play,
|
||||
GstElement *audio_sink);
|
||||
|
||||
gboolean gst_play_set_visualization (GstPlay * play, GstElement * element);
|
||||
gboolean gst_play_connect_visualization (GstPlay * play, gboolean connect);
|
||||
gboolean gst_play_set_visualization (GstPlay *play,
|
||||
GstElement *element);
|
||||
gboolean gst_play_connect_visualization (GstPlay *play,
|
||||
gboolean connect);
|
||||
|
||||
gboolean gst_play_set_location (GstPlay * play, const char *location);
|
||||
char *gst_play_get_location (GstPlay * play);
|
||||
gboolean gst_play_set_location (GstPlay *play,
|
||||
const char *location);
|
||||
char * gst_play_get_location (GstPlay *play);
|
||||
|
||||
gboolean gst_play_seek_to_time (GstPlay * play, gint64 time_nanos);
|
||||
gboolean gst_play_seek_to_time (GstPlay *play,
|
||||
gint64 time_nanos);
|
||||
|
||||
GstElement *gst_play_get_sink_element (GstPlay * play,
|
||||
GstElement * element, GstPlaySinkType sink_type);
|
||||
GstElement * gst_play_get_sink_element (GstPlay *play,
|
||||
GstElement *element,
|
||||
GstPlaySinkType sink_type);
|
||||
|
||||
#endif /* __GST_PLAY_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_PROPERTY_PROBE \
|
||||
(gst_property_probe_get_type ())
|
||||
#define GST_PROPERTY_PROBE(obj) \
|
||||
|
@ -33,59 +34,64 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PROPERTY_PROBE))
|
||||
#define GST_PROPERTY_PROBE_GET_IFACE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbeInterface))
|
||||
typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */
|
||||
|
||||
typedef struct _GstPropertyProbeInterface
|
||||
{
|
||||
typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */
|
||||
|
||||
typedef struct _GstPropertyProbeInterface {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* signals */
|
||||
void (*probe_needed) (GstPropertyProbe * probe, const GParamSpec * pspec);
|
||||
void (*probe_needed) (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*get_properties) (GstPropertyProbe * probe);
|
||||
gboolean (*needs_probe) (GstPropertyProbe * probe,
|
||||
guint prop_id, const GParamSpec * pspec);
|
||||
void (*probe_property) (GstPropertyProbe * probe,
|
||||
guint prop_id, const GParamSpec * pspec);
|
||||
GValueArray *(*get_values) (GstPropertyProbe * probe,
|
||||
guint prop_id, const GParamSpec * pspec);
|
||||
const GList * (*get_properties) (GstPropertyProbe *probe);
|
||||
gboolean (*needs_probe) (GstPropertyProbe *probe,
|
||||
guint prop_id,
|
||||
const GParamSpec *pspec);
|
||||
void (*probe_property) (GstPropertyProbe *probe,
|
||||
guint prop_id,
|
||||
const GParamSpec *pspec);
|
||||
GValueArray * (*get_values) (GstPropertyProbe *probe,
|
||||
guint prop_id,
|
||||
const GParamSpec *pspec);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstPropertyProbeInterface;
|
||||
|
||||
GType gst_property_probe_get_type (void);
|
||||
GType gst_property_probe_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
|
||||
/* returns list of GParamSpecs */
|
||||
const GList *gst_property_probe_get_properties (GstPropertyProbe * probe);
|
||||
const GParamSpec *gst_property_probe_get_property (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
const GList * gst_property_probe_get_properties (GstPropertyProbe *probe);
|
||||
const GParamSpec *gst_property_probe_get_property (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* probe one property */
|
||||
void gst_property_probe_probe_property (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
void gst_property_probe_probe_property_name (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
void gst_property_probe_probe_property (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
void gst_property_probe_probe_property_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* do we need a probe? */
|
||||
gboolean gst_property_probe_needs_probe (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
gboolean gst_property_probe_needs_probe_name (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
gboolean gst_property_probe_needs_probe (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
gboolean gst_property_probe_needs_probe_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* returns list of GValues */
|
||||
GValueArray *gst_property_probe_get_values (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
GValueArray *gst_property_probe_get_values_name (GstPropertyProbe * probe,
|
||||
const gchar * name);
|
||||
GValueArray * gst_property_probe_get_values (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
GValueArray * gst_property_probe_get_values_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
/* sugar */
|
||||
GValueArray *gst_property_probe_probe_and_get_values (GstPropertyProbe * probe,
|
||||
const GParamSpec * pspec);
|
||||
GValueArray *gst_property_probe_probe_and_get_values_name (GstPropertyProbe *
|
||||
probe, const gchar * name);
|
||||
GValueArray * gst_property_probe_probe_and_get_values (GstPropertyProbe *probe,
|
||||
const GParamSpec *pspec);
|
||||
GValueArray * gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe,
|
||||
const gchar *name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_PROPERTY_PROBE_H__ */
|
||||
|
|
|
@ -23,71 +23,68 @@
|
|||
|
||||
#include "resample.h"
|
||||
|
||||
void gst_resample_nearest_s16 (gst_resample_t * r);
|
||||
void gst_resample_bilinear_s16 (gst_resample_t * r);
|
||||
void gst_resample_sinc_s16 (gst_resample_t * r);
|
||||
void gst_resample_sinc_slow_s16 (gst_resample_t * r);
|
||||
void gst_resample_sinc_ft_s16 (gst_resample_t * r);
|
||||
void gst_resample_nearest_s16(gst_resample_t *r);
|
||||
void gst_resample_bilinear_s16(gst_resample_t *r);
|
||||
void gst_resample_sinc_s16(gst_resample_t *r);
|
||||
void gst_resample_sinc_slow_s16(gst_resample_t *r);
|
||||
void gst_resample_sinc_ft_s16(gst_resample_t * r);
|
||||
|
||||
void gst_resample_nearest_float (gst_resample_t * r);
|
||||
void gst_resample_bilinear_float (gst_resample_t * r);
|
||||
void gst_resample_sinc_float (gst_resample_t * r);
|
||||
void gst_resample_sinc_slow_float (gst_resample_t * r);
|
||||
void gst_resample_sinc_ft_float (gst_resample_t * r);
|
||||
void gst_resample_nearest_float(gst_resample_t *r);
|
||||
void gst_resample_bilinear_float(gst_resample_t *r);
|
||||
void gst_resample_sinc_float(gst_resample_t *r);
|
||||
void gst_resample_sinc_slow_float(gst_resample_t *r);
|
||||
void gst_resample_sinc_ft_float(gst_resample_t * r);
|
||||
|
||||
|
||||
typedef struct functable_s functable_t;
|
||||
struct functable_s
|
||||
{
|
||||
double start;
|
||||
double offset;
|
||||
int len;
|
||||
struct functable_s {
|
||||
double start;
|
||||
double offset;
|
||||
int len;
|
||||
|
||||
double invoffset;
|
||||
double invoffset;
|
||||
|
||||
double scale;
|
||||
double scale2;
|
||||
double scale;
|
||||
double scale2;
|
||||
|
||||
double (*func_x) (void *, double x);
|
||||
double (*func_dx) (void *, double x);
|
||||
double (*func_x)(void *,double x);
|
||||
double (*func_dx)(void *,double x);
|
||||
|
||||
double (*func2_x) (void *, double x);
|
||||
double (*func2_dx) (void *, double x);
|
||||
double (*func2_x)(void *,double x);
|
||||
double (*func2_dx)(void *,double x);
|
||||
|
||||
double *fx;
|
||||
double *fdx;
|
||||
double *fx;
|
||||
double *fdx;
|
||||
|
||||
void *priv;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
void functable_init (functable_t * t);
|
||||
double functable_eval (functable_t * t, double x);
|
||||
void functable_init(functable_t *t);
|
||||
double functable_eval(functable_t *t,double x);
|
||||
|
||||
double functable_fir (functable_t * t, double x0, int n, double *data, int len);
|
||||
void functable_fir2 (functable_t * t, double *r0, double *r1, double x0,
|
||||
int n, double *data, int len);
|
||||
double functable_fir(functable_t *t,double x0,int n,double *data,int len);
|
||||
void functable_fir2(functable_t *t,double *r0, double *r1, double x0,
|
||||
int n,double *data,int len);
|
||||
|
||||
double functable_sinc (void *p, double x);
|
||||
double functable_dsinc (void *p, double x);
|
||||
double functable_window_std (void *p, double x);
|
||||
double functable_window_dstd (void *p, double x);
|
||||
double functable_window_boxcar (void *p, double x);
|
||||
double functable_window_dboxcar (void *p, double x);
|
||||
double functable_sinc(void *p, double x);
|
||||
double functable_dsinc(void *p, double x);
|
||||
double functable_window_std(void *p, double x);
|
||||
double functable_window_dstd(void *p, double x);
|
||||
double functable_window_boxcar(void *p, double x);
|
||||
double functable_window_dboxcar(void *p, double x);
|
||||
|
||||
/* math lib stuff */
|
||||
|
||||
void conv_double_short_table (double *dest, short *src, int n);
|
||||
void conv_double_short_unroll (double *dest, short *src, int n);
|
||||
void conv_double_short_ref (double *dest, short *src, int n);
|
||||
|
||||
void conv_double_short_table(double *dest, short *src, int n);
|
||||
void conv_double_short_unroll(double *dest, short *src, int n);
|
||||
void conv_double_short_ref(double *dest, short *src, int n);
|
||||
#ifdef HAVE_CPU_PPC
|
||||
void conv_double_short_altivec (double *dest, short *src, int n);
|
||||
void conv_double_short_altivec(double *dest, short *src, int n);
|
||||
#endif
|
||||
|
||||
void conv_short_double_ref (short *dest, double *src, int n);
|
||||
|
||||
void conv_short_double_ref(short *dest, double *src, int n);
|
||||
#ifdef HAVE_CPU_PPC
|
||||
void conv_short_double_ppcasm (short *dest, double *src, int n);
|
||||
void conv_short_double_ppcasm(short *dest, double *src, int n);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CPU_PPC
|
||||
|
@ -101,12 +98,12 @@ void conv_short_double_ppcasm (short *dest, double *src, int n);
|
|||
#define conv_double_float conv_double_float_ref
|
||||
#define conv_float_double conv_float_double_ref
|
||||
|
||||
void conv_double_short_dstr (double *dest, short *src, int n, int dstr);
|
||||
void conv_short_double_sstr (short *dest, double *src, int n, int dstr);
|
||||
void conv_double_short_dstr(double *dest, short *src, int n, int dstr);
|
||||
void conv_short_double_sstr(short *dest, double *src, int n, int dstr);
|
||||
|
||||
void conv_double_float_ref (double *dest, float *src, int n);
|
||||
void conv_float_double_ref (float *dest, double *src, int n);
|
||||
void conv_double_float_dstr (double *dest, float *src, int n, int dstr);
|
||||
void conv_float_double_sstr (float *dest, double *src, int n, int sstr);
|
||||
void conv_double_float_ref(double *dest, float *src, int n);
|
||||
void conv_float_double_ref(float *dest, double *src, int n);
|
||||
void conv_double_float_dstr(double *dest, float *src, int n, int dstr);
|
||||
void conv_float_double_sstr(float *dest, double *src, int n, int sstr);
|
||||
|
||||
#endif /* __PRIVATE_H__ */
|
||||
|
|
|
@ -21,78 +21,76 @@
|
|||
#ifndef __GST_RESAMPLE_H__
|
||||
#define __GST_RESAMPLE_H__
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_RESAMPLE_NEAREST = 0,
|
||||
GST_RESAMPLE_BILINEAR,
|
||||
GST_RESAMPLE_SINC_SLOW,
|
||||
GST_RESAMPLE_SINC,
|
||||
typedef enum {
|
||||
GST_RESAMPLE_NEAREST = 0,
|
||||
GST_RESAMPLE_BILINEAR,
|
||||
GST_RESAMPLE_SINC_SLOW,
|
||||
GST_RESAMPLE_SINC,
|
||||
} gst_resample_method;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_RESAMPLE_S16 = 0,
|
||||
GST_RESAMPLE_FLOAT
|
||||
typedef enum {
|
||||
GST_RESAMPLE_S16 = 0,
|
||||
GST_RESAMPLE_FLOAT
|
||||
} gst_resample_format;
|
||||
|
||||
typedef struct gst_resample_s gst_resample_t;
|
||||
|
||||
struct gst_resample_s
|
||||
{
|
||||
/* parameters */
|
||||
struct gst_resample_s {
|
||||
/* parameters */
|
||||
|
||||
gst_resample_method method;
|
||||
int channels;
|
||||
int verbose;
|
||||
gst_resample_format format;
|
||||
gst_resample_method method;
|
||||
int channels;
|
||||
int verbose;
|
||||
gst_resample_format format;
|
||||
|
||||
int filter_length;
|
||||
int filter_length;
|
||||
|
||||
double i_rate;
|
||||
double o_rate;
|
||||
double i_rate;
|
||||
double o_rate;
|
||||
|
||||
void *priv;
|
||||
void *priv;
|
||||
|
||||
void *(*get_buffer) (void *priv, unsigned int size);
|
||||
void *(*get_buffer)(void *priv, unsigned int size);
|
||||
|
||||
/* internal parameters */
|
||||
/* internal parameters */
|
||||
|
||||
double halftaps;
|
||||
double halftaps;
|
||||
|
||||
/* filter state */
|
||||
/* filter state */
|
||||
|
||||
void *buffer;
|
||||
int buffer_len;
|
||||
void *buffer;
|
||||
int buffer_len;
|
||||
|
||||
double i_start;
|
||||
double o_start;
|
||||
double i_start;
|
||||
double o_start;
|
||||
|
||||
double i_start_buf;
|
||||
double i_end_buf;
|
||||
double i_start_buf;
|
||||
double i_end_buf;
|
||||
|
||||
double i_inc;
|
||||
double o_inc;
|
||||
double i_inc;
|
||||
double o_inc;
|
||||
|
||||
double i_end;
|
||||
double o_end;
|
||||
double i_end;
|
||||
double o_end;
|
||||
|
||||
int i_samples;
|
||||
int o_samples;
|
||||
int i_samples;
|
||||
int o_samples;
|
||||
|
||||
void *i_buf, *o_buf;
|
||||
void *i_buf, *o_buf;
|
||||
|
||||
double acc[10];
|
||||
double acc[10];
|
||||
|
||||
/* methods */
|
||||
void (*scale) (gst_resample_t * r);
|
||||
/* methods */
|
||||
void (*scale)(gst_resample_t *r);
|
||||
|
||||
double ack;
|
||||
double ack;
|
||||
};
|
||||
|
||||
void gst_resample_init (gst_resample_t * r);
|
||||
void gst_resample_init(gst_resample_t *r);
|
||||
|
||||
void gst_resample_reinit (gst_resample_t * r);
|
||||
void gst_resample_reinit(gst_resample_t *r);
|
||||
|
||||
void gst_resample_scale (gst_resample_t * r, void *i_buf, unsigned int size);
|
||||
void gst_resample_scale(gst_resample_t *r, void *i_buf, unsigned int size);
|
||||
|
||||
#endif /* __GST_RESAMPLE_H__ */
|
||||
|
||||
|
|
|
@ -66,29 +66,29 @@
|
|||
#define GST_RIFF_FCCH_MSVC GST_MAKE_FOURCC ('M','S','V','C')
|
||||
|
||||
/* INFO types - see http://www.saettler.com/RIFFMCI/riffmci.html */
|
||||
#define GST_RIFF_INFO_IARL GST_MAKE_FOURCC ('I','A','R','L') /* location */
|
||||
#define GST_RIFF_INFO_IART GST_MAKE_FOURCC ('I','A','R','T') /* artist */
|
||||
#define GST_RIFF_INFO_ICMS GST_MAKE_FOURCC ('I','C','M','S') /* commissioned */
|
||||
#define GST_RIFF_INFO_ICMT GST_MAKE_FOURCC ('I','C','M','T') /* comment */
|
||||
#define GST_RIFF_INFO_ICOP GST_MAKE_FOURCC ('I','C','O','P') /* copyright */
|
||||
#define GST_RIFF_INFO_ICRD GST_MAKE_FOURCC ('I','C','R','D') /* creation date */
|
||||
#define GST_RIFF_INFO_ICRP GST_MAKE_FOURCC ('I','C','R','P') /* cropped */
|
||||
#define GST_RIFF_INFO_IDIM GST_MAKE_FOURCC ('I','D','I','M') /* dimensions */
|
||||
#define GST_RIFF_INFO_IDPI GST_MAKE_FOURCC ('I','D','P','I') /* dots-per-inch */
|
||||
#define GST_RIFF_INFO_IENG GST_MAKE_FOURCC ('I','E','N','G') /* engineer(s) */
|
||||
#define GST_RIFF_INFO_IGNR GST_MAKE_FOURCC ('I','G','N','R') /* genre */
|
||||
#define GST_RIFF_INFO_IKEY GST_MAKE_FOURCC ('I','K','E','Y') /* keywords */
|
||||
#define GST_RIFF_INFO_ILGT GST_MAKE_FOURCC ('I','L','G','T') /* lightness */
|
||||
#define GST_RIFF_INFO_IMED GST_MAKE_FOURCC ('I','M','E','D') /* medium */
|
||||
#define GST_RIFF_INFO_INAM GST_MAKE_FOURCC ('I','N','A','M') /* name */
|
||||
#define GST_RIFF_INFO_IPLT GST_MAKE_FOURCC ('I','P','L','T') /* palette setting */
|
||||
#define GST_RIFF_INFO_IPRD GST_MAKE_FOURCC ('I','P','R','D') /* product */
|
||||
#define GST_RIFF_INFO_ISBJ GST_MAKE_FOURCC ('I','S','B','J') /* subject */
|
||||
#define GST_RIFF_INFO_ISFT GST_MAKE_FOURCC ('I','S','F','T') /* software */
|
||||
#define GST_RIFF_INFO_ISHP GST_MAKE_FOURCC ('I','S','H','P') /* sharpness */
|
||||
#define GST_RIFF_INFO_ISRC GST_MAKE_FOURCC ('I','S','R','C') /* source */
|
||||
#define GST_RIFF_INFO_ISRF GST_MAKE_FOURCC ('I','S','R','F') /* source form */
|
||||
#define GST_RIFF_INFO_ITCH GST_MAKE_FOURCC ('I','T','C','H') /* technician(s) */
|
||||
#define GST_RIFF_INFO_IARL GST_MAKE_FOURCC ('I','A','R','L') /* location */
|
||||
#define GST_RIFF_INFO_IART GST_MAKE_FOURCC ('I','A','R','T') /* artist */
|
||||
#define GST_RIFF_INFO_ICMS GST_MAKE_FOURCC ('I','C','M','S') /* commissioned */
|
||||
#define GST_RIFF_INFO_ICMT GST_MAKE_FOURCC ('I','C','M','T') /* comment */
|
||||
#define GST_RIFF_INFO_ICOP GST_MAKE_FOURCC ('I','C','O','P') /* copyright */
|
||||
#define GST_RIFF_INFO_ICRD GST_MAKE_FOURCC ('I','C','R','D') /* creation date */
|
||||
#define GST_RIFF_INFO_ICRP GST_MAKE_FOURCC ('I','C','R','P') /* cropped */
|
||||
#define GST_RIFF_INFO_IDIM GST_MAKE_FOURCC ('I','D','I','M') /* dimensions */
|
||||
#define GST_RIFF_INFO_IDPI GST_MAKE_FOURCC ('I','D','P','I') /* dots-per-inch */
|
||||
#define GST_RIFF_INFO_IENG GST_MAKE_FOURCC ('I','E','N','G') /* engineer(s) */
|
||||
#define GST_RIFF_INFO_IGNR GST_MAKE_FOURCC ('I','G','N','R') /* genre */
|
||||
#define GST_RIFF_INFO_IKEY GST_MAKE_FOURCC ('I','K','E','Y') /* keywords */
|
||||
#define GST_RIFF_INFO_ILGT GST_MAKE_FOURCC ('I','L','G','T') /* lightness */
|
||||
#define GST_RIFF_INFO_IMED GST_MAKE_FOURCC ('I','M','E','D') /* medium */
|
||||
#define GST_RIFF_INFO_INAM GST_MAKE_FOURCC ('I','N','A','M') /* name */
|
||||
#define GST_RIFF_INFO_IPLT GST_MAKE_FOURCC ('I','P','L','T') /* palette setting */
|
||||
#define GST_RIFF_INFO_IPRD GST_MAKE_FOURCC ('I','P','R','D') /* product */
|
||||
#define GST_RIFF_INFO_ISBJ GST_MAKE_FOURCC ('I','S','B','J') /* subject */
|
||||
#define GST_RIFF_INFO_ISFT GST_MAKE_FOURCC ('I','S','F','T') /* software */
|
||||
#define GST_RIFF_INFO_ISHP GST_MAKE_FOURCC ('I','S','H','P') /* sharpness */
|
||||
#define GST_RIFF_INFO_ISRC GST_MAKE_FOURCC ('I','S','R','C') /* source */
|
||||
#define GST_RIFF_INFO_ISRF GST_MAKE_FOURCC ('I','S','R','F') /* source form */
|
||||
#define GST_RIFF_INFO_ITCH GST_MAKE_FOURCC ('I','T','C','H') /* technician(s) */
|
||||
|
||||
/*********Chunk Names***************/
|
||||
#define GST_RIFF_FF00 GST_MAKE_FOURCC (0xFF,0xFF,0x00,0x00)
|
||||
|
@ -167,7 +167,7 @@
|
|||
#define GST_RIFF_v422 GST_MAKE_FOURCC ('v', '4', '2', '2')
|
||||
#define GST_RIFF_V422 GST_MAKE_FOURCC ('V', '4', '2', '2')
|
||||
#define GST_RIFF_mvi1 GST_MAKE_FOURCC ('m', 'v', 'i', '1')
|
||||
#define GST_RIFF_MPIX GST_MAKE_FOURCC (0x04,0x00, 'i', '1') /* MotionPixels munged their id */
|
||||
#define GST_RIFF_MPIX GST_MAKE_FOURCC (0x04,0x00, 'i', '1') /* MotionPixels munged their id */
|
||||
#define GST_RIFF_AURA GST_MAKE_FOURCC ('A', 'U', 'R', 'A')
|
||||
#define GST_RIFF_DMB1 GST_MAKE_FOURCC ('D', 'M', 'B', '1')
|
||||
#define GST_RIFF_dmb1 GST_MAKE_FOURCC ('d', 'm', 'b', '1')
|
||||
|
@ -203,7 +203,7 @@
|
|||
|
||||
#define GST_RIFF_rpza GST_MAKE_FOURCC ('r', 'p', 'z', 'a')
|
||||
/* And this here's the mistakes that need to be supported */
|
||||
#define GST_RIFF_azpr GST_MAKE_FOURCC ('a', 'z', 'p', 'r') /* recognize Apple's rpza mangled? */
|
||||
#define GST_RIFF_azpr GST_MAKE_FOURCC ('a', 'z', 'p', 'r') /* recognize Apple's rpza mangled? */
|
||||
|
||||
/*********** FND in MJPG **********/
|
||||
#define GST_RIFF_ISFT GST_MAKE_FOURCC ('I', 'S', 'F', 'T')
|
||||
|
@ -216,28 +216,26 @@
|
|||
#define GST_RIFF_rec GST_MAKE_FOURCC ('r', 'e', 'c', ' ')
|
||||
|
||||
/* common data structures */
|
||||
typedef struct _gst_riff_strh
|
||||
{
|
||||
guint32 type; /* stream type */
|
||||
guint32 fcc_handler; /* fcc_handler */
|
||||
typedef struct _gst_riff_strh {
|
||||
guint32 type; /* stream type */
|
||||
guint32 fcc_handler; /* fcc_handler */
|
||||
guint32 flags;
|
||||
/* flags values */
|
||||
#define GST_RIFF_STRH_DISABLED 0x000000001
|
||||
#define GST_RIFF_STRH_VIDEOPALCHANGES 0x000010000
|
||||
guint32 priority;
|
||||
guint32 init_frames; /* initial frames (???) */
|
||||
guint32 init_frames; /* initial frames (???) */
|
||||
guint32 scale;
|
||||
guint32 rate;
|
||||
guint32 start;
|
||||
guint32 length;
|
||||
guint32 bufsize; /* suggested buffer size */
|
||||
guint32 bufsize; /* suggested buffer size */
|
||||
guint32 quality;
|
||||
guint32 samplesize;
|
||||
/* XXX 16 bytes ? */
|
||||
} gst_riff_strh;
|
||||
|
||||
typedef struct _gst_riff_strf_vids
|
||||
{ /* == BitMapInfoHeader */
|
||||
typedef struct _gst_riff_strf_vids { /* == BitMapInfoHeader */
|
||||
guint32 size;
|
||||
guint32 width;
|
||||
guint32 height;
|
||||
|
@ -247,14 +245,13 @@ typedef struct _gst_riff_strf_vids
|
|||
guint32 image_size;
|
||||
guint32 xpels_meter;
|
||||
guint32 ypels_meter;
|
||||
guint32 num_colors; /* used colors */
|
||||
guint32 imp_colors; /* important colors */
|
||||
guint32 num_colors; /* used colors */
|
||||
guint32 imp_colors; /* important colors */
|
||||
/* may be more for some codecs */
|
||||
} gst_riff_strf_vids;
|
||||
|
||||
|
||||
typedef struct _gst_riff_strf_auds
|
||||
{ /* == WaveHeader (?) */
|
||||
typedef struct _gst_riff_strf_auds { /* == WaveHeader (?) */
|
||||
guint16 format;
|
||||
/**** from public Microsoft RIFF docs ******/
|
||||
#define GST_RIFF_WAVE_FORMAT_UNKNOWN (0x0000)
|
||||
|
@ -293,8 +290,7 @@ typedef struct _gst_riff_strf_auds
|
|||
guint16 size;
|
||||
} gst_riff_strf_auds;
|
||||
|
||||
typedef struct _gst_riff_strf_iavs
|
||||
{
|
||||
typedef struct _gst_riff_strf_iavs {
|
||||
guint32 DVAAuxSrc;
|
||||
guint32 DVAAuxCtl;
|
||||
guint32 DVAAuxSrc1;
|
||||
|
@ -305,8 +301,7 @@ typedef struct _gst_riff_strf_iavs
|
|||
guint32 DVReserved2;
|
||||
} gst_riff_strf_iavs;
|
||||
|
||||
typedef struct _gst_riff_index_entry
|
||||
{
|
||||
typedef struct _gst_riff_index_entry {
|
||||
guint32 id;
|
||||
guint32 flags;
|
||||
#define GST_RIFF_IF_LIST (0x00000001L)
|
||||
|
@ -317,8 +312,7 @@ typedef struct _gst_riff_index_entry
|
|||
guint32 size;
|
||||
} gst_riff_index_entry;
|
||||
|
||||
typedef struct _gst_riff_dmlh
|
||||
{
|
||||
typedef struct _gst_riff_dmlh {
|
||||
guint32 totalframes;
|
||||
} gst_riff_dmlh;
|
||||
|
||||
|
|
|
@ -27,15 +27,23 @@
|
|||
#include "riff-ids.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Create one caps. strh/strf can be NULL (for non-fixed caps).
|
||||
*/
|
||||
GstCaps * gst_riff_create_video_caps (guint32 codec_fcc,
|
||||
gst_riff_strh * strh, gst_riff_strf_vids * strf, char **codec_name);
|
||||
GstCaps *gst_riff_create_audio_caps (guint16 codec_id,
|
||||
gst_riff_strh * strh, gst_riff_strf_auds * strf, char **codec_name);
|
||||
GstCaps *gst_riff_create_iavs_caps (guint32 codec_fcc,
|
||||
gst_riff_strh * strh, gst_riff_strf_iavs * strf, char **codec_name);
|
||||
|
||||
GstCaps *gst_riff_create_video_caps (guint32 codec_fcc,
|
||||
gst_riff_strh *strh,
|
||||
gst_riff_strf_vids *strf,
|
||||
char **codec_name);
|
||||
GstCaps *gst_riff_create_audio_caps (guint16 codec_id,
|
||||
gst_riff_strh *strh,
|
||||
gst_riff_strf_auds *strf,
|
||||
char **codec_name);
|
||||
GstCaps *gst_riff_create_iavs_caps (guint32 codec_fcc,
|
||||
gst_riff_strh *strh,
|
||||
gst_riff_strf_iavs *strf,
|
||||
char **codec_name);
|
||||
|
||||
/*
|
||||
* Create template caps (includes all known types).
|
||||
|
@ -43,7 +51,8 @@ GstCaps *gst_riff_create_iavs_caps (guint32 codec_fcc,
|
|||
|
||||
GstCaps *gst_riff_create_video_template_caps (void);
|
||||
GstCaps *gst_riff_create_audio_template_caps (void);
|
||||
GstCaps *gst_riff_create_iavs_template_caps (void);
|
||||
GstCaps *gst_riff_create_iavs_template_caps (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_RIFF_READ_H__ */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <gst/bytestream/bytestream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_RIFF_READ \
|
||||
(gst_riff_read_get_type ())
|
||||
#define GST_RIFF_READ(obj) \
|
||||
|
@ -39,13 +40,13 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RIFF_READ))
|
||||
#define GST_RIFF_READ_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RIFF_READ, GstRiffReadClass))
|
||||
typedef struct _GstRiffLevel
|
||||
{
|
||||
guint64 start, length;
|
||||
|
||||
typedef struct _GstRiffLevel {
|
||||
guint64 start,
|
||||
length;
|
||||
} GstRiffLevel;
|
||||
|
||||
typedef struct _GstRiffRead
|
||||
{
|
||||
typedef struct _GstRiffRead {
|
||||
GstElement parent;
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
@ -54,35 +55,43 @@ typedef struct _GstRiffRead
|
|||
GList *level;
|
||||
} GstRiffRead;
|
||||
|
||||
typedef struct _GstRiffReadClass
|
||||
{
|
||||
typedef struct _GstRiffReadClass {
|
||||
GstElementClass parent;
|
||||
} GstRiffReadClass;
|
||||
|
||||
GType gst_riff_read_get_type (void);
|
||||
GType gst_riff_read_get_type (void);
|
||||
|
||||
guint32 gst_riff_peek_tag (GstRiffRead * riff, guint * level_up);
|
||||
guint32 gst_riff_peek_list (GstRiffRead * riff);
|
||||
guint32 gst_riff_peek_tag (GstRiffRead *riff,
|
||||
guint *level_up);
|
||||
guint32 gst_riff_peek_list (GstRiffRead *riff);
|
||||
|
||||
GstEvent *gst_riff_read_seek (GstRiffRead * riff, guint64 offset);
|
||||
gboolean gst_riff_read_skip (GstRiffRead * riff);
|
||||
gboolean gst_riff_read_data (GstRiffRead * riff,
|
||||
guint32 * tag, GstBuffer ** buf);
|
||||
gboolean gst_riff_read_ascii (GstRiffRead * riff, guint32 * tag, gchar ** str);
|
||||
gboolean gst_riff_read_list (GstRiffRead * riff, guint32 * tag);
|
||||
gboolean gst_riff_read_header (GstRiffRead * read, guint32 * doctype);
|
||||
GstEvent *gst_riff_read_seek (GstRiffRead *riff,
|
||||
guint64 offset);
|
||||
gboolean gst_riff_read_skip (GstRiffRead *riff);
|
||||
gboolean gst_riff_read_data (GstRiffRead *riff,
|
||||
guint32 *tag,
|
||||
GstBuffer **buf);
|
||||
gboolean gst_riff_read_ascii (GstRiffRead *riff,
|
||||
guint32 *tag,
|
||||
gchar **str);
|
||||
gboolean gst_riff_read_list (GstRiffRead *riff,
|
||||
guint32 *tag);
|
||||
gboolean gst_riff_read_header (GstRiffRead *read,
|
||||
guint32 *doctype);
|
||||
|
||||
/*
|
||||
* Utility functions (including byteswapping).
|
||||
*/
|
||||
gboolean gst_riff_read_strh (GstRiffRead * riff, gst_riff_strh ** header);
|
||||
gboolean gst_riff_read_strf_vids (GstRiffRead * riff,
|
||||
gst_riff_strf_vids ** header);
|
||||
gboolean gst_riff_read_strf_auds (GstRiffRead * riff,
|
||||
gst_riff_strf_auds ** header);
|
||||
gboolean gst_riff_read_strf_iavs (GstRiffRead * riff,
|
||||
gst_riff_strf_iavs ** header);
|
||||
gboolean gst_riff_read_info (GstRiffRead * riff);
|
||||
gboolean gst_riff_read_strh (GstRiffRead *riff,
|
||||
gst_riff_strh **header);
|
||||
gboolean gst_riff_read_strf_vids (GstRiffRead *riff,
|
||||
gst_riff_strf_vids **header);
|
||||
gboolean gst_riff_read_strf_auds (GstRiffRead *riff,
|
||||
gst_riff_strf_auds **header);
|
||||
gboolean gst_riff_read_strf_iavs (GstRiffRead *riff,
|
||||
gst_riff_strf_iavs **header);
|
||||
gboolean gst_riff_read_info (GstRiffRead *riff);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_RIFF_READ_H__ */
|
||||
|
|
|
@ -24,30 +24,39 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
/* functions for vorbis comment manipulation */
|
||||
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);
|
||||
void gst_vorbis_tag_add (GstTagList * list,
|
||||
const gchar * tag, const gchar * value);
|
||||
|
||||
GList *gst_tag_to_vorbis_comments (const GstTagList * list, const gchar * tag);
|
||||
|
||||
/* functions for vorbis comment manipulation */
|
||||
|
||||
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);
|
||||
void gst_vorbis_tag_add (GstTagList * list,
|
||||
const gchar * tag,
|
||||
const gchar * value);
|
||||
|
||||
GList * gst_tag_to_vorbis_comments (const GstTagList * list,
|
||||
const gchar * tag);
|
||||
|
||||
/* functions to convert GstBuffers with vorbiscomment contents to GstTagLists and back */
|
||||
GstTagList *gst_tag_list_from_vorbiscomment_buffer (const GstBuffer * buffer,
|
||||
const guint8 * id_data, const guint id_data_length, gchar ** vendor_string);
|
||||
GstBuffer *gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list,
|
||||
const guint8 * id_data,
|
||||
const guint id_data_length, const gchar * vendor_string);
|
||||
GstTagList * gst_tag_list_from_vorbiscomment_buffer (const GstBuffer * buffer,
|
||||
const guint8 * id_data,
|
||||
const guint id_data_length,
|
||||
gchar ** vendor_string);
|
||||
GstBuffer * gst_tag_list_to_vorbiscomment_buffer (const GstTagList * list,
|
||||
const guint8 * id_data,
|
||||
const guint id_data_length,
|
||||
const gchar * vendor_string);
|
||||
|
||||
/* functions for ID3 tag manipulation */
|
||||
|
||||
guint gst_tag_id3_genre_count (void);
|
||||
G_CONST_RETURN gchar *gst_tag_id3_genre_get (const guint id);
|
||||
GstTagList *gst_tag_list_new_from_id3v1 (const guint8 * data);
|
||||
guint gst_tag_id3_genre_count (void);
|
||||
G_CONST_RETURN gchar * gst_tag_id3_genre_get (const guint id);
|
||||
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_to_id3_tag (const gchar * gst_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_END_DECLS
|
||||
|
||||
#endif /* __GST_TAG_TAG_H__ */
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <gst/tuner/tuner-enumtypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TUNER \
|
||||
(gst_tuner_get_type ())
|
||||
#define GST_TUNER(obj) \
|
||||
|
@ -40,65 +41,87 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER))
|
||||
#define GST_TUNER_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_TUNER, GstTunerClass))
|
||||
|
||||
typedef struct _GstTuner GstTuner;
|
||||
|
||||
typedef struct _GstTunerClass
|
||||
{
|
||||
typedef struct _GstTunerClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* virtual functions */
|
||||
const GList *(*list_channels) (GstTuner * tuner);
|
||||
void (*set_channel) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
GstTunerChannel *(*get_channel) (GstTuner * tuner);
|
||||
const GList * (* list_channels) (GstTuner *tuner);
|
||||
void (* set_channel) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
GstTunerChannel *
|
||||
(* get_channel) (GstTuner *tuner);
|
||||
|
||||
const GList *(*list_norms) (GstTuner * tuner);
|
||||
void (*set_norm) (GstTuner * tuner, GstTunerNorm * norm);
|
||||
GstTunerNorm *(*get_norm) (GstTuner * tuner);
|
||||
const GList * (* list_norms) (GstTuner *tuner);
|
||||
void (* set_norm) (GstTuner *tuner,
|
||||
GstTunerNorm *norm);
|
||||
GstTunerNorm *(* get_norm) (GstTuner *tuner);
|
||||
|
||||
void (*set_frequency) (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
gulong (*get_frequency) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
gint (*signal_strength) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void (* set_frequency) (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
gulong (* get_frequency) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
gint (* signal_strength) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
|
||||
/* signals */
|
||||
void (*channel_changed) (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void (*norm_changed) (GstTuner * tuner, GstTunerNorm * norm);
|
||||
void (*frequency_changed) (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
void (*signal_changed) (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gint signal);
|
||||
void (*channel_changed) (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
void (*norm_changed) (GstTuner *tuner,
|
||||
GstTunerNorm *norm);
|
||||
void (*frequency_changed) (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
void (*signal_changed) (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gint signal);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstTunerClass;
|
||||
|
||||
GType gst_tuner_get_type (void);
|
||||
GType gst_tuner_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
const GList *gst_tuner_list_channels (GstTuner * tuner);
|
||||
void gst_tuner_set_channel (GstTuner * tuner, GstTunerChannel * channel);
|
||||
GstTunerChannel *gst_tuner_get_channel (GstTuner * tuner);
|
||||
const GList * gst_tuner_list_channels (GstTuner *tuner);
|
||||
void gst_tuner_set_channel (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
GstTunerChannel *
|
||||
gst_tuner_get_channel (GstTuner *tuner);
|
||||
|
||||
const GList *gst_tuner_list_norms (GstTuner * tuner);
|
||||
void gst_tuner_set_norm (GstTuner * tuner, GstTunerNorm * channel);
|
||||
GstTunerNorm *gst_tuner_get_norm (GstTuner * tuner);
|
||||
const GList * gst_tuner_list_norms (GstTuner *tuner);
|
||||
void gst_tuner_set_norm (GstTuner *tuner,
|
||||
GstTunerNorm *channel);
|
||||
GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner);
|
||||
|
||||
void gst_tuner_set_frequency (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
gulong gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel);
|
||||
gint gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void gst_tuner_set_frequency (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
gulong gst_tuner_get_frequency (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
gint gst_tuner_signal_strength (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
|
||||
/* helper functions */
|
||||
GstTunerNorm *gst_tuner_find_norm_by_name (GstTuner * tuner, gchar * norm);
|
||||
GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner * tuner,
|
||||
gchar * channel);
|
||||
GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner,
|
||||
gchar *norm);
|
||||
GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner,
|
||||
gchar *channel);
|
||||
|
||||
/* trigger signals */
|
||||
void gst_tuner_channel_changed (GstTuner * tuner, GstTunerChannel * channel);
|
||||
void gst_tuner_norm_changed (GstTuner * tuner, GstTunerNorm * norm);
|
||||
void gst_tuner_frequency_changed (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gulong frequency);
|
||||
void gst_tuner_signal_changed (GstTuner * tuner,
|
||||
GstTunerChannel * channel, gint signal);
|
||||
void gst_tuner_channel_changed (GstTuner *tuner,
|
||||
GstTunerChannel *channel);
|
||||
void gst_tuner_norm_changed (GstTuner *tuner,
|
||||
GstTunerNorm *norm);
|
||||
void gst_tuner_frequency_changed (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
void gst_tuner_signal_changed (GstTuner *tuner,
|
||||
GstTunerChannel *channel,
|
||||
gint signal);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TUNER_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TUNER_CHANNEL \
|
||||
(gst_tuner_channel_get_type ())
|
||||
#define GST_TUNER_CHANNEL(obj) \
|
||||
|
@ -37,39 +38,42 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_CHANNEL))
|
||||
#define GST_IS_TUNER_CHANNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_CHANNEL))
|
||||
typedef enum
|
||||
{
|
||||
GST_TUNER_CHANNEL_INPUT = (1 << 0),
|
||||
GST_TUNER_CHANNEL_OUTPUT = (1 << 1),
|
||||
GST_TUNER_CHANNEL_FREQUENCY = (1 << 2),
|
||||
GST_TUNER_CHANNEL_AUDIO = (1 << 3),
|
||||
|
||||
typedef enum {
|
||||
GST_TUNER_CHANNEL_INPUT = (1<<0),
|
||||
GST_TUNER_CHANNEL_OUTPUT = (1<<1),
|
||||
GST_TUNER_CHANNEL_FREQUENCY = (1<<2),
|
||||
GST_TUNER_CHANNEL_AUDIO = (1<<3),
|
||||
} GstTunerChannelFlags;
|
||||
|
||||
#define GST_TUNER_CHANNEL_HAS_FLAG(channel, flag) \
|
||||
((channel)->flags & flag)
|
||||
|
||||
typedef struct _GstTunerChannel
|
||||
{
|
||||
GObject parent;
|
||||
typedef struct _GstTunerChannel {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gchar *label;
|
||||
GstTunerChannelFlags flags;
|
||||
gulong min_frequency, max_frequency;
|
||||
gint min_signal, max_signal;
|
||||
gulong min_frequency,
|
||||
max_frequency;
|
||||
gint min_signal,
|
||||
max_signal;
|
||||
} GstTunerChannel;
|
||||
|
||||
typedef struct _GstTunerChannelClass
|
||||
{
|
||||
typedef struct _GstTunerChannelClass {
|
||||
GObjectClass parent;
|
||||
|
||||
/* signals */
|
||||
void (*frequency_changed) (GstTunerChannel * channel, gulong frequency);
|
||||
void (*signal_changed) (GstTunerChannel * channel, gint signal);
|
||||
void (*frequency_changed) (GstTunerChannel *channel,
|
||||
gulong frequency);
|
||||
void (*signal_changed) (GstTunerChannel *channel,
|
||||
gint signal);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstTunerChannelClass;
|
||||
|
||||
GType gst_tuner_channel_get_type (void);
|
||||
GType gst_tuner_channel_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TUNER_CHANNEL_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_TUNER_NORM \
|
||||
(gst_tuner_norm_get_type ())
|
||||
#define GST_TUNER_NORM(obj) \
|
||||
|
@ -35,22 +36,22 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_NORM))
|
||||
#define GST_IS_TUNER_NORM_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_NORM))
|
||||
typedef struct _GstTunerNorm
|
||||
{
|
||||
|
||||
typedef struct _GstTunerNorm {
|
||||
GObject parent;
|
||||
|
||||
gchar *label;
|
||||
gfloat fps;
|
||||
gchar *label;
|
||||
gfloat fps;
|
||||
} GstTunerNorm;
|
||||
|
||||
typedef struct _GstTunerNormClass
|
||||
{
|
||||
typedef struct _GstTunerNormClass {
|
||||
GObjectClass parent;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstTunerNormClass;
|
||||
|
||||
GType gst_tuner_norm_get_type (void);
|
||||
GType gst_tuner_norm_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TUNER_NORM_H__ */
|
||||
|
|
|
@ -25,17 +25,18 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS typedef struct _GstVideofilter GstVideofilter;
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GstVideofilter GstVideofilter;
|
||||
typedef struct _GstVideofilterClass GstVideofilterClass;
|
||||
|
||||
typedef void (*GstVideofilterFilterFunc) (GstVideofilter * filter,
|
||||
typedef void (*GstVideofilterFilterFunc)(GstVideofilter *filter,
|
||||
void *out_data, void *in_data);
|
||||
|
||||
typedef void (*GstVideofilterSetupFunc) (GstVideofilter * filter);
|
||||
typedef void (*GstVideofilterSetupFunc)(GstVideofilter *filter);
|
||||
|
||||
typedef struct _GstVideofilterFormat GstVideofilterFormat;
|
||||
struct _GstVideofilterFormat
|
||||
{
|
||||
struct _GstVideofilterFormat {
|
||||
char *fourcc;
|
||||
int bpp;
|
||||
GstVideofilterFilterFunc filter_func;
|
||||
|
@ -57,11 +58,10 @@ struct _GstVideofilterFormat
|
|||
#define GST_IS_VIDEOFILTER_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOFILTER))
|
||||
|
||||
struct _GstVideofilter
|
||||
{
|
||||
struct _GstVideofilter {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
/* video state */
|
||||
gboolean inited;
|
||||
|
@ -81,29 +81,28 @@ struct _GstVideofilter
|
|||
GstBuffer *out_buf;
|
||||
};
|
||||
|
||||
struct _GstVideofilterClass
|
||||
{
|
||||
struct _GstVideofilterClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
GPtrArray *formats;
|
||||
GstVideofilterSetupFunc setup;
|
||||
};
|
||||
|
||||
GType gst_videofilter_get_type (void);
|
||||
GType gst_videofilter_get_type(void);
|
||||
|
||||
int gst_videofilter_get_input_width (GstVideofilter * videofilter);
|
||||
int gst_videofilter_get_input_height (GstVideofilter * videofilter);
|
||||
void gst_videofilter_set_output_size (GstVideofilter * videofilter,
|
||||
int gst_videofilter_get_input_width(GstVideofilter *videofilter);
|
||||
int gst_videofilter_get_input_height(GstVideofilter *videofilter);
|
||||
void gst_videofilter_set_output_size(GstVideofilter *videofilter,
|
||||
int width, int height);
|
||||
GstVideofilterFormat *gst_videofilter_find_format_by_structure (GstVideofilter *
|
||||
filter, const GstStructure * structure);
|
||||
GstCaps *gst_videofilter_class_get_capslist (GstVideofilterClass *
|
||||
videofilterclass);
|
||||
GstVideofilterFormat *gst_videofilter_find_format_by_structure (GstVideofilter *filter,
|
||||
const GstStructure *structure);
|
||||
GstCaps *gst_videofilter_class_get_capslist(GstVideofilterClass *videofilterclass);
|
||||
|
||||
void gst_videofilter_class_add_format (GstVideofilterClass * videofilterclass,
|
||||
GstVideofilterFormat * format);
|
||||
void gst_videofilter_class_add_pad_templates (GstVideofilterClass *
|
||||
videofilterclass);
|
||||
void gst_videofilter_class_add_format(GstVideofilterClass *videofilterclass,
|
||||
GstVideofilterFormat *format);
|
||||
void gst_videofilter_class_add_pad_templates (GstVideofilterClass *videofilterclass);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VIDEOFILTER_H__ */
|
||||
|
||||
|
|
|
@ -17,17 +17,16 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_VIDEOSINK_H__
|
||||
#define __GST_VIDEOSINK_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GST_TYPE_VIDEOSINK (gst_videosink_get_type())
|
||||
#define GST_VIDEOSINK(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEOSINK, GstVideoSink))
|
||||
|
@ -39,39 +38,37 @@ extern "C"
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VIDEOSINK))
|
||||
#define GST_VIDEOSINK_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VIDEOSINK, GstVideoSinkClass))
|
||||
|
||||
|
||||
#define GST_VIDEOSINK_PAD(obj) (GST_VIDEOSINK (obj)->sinkpad)
|
||||
#define GST_VIDEOSINK_WIDTH(obj) (GST_VIDEOSINK (obj)->width)
|
||||
#define GST_VIDEOSINK_HEIGHT(obj) (GST_VIDEOSINK (obj)->height)
|
||||
#define GST_VIDEOSINK_CLOCK(obj) (GST_VIDEOSINK (obj)->clock)
|
||||
|
||||
typedef struct _GstVideoSink GstVideoSink;
|
||||
typedef struct _GstVideoSinkClass GstVideoSinkClass;
|
||||
|
||||
typedef struct _GstVideoSink GstVideoSink;
|
||||
typedef struct _GstVideoSinkClass GstVideoSinkClass;
|
||||
struct _GstVideoSink {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
||||
gint width, height;
|
||||
|
||||
GstClock *clock;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstVideoSink
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstVideoSinkClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
||||
gint width, height;
|
||||
|
||||
GstClock *clock;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstVideoSinkClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_videosink_get_type (void);
|
||||
GType gst_videosink_get_type (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GST_VIDEOSINK_H__ */
|
||||
#endif /* __GST_VIDEOSINK_H__ */
|
||||
|
|
|
@ -98,31 +98,31 @@
|
|||
|
||||
#define GST_VIDEO_CAPS_RGBx \
|
||||
__GST_VIDEO_CAPS_MAKE_32 (1, 2, 3)
|
||||
|
||||
|
||||
#define GST_VIDEO_CAPS_xRGB \
|
||||
__GST_VIDEO_CAPS_MAKE_32 (2, 3, 4)
|
||||
|
||||
|
||||
#define GST_VIDEO_CAPS_BGRx \
|
||||
__GST_VIDEO_CAPS_MAKE_32 (3, 2, 1)
|
||||
|
||||
|
||||
#define GST_VIDEO_CAPS_xBGR \
|
||||
__GST_VIDEO_CAPS_MAKE_32 (4, 3, 2)
|
||||
|
||||
/* note: the macro name uses the order on BE systems */
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
#define GST_VIDEO_CAPS_xRGB_HOST_ENDIAN \
|
||||
#define GST_VIDEO_CAPS_xRGB_HOST_ENDIAN \
|
||||
GST_VIDEO_CAPS_xRGB
|
||||
#define GST_VIDEO_CAPS_BGRx_HOST_ENDIAN \
|
||||
#define GST_VIDEO_CAPS_BGRx_HOST_ENDIAN \
|
||||
GST_VIDEO_CAPS_BGRx
|
||||
#else
|
||||
#define GST_VIDEO_CAPS_xRGB_HOST_ENDIAN \
|
||||
#define GST_VIDEO_CAPS_xRGB_HOST_ENDIAN \
|
||||
GST_VIDEO_CAPS_BGRx
|
||||
#define GST_VIDEO_CAPS_BGRx_HOST_ENDIAN \
|
||||
#define GST_VIDEO_CAPS_BGRx_HOST_ENDIAN \
|
||||
GST_VIDEO_CAPS_xRGB
|
||||
#endif
|
||||
|
||||
|
||||
/* 15/16 bit */
|
||||
|
||||
|
||||
#define GST_VIDEO_CAPS_RGB_16 \
|
||||
"video/x-raw-rgb, " \
|
||||
"bpp = (int) 16, " \
|
||||
|
@ -155,7 +155,9 @@
|
|||
"framerate = " GST_VIDEO_FPS_RANGE
|
||||
|
||||
/* functions */
|
||||
gdouble gst_video_frame_rate (GstPad * pad);
|
||||
gboolean gst_video_get_size (GstPad * pad, gint * width, gint * height);
|
||||
gdouble gst_video_frame_rate (GstPad *pad);
|
||||
gboolean gst_video_get_size (GstPad *pad,
|
||||
gint *width,
|
||||
gint *height);
|
||||
|
||||
#endif /* __GST_VIDEO_H__ */
|
||||
|
|
|
@ -17,17 +17,16 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_VIDEOSINK_H__
|
||||
#define __GST_VIDEOSINK_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GST_TYPE_VIDEOSINK (gst_videosink_get_type())
|
||||
#define GST_VIDEOSINK(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEOSINK, GstVideoSink))
|
||||
|
@ -39,39 +38,37 @@ extern "C"
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VIDEOSINK))
|
||||
#define GST_VIDEOSINK_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VIDEOSINK, GstVideoSinkClass))
|
||||
|
||||
|
||||
#define GST_VIDEOSINK_PAD(obj) (GST_VIDEOSINK (obj)->sinkpad)
|
||||
#define GST_VIDEOSINK_WIDTH(obj) (GST_VIDEOSINK (obj)->width)
|
||||
#define GST_VIDEOSINK_HEIGHT(obj) (GST_VIDEOSINK (obj)->height)
|
||||
#define GST_VIDEOSINK_CLOCK(obj) (GST_VIDEOSINK (obj)->clock)
|
||||
|
||||
typedef struct _GstVideoSink GstVideoSink;
|
||||
typedef struct _GstVideoSinkClass GstVideoSinkClass;
|
||||
|
||||
typedef struct _GstVideoSink GstVideoSink;
|
||||
typedef struct _GstVideoSinkClass GstVideoSinkClass;
|
||||
struct _GstVideoSink {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
||||
gint width, height;
|
||||
|
||||
GstClock *clock;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstVideoSink
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstVideoSinkClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GstPad *sinkpad;
|
||||
|
||||
gint width, height;
|
||||
|
||||
GstClock *clock;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstVideoSinkClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_videosink_get_type (void);
|
||||
GType gst_videosink_get_type (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GST_VIDEOSINK_H__ */
|
||||
#endif /* __GST_VIDEOSINK_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_X_OVERLAY \
|
||||
(gst_x_overlay_get_type ())
|
||||
#define GST_X_OVERLAY(obj) \
|
||||
|
@ -39,38 +40,42 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_X_OVERLAY))
|
||||
#define GST_X_OVERLAY_GET_CLASS(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_X_OVERLAY, GstXOverlayClass))
|
||||
|
||||
typedef struct _GstXOverlay GstXOverlay;
|
||||
|
||||
typedef struct _GstXOverlayClass
|
||||
{
|
||||
typedef struct _GstXOverlayClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* virtual functions */
|
||||
void (*set_xwindow_id) (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void (* set_xwindow_id) (GstXOverlay *overlay,
|
||||
gulong xwindow_id);
|
||||
/* optional virtual functions */
|
||||
void (*get_desired_size) (GstXOverlay * overlay,
|
||||
guint * width, guint * height);
|
||||
void (*expose) (GstXOverlay * overlay);
|
||||
|
||||
void (* get_desired_size) (GstXOverlay *overlay,
|
||||
guint *width,
|
||||
guint *height);
|
||||
void (* expose) (GstXOverlay *overlay);
|
||||
|
||||
/* signals */
|
||||
void (*have_xwindow_id) (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void (*desired_size) (GstXOverlay * overlay, guint width, guint height);
|
||||
void (*have_xwindow_id) (GstXOverlay *overlay,
|
||||
gulong xwindow_id);
|
||||
void (* desired_size) (GstXOverlay *overlay,
|
||||
guint width,
|
||||
guint height);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
} GstXOverlayClass;
|
||||
|
||||
GType gst_x_overlay_get_type (void);
|
||||
GType gst_x_overlay_get_type (void);
|
||||
|
||||
/* virtual class function wrappers */
|
||||
void gst_x_overlay_set_xwindow_id (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_get_desired_size (GstXOverlay * overlay, guint * width,
|
||||
guint * height);
|
||||
void gst_x_overlay_expose (GstXOverlay * overlay);
|
||||
void gst_x_overlay_set_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_get_desired_size (GstXOverlay *overlay, guint *width, guint *height);
|
||||
void gst_x_overlay_expose (GstXOverlay *overlay);
|
||||
|
||||
/* public methods to fire signals */
|
||||
void gst_x_overlay_got_xwindow_id (GstXOverlay * overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_got_desired_size (GstXOverlay * overlay, guint width,
|
||||
guint height);
|
||||
void gst_x_overlay_got_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);
|
||||
void gst_x_overlay_got_desired_size (GstXOverlay *overlay, guint width, guint height);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_X_OVERLAY_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <X11/Xlib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_X_WINDOW_LISTENER \
|
||||
(gst_x_window_listener_get_type())
|
||||
#define GST_X_WINDOW_LISTENER(obj) \
|
||||
|
@ -38,22 +39,28 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_X_WINDOW_LISTENER))
|
||||
#define GST_IS_X_WINDOW_LISTENER_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_X_WINDOW_LISTENER))
|
||||
typedef struct _GstXWindowListener GstXWindowListener;
|
||||
typedef struct _GstXWindowListenerClass GstXWindowListenerClass;
|
||||
typedef struct _GstXWindowClip GstXWindowClip;
|
||||
typedef void (*MapWindowFunc) (gpointer your_data, gboolean visible);
|
||||
typedef void (*SetWindowFunc) (gpointer your_data,
|
||||
gint x, gint y, gint w, gint h, GstXWindowClip * clips, gint num_clips);
|
||||
|
||||
struct _GstXWindowClip
|
||||
{
|
||||
gint32 x_offset, y_offset, width, height;
|
||||
typedef struct _GstXWindowListener GstXWindowListener;
|
||||
typedef struct _GstXWindowListenerClass GstXWindowListenerClass;
|
||||
typedef struct _GstXWindowClip GstXWindowClip;
|
||||
typedef void (* MapWindowFunc) (gpointer your_data,
|
||||
gboolean visible);
|
||||
typedef void (* SetWindowFunc) (gpointer your_data,
|
||||
gint x, gint y,
|
||||
gint w, gint h,
|
||||
GstXWindowClip *clips,
|
||||
gint num_clips);
|
||||
|
||||
struct _GstXWindowClip {
|
||||
gint32 x_offset,
|
||||
y_offset,
|
||||
width,
|
||||
height;
|
||||
gpointer data;
|
||||
};
|
||||
|
||||
struct _GstXWindowListener
|
||||
{
|
||||
GObject parent;
|
||||
struct _GstXWindowListener {
|
||||
GObject parent;
|
||||
|
||||
/* "per-instance virtual functions" */
|
||||
MapWindowFunc map_window_func;
|
||||
|
@ -63,12 +70,12 @@ struct _GstXWindowListener
|
|||
gpointer private_data;
|
||||
|
||||
/* general information of what we're doing */
|
||||
gchar *display_name;
|
||||
XID xwindow_id;
|
||||
gchar *display_name;
|
||||
XID xwindow_id;
|
||||
|
||||
/* one extra... */
|
||||
Display *main_display;
|
||||
GMutex *main_lock;
|
||||
GMutex *main_lock;
|
||||
|
||||
/* oh my g*d, this is going to be so horribly ugly */
|
||||
GThread *thread;
|
||||
|
@ -77,24 +84,33 @@ struct _GstXWindowListener
|
|||
/* the overlay window + own thread */
|
||||
Display *display;
|
||||
Drawable child;
|
||||
gboolean ov_conf, ov_map, ov_visible, ov_refresh, ov_move, ov_wmmap;
|
||||
gint ov_visibility;
|
||||
guint ov_conf_id, ov_refresh_id;
|
||||
gint x, y, w, h;
|
||||
gboolean ov_conf,
|
||||
ov_map,
|
||||
ov_visible,
|
||||
ov_refresh,
|
||||
ov_move,
|
||||
ov_wmmap;
|
||||
gint ov_visibility;
|
||||
guint ov_conf_id,
|
||||
ov_refresh_id;
|
||||
gint x, y, w, h;
|
||||
GstXWindowClip *clips;
|
||||
gint num_clips;
|
||||
gint num_clips;
|
||||
};
|
||||
|
||||
struct _GstXWindowListenerClass
|
||||
{
|
||||
struct _GstXWindowListenerClass {
|
||||
GObjectClass parent;
|
||||
};
|
||||
|
||||
GType gst_x_window_listener_get_type (void);
|
||||
GstXWindowListener *gst_x_window_listener_new (gchar * display,
|
||||
MapWindowFunc map_window_func,
|
||||
SetWindowFunc set_window_func, gpointer private_data);
|
||||
void gst_x_window_listener_set_xid (GstXWindowListener * xwin, XID id);
|
||||
GType gst_x_window_listener_get_type (void);
|
||||
GstXWindowListener *
|
||||
gst_x_window_listener_new (gchar *display,
|
||||
MapWindowFunc map_window_func,
|
||||
SetWindowFunc set_window_func,
|
||||
gpointer private_data);
|
||||
void gst_x_window_listener_set_xid (GstXWindowListener *xwin,
|
||||
XID id);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __X_WINDOW_LISTENER_H__ */
|
||||
|
|
|
@ -27,11 +27,10 @@
|
|||
#include <gst/bytestream/bytestream.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern GstElementDetails gst_adder_details;
|
||||
extern GstElementDetails gst_adder_details;
|
||||
|
||||
#define GST_TYPE_ADDER \
|
||||
(gst_adder_get_type())
|
||||
|
@ -44,61 +43,57 @@ extern "C"
|
|||
#define GST_IS_ADDER_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ADDER))
|
||||
|
||||
typedef struct _GstAdder GstAdder;
|
||||
typedef struct _GstAdderClass GstAdderClass;
|
||||
typedef struct _GstAdderInputChannel GstAdderInputChannel;
|
||||
typedef enum _GstAdderFormat GstAdderFormat;
|
||||
typedef struct _GstAdder GstAdder;
|
||||
typedef struct _GstAdderClass GstAdderClass;
|
||||
typedef struct _GstAdderInputChannel GstAdderInputChannel;
|
||||
typedef enum _GstAdderFormat GstAdderFormat;
|
||||
|
||||
enum _GstAdderFormat
|
||||
{
|
||||
GST_ADDER_FORMAT_UNSET,
|
||||
GST_ADDER_FORMAT_INT,
|
||||
GST_ADDER_FORMAT_FLOAT
|
||||
};
|
||||
enum _GstAdderFormat {
|
||||
GST_ADDER_FORMAT_UNSET,
|
||||
GST_ADDER_FORMAT_INT,
|
||||
GST_ADDER_FORMAT_FLOAT
|
||||
};
|
||||
|
||||
struct _GstAdderInputChannel
|
||||
{
|
||||
GstPad *sinkpad;
|
||||
GstByteStream *bytestream;
|
||||
};
|
||||
struct _GstAdderInputChannel {
|
||||
GstPad *sinkpad;
|
||||
GstByteStream *bytestream;
|
||||
};
|
||||
|
||||
struct _GstAdder
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstAdder {
|
||||
GstElement element;
|
||||
|
||||
GstPad *srcpad;
|
||||
GstPad *srcpad;
|
||||
|
||||
/* keep track of the sinkpads */
|
||||
guint numsinkpads;
|
||||
GSList *input_channels;
|
||||
/* keep track of the sinkpads */
|
||||
guint numsinkpads;
|
||||
GSList *input_channels;
|
||||
|
||||
/* the next are valid for both int and float */
|
||||
GstAdderFormat format;
|
||||
guint rate;
|
||||
guint channels;
|
||||
guint width;
|
||||
guint endianness;
|
||||
/* the next are valid for both int and float */
|
||||
GstAdderFormat format;
|
||||
guint rate;
|
||||
guint channels;
|
||||
guint width;
|
||||
guint endianness;
|
||||
|
||||
/* the next are valid only for format == GST_ADDER_FORMAT_INT */
|
||||
guint depth;
|
||||
gboolean is_signed;
|
||||
/* the next are valid only for format == GST_ADDER_FORMAT_INT */
|
||||
guint depth;
|
||||
gboolean is_signed;
|
||||
|
||||
/* counters to keep track of timestamps */
|
||||
gint64 timestamp;
|
||||
gint64 offset;
|
||||
};
|
||||
/* counters to keep track of timestamps */
|
||||
gint64 timestamp;
|
||||
gint64 offset;
|
||||
};
|
||||
|
||||
struct _GstAdderClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
struct _GstAdderClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_adder_get_type (void);
|
||||
gboolean gst_adder_factory_init (GstElementFactory * factory);
|
||||
GType gst_adder_get_type (void);
|
||||
gboolean gst_adder_factory_init (GstElementFactory *factory);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_ADDER_H__ */
|
||||
#endif /* __GST_ADDER_H__ */
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define GST_TYPE_AUDIOSCALE \
|
||||
(audioscale_get_type())
|
||||
#define GST_AUDIOSCALE(obj) \
|
||||
|
@ -38,8 +40,8 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIOSCALE))
|
||||
#define GST_IS_AUDIOSCALE_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIOSCALE))
|
||||
typedef enum
|
||||
{
|
||||
|
||||
typedef enum {
|
||||
GST_AUDIOSCALE_NEAREST,
|
||||
GST_AUDIOSCALE_BILINEAR,
|
||||
GST_AUDIOSCALE_SINC,
|
||||
|
@ -48,11 +50,10 @@ G_BEGIN_DECLS
|
|||
typedef struct _Audioscale Audioscale;
|
||||
typedef struct _AudioscaleClass AudioscaleClass;
|
||||
|
||||
struct _Audioscale
|
||||
{
|
||||
struct _Audioscale {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
/* audio state */
|
||||
gboolean passthru;
|
||||
|
@ -63,13 +64,14 @@ struct _Audioscale
|
|||
GstBuffer *outbuf;
|
||||
};
|
||||
|
||||
struct _AudioscaleClass
|
||||
{
|
||||
struct _AudioscaleClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_audioscale_get_type (void);
|
||||
GType gst_audioscale_get_type(void);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __AUDIOSCALE_H__ */
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS GstElementDetails gst_sinesrc_details;
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
GstElementDetails gst_sinesrc_details;
|
||||
|
||||
|
||||
#define GST_TYPE_SINESRC \
|
||||
|
@ -44,8 +47,7 @@ G_BEGIN_DECLS GstElementDetails gst_sinesrc_details;
|
|||
typedef struct _GstSineSrc GstSineSrc;
|
||||
typedef struct _GstSineSrcClass GstSineSrcClass;
|
||||
|
||||
struct _GstSineSrc
|
||||
{
|
||||
struct _GstSineSrc {
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
|
@ -56,7 +58,7 @@ struct _GstSineSrc
|
|||
gdouble volume;
|
||||
gdouble freq;
|
||||
gboolean sync;
|
||||
|
||||
|
||||
/* lookup table data */
|
||||
gdouble *table_data;
|
||||
gdouble table_pos;
|
||||
|
@ -65,13 +67,13 @@ struct _GstSineSrc
|
|||
gdouble table_interp;
|
||||
gint table_lookup;
|
||||
gint table_lookup_next;
|
||||
|
||||
|
||||
/* audio parameters */
|
||||
gint samplerate;
|
||||
|
||||
gint samples_per_buffer;
|
||||
gulong seq;
|
||||
|
||||
|
||||
guint64 timestamp;
|
||||
guint64 offset;
|
||||
|
||||
|
@ -82,13 +84,14 @@ struct _GstSineSrc
|
|||
GstClock *clock;
|
||||
};
|
||||
|
||||
struct _GstSineSrcClass
|
||||
{
|
||||
struct _GstSineSrcClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_sinesrc_get_type (void);
|
||||
gboolean gst_sinesrc_factory_init (GstElementFactory * factory);
|
||||
GType gst_sinesrc_get_type(void);
|
||||
gboolean gst_sinesrc_factory_init (GstElementFactory *factory);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __GST_SINESRC_H__ */
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
|
||||
#include <gst/tag/tag.h>
|
||||
|
||||
G_BEGIN_DECLS typedef struct _GstTagEntryMatch GstTagEntryMatch;
|
||||
struct _GstTagEntryMatch
|
||||
{
|
||||
gchar *gstreamer_tag;
|
||||
gchar *original_tag;
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
typedef struct _GstTagEntryMatch GstTagEntryMatch;
|
||||
struct _GstTagEntryMatch {
|
||||
gchar * gstreamer_tag;
|
||||
gchar * original_tag;
|
||||
};
|
||||
|
||||
|
||||
|
@ -35,4 +37,5 @@ GType gst_vorbis_tag_get_type (void);
|
|||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_TAG_EDIT_PRIVATE_H__ */
|
||||
|
|
|
@ -35,6 +35,6 @@ extern "C"
|
|||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GST_TCP_H__ */
|
||||
#endif /* __GST_TCP_H__ */
|
||||
|
|
|
@ -35,6 +35,6 @@ extern "C"
|
|||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GST_TCP_H__ */
|
||||
#endif /* __GST_TCP_H__ */
|
||||
|
|
|
@ -25,9 +25,8 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -55,46 +54,43 @@ extern "C"
|
|||
#define GST_IS_TCPSINK_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TCPSINK))
|
||||
|
||||
typedef struct _GstTCPSink GstTCPSink;
|
||||
typedef struct _GstTCPSinkClass GstTCPSinkClass;
|
||||
typedef struct _GstTCPSink GstTCPSink;
|
||||
typedef struct _GstTCPSinkClass GstTCPSinkClass;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_TCPSINK_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||
typedef enum {
|
||||
GST_TCPSINK_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||
|
||||
GST_TCPSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
|
||||
} GstTCPSinkFlags;
|
||||
GST_TCPSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
|
||||
} GstTCPSinkFlags;
|
||||
|
||||
struct _GstTCPSink
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstTCPSink {
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *sinkpad, *srcpad;
|
||||
/* pads */
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
int sock;
|
||||
struct sockaddr_in theiraddr;
|
||||
Gst_TCP_Control control;
|
||||
int sock;
|
||||
struct sockaddr_in theiraddr;
|
||||
Gst_TCP_Control control;
|
||||
|
||||
gint port;
|
||||
gchar *host;
|
||||
gint port;
|
||||
gchar *host;
|
||||
|
||||
guint mtu;
|
||||
|
||||
GstClock *clock;
|
||||
};
|
||||
|
||||
guint mtu;
|
||||
struct _GstTCPSinkClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GstClock *clock;
|
||||
};
|
||||
|
||||
struct _GstTCPSinkClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_tcpsink_get_type (void);
|
||||
GType gst_tcpsink_get_type(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_TCPSINK_H__ */
|
||||
#endif /* __GST_TCPSINK_H__ */
|
||||
|
|
|
@ -24,9 +24,8 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
@ -50,47 +49,44 @@ extern "C"
|
|||
#define GST_IS_TCPSRC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TCPSRC))
|
||||
|
||||
typedef struct _GstTCPSrc GstTCPSrc;
|
||||
typedef struct _GstTCPSrcClass GstTCPSrcClass;
|
||||
typedef struct _GstTCPSrc GstTCPSrc;
|
||||
typedef struct _GstTCPSrcClass GstTCPSrcClass;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_TCPSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||
GST_TCPSRC_1ST_BUF,
|
||||
GST_TCPSRC_CONNECTED,
|
||||
typedef enum {
|
||||
GST_TCPSRC_OPEN = GST_ELEMENT_FLAG_LAST,
|
||||
GST_TCPSRC_1ST_BUF,
|
||||
GST_TCPSRC_CONNECTED,
|
||||
|
||||
GST_TCPSRC_FLAG_LAST,
|
||||
} GstTCPSrcFlags;
|
||||
GST_TCPSRC_FLAG_LAST,
|
||||
} GstTCPSrcFlags;
|
||||
|
||||
struct _GstTCPSrc
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstTCPSrc {
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *sinkpad, *srcpad;
|
||||
/* pads */
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
int port;
|
||||
int sock;
|
||||
int client_sock;
|
||||
int control_sock;
|
||||
int port;
|
||||
int sock;
|
||||
int client_sock;
|
||||
int control_sock;
|
||||
/* gboolean socket_options;*/
|
||||
Gst_TCP_Control control;
|
||||
Gst_TCP_Control control;
|
||||
|
||||
struct sockaddr_in myaddr;
|
||||
GstClock *clock;
|
||||
};
|
||||
struct sockaddr_in myaddr;
|
||||
GstClock *clock;
|
||||
};
|
||||
|
||||
struct _GstTCPSrcClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
struct _GstTCPSrcClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_tcpsrc_get_type (void);
|
||||
GType gst_tcpsrc_get_type(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_TCPSRC_H__ */
|
||||
#endif /* __GST_TCPSRC_H__ */
|
||||
|
|
|
@ -26,12 +26,11 @@
|
|||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* debugging */
|
||||
GST_DEBUG_CATEGORY_EXTERN (videoscale_debug);
|
||||
GST_DEBUG_CATEGORY_EXTERN (videoscale_debug);
|
||||
#define GST_CAT_DEFAULT videoscale_debug
|
||||
|
||||
#define GST_TYPE_VIDEOSCALE \
|
||||
|
@ -45,58 +44,55 @@ extern "C"
|
|||
#define GST_IS_VIDEOSCALE_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOSCALE))
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GST_VIDEOSCALE_POINT_SAMPLE,
|
||||
GST_VIDEOSCALE_NEAREST,
|
||||
GST_VIDEOSCALE_BILINEAR,
|
||||
GST_VIDEOSCALE_BICUBIC
|
||||
} GstVideoScaleMethod;
|
||||
typedef enum {
|
||||
GST_VIDEOSCALE_POINT_SAMPLE,
|
||||
GST_VIDEOSCALE_NEAREST,
|
||||
GST_VIDEOSCALE_BILINEAR,
|
||||
GST_VIDEOSCALE_BICUBIC
|
||||
} GstVideoScaleMethod;
|
||||
|
||||
typedef struct _GstVideoscale GstVideoscale;
|
||||
typedef struct _GstVideoscaleClass GstVideoscaleClass;
|
||||
typedef struct _GstVideoscale GstVideoscale;
|
||||
typedef struct _GstVideoscaleClass GstVideoscaleClass;
|
||||
|
||||
struct _GstVideoscale
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstVideoscale {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
/* video state */
|
||||
gboolean inited;
|
||||
struct videoscale_format_struct *format;
|
||||
gint to_width;
|
||||
gint to_height;
|
||||
gint from_width;
|
||||
gint from_height;
|
||||
gboolean passthru;
|
||||
float framerate;
|
||||
/* video state */
|
||||
gboolean inited;
|
||||
struct videoscale_format_struct *format;
|
||||
gint to_width;
|
||||
gint to_height;
|
||||
gint from_width;
|
||||
gint from_height;
|
||||
gboolean passthru;
|
||||
float framerate;
|
||||
|
||||
GstVideoScaleMethod method;
|
||||
|
||||
/* private */
|
||||
gint from_buf_size;
|
||||
gint to_buf_size;
|
||||
GstVideoScaleMethod method;
|
||||
|
||||
/* private */
|
||||
gint from_buf_size;
|
||||
gint to_buf_size;
|
||||
#if 0
|
||||
guchar *temp;
|
||||
guchar (*filter) (guchar * src, gdouble x, gdouble y, gint sw, gint sh);
|
||||
guchar copy_row[8192];
|
||||
guchar *temp;
|
||||
guchar (*filter) (guchar *src, gdouble x, gdouble y, gint sw, gint sh);
|
||||
guchar copy_row[8192];
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
struct _GstVideoscaleClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
struct _GstVideoscaleClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_videoscale_get_type (void);
|
||||
GType gst_videoscale_get_type(void);
|
||||
|
||||
void gst_videoscale_setup (GstVideoscale *);
|
||||
void gst_videoscale_setup(GstVideoscale *);
|
||||
#define gst_videoscale_scale(scale, src, dest) (scale)->scale_cc((scale), (src), (dest))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_VIDEOSCALE_H__ */
|
||||
#endif /* __GST_VIDEOSCALE_H__ */
|
||||
|
|
|
@ -23,26 +23,24 @@
|
|||
|
||||
#include "gstvideoscale.h"
|
||||
|
||||
struct videoscale_format_struct
|
||||
{
|
||||
unsigned int fourcc;
|
||||
int bpp;
|
||||
void (*scale) (GstVideoscale *, unsigned char *dest, unsigned char *src);
|
||||
int depth;
|
||||
unsigned int endianness;
|
||||
unsigned int red_mask;
|
||||
unsigned int green_mask;
|
||||
unsigned int blue_mask;
|
||||
struct videoscale_format_struct {
|
||||
unsigned int fourcc;
|
||||
int bpp;
|
||||
void (*scale)(GstVideoscale *,unsigned char *dest, unsigned char *src);
|
||||
int depth;
|
||||
unsigned int endianness;
|
||||
unsigned int red_mask;
|
||||
unsigned int green_mask;
|
||||
unsigned int blue_mask;
|
||||
};
|
||||
|
||||
extern struct videoscale_format_struct videoscale_formats[];
|
||||
extern int videoscale_n_formats;
|
||||
|
||||
GstStructure *videoscale_get_structure (struct videoscale_format_struct
|
||||
*format);
|
||||
GstStructure *videoscale_get_structure(struct videoscale_format_struct *format);
|
||||
|
||||
struct videoscale_format_struct *videoscale_find_by_structure (GstStructure *
|
||||
structure);
|
||||
struct videoscale_format_struct *videoscale_find_by_structure (GstStructure *structure);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
|
||||
/* scalers */
|
||||
void gst_videoscale_generate_rowbytes_x86 (unsigned char *copy_row, int src_w,
|
||||
int dst_w, int bpp);
|
||||
void gst_videoscale_scale_nearest_x86 (GstVideoscale * scale,
|
||||
unsigned char *src, unsigned char *dest, int sw, int sh, int dw, int dh);
|
||||
void gst_videoscale_generate_rowbytes_x86 (unsigned char *copy_row, int src_w, int dst_w, int bpp);
|
||||
void gst_videoscale_scale_nearest_x86 (GstVideoscale *scale,
|
||||
unsigned char *src, unsigned char *dest,
|
||||
int sw, int sh, int dw, int dh);
|
||||
#endif /* __GST_VIDEOSCALE__X86_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_VIDEOTESTSRC \
|
||||
(gst_videotestsrc_get_type())
|
||||
#define GST_VIDEOTESTSRC(obj) \
|
||||
|
@ -36,8 +37,8 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEOTESTSRC))
|
||||
#define GST_IS_VIDEOTESTSRC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEOTESTSRC))
|
||||
typedef enum
|
||||
{
|
||||
|
||||
typedef enum {
|
||||
GST_VIDEOTESTSRC_SMPTE,
|
||||
GST_VIDEOTESTSRC_SNOW,
|
||||
GST_VIDEOTESTSRC_BLACK,
|
||||
|
@ -46,11 +47,10 @@ G_BEGIN_DECLS
|
|||
typedef struct _GstVideotestsrc GstVideotestsrc;
|
||||
typedef struct _GstVideotestsrcClass GstVideotestsrcClass;
|
||||
|
||||
struct _GstVideotestsrc
|
||||
{
|
||||
struct _GstVideotestsrc {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstPad *sinkpad,*srcpad;
|
||||
|
||||
/* parameters */
|
||||
gboolean sync;
|
||||
|
@ -60,7 +60,7 @@ struct _GstVideotestsrc
|
|||
gint width;
|
||||
gint height;
|
||||
struct fourcc_list_struct *fourcc;
|
||||
|
||||
|
||||
/* private */
|
||||
gint64 timestamp_offset;
|
||||
gint64 n_frames;
|
||||
|
@ -69,17 +69,15 @@ struct _GstVideotestsrc
|
|||
int type;
|
||||
GstClock *clock;
|
||||
|
||||
void (*make_image) (GstVideotestsrc * v, unsigned char *dest, int w, int h);
|
||||
void (*make_image)(GstVideotestsrc *v, unsigned char *dest, int w, int h);
|
||||
};
|
||||
|
||||
struct _GstVideotestsrcClass
|
||||
{
|
||||
struct _GstVideotestsrcClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType
|
||||
gst_videotestsrc_get_type (void)
|
||||
G_GNUC_CONST;
|
||||
GType gst_videotestsrc_get_type(void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_VIDEOTESTSRC_H__ */
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
#ifndef __VIDEOTESTSRC_H__
|
||||
#define __VIDEOTESTSRC_H__
|
||||
|
||||
struct vts_color_struct
|
||||
{
|
||||
int Y, U, V;
|
||||
int R, G, B;
|
||||
struct vts_color_struct{
|
||||
int Y,U,V;
|
||||
int R,G,B;
|
||||
};
|
||||
|
||||
typedef struct paintinfo_struct paintinfo;
|
||||
|
@ -55,20 +54,18 @@ struct fourcc_list_struct
|
|||
unsigned int blue_mask;
|
||||
};
|
||||
|
||||
struct fourcc_list_struct *paintrect_find_fourcc (int find_fourcc);
|
||||
struct fourcc_list_struct *paintrect_find_name (const char *name);
|
||||
struct fourcc_list_struct *paintinfo_find_by_structure (const GstStructure *
|
||||
structure);
|
||||
GstStructure *paint_get_structure (struct fourcc_list_struct *format);
|
||||
struct fourcc_list_struct * paintrect_find_fourcc (int find_fourcc);
|
||||
struct fourcc_list_struct * paintrect_find_name (const char *name);
|
||||
struct fourcc_list_struct *paintinfo_find_by_structure(
|
||||
const GstStructure *structure);
|
||||
GstStructure *paint_get_structure(struct fourcc_list_struct *format);
|
||||
int gst_videotestsrc_get_size (GstVideotestsrc * v, int w, int h);
|
||||
void gst_videotestsrc_smpte (GstVideotestsrc * v, unsigned char *dest, int w,
|
||||
int h);
|
||||
void gst_videotestsrc_snow (GstVideotestsrc * v, unsigned char *dest, int w,
|
||||
int h);
|
||||
void gst_videotestsrc_black (GstVideotestsrc * v, unsigned char *dest, int w,
|
||||
int h);
|
||||
void gst_videotestsrc_smpte (GstVideotestsrc * v, unsigned char *dest, int w, int h);
|
||||
void gst_videotestsrc_snow (GstVideotestsrc * v, unsigned char *dest, int w, int h);
|
||||
void gst_videotestsrc_black (GstVideotestsrc * v, unsigned char *dest, int w, int h);
|
||||
|
||||
extern struct fourcc_list_struct fourcc_list[];
|
||||
extern int n_fourccs;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -28,9 +28,8 @@
|
|||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define GST_TYPE_VOLUME \
|
||||
|
@ -44,40 +43,37 @@ extern "C"
|
|||
#define GST_IS_VOLUME_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VOLUME))
|
||||
|
||||
typedef struct _GstVolume GstVolume;
|
||||
typedef struct _GstVolumeClass GstVolumeClass;
|
||||
typedef enum _GstVolumeFormat GstVolumeFormat;
|
||||
typedef struct _GstVolume GstVolume;
|
||||
typedef struct _GstVolumeClass GstVolumeClass;
|
||||
typedef enum _GstVolumeFormat GstVolumeFormat;
|
||||
|
||||
enum _GstVolumeFormat
|
||||
{
|
||||
GST_VOLUME_FORMAT_INT = 1,
|
||||
GST_VOLUME_FORMAT_FLOAT
|
||||
};
|
||||
enum _GstVolumeFormat {
|
||||
GST_VOLUME_FORMAT_INT=1,
|
||||
GST_VOLUME_FORMAT_FLOAT
|
||||
};
|
||||
|
||||
struct _GstVolume
|
||||
{
|
||||
GstElement element;
|
||||
struct _GstVolume {
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstDParamManager *dpman;
|
||||
GstPad *sinkpad, *srcpad;
|
||||
GstDParamManager *dpman;
|
||||
|
||||
gboolean mute;
|
||||
gint volume_i, real_vol_i; /* the _i(nt) values get synchronized with the */
|
||||
gfloat volume_f, real_vol_f; /* _f(loat) values on each update */
|
||||
gboolean mute;
|
||||
gint volume_i, real_vol_i; /* the _i(nt) values get synchronized with the */
|
||||
gfloat volume_f, real_vol_f; /* _f(loat) values on each update */
|
||||
|
||||
GList *tracklist;
|
||||
};
|
||||
|
||||
GList *tracklist;
|
||||
};
|
||||
struct _GstVolumeClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
struct _GstVolumeClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_volume_get_type (void);
|
||||
GType gst_volume_get_type(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_VOLUME_H__ */
|
||||
#endif /* __GST_VOLUME_H__ */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "v4l_calls.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_V4L_COLOR_BALANCE_CHANNEL \
|
||||
(gst_v4l_color_balance_channel_get_type ())
|
||||
#define GST_V4L_COLOR_BALANCE_CHANNEL(obj) \
|
||||
|
@ -39,20 +40,19 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL))
|
||||
#define GST_IS_V4L_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L_COLOR_BALANCE_CHANNEL))
|
||||
typedef struct _GstV4lColorBalanceChannel
|
||||
{
|
||||
|
||||
typedef struct _GstV4lColorBalanceChannel {
|
||||
GstColorBalanceChannel parent;
|
||||
|
||||
GstV4lPictureType index;
|
||||
} GstV4lColorBalanceChannel;
|
||||
|
||||
typedef struct _GstV4lColorBalanceChannelClass
|
||||
{
|
||||
typedef struct _GstV4lColorBalanceChannelClass {
|
||||
GstColorBalanceChannelClass parent;
|
||||
} 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__ */
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_V4LELEMENT \
|
||||
(gst_v4lelement_get_type())
|
||||
#define GST_V4LELEMENT(obj) \
|
||||
|
@ -53,11 +54,11 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4LELEMENT))
|
||||
#define GST_V4LELEMENT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4LELEMENT, GstV4lElementClass))
|
||||
|
||||
typedef struct _GstV4lElement GstV4lElement;
|
||||
typedef struct _GstV4lElementClass GstV4lElementClass;
|
||||
|
||||
struct _GstV4lElement
|
||||
{
|
||||
struct _GstV4lElement {
|
||||
GstElement element;
|
||||
|
||||
/* the video device */
|
||||
|
@ -88,26 +89,30 @@ struct _GstV4lElement
|
|||
gchar *display;
|
||||
};
|
||||
|
||||
struct _GstV4lElementClass
|
||||
{
|
||||
struct _GstV4lElementClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
/* probed devices */
|
||||
GList *devices;
|
||||
|
||||
/* signals */
|
||||
void (*open) (GstElement * element, const gchar * device);
|
||||
void (*close) (GstElement * element, const gchar * device);
|
||||
void (*open) (GstElement *element,
|
||||
const gchar *device);
|
||||
void (*close) (GstElement *element,
|
||||
const gchar *device);
|
||||
|
||||
/* actions */
|
||||
gboolean (*get_attribute) (GstElement * element,
|
||||
const gchar * attr_name, int *value);
|
||||
gboolean (*set_attribute) (GstElement * element,
|
||||
const gchar * attr_name, const int value);
|
||||
gboolean (*get_attribute) (GstElement *element,
|
||||
const gchar *attr_name,
|
||||
int *value);
|
||||
gboolean (*set_attribute) (GstElement *element,
|
||||
const gchar *attr_name,
|
||||
const int value);
|
||||
};
|
||||
|
||||
GType gst_v4lelement_get_type (void);
|
||||
GType gst_v4lelement_get_type(void);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_V4LELEMENT_H__ */
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define GST_TYPE_V4LMJPEGSINK \
|
||||
(gst_v4lmjpegsink_get_type())
|
||||
#define GST_V4LMJPEGSINK(obj) \
|
||||
|
@ -36,11 +38,11 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4LMJPEGSINK))
|
||||
#define GST_IS_V4LMJPEGSINK_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4LMJPEGSINK))
|
||||
|
||||
typedef struct _GstV4lMjpegSink GstV4lMjpegSink;
|
||||
typedef struct _GstV4lMjpegSinkClass GstV4lMjpegSinkClass;
|
||||
|
||||
struct _GstV4lMjpegSink
|
||||
{
|
||||
struct _GstV4lMjpegSink {
|
||||
GstV4lElement v4lelement;
|
||||
|
||||
/* the sink pas */
|
||||
|
@ -58,7 +60,7 @@ struct _GstV4lMjpegSink
|
|||
struct mjpeg_requestbuffers breq;
|
||||
|
||||
/* thread to keep track of synced frames */
|
||||
gint8 *isqueued_queued_frames; /* 1 = queued, 0 = unqueued, -1 = error */
|
||||
gint8 *isqueued_queued_frames; /* 1 = queued, 0 = unqueued, -1 = error */
|
||||
GThread *thread_queued_frames;
|
||||
GMutex *mutex_queued_frames;
|
||||
GCond **cond_queued_frames;
|
||||
|
@ -74,19 +76,19 @@ struct _GstV4lMjpegSink
|
|||
gint y_offset;
|
||||
|
||||
gint numbufs;
|
||||
gint bufsize; /* in KB */
|
||||
gint bufsize; /* in KB */
|
||||
};
|
||||
|
||||
struct _GstV4lMjpegSinkClass
|
||||
{
|
||||
struct _GstV4lMjpegSinkClass {
|
||||
GstV4lElementClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (*frame_displayed) (GstElement * element);
|
||||
void (*frame_displayed) (GstElement *element);
|
||||
};
|
||||
|
||||
GType gst_v4lmjpegsink_get_type (void);
|
||||
GType gst_v4lmjpegsink_get_type(void);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_SDLVIDEOSINK_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <videodev_mjpeg.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_V4LMJPEGSRC \
|
||||
(gst_v4lmjpegsrc_get_type())
|
||||
#define GST_V4LMJPEGSRC(obj) \
|
||||
|
@ -35,11 +36,11 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4LMJPEGSRC))
|
||||
#define GST_IS_V4LMJPEGSRC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4LMJPEGSRC))
|
||||
|
||||
typedef struct _GstV4lMjpegSrc GstV4lMjpegSrc;
|
||||
typedef struct _GstV4lMjpegSrcClass GstV4lMjpegSrcClass;
|
||||
|
||||
struct _GstV4lMjpegSrc
|
||||
{
|
||||
struct _GstV4lMjpegSrc {
|
||||
GstV4lElement v4lelement;
|
||||
|
||||
/* pads */
|
||||
|
@ -94,18 +95,19 @@ struct _GstV4lMjpegSrc
|
|||
gint numbufs;
|
||||
};
|
||||
|
||||
struct _GstV4lMjpegSrcClass
|
||||
{
|
||||
struct _GstV4lMjpegSrcClass {
|
||||
GstV4lElementClass parent_class;
|
||||
|
||||
void (*frame_capture) (GObject * object);
|
||||
void (*frame_drop) (GObject * object);
|
||||
void (*frame_insert) (GObject * object);
|
||||
void (*frame_lost) (GObject * object, gint num_lost);
|
||||
void (*frame_capture) (GObject *object);
|
||||
void (*frame_drop) (GObject *object);
|
||||
void (*frame_insert) (GObject *object);
|
||||
void (*frame_lost) (GObject *object,
|
||||
gint num_lost);
|
||||
};
|
||||
|
||||
GType gst_v4lmjpegsrc_get_type (void);
|
||||
GType gst_v4lmjpegsrc_get_type(void);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_V4LMJPEGSRC_H__ */
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <gstv4lelement.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_V4LSRC \
|
||||
(gst_v4lsrc_get_type())
|
||||
#define GST_V4LSRC(obj) \
|
||||
|
@ -33,19 +34,18 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4LSRC))
|
||||
#define GST_IS_V4LSRC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4LSRC))
|
||||
|
||||
typedef struct _GstV4lSrc GstV4lSrc;
|
||||
typedef struct _GstV4lSrcClass GstV4lSrcClass;
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
QUEUE_STATE_ERROR = -1,
|
||||
QUEUE_STATE_READY_FOR_QUEUE,
|
||||
QUEUE_STATE_QUEUED,
|
||||
QUEUE_STATE_SYNCED,
|
||||
};
|
||||
|
||||
struct _GstV4lSrc
|
||||
{
|
||||
struct _GstV4lSrc {
|
||||
GstV4lElement v4lelement;
|
||||
|
||||
/* pads */
|
||||
|
@ -90,17 +90,17 @@ struct _GstV4lSrc
|
|||
gboolean use_fixed_fps;
|
||||
};
|
||||
|
||||
struct _GstV4lSrcClass
|
||||
{
|
||||
struct _GstV4lSrcClass {
|
||||
GstV4lElementClass parent_class;
|
||||
|
||||
void (*frame_capture) (GObject * object);
|
||||
void (*frame_drop) (GObject * object);
|
||||
void (*frame_insert) (GObject * object);
|
||||
void (*frame_capture) (GObject *object);
|
||||
void (*frame_drop) (GObject *object);
|
||||
void (*frame_insert) (GObject *object);
|
||||
};
|
||||
|
||||
GType gst_v4lsrc_get_type (void);
|
||||
GType gst_v4lsrc_get_type(void);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_V4LSRC_H__ */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/tuner/tuner.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_V4L_TUNER_CHANNEL \
|
||||
(gst_v4l_tuner_channel_get_type ())
|
||||
#define GST_V4L_TUNER_CHANNEL(obj) \
|
||||
|
@ -38,17 +39,16 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L_TUNER_CHANNEL))
|
||||
#define GST_IS_V4L_TUNER_CHANNEL_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L_TUNER_CHANNEL))
|
||||
typedef struct _GstV4lTunerChannel
|
||||
{
|
||||
|
||||
typedef struct _GstV4lTunerChannel {
|
||||
GstTunerChannel parent;
|
||||
|
||||
gint index;
|
||||
gint tuner;
|
||||
gint audio;
|
||||
gint index;
|
||||
gint tuner;
|
||||
gint audio;
|
||||
} GstV4lTunerChannel;
|
||||
|
||||
typedef struct _GstV4lTunerChannelClass
|
||||
{
|
||||
typedef struct _GstV4lTunerChannelClass {
|
||||
GstTunerChannelClass parent;
|
||||
} GstV4lTunerChannelClass;
|
||||
|
||||
|
@ -65,21 +65,19 @@ typedef struct _GstV4lTunerChannelClass
|
|||
#define GST_IS_V4L_TUNER_NORM_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L_TUNER_NORM))
|
||||
|
||||
typedef struct _GstV4lTunerNorm
|
||||
{
|
||||
typedef struct _GstV4lTunerNorm {
|
||||
GstTunerNorm parent;
|
||||
|
||||
gint index;
|
||||
gint index;
|
||||
} GstV4lTunerNorm;
|
||||
|
||||
typedef struct _GstV4lTunerNormClass
|
||||
{
|
||||
typedef struct _GstV4lTunerNormClass {
|
||||
GstTunerNormClass parent;
|
||||
} GstV4lTunerNormClass;
|
||||
|
||||
GType gst_v4l_tuner_channel_get_type (void);
|
||||
GType gst_v4l_tuner_norm_get_type (void);
|
||||
GType gst_v4l_tuner_channel_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__ */
|
||||
|
|
|
@ -27,13 +27,16 @@
|
|||
|
||||
#include "gstv4lelement.h"
|
||||
|
||||
G_BEGIN_DECLS void gst_v4l_xoverlay_interface_init (GstXOverlayClass * klass);
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GstXWindowListener *gst_v4l_xoverlay_new (GstV4lElement * v4lelement);
|
||||
void gst_v4l_xoverlay_free (GstV4lElement * v4lelement);
|
||||
void gst_v4l_xoverlay_interface_init (GstXOverlayClass *klass);
|
||||
|
||||
GstXWindowListener *
|
||||
gst_v4l_xoverlay_new (GstV4lElement *v4lelement);
|
||||
void gst_v4l_xoverlay_free (GstV4lElement *v4lelement);
|
||||
|
||||
/* signal handlers */
|
||||
void gst_v4l_xoverlay_open (GstV4lElement * v4lelement);
|
||||
void gst_v4l_xoverlay_close (GstV4lElement * v4lelement);
|
||||
void gst_v4l_xoverlay_open (GstV4lElement *v4lelement);
|
||||
void gst_v4l_xoverlay_close (GstV4lElement *v4lelement);
|
||||
|
||||
#endif /* __GST_V4L_X_OVERLAY_H__ */
|
||||
|
|
|
@ -24,9 +24,8 @@
|
|||
#include "gst/gst-i18n-plugin.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* simple check whether the device is open */
|
||||
|
@ -86,62 +85,75 @@ extern "C"
|
|||
}
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
V4L_PICTURE_HUE = 0,
|
||||
V4L_PICTURE_BRIGHTNESS,
|
||||
V4L_PICTURE_CONTRAST,
|
||||
V4L_PICTURE_SATURATION,
|
||||
} GstV4lPictureType;
|
||||
typedef enum {
|
||||
V4L_PICTURE_HUE = 0,
|
||||
V4L_PICTURE_BRIGHTNESS,
|
||||
V4L_PICTURE_CONTRAST,
|
||||
V4L_PICTURE_SATURATION,
|
||||
} GstV4lPictureType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
V4L_AUDIO_VOLUME = 0,
|
||||
V4L_AUDIO_MUTE,
|
||||
V4L_AUDIO_MODE, /* stereo, mono, ... (see videodev.h) */
|
||||
} GstV4lAudioType;
|
||||
typedef enum {
|
||||
V4L_AUDIO_VOLUME = 0,
|
||||
V4L_AUDIO_MUTE,
|
||||
V4L_AUDIO_MODE, /* stereo, mono, ... (see videodev.h) */
|
||||
} GstV4lAudioType;
|
||||
|
||||
|
||||
/* open/close the device */
|
||||
gboolean gst_v4l_open (GstV4lElement * v4lelement);
|
||||
gboolean gst_v4l_close (GstV4lElement * v4lelement);
|
||||
gboolean gst_v4l_open (GstV4lElement *v4lelement);
|
||||
gboolean gst_v4l_close (GstV4lElement *v4lelement);
|
||||
|
||||
/* norm control (norm = VIDEO_MODE_{PAL|NTSC|SECAM|AUTO}) */
|
||||
gboolean gst_v4l_get_chan_norm (GstV4lElement * v4lelement,
|
||||
gint * channel, gint * norm);
|
||||
gboolean gst_v4l_set_chan_norm (GstV4lElement * v4lelement,
|
||||
gint channel, gint norm);
|
||||
GList *gst_v4l_get_chan_names (GstV4lElement * v4lelement);
|
||||
gboolean gst_v4l_get_chan_norm (GstV4lElement *v4lelement,
|
||||
gint *channel,
|
||||
gint *norm);
|
||||
gboolean gst_v4l_set_chan_norm (GstV4lElement *v4lelement,
|
||||
gint channel,
|
||||
gint norm);
|
||||
GList *gst_v4l_get_chan_names (GstV4lElement *v4lelement);
|
||||
|
||||
/* frequency control */
|
||||
gboolean gst_v4l_get_signal (GstV4lElement * v4lelement,
|
||||
gint tunernum, guint * signal);
|
||||
gboolean gst_v4l_get_frequency (GstV4lElement * v4lelement,
|
||||
gint tunernum, gulong * frequency);
|
||||
gboolean gst_v4l_set_frequency (GstV4lElement * v4lelement,
|
||||
gint tunernum, gulong frequency);
|
||||
gboolean gst_v4l_get_signal (GstV4lElement *v4lelement,
|
||||
gint tunernum,
|
||||
guint *signal);
|
||||
gboolean gst_v4l_get_frequency (GstV4lElement *v4lelement,
|
||||
gint tunernum,
|
||||
gulong *frequency);
|
||||
gboolean gst_v4l_set_frequency (GstV4lElement *v4lelement,
|
||||
gint tunernum,
|
||||
gulong frequency);
|
||||
|
||||
/* picture control */
|
||||
gboolean gst_v4l_get_picture (GstV4lElement * v4lelement,
|
||||
GstV4lPictureType type, gint * value);
|
||||
gboolean gst_v4l_set_picture (GstV4lElement * v4lelement,
|
||||
GstV4lPictureType type, gint value);
|
||||
gboolean gst_v4l_get_picture (GstV4lElement *v4lelement,
|
||||
GstV4lPictureType type,
|
||||
gint *value);
|
||||
gboolean gst_v4l_set_picture (GstV4lElement *v4lelement,
|
||||
GstV4lPictureType type,
|
||||
gint value);
|
||||
|
||||
/* audio control */
|
||||
gboolean gst_v4l_get_audio (GstV4lElement * v4lelement,
|
||||
gint audionum, GstV4lAudioType type, gint * value);
|
||||
gboolean gst_v4l_set_audio (GstV4lElement * v4lelement,
|
||||
gint audionum, GstV4lAudioType type, gint value);
|
||||
gboolean gst_v4l_get_audio (GstV4lElement *v4lelement,
|
||||
gint audionum,
|
||||
GstV4lAudioType type,
|
||||
gint *value);
|
||||
gboolean gst_v4l_set_audio (GstV4lElement *v4lelement,
|
||||
gint audionum,
|
||||
GstV4lAudioType type,
|
||||
gint value);
|
||||
|
||||
/* overlay */
|
||||
gboolean gst_v4l_set_overlay (GstV4lElement * v4lelement);
|
||||
gboolean gst_v4l_set_window (GstElement * element,
|
||||
gint x, gint y, gint w, gint h, struct video_clip *clips, gint num_clips);
|
||||
gboolean gst_v4l_enable_overlay (GstV4lElement * v4lelement, gboolean enable);
|
||||
gboolean gst_v4l_set_overlay (GstV4lElement *v4lelement);
|
||||
gboolean gst_v4l_set_window (GstElement *element,
|
||||
gint x, gint y,
|
||||
gint w, gint h,
|
||||
struct video_clip *clips,
|
||||
gint num_clips);
|
||||
gboolean gst_v4l_enable_overlay (GstV4lElement *v4lelement,
|
||||
gboolean enable);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __V4L_CALLS_H__ */
|
||||
#endif /* __V4L_CALLS_H__ */
|
||||
|
|
|
@ -24,32 +24,36 @@
|
|||
#include "v4l_calls.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* frame playback on device */
|
||||
gboolean gst_v4lmjpegsink_set_buffer (GstV4lMjpegSink * v4lmjpegsink,
|
||||
gint numbufs, gint bufsize);
|
||||
gboolean gst_v4lmjpegsink_set_playback (GstV4lMjpegSink * v4lmjpegsink,
|
||||
gint width,
|
||||
gint height, gint x_offset, gint y_offset, gint norm, gint interlacing);
|
||||
gboolean gst_v4lmjpegsink_playback_init (GstV4lMjpegSink * v4lmjpegsink);
|
||||
gboolean gst_v4lmjpegsink_playback_start (GstV4lMjpegSink * v4lmjpegsink);
|
||||
guint8 *gst_v4lmjpegsink_get_buffer (GstV4lMjpegSink * v4lmjpegsink,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsink_play_frame (GstV4lMjpegSink * v4lmjpegsink,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsink_wait_frame (GstV4lMjpegSink * v4lmjpegsink,
|
||||
gint * num);
|
||||
gboolean gst_v4lmjpegsink_playback_stop (GstV4lMjpegSink * v4lmjpegsink);
|
||||
gboolean gst_v4lmjpegsink_playback_deinit (GstV4lMjpegSink * v4lmjpegsink);
|
||||
gboolean gst_v4lmjpegsink_set_buffer (GstV4lMjpegSink *v4lmjpegsink,
|
||||
gint numbufs,
|
||||
gint bufsize);
|
||||
gboolean gst_v4lmjpegsink_set_playback (GstV4lMjpegSink *v4lmjpegsink,
|
||||
gint width,
|
||||
gint height,
|
||||
gint x_offset,
|
||||
gint y_offset,
|
||||
gint norm,
|
||||
gint interlacing);
|
||||
gboolean gst_v4lmjpegsink_playback_init (GstV4lMjpegSink *v4lmjpegsink);
|
||||
gboolean gst_v4lmjpegsink_playback_start (GstV4lMjpegSink *v4lmjpegsink);
|
||||
guint8 * gst_v4lmjpegsink_get_buffer (GstV4lMjpegSink *v4lmjpegsink,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsink_play_frame (GstV4lMjpegSink *v4lmjpegsink,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsink_wait_frame (GstV4lMjpegSink *v4lmjpegsink,
|
||||
gint *num);
|
||||
gboolean gst_v4lmjpegsink_playback_stop (GstV4lMjpegSink *v4lmjpegsink);
|
||||
gboolean gst_v4lmjpegsink_playback_deinit (GstV4lMjpegSink *v4lmjpegsink);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __V4L_MJPEG_SINK_CALLS_H__ */
|
||||
#endif /* __V4L_MJPEG_SINK_CALLS_H__ */
|
||||
|
|
|
@ -24,34 +24,40 @@
|
|||
#include "v4l_calls.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* frame grabbing/capture */
|
||||
gboolean gst_v4lmjpegsrc_set_buffer (GstV4lMjpegSrc * v4lmjpegsrc,
|
||||
gint numbufs, gint bufsize);
|
||||
gboolean gst_v4lmjpegsrc_set_capture (GstV4lMjpegSrc * v4lmjpegsrc,
|
||||
gint decimation, gint quality);
|
||||
gboolean gst_v4lmjpegsrc_set_capture_m (GstV4lMjpegSrc * v4lmjpegsrc,
|
||||
gint x_offset,
|
||||
gint y_offset,
|
||||
gint width,
|
||||
gint height, gint h_decimation, gint v_decimation, gint quality);
|
||||
gboolean gst_v4lmjpegsrc_capture_init (GstV4lMjpegSrc * v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_capture_start (GstV4lMjpegSrc * v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_grab_frame (GstV4lMjpegSrc * v4lmjpegsrc,
|
||||
gint * num, gint * size);
|
||||
guint8 *gst_v4lmjpegsrc_get_buffer (GstV4lMjpegSrc * v4lmjpegsrc, gint num);
|
||||
gboolean gst_v4lmjpegsrc_requeue_frame (GstV4lMjpegSrc * v4lmjpegsrc,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsrc_capture_stop (GstV4lMjpegSrc * v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_capture_deinit (GstV4lMjpegSrc * v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_set_buffer (GstV4lMjpegSrc *v4lmjpegsrc,
|
||||
gint numbufs,
|
||||
gint bufsize);
|
||||
gboolean gst_v4lmjpegsrc_set_capture (GstV4lMjpegSrc *v4lmjpegsrc,
|
||||
gint decimation,
|
||||
gint quality);
|
||||
gboolean gst_v4lmjpegsrc_set_capture_m (GstV4lMjpegSrc *v4lmjpegsrc,
|
||||
gint x_offset,
|
||||
gint y_offset,
|
||||
gint width,
|
||||
gint height,
|
||||
gint h_decimation,
|
||||
gint v_decimation,
|
||||
gint quality);
|
||||
gboolean gst_v4lmjpegsrc_capture_init (GstV4lMjpegSrc *v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_capture_start (GstV4lMjpegSrc *v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_grab_frame (GstV4lMjpegSrc *v4lmjpegsrc,
|
||||
gint *num,
|
||||
gint *size);
|
||||
guint8 * gst_v4lmjpegsrc_get_buffer (GstV4lMjpegSrc *v4lmjpegsrc,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsrc_requeue_frame (GstV4lMjpegSrc *v4lmjpegsrc,
|
||||
gint num);
|
||||
gboolean gst_v4lmjpegsrc_capture_stop (GstV4lMjpegSrc *v4lmjpegsrc);
|
||||
gboolean gst_v4lmjpegsrc_capture_deinit (GstV4lMjpegSrc *v4lmjpegsrc);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __V4L_MJPEG_SRC_CALLS_H__ */
|
||||
#endif /* __V4L_MJPEG_SRC_CALLS_H__ */
|
||||
|
|
|
@ -24,28 +24,26 @@
|
|||
#include "v4l_calls.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* frame grabbing/capture (palette = VIDEO_PALETTE_* - see videodev.h) */
|
||||
gboolean gst_v4lsrc_set_capture (GstV4lSrc * v4lsrc, gint width, gint height,
|
||||
gint palette);
|
||||
gboolean gst_v4lsrc_capture_init (GstV4lSrc * v4lsrc);
|
||||
gboolean gst_v4lsrc_capture_start (GstV4lSrc * v4lsrc);
|
||||
gboolean gst_v4lsrc_grab_frame (GstV4lSrc * v4lsrc, gint * num);
|
||||
guint8 *gst_v4lsrc_get_buffer (GstV4lSrc * v4lsrc, gint num);
|
||||
gboolean gst_v4lsrc_requeue_frame (GstV4lSrc * v4lsrc, gint num);
|
||||
gboolean gst_v4lsrc_capture_stop (GstV4lSrc * v4lsrc);
|
||||
gboolean gst_v4lsrc_capture_deinit (GstV4lSrc * v4lsrc);
|
||||
gboolean gst_v4lsrc_set_capture (GstV4lSrc *v4lsrc, gint width, gint height, gint palette);
|
||||
gboolean gst_v4lsrc_capture_init (GstV4lSrc *v4lsrc);
|
||||
gboolean gst_v4lsrc_capture_start (GstV4lSrc *v4lsrc);
|
||||
gboolean gst_v4lsrc_grab_frame (GstV4lSrc *v4lsrc, gint *num);
|
||||
guint8 * gst_v4lsrc_get_buffer (GstV4lSrc *v4lsrc, gint num);
|
||||
gboolean gst_v4lsrc_requeue_frame (GstV4lSrc *v4lsrc, gint num);
|
||||
gboolean gst_v4lsrc_capture_stop (GstV4lSrc *v4lsrc);
|
||||
gboolean gst_v4lsrc_capture_deinit (GstV4lSrc *v4lsrc);
|
||||
|
||||
/* "the ugliest hack ever, now available at your local mirror" */
|
||||
gboolean gst_v4lsrc_try_palette (GstV4lSrc * v4lsrc, gint palette);
|
||||
gboolean gst_v4lsrc_try_palette (GstV4lSrc *v4lsrc, gint palette);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __V4L_SRC_CALLS_H__ */
|
||||
#endif /* __V4L_SRC_CALLS_H__ */
|
||||
|
|
|
@ -11,102 +11,102 @@
|
|||
struct mjpeg_params
|
||||
{
|
||||
|
||||
/* The following parameters can only be queried */
|
||||
/* The following parameters can only be queried */
|
||||
|
||||
int major_version; /* Major version number of driver */
|
||||
int minor_version; /* Minor version number of driver */
|
||||
int major_version; /* Major version number of driver */
|
||||
int minor_version; /* Minor version number of driver */
|
||||
|
||||
/* Main control parameters */
|
||||
/* Main control parameters */
|
||||
|
||||
int input; /* Input channel: 0 = Composite, 1 = S-VHS */
|
||||
int norm; /* Norm: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */
|
||||
int decimation; /* decimation of captured video,
|
||||
enlargement of video played back.
|
||||
Valid values are 1, 2, 4 or 0.
|
||||
0 is a special value where the user
|
||||
has full control over video scaling */
|
||||
int input; /* Input channel: 0 = Composite, 1 = S-VHS */
|
||||
int norm; /* Norm: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */
|
||||
int decimation; /* decimation of captured video,
|
||||
enlargement of video played back.
|
||||
Valid values are 1, 2, 4 or 0.
|
||||
0 is a special value where the user
|
||||
has full control over video scaling */
|
||||
|
||||
/* The following parameters only have to be set if decimation==0,
|
||||
for other values of decimation they provide the data how the image is captured */
|
||||
/* The following parameters only have to be set if decimation==0,
|
||||
for other values of decimation they provide the data how the image is captured */
|
||||
|
||||
int HorDcm; /* Horizontal decimation: 1, 2 or 4 */
|
||||
int VerDcm; /* Vertical decimation: 1 or 2 */
|
||||
int TmpDcm; /* Temporal decimation: 1 or 2,
|
||||
if TmpDcm==2 in capture every second frame is dropped,
|
||||
in playback every frame is played twice */
|
||||
int field_per_buff; /* Number of fields per buffer: 1 or 2 */
|
||||
int img_x; /* start of image in x direction */
|
||||
int img_y; /* start of image in y direction */
|
||||
int img_width; /* image width BEFORE decimation,
|
||||
must be a multiple of HorDcm*16 */
|
||||
int img_height; /* image height BEFORE decimation,
|
||||
must be a multiple of VerDcm*8 */
|
||||
int HorDcm; /* Horizontal decimation: 1, 2 or 4 */
|
||||
int VerDcm; /* Vertical decimation: 1 or 2 */
|
||||
int TmpDcm; /* Temporal decimation: 1 or 2,
|
||||
if TmpDcm==2 in capture every second frame is dropped,
|
||||
in playback every frame is played twice */
|
||||
int field_per_buff; /* Number of fields per buffer: 1 or 2 */
|
||||
int img_x; /* start of image in x direction */
|
||||
int img_y; /* start of image in y direction */
|
||||
int img_width; /* image width BEFORE decimation,
|
||||
must be a multiple of HorDcm*16 */
|
||||
int img_height; /* image height BEFORE decimation,
|
||||
must be a multiple of VerDcm*8 */
|
||||
|
||||
/* --- End of parameters for decimation==0 only --- */
|
||||
/* --- End of parameters for decimation==0 only --- */
|
||||
|
||||
/* JPEG control parameters */
|
||||
/* JPEG control parameters */
|
||||
|
||||
int quality; /* Measure for quality of compressed images.
|
||||
Scales linearly with the size of the compressed images.
|
||||
Must be beetween 0 and 100, 100 is a compression
|
||||
ratio of 1:4 */
|
||||
int quality; /* Measure for quality of compressed images.
|
||||
Scales linearly with the size of the compressed images.
|
||||
Must be beetween 0 and 100, 100 is a compression
|
||||
ratio of 1:4 */
|
||||
|
||||
int odd_even; /* Which field should come first ???
|
||||
This is more aptly named "top_first",
|
||||
i.e. (odd_even==1) --> top-field-first */
|
||||
int odd_even; /* Which field should come first ???
|
||||
This is more aptly named "top_first",
|
||||
i.e. (odd_even==1) --> top-field-first */
|
||||
|
||||
int APPn; /* Number of APP segment to be written, must be 0..15 */
|
||||
int APP_len; /* Length of data in JPEG APPn segment */
|
||||
char APP_data[60]; /* Data in the JPEG APPn segment. */
|
||||
int APPn; /* Number of APP segment to be written, must be 0..15 */
|
||||
int APP_len; /* Length of data in JPEG APPn segment */
|
||||
char APP_data[60]; /* Data in the JPEG APPn segment. */
|
||||
|
||||
int COM_len; /* Length of data in JPEG COM segment */
|
||||
char COM_data[60]; /* Data in JPEG COM segment */
|
||||
int COM_len; /* Length of data in JPEG COM segment */
|
||||
char COM_data[60]; /* Data in JPEG COM segment */
|
||||
|
||||
unsigned long jpeg_markers; /* Which markers should go into the JPEG output.
|
||||
Unless you exactly know what you do, leave them untouched.
|
||||
Inluding less markers will make the resulting code
|
||||
smaller, but there will be fewer aplications
|
||||
which can read it.
|
||||
The presence of the APP and COM marker is
|
||||
influenced by APP0_len and COM_len ONLY! */
|
||||
#define JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
|
||||
#define JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
|
||||
#define JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
|
||||
#define JPEG_MARKER_COM (1<<6) /* Comment segment */
|
||||
#define JPEG_MARKER_APP (1<<7) /* App segment, driver will allways use APP0 */
|
||||
unsigned long jpeg_markers; /* Which markers should go into the JPEG output.
|
||||
Unless you exactly know what you do, leave them untouched.
|
||||
Inluding less markers will make the resulting code
|
||||
smaller, but there will be fewer aplications
|
||||
which can read it.
|
||||
The presence of the APP and COM marker is
|
||||
influenced by APP0_len and COM_len ONLY! */
|
||||
#define JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
|
||||
#define JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
|
||||
#define JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
|
||||
#define JPEG_MARKER_COM (1<<6) /* Comment segment */
|
||||
#define JPEG_MARKER_APP (1<<7) /* App segment, driver will allways use APP0 */
|
||||
|
||||
int VFIFO_FB; /* Flag for enabling Video Fifo Feedback.
|
||||
If this flag is turned on and JPEG decompressing
|
||||
is going to the screen, the decompress process
|
||||
is stopped every time the Video Fifo is full.
|
||||
This enables a smooth decompress to the screen
|
||||
but the video output signal will get scrambled */
|
||||
int VFIFO_FB; /* Flag for enabling Video Fifo Feedback.
|
||||
If this flag is turned on and JPEG decompressing
|
||||
is going to the screen, the decompress process
|
||||
is stopped every time the Video Fifo is full.
|
||||
This enables a smooth decompress to the screen
|
||||
but the video output signal will get scrambled */
|
||||
|
||||
/* Misc */
|
||||
/* Misc */
|
||||
|
||||
char reserved[312]; /* Makes 512 bytes for this structure */
|
||||
char reserved[312]; /* Makes 512 bytes for this structure */
|
||||
};
|
||||
|
||||
struct mjpeg_requestbuffers
|
||||
{
|
||||
unsigned long count; /* Number of buffers for MJPEG grabbing */
|
||||
unsigned long size; /* Size PER BUFFER in bytes */
|
||||
unsigned long count; /* Number of buffers for MJPEG grabbing */
|
||||
unsigned long size; /* Size PER BUFFER in bytes */
|
||||
};
|
||||
|
||||
struct mjpeg_sync
|
||||
{
|
||||
unsigned long frame; /* Frame (0 - n) for double buffer */
|
||||
unsigned long length; /* number of code bytes in buffer (capture only) */
|
||||
unsigned long seq; /* frame sequence number */
|
||||
struct timeval timestamp; /* timestamp */
|
||||
unsigned long frame; /* Frame (0 - n) for double buffer */
|
||||
unsigned long length; /* number of code bytes in buffer (capture only) */
|
||||
unsigned long seq; /* frame sequence number */
|
||||
struct timeval timestamp; /* timestamp */
|
||||
};
|
||||
|
||||
struct mjpeg_status
|
||||
{
|
||||
int input; /* Input channel, has to be set prior to BUZIOC_G_STATUS */
|
||||
int signal; /* Returned: 1 if valid video signal detected */
|
||||
int norm; /* Returned: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */
|
||||
int color; /* Returned: 1 if color signal detected */
|
||||
int input; /* Input channel, has to be set prior to BUZIOC_G_STATUS */
|
||||
int signal; /* Returned: 1 if valid video signal detected */
|
||||
int norm; /* Returned: VIDEO_MODE_PAL or VIDEO_MODE_NTSC */
|
||||
int color; /* Returned: 1 if color signal detected */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_XIMAGESINK_H__
|
||||
#define __GST_XIMAGESINK_H__
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
|||
#include <math.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_XIMAGESINK \
|
||||
(gst_ximagesink_get_type())
|
||||
#define GST_XIMAGESINK(obj) \
|
||||
|
@ -48,6 +49,7 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XIMAGESINK))
|
||||
#define GST_IS_XIMAGESINK_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XIMAGESINK))
|
||||
|
||||
typedef struct _GstXContext GstXContext;
|
||||
typedef struct _GstXWindow GstXWindow;
|
||||
typedef struct _GstXImage GstXImage;
|
||||
|
@ -56,31 +58,29 @@ typedef struct _GstXImageSink GstXImageSink;
|
|||
typedef struct _GstXImageSinkClass GstXImageSinkClass;
|
||||
|
||||
/* Global X Context stuff */
|
||||
struct _GstXContext
|
||||
{
|
||||
struct _GstXContext {
|
||||
Display *disp;
|
||||
|
||||
|
||||
Screen *screen;
|
||||
gint screen_num;
|
||||
|
||||
|
||||
Visual *visual;
|
||||
|
||||
|
||||
Window root;
|
||||
|
||||
|
||||
gulong white, black;
|
||||
|
||||
|
||||
gint depth;
|
||||
gint bpp;
|
||||
gint endianness;
|
||||
|
||||
|
||||
gboolean use_xshm;
|
||||
|
||||
|
||||
GstCaps *caps;
|
||||
};
|
||||
|
||||
/* XWindow stuff */
|
||||
struct _GstXWindow
|
||||
{
|
||||
struct _GstXWindow {
|
||||
Window win;
|
||||
gint width, height;
|
||||
gboolean internal;
|
||||
|
@ -88,54 +88,52 @@ struct _GstXWindow
|
|||
};
|
||||
|
||||
/* XImage stuff */
|
||||
struct _GstXImage
|
||||
{
|
||||
struct _GstXImage {
|
||||
/* Reference to the ximagesink we belong to */
|
||||
GstXImageSink *ximagesink;
|
||||
|
||||
|
||||
XImage *ximage;
|
||||
|
||||
|
||||
#ifdef HAVE_XSHM
|
||||
XShmSegmentInfo SHMInfo;
|
||||
#endif /* HAVE_XSHM */
|
||||
|
||||
#endif /* HAVE_XSHM */
|
||||
|
||||
char *data;
|
||||
gint width, height, size;
|
||||
};
|
||||
|
||||
struct _GstXImageSink
|
||||
{
|
||||
struct _GstXImageSink {
|
||||
/* Our element stuff */
|
||||
GstVideoSink videosink;
|
||||
|
||||
char *display_name;
|
||||
|
||||
|
||||
GstXContext *xcontext;
|
||||
GstXWindow *xwindow;
|
||||
GstXImage *ximage;
|
||||
GstXImage *cur_image;
|
||||
|
||||
|
||||
gdouble framerate;
|
||||
GMutex *x_lock;
|
||||
|
||||
|
||||
/* Unused */
|
||||
gint pixel_width, pixel_height;
|
||||
|
||||
|
||||
GstClockTime time;
|
||||
|
||||
|
||||
GMutex *pool_lock;
|
||||
GSList *image_pool;
|
||||
|
||||
|
||||
gboolean synchronous;
|
||||
gboolean sw_scaling_failed;
|
||||
};
|
||||
|
||||
struct _GstXImageSinkClass
|
||||
{
|
||||
struct _GstXImageSinkClass {
|
||||
GstVideoSinkClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_ximagesink_get_type (void);
|
||||
GType gst_ximagesink_get_type(void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_XIMAGESINK_H__ */
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GST_XVIMAGESINK_H__
|
||||
#define __GST_XVIMAGESINK_H__
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
|||
#include <math.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_XVIMAGESINK \
|
||||
(gst_xvimagesink_get_type())
|
||||
#define GST_XVIMAGESINK(obj) \
|
||||
|
@ -51,46 +52,45 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_XVIMAGESINK))
|
||||
#define GST_IS_XVIMAGESINK_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_XVIMAGESINK))
|
||||
|
||||
typedef struct _GstXContext GstXContext;
|
||||
typedef struct _GstXWindow GstXWindow;
|
||||
typedef struct _GstXvImage GstXvImage;
|
||||
typedef struct _GstXvImageFormat GstXvImageFormat;
|
||||
|
||||
|
||||
typedef struct _GstXvImageSink GstXvImageSink;
|
||||
typedef struct _GstXvImageSinkClass GstXvImageSinkClass;
|
||||
|
||||
/* Global X Context stuff */
|
||||
struct _GstXContext
|
||||
{
|
||||
struct _GstXContext {
|
||||
Display *disp;
|
||||
|
||||
|
||||
Screen *screen;
|
||||
gint screen_num;
|
||||
|
||||
|
||||
Visual *visual;
|
||||
|
||||
|
||||
Window root;
|
||||
|
||||
|
||||
gulong white, black;
|
||||
|
||||
|
||||
gint depth;
|
||||
gint bpp;
|
||||
gint endianness;
|
||||
|
||||
|
||||
gboolean use_xshm;
|
||||
|
||||
|
||||
XvPortID xv_port_id;
|
||||
gint im_format;
|
||||
|
||||
|
||||
GList *formats_list;
|
||||
GList *channels_list;
|
||||
|
||||
|
||||
GstCaps *caps;
|
||||
};
|
||||
|
||||
/* XWindow stuff */
|
||||
struct _GstXWindow
|
||||
{
|
||||
struct _GstXWindow {
|
||||
Window win;
|
||||
gint width, height;
|
||||
gboolean internal;
|
||||
|
@ -98,67 +98,64 @@ struct _GstXWindow
|
|||
};
|
||||
|
||||
/* XvImage format stuff */
|
||||
struct _GstXvImageFormat
|
||||
{
|
||||
struct _GstXvImageFormat {
|
||||
gint format;
|
||||
GstCaps *caps;
|
||||
};
|
||||
|
||||
/* XvImage stuff */
|
||||
struct _GstXvImage
|
||||
{
|
||||
struct _GstXvImage {
|
||||
/* Reference to the xvimagesink we belong to */
|
||||
GstXvImageSink *xvimagesink;
|
||||
|
||||
|
||||
XvImage *xvimage;
|
||||
|
||||
|
||||
#ifdef HAVE_XSHM
|
||||
XShmSegmentInfo SHMInfo;
|
||||
#endif /* HAVE_XSHM */
|
||||
|
||||
#endif /* HAVE_XSHM */
|
||||
|
||||
char *data;
|
||||
gint width, height, size;
|
||||
};
|
||||
|
||||
struct _GstXvImageSink
|
||||
{
|
||||
struct _GstXvImageSink {
|
||||
/* Our element stuff */
|
||||
GstVideoSink videosink;
|
||||
|
||||
|
||||
char *display_name;
|
||||
|
||||
|
||||
GstXContext *xcontext;
|
||||
GstXWindow *xwindow;
|
||||
GstXvImage *xvimage;
|
||||
GstXvImage *cur_image;
|
||||
|
||||
|
||||
gdouble framerate;
|
||||
|
||||
|
||||
gint brightness;
|
||||
gint contrast;
|
||||
gint hue;
|
||||
gint saturation;
|
||||
gboolean cb_changed;
|
||||
|
||||
|
||||
GMutex *x_lock;
|
||||
|
||||
|
||||
/* Unused */
|
||||
gint pixel_width, pixel_height;
|
||||
|
||||
GstClockTime time;
|
||||
|
||||
|
||||
GMutex *pool_lock;
|
||||
GSList *image_pool;
|
||||
|
||||
gboolean synchronous;
|
||||
};
|
||||
|
||||
struct _GstXvImageSinkClass
|
||||
{
|
||||
struct _GstXvImageSinkClass {
|
||||
GstVideoSinkClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_xvimagesink_get_type (void);
|
||||
GType gst_xvimagesink_get_type(void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_XVIMAGESINK_H__ */
|
||||
|
|
|
@ -25,10 +25,9 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define TYPE_SINESRC \
|
||||
(sinesrc_get_type())
|
||||
|
@ -41,53 +40,50 @@ extern "C"
|
|||
#define IS_SINESRC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),TYPE_SINESRC))
|
||||
|
||||
typedef struct _SineSrc SineSrc;
|
||||
typedef struct _SineSrcClass SineSrcClass;
|
||||
typedef struct _SineSrc SineSrc;
|
||||
typedef struct _SineSrcClass SineSrcClass;
|
||||
|
||||
typedef void (*PreGetFunc) (SineSrc * src);
|
||||
typedef void (*PreGetFunc) (SineSrc *src);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SINE_SRC_INT,
|
||||
SINE_SRC_FLOAT
|
||||
} SineSrcAudio;
|
||||
typedef enum {
|
||||
SINE_SRC_INT,
|
||||
SINE_SRC_FLOAT
|
||||
} SineSrcAudio;
|
||||
|
||||
struct _SineSrc
|
||||
{
|
||||
GstElement element;
|
||||
struct _SineSrc {
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *src;
|
||||
/* pads */
|
||||
GstPad *src;
|
||||
|
||||
/* audio parameters */
|
||||
SineSrcAudio type;
|
||||
gint width; /* int + float */
|
||||
gint depth; /* int */
|
||||
gboolean sign; /* int */
|
||||
gint endianness; /* int */
|
||||
/* audio parameters */
|
||||
SineSrcAudio type;
|
||||
gint width; /* int + float */
|
||||
gint depth; /* int */
|
||||
gboolean sign; /* int */
|
||||
gint endianness; /* int */
|
||||
|
||||
gint rate;
|
||||
gint channels; /* interleaved */
|
||||
|
||||
gboolean newcaps;
|
||||
|
||||
/* freaky stuff for testing */
|
||||
PreGetFunc pre_get_func;
|
||||
};
|
||||
|
||||
gint rate;
|
||||
gint channels; /* interleaved */
|
||||
struct _SineSrcClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
gboolean newcaps;
|
||||
GType sinesrc_get_type (void);
|
||||
GstElement * sinesrc_new (void);
|
||||
|
||||
/* freaky stuff for testing */
|
||||
PreGetFunc pre_get_func;
|
||||
};
|
||||
|
||||
struct _SineSrcClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType sinesrc_get_type (void);
|
||||
GstElement *sinesrc_new (void);
|
||||
|
||||
void sinesrc_set_pre_get_func (SineSrc * src, PreGetFunc func);
|
||||
void sinesrc_set_pre_get_func (SineSrc *src, PreGetFunc func);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_SINESRC_H__ */
|
||||
#endif /* __GST_SINESRC_H__ */
|
||||
|
|
|
@ -25,10 +25,9 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#define TYPE_SINESRC \
|
||||
(sinesrc_get_type())
|
||||
|
@ -41,53 +40,50 @@ extern "C"
|
|||
#define IS_SINESRC_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),TYPE_SINESRC))
|
||||
|
||||
typedef struct _SineSrc SineSrc;
|
||||
typedef struct _SineSrcClass SineSrcClass;
|
||||
typedef struct _SineSrc SineSrc;
|
||||
typedef struct _SineSrcClass SineSrcClass;
|
||||
|
||||
typedef void (*PreGetFunc) (SineSrc * src);
|
||||
typedef void (*PreGetFunc) (SineSrc *src);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SINE_SRC_INT,
|
||||
SINE_SRC_FLOAT
|
||||
} SineSrcAudio;
|
||||
typedef enum {
|
||||
SINE_SRC_INT,
|
||||
SINE_SRC_FLOAT
|
||||
} SineSrcAudio;
|
||||
|
||||
struct _SineSrc
|
||||
{
|
||||
GstElement element;
|
||||
struct _SineSrc {
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *src;
|
||||
/* pads */
|
||||
GstPad *src;
|
||||
|
||||
/* audio parameters */
|
||||
SineSrcAudio type;
|
||||
gint width; /* int + float */
|
||||
gint depth; /* int */
|
||||
gboolean sign; /* int */
|
||||
gint endianness; /* int */
|
||||
/* audio parameters */
|
||||
SineSrcAudio type;
|
||||
gint width; /* int + float */
|
||||
gint depth; /* int */
|
||||
gboolean sign; /* int */
|
||||
gint endianness; /* int */
|
||||
|
||||
gint rate;
|
||||
gint channels; /* interleaved */
|
||||
|
||||
gboolean newcaps;
|
||||
|
||||
/* freaky stuff for testing */
|
||||
PreGetFunc pre_get_func;
|
||||
};
|
||||
|
||||
gint rate;
|
||||
gint channels; /* interleaved */
|
||||
struct _SineSrcClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
gboolean newcaps;
|
||||
GType sinesrc_get_type (void);
|
||||
GstElement * sinesrc_new (void);
|
||||
|
||||
/* freaky stuff for testing */
|
||||
PreGetFunc pre_get_func;
|
||||
};
|
||||
|
||||
struct _SineSrcClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType sinesrc_get_type (void);
|
||||
GstElement *sinesrc_new (void);
|
||||
|
||||
void sinesrc_set_pre_get_func (SineSrc * src, PreGetFunc func);
|
||||
void sinesrc_set_pre_get_func (SineSrc *src, PreGetFunc func);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __GST_SINESRC_H__ */
|
||||
#endif /* __GST_SINESRC_H__ */
|
||||
|
|
Loading…
Reference in a new issue