summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/source-output.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-20 20:16:55 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-20 20:16:55 +0000
commit62e7bc17c41c5542779a3c395a9d47d2bd306de2 (patch)
tree4445167f4164a8af45438519fee8202c14a35892 /src/pulsecore/source-output.h
parent7556ef5bfc37c99064d95857626bcf9f20423c70 (diff)
Big pile of dependant changes:
* Change pa_memblockq to carry silence memchunk instead of memblock and adapt all users * Add new call pa_sink_input_get_silence() to get the suitable silence block for a sink input * Implement monitoring sources properly by adding a delay queue to even out rewinds * Remove pa_{sink|source}_ping() becaused unnecessary these days and not used * Fix naming of various rewind related functions. Downstream is now _request_rewind(), upstream is _process_rewind() * Fix volume adjustments for a single stream in pa_sink_render() * Properly handle prebuf-style buffer underruns in pa_sink_input * Don't allow rewinding to more than the last underrun * Rework default buffering metrics selection for native protocol * New functions pa_memblockq_prebuf_active(), pa_memblockq_silence() * add option "mixer_reset=" to module-alsa-sink * Other cleanups git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2283 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/source-output.h')
-rw-r--r--src/pulsecore/source-output.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h
index 0a2286b9..f79761ae 100644
--- a/src/pulsecore/source-output.h
+++ b/src/pulsecore/source-output.h
@@ -82,6 +82,14 @@ struct pa_source_output {
* context. */
void (*push)(pa_source_output *o, const pa_memchunk *chunk);
+ /* Only relevant for monitor sources right now: called when the
+ * recorded stream is rewound. */
+ void (*rewind)(pa_source_output *o, size_t nbytes);
+
+ /* Called whenever the maximum rewindable size of the source
+ * changes. Called from RT context. */
+ void (*set_max_rewind) (pa_source_output *o, size_t nbytes); /* may be NULL */
+
/* If non-NULL this function is called when the output is first
* connected to a source. Called from IO thread context */
void (*attach) (pa_source_output *o); /* may be NULL */
@@ -117,6 +125,10 @@ struct pa_source_output {
pa_resampler* resampler; /* may be NULL */
+ /* We maintain a delay memblockq here for source outputs that
+ * don't implement rewind() */
+ pa_memblockq *delay_memblockq;
+
/* The requested latency for the source */
pa_usec_t requested_source_latency;
} thread_info;
@@ -196,6 +208,8 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest);
/* To be used exclusively by the source driver thread */
void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk);
+void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes);
+void pa_source_output_set_max_rewind(pa_source_output *o, size_t nbytes);
int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int64_t offset, pa_memchunk *chunk);