diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2006-12-09 16:17:33 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2006-12-09 16:17:33 +0000 |
commit | 6e9ee0d19a736e2a010c5795c6941ebf55411328 (patch) | |
tree | b62a871d0e8807b0f87b66cb2d4a6fc1797bfb7e /sys/sunaudio/gstsunaudiosink.h | |
parent | f3bdb649718c911d6227d10e9280d042dca0ed92 (diff) |
sys/sunaudio/: Use the sunaudio debug category.
Original commit message from CVS:
* sys/sunaudio/gstsunaudiomixerctrl.c:
* sys/sunaudio/gstsunaudiosrc.c:
Use the sunaudio debug category.
* sys/sunaudio/gstsunaudiosink.c: (gst_sunaudiosink_finalize),
(gst_sunaudiosink_class_init), (gst_sunaudiosink_init),
(gst_sunaudiosink_set_property), (gst_sunaudiosink_get_property),
(gst_sunaudiosink_open), (gst_sunaudiosink_close),
(gst_sunaudiosink_prepare), (gst_sunaudio_sink_do_delay),
(gst_sunaudiosink_write), (gst_sunaudiosink_delay),
(gst_sunaudiosink_reset):
* sys/sunaudio/gstsunaudiosink.h:
Uses the sunaudio debug category for all debug output
Implements the _delay() callback to synchronise video playback better
Change the segtotal and segsize values back to the parent class
defaults (taken from buffer_time and latency_times of 200ms and 10ms
respectively)
Measure the samples written to the device vs. played.
Keep track of segments in the device by writing empty eof frames, and
sleep using a GCond when we get too far ahead and risk overrunning the
sink's ringbuffer.
Fixes: #360673
Diffstat (limited to 'sys/sunaudio/gstsunaudiosink.h')
-rw-r--r-- | sys/sunaudio/gstsunaudiosink.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/sunaudio/gstsunaudiosink.h b/sys/sunaudio/gstsunaudiosink.h index 7c47f3e4..b1a3cc26 100644 --- a/sys/sunaudio/gstsunaudiosink.h +++ b/sys/sunaudio/gstsunaudiosink.h @@ -47,7 +47,20 @@ struct _GstSunAudioSink { audio_device_t dev; audio_info_t info; - gint bytes_per_sample; + /* Number of segments the ringbuffer is configured for */ + guint segtotal; + guint segtotal_samples; + + /* Number of segments written to the device */ + gint segs_written; + /* Number of samples written to the device */ + gint samples_written; + guint bytes_per_sample; + + /* mutex and gconf used to control the write method */ + GMutex *write_mutex; + GCond *sleep_cond; + gboolean flushing; }; struct _GstSunAudioSinkClass { |