mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
more indentation madness, no actual code changes
Original commit message from CVS: more indentation madness, no actual code changes
This commit is contained in:
parent
8f6ae19cbf
commit
f2f10fcade
2 changed files with 84 additions and 83 deletions
|
@ -81,17 +81,17 @@ static GstElementDetails gst_alsa_src_details = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* GObject functions */
|
/* GObject functions */
|
||||||
static void gst_alsa_class_init (GstAlsaClass *klass);
|
static void gst_alsa_class_init (GstAlsaClass * klass);
|
||||||
static void gst_alsa_init (GstAlsa *this);
|
static void gst_alsa_init (GstAlsa * this);
|
||||||
static void gst_alsa_dispose (GObject *object);
|
static void gst_alsa_dispose (GObject * object);
|
||||||
static void gst_alsa_set_property (GObject *object,
|
static void gst_alsa_set_property (GObject * object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
const GValue *value,
|
const GValue * value,
|
||||||
GParamSpec *pspec);
|
GParamSpec * pspec);
|
||||||
static void gst_alsa_get_property (GObject *object,
|
static void gst_alsa_get_property (GObject * object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
GValue *value,
|
GValue * value,
|
||||||
GParamSpec *pspec);
|
GParamSpec * pspec);
|
||||||
|
|
||||||
/* GStreamer functions for pads and state changing */
|
/* GStreamer functions for pads and state changing */
|
||||||
static GstPadTemplate * gst_alsa_src_pad_factory (void);
|
static GstPadTemplate * gst_alsa_src_pad_factory (void);
|
||||||
|
@ -99,69 +99,69 @@ static GstPadTemplate * gst_alsa_src_request_pad_factory (void);
|
||||||
static GstPadTemplate * gst_alsa_sink_pad_factory (void);
|
static GstPadTemplate * gst_alsa_sink_pad_factory (void);
|
||||||
static GstPadTemplate * gst_alsa_sink_request_pad_factory (void);
|
static GstPadTemplate * gst_alsa_sink_request_pad_factory (void);
|
||||||
|
|
||||||
static GstPad * gst_alsa_request_new_pad (GstElement *element,
|
static GstPad * gst_alsa_request_new_pad (GstElement * element,
|
||||||
GstPadTemplate *templ,
|
GstPadTemplate * templ,
|
||||||
const gchar *name);
|
const gchar * name);
|
||||||
static GstPadLinkReturn gst_alsa_link (GstPad *pad,
|
static GstPadLinkReturn gst_alsa_link (GstPad * pad,
|
||||||
GstCaps *caps);
|
GstCaps * caps);
|
||||||
static GstCaps * gst_alsa_get_caps (GstPad *pad,
|
static GstCaps * gst_alsa_get_caps (GstPad * pad,
|
||||||
GstCaps *caps);
|
GstCaps * caps);
|
||||||
static GstCaps * gst_alsa_caps (snd_pcm_format_t format,
|
static GstCaps * gst_alsa_caps (snd_pcm_format_t format,
|
||||||
gint rate,
|
gint rate,
|
||||||
gint channels);
|
gint channels);
|
||||||
|
|
||||||
static GstBufferPool * gst_alsa_src_get_buffer_pool (GstPad *pad);
|
static GstBufferPool * gst_alsa_src_get_buffer_pool (GstPad * pad);
|
||||||
|
|
||||||
static GstElementStateReturn gst_alsa_change_state (GstElement *element);
|
static GstElementStateReturn gst_alsa_change_state (GstElement * element);
|
||||||
|
|
||||||
/* audio processing functions */
|
/* audio processing functions */
|
||||||
static int gst_alsa_do_mmap (GstAlsa *this,
|
static int gst_alsa_do_mmap (GstAlsa * this,
|
||||||
snd_pcm_sframes_t *avail);
|
snd_pcm_sframes_t * avail);
|
||||||
|
|
||||||
static void gst_alsa_sink_loop (GstElement *element);
|
static void gst_alsa_sink_loop (GstElement * element);
|
||||||
static void gst_alsa_src_loop (GstElement *element);
|
static void gst_alsa_src_loop (GstElement * element);
|
||||||
static void gst_alsa_xrun_recovery (GstAlsa *this);
|
static void gst_alsa_xrun_recovery (GstAlsa * this);
|
||||||
|
|
||||||
static gboolean gst_alsa_sink_check_event (GstAlsa *this,
|
static gboolean gst_alsa_sink_check_event (GstAlsa * this,
|
||||||
gint pad_nr,
|
gint pad_nr,
|
||||||
GstEvent *event);
|
GstEvent * event);
|
||||||
|
|
||||||
/* alsa setup / start / stop functions */
|
/* alsa setup / start / stop functions */
|
||||||
static void gst_alsa_set_eos (GstAlsa *this);
|
static void gst_alsa_set_eos (GstAlsa * this);
|
||||||
|
|
||||||
static gboolean gst_alsa_probe_hw_params (GstAlsa *this,
|
static gboolean gst_alsa_probe_hw_params (GstAlsa * this,
|
||||||
GstAlsaFormat *format);
|
GstAlsaFormat * format);
|
||||||
static gboolean gst_alsa_set_hw_params (GstAlsa *this);
|
static gboolean gst_alsa_set_hw_params (GstAlsa * this);
|
||||||
static gboolean gst_alsa_set_sw_params (GstAlsa *this);
|
static gboolean gst_alsa_set_sw_params (GstAlsa * this);
|
||||||
|
|
||||||
static gboolean gst_alsa_open_audio (GstAlsa *this);
|
static gboolean gst_alsa_open_audio (GstAlsa * this);
|
||||||
static gboolean gst_alsa_start_audio (GstAlsa *this);
|
static gboolean gst_alsa_start_audio (GstAlsa * this);
|
||||||
static gboolean gst_alsa_drain_audio (GstAlsa *this);
|
static gboolean gst_alsa_drain_audio (GstAlsa * this);
|
||||||
static gboolean gst_alsa_stop_audio (GstAlsa *this);
|
static gboolean gst_alsa_stop_audio (GstAlsa * this);
|
||||||
static gboolean gst_alsa_close_audio (GstAlsa *this);
|
static gboolean gst_alsa_close_audio (GstAlsa * this);
|
||||||
|
|
||||||
/* clock functions */
|
/* clock functions */
|
||||||
static void gst_alsa_clock_class_init (GstAlsaClockClass *klass);
|
static void gst_alsa_clock_class_init (GstAlsaClockClass * klass);
|
||||||
static void gst_alsa_clock_init (GstAlsaClock *clock);
|
static void gst_alsa_clock_init (GstAlsaClock * clock);
|
||||||
static GstAlsaClock * gst_alsa_clock_new (gchar *name,
|
static GstAlsaClock * gst_alsa_clock_new (gchar *name,
|
||||||
GstAlsaClockGetTimeFunc func,
|
GstAlsaClockGetTimeFunc func,
|
||||||
GstAlsa* owner);
|
GstAlsa* owner);
|
||||||
|
|
||||||
static void gst_alsa_clock_start (GstAlsaClock *clock);
|
static void gst_alsa_clock_start (GstAlsaClock * clock);
|
||||||
static void gst_alsa_clock_stop (GstAlsaClock *clock);
|
static void gst_alsa_clock_stop (GstAlsaClock * clock);
|
||||||
|
|
||||||
static GstClockTime gst_alsa_clock_get_internal_time (GstClock *clock);
|
static GstClockTime gst_alsa_clock_get_internal_time (GstClock * clock);
|
||||||
static guint64 gst_alsa_clock_get_resolution (GstClock *clock);
|
static guint64 gst_alsa_clock_get_resolution (GstClock * clock);
|
||||||
static GstClockEntryStatus gst_alsa_clock_wait (GstClock *clock,
|
static GstClockEntryStatus gst_alsa_clock_wait (GstClock * clock,
|
||||||
GstClockEntry *entry);
|
GstClockEntry * entry);
|
||||||
static void gst_alsa_clock_unlock (GstClock *clock,
|
static void gst_alsa_clock_unlock (GstClock * clock,
|
||||||
GstClockEntry *entry);
|
GstClockEntry * entry);
|
||||||
|
|
||||||
static GstClockTime gst_alsa_sink_get_time (GstAlsa *this);
|
static GstClockTime gst_alsa_sink_get_time (GstAlsa * this);
|
||||||
static GstClockTime gst_alsa_src_get_time (GstAlsa *this);
|
static GstClockTime gst_alsa_src_get_time (GstAlsa * this);
|
||||||
static GstClock * gst_alsa_get_clock (GstElement *element);
|
static GstClock * gst_alsa_get_clock (GstElement * element);
|
||||||
static void gst_alsa_set_clock (GstElement *element,
|
static void gst_alsa_set_clock (GstElement * element,
|
||||||
GstClock *clock);
|
GstClock * clock);
|
||||||
static GstClockClass * clock_parent_class = NULL;
|
static GstClockClass * clock_parent_class = NULL;
|
||||||
/* static guint gst_alsa_clock_signals[LAST_SIGNAL] = { 0 }; */
|
/* static guint gst_alsa_clock_signals[LAST_SIGNAL] = { 0 }; */
|
||||||
|
|
||||||
|
|
|
@ -100,47 +100,48 @@ typedef int (*GstAlsaTransmitFunction) (GstAlsa *this, snd_pcm_sframes_t *avail)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GstPad * pad;
|
GstPad * pad;
|
||||||
guint8 * data; /* pointer into buffer */
|
guint8 * data; /* pointer into buffer */
|
||||||
guint size; /* sink: bytes left in buffer */
|
guint size; /* sink: bytes left in buffer */
|
||||||
GstBuffer * buf; /* current buffer */
|
GstBuffer * buf; /* current buffer */
|
||||||
guint behaviour; /* 0 = data points into buffer (so unref when size == 0),
|
guint behaviour; /* 0 = data points into buffer (so unref when size == 0),
|
||||||
1 = data should be freed, use buffer after that */
|
1 = data should be freed, use buffer after that */
|
||||||
} GstAlsaPad;
|
} GstAlsaPad;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
snd_pcm_format_t format;
|
snd_pcm_format_t format;
|
||||||
guint rate;
|
guint rate;
|
||||||
gint channels;
|
gint channels;
|
||||||
} GstAlsaFormat;
|
} GstAlsaFormat;
|
||||||
|
|
||||||
struct _GstAlsa {
|
struct _GstAlsa {
|
||||||
GstElement parent;
|
GstElement parent;
|
||||||
|
|
||||||
/* array of GstAlsaPads */
|
/* array of GstAlsaPads */
|
||||||
GstAlsaPad pads[GST_ALSA_MAX_CHANNELS];
|
GstAlsaPad pads[GST_ALSA_MAX_CHANNELS];
|
||||||
|
|
||||||
gchar *device;
|
gchar * device;
|
||||||
snd_pcm_stream_t stream;
|
snd_pcm_stream_t stream;
|
||||||
snd_pcm_t *handle;
|
snd_pcm_t * handle;
|
||||||
guint pcm_caps; /* capabilities of the pcm device */
|
guint pcm_caps; /* capabilities of the pcm device, see GstAlsaPcmCaps */
|
||||||
snd_output_t *out;
|
snd_output_t * out;
|
||||||
|
|
||||||
GstAlsaFormat *format; /* NULL if undefined */
|
GstAlsaFormat * format; /* NULL if undefined */
|
||||||
gboolean mmap; /* use mmap transmit (fast) or read/write (sloooow) */
|
gboolean mmap; /* use mmap transmit (fast) or read/write (sloooow) */
|
||||||
GstAlsaTransmitFunction transmit;
|
GstAlsaTransmitFunction transmit;
|
||||||
|
|
||||||
/* latency / performance parameters */
|
/* latency / performance parameters */
|
||||||
snd_pcm_uframes_t period_size;
|
snd_pcm_uframes_t period_size;
|
||||||
unsigned int period_count;
|
unsigned int period_count;
|
||||||
|
|
||||||
gboolean autorecover;
|
gboolean autorecover;
|
||||||
|
|
||||||
/* clocking */
|
/* clocking */
|
||||||
GstAlsaClock *clock; /* our provided clock */
|
GstAlsaClock * clock; /* our provided clock */
|
||||||
snd_pcm_uframes_t transmitted; /* samples transmitted since last sync
|
snd_pcm_uframes_t transmitted; /* samples transmitted since last sync
|
||||||
This thing actually is our master clock.
|
This thing actually is our master clock.
|
||||||
We will event insert silent samples or
|
We will event insert silent samples or
|
||||||
drop some to sync to incoming timestamps.
|
drop some to sync to incoming timestamps.
|
||||||
*/
|
*/
|
||||||
GstClockTime max_discont; /* max difference between current
|
GstClockTime max_discont; /* max difference between current
|
||||||
playback timestamp and buffers timestamps
|
playback timestamp and buffers timestamps
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue