summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-20 20:35:44 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-20 20:35:44 +0000
commit5971345e9951762ec27af3d824b2909c034b1c48 (patch)
treebbeaa1ae52108db04b856def5a5979fefef4b387
parent62e7bc17c41c5542779a3c395a9d47d2bd306de2 (diff)
rename sink_input->rewind to process_rewind() and set_max_rewind to update_max_rewind()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2284 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/play-memblockq.c8
-rw-r--r--src/pulsecore/protocol-native.c12
-rw-r--r--src/pulsecore/sink-input.c16
-rw-r--r--src/pulsecore/sink-input.h6
-rw-r--r--src/pulsecore/sink.c6
-rw-r--r--src/pulsecore/sound-file-stream.c8
-rw-r--r--src/pulsecore/source-output.c16
-rw-r--r--src/pulsecore/source-output.h6
-rw-r--r--src/pulsecore/source.c4
9 files changed, 41 insertions, 41 deletions
diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c
index 7b9b8fb8..99b59134 100644
--- a/src/pulsecore/play-memblockq.c
+++ b/src/pulsecore/play-memblockq.c
@@ -127,7 +127,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
return 0;
}
-static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
memblockq_stream *u;
pa_sink_input_assert_ref(i);
@@ -141,7 +141,7 @@ static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes) {
pa_memblockq_rewind(u->memblockq, nbytes);
}
-static void sink_input_set_max_rewind(pa_sink_input *i, size_t nbytes) {
+static void sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes) {
memblockq_stream *u;
pa_sink_input_assert_ref(i);
@@ -193,8 +193,8 @@ pa_sink_input* pa_memblockq_sink_input_new(
goto fail;
u->sink_input->pop = sink_input_pop_cb;
- u->sink_input->rewind = sink_input_rewind_cb;
- u->sink_input->set_max_rewind = sink_input_set_max_rewind;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
+ u->sink_input->update_max_rewind = sink_input_update_max_rewind;
u->sink_input->kill = sink_input_kill_cb;
u->sink_input->userdata = u;
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 37200db6..42baf8d8 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -209,8 +209,8 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk
static void sink_input_kill_cb(pa_sink_input *i);
static void sink_input_suspend_cb(pa_sink_input *i, pa_bool_t suspend);
static void sink_input_moved_cb(pa_sink_input *i);
-static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes);
-static void sink_input_set_max_rewind_cb(pa_sink_input *i, size_t nbytes);
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes);
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes);
static void send_memblock(connection *c);
@@ -760,8 +760,8 @@ static playback_stream* playback_stream_new(
s->sink_input->parent.process_msg = sink_input_process_msg;
s->sink_input->pop = sink_input_pop_cb;
- s->sink_input->rewind = sink_input_rewind_cb;
- s->sink_input->set_max_rewind = sink_input_set_max_rewind_cb;
+ s->sink_input->process_rewind = sink_input_process_rewind_cb;
+ s->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
s->sink_input->kill = sink_input_kill_cb;
s->sink_input->moved = sink_input_moved_cb;
s->sink_input->suspend = sink_input_suspend_cb;
@@ -1228,7 +1228,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
return 0;
}
-static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
playback_stream *s;
pa_sink_input_assert_ref(i);
@@ -1242,7 +1242,7 @@ static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes) {
pa_memblockq_rewind(s->memblockq, nbytes);
}
-static void sink_input_set_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
playback_stream *s;
pa_sink_input_assert_ref(i);
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 7e6c5de1..ccb1ff11 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -98,8 +98,8 @@ static void reset_callbacks(pa_sink_input *i) {
pa_assert(i);
i->pop = NULL;
- i->rewind = NULL;
- i->set_max_rewind = NULL;
+ i->process_rewind = NULL;
+ i->update_max_rewind = NULL;
i->attach = NULL;
i->detach = NULL;
i->suspend = NULL;
@@ -394,7 +394,7 @@ void pa_sink_input_put(pa_sink_input *i) {
pa_assert(i->state == PA_SINK_INPUT_INIT);
pa_assert(i->pop);
- pa_assert(i->rewind);
+ pa_assert(i->process_rewind);
i->thread_info.volume = i->volume;
i->thread_info.muted = i->muted;
@@ -651,8 +651,8 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam
pa_log_debug("Have to rewind %lu bytes on implementor.", (unsigned long) amount);
/* Tell the implementor */
- if (i->rewind)
- i->rewind(i, amount);
+ if (i->process_rewind)
+ i->process_rewind(i, amount);
}
/* And reset the resampler */
@@ -668,15 +668,15 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam
}
/* Called from thread context */
-void pa_sink_input_set_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
+void pa_sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */) {
pa_sink_input_assert_ref(i);
pa_assert(PA_SINK_INPUT_LINKED(i->thread_info.state));
pa_assert(pa_frame_aligned(nbytes, &i->sink->sample_spec));
pa_memblockq_set_maxrewind(i->thread_info.render_memblockq, nbytes);
- if (i->set_max_rewind)
- i->set_max_rewind(i, i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, nbytes) : nbytes);
+ if (i->update_max_rewind)
+ i->update_max_rewind(i, i->thread_info.resampler ? pa_resampler_request(i->thread_info.resampler, nbytes) : nbytes);
}
pa_usec_t pa_sink_input_set_requested_latency(pa_sink_input *i, pa_usec_t usec) {
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index 184a2c4e..b433edc0 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -103,11 +103,11 @@ struct pa_sink_input {
* before peek() if it is called at all. Only called if the sink
* input driver ever plans to call
* pa_sink_input_request_rewind(). Called from IO context. */
- void (*rewind) (pa_sink_input *i, size_t nbytes); /* may NOT be NULL */
+ void (*process_rewind) (pa_sink_input *i, size_t nbytes); /* may NOT be NULL */
/* Called whenever the maximum rewindable size of the sink
* changes. Called from RT context. */
- void (*set_max_rewind) (pa_sink_input *i, size_t nbytes); /* may be NULL */
+ void (*update_max_rewind) (pa_sink_input *i, size_t nbytes); /* may be NULL */
/* If non-NULL this function is called when the input is first
* connected to a sink or when the rtpoll/asyncmsgq fields
@@ -267,7 +267,7 @@ pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i);
int pa_sink_input_peek(pa_sink_input *i, size_t length, pa_memchunk *chunk, pa_cvolume *volume);
void pa_sink_input_drop(pa_sink_input *i, size_t length);
void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */);
-void pa_sink_input_set_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */);
+void pa_sink_input_update_max_rewind(pa_sink_input *i, size_t nbytes /* in the sink's sample spec */);
int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index f631de35..39468f1e 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -981,7 +981,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
i->thread_info.sync_next->thread_info.sync_prev = i;
}
- pa_sink_input_set_max_rewind(i, s->thread_info.max_rewind);
+ pa_sink_input_update_max_rewind(i, s->thread_info.max_rewind);
pa_assert(!i->thread_info.attached);
i->thread_info.attached = TRUE;
@@ -1111,7 +1111,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
pa_hashmap_put(s->thread_info.inputs, PA_UINT32_TO_PTR(info->ghost_sink_input->index), pa_sink_input_ref(info->ghost_sink_input));
info->ghost_sink_input->thread_info.sync_prev = info->ghost_sink_input->thread_info.sync_next = NULL;
- pa_sink_input_set_max_rewind(info->ghost_sink_input, s->thread_info.max_rewind);
+ pa_sink_input_update_max_rewind(info->ghost_sink_input, s->thread_info.max_rewind);
pa_assert(!info->ghost_sink_input->thread_info.attached);
info->ghost_sink_input->thread_info.attached = TRUE;
@@ -1314,7 +1314,7 @@ void pa_sink_set_max_rewind(pa_sink *s, size_t max_rewind) {
s->thread_info.max_rewind = max_rewind;
while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)))
- pa_sink_input_set_max_rewind(i, s->thread_info.max_rewind);
+ pa_sink_input_update_max_rewind(i, s->thread_info.max_rewind);
if (s->monitor_source)
pa_source_set_max_rewind(s->monitor_source, s->thread_info.max_rewind);
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index 9030d6db..604723f1 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -198,7 +198,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk
return -1;
}
-static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes) {
+static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
file_stream *u;
pa_sink_input_assert_ref(i);
@@ -212,7 +212,7 @@ static void sink_input_rewind_cb(pa_sink_input *i, size_t nbytes) {
pa_memblockq_rewind(u->memblockq, nbytes);
}
-static void sink_input_set_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
+static void sink_input_update_max_rewind_cb(pa_sink_input *i, size_t nbytes) {
file_stream *u;
pa_sink_input_assert_ref(i);
@@ -331,8 +331,8 @@ int pa_play_file(
goto fail;
u->sink_input->pop = sink_input_pop_cb;
- u->sink_input->rewind = sink_input_rewind_cb;
- u->sink_input->set_max_rewind = sink_input_set_max_rewind_cb;
+ u->sink_input->process_rewind = sink_input_process_rewind_cb;
+ u->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
u->sink_input->kill = sink_input_kill_cb;
u->sink_input->userdata = u;
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 318f6f84..c6dc9e88 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -80,8 +80,8 @@ static void reset_callbacks(pa_source_output *o) {
pa_assert(o);
o->push = NULL;
- o->rewind = NULL;
- o->set_max_rewind = NULL;
+ o->process_rewind = NULL;
+ o->update_max_rewind = NULL;
o->attach = NULL;
o->detach = NULL;
o->suspend = NULL;
@@ -376,7 +376,7 @@ void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk) {
pa_memblockq_seek(o->thread_info.delay_memblockq, chunk->length, PA_SEEK_RELATIVE);
}
- limit = o->rewind ? 0 : o->source->thread_info.max_rewind;
+ limit = o->process_rewind ? 0 : o->source->thread_info.max_rewind;
/* Implement the delay queue */
while ((length = pa_memblockq_get_length(o->thread_info.delay_memblockq)) > limit) {
@@ -418,7 +418,7 @@ void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes /* in si
if (nbytes <= 0)
return;
- if (o->rewind) {
+ if (o->process_rewind) {
pa_assert(pa_memblockq_get_length(o->thread_info.delay_memblockq) == 0);
if (o->thread_info.resampler)
@@ -427,7 +427,7 @@ void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes /* in si
pa_log_debug("Have to rewind %lu bytes on implementor.", (unsigned long) nbytes);
if (nbytes > 0)
- o->rewind(o, nbytes);
+ o->process_rewind(o, nbytes);
if (o->thread_info.resampler)
pa_resampler_reset(o->thread_info.resampler);
@@ -437,13 +437,13 @@ void pa_source_output_process_rewind(pa_source_output *o, size_t nbytes /* in si
}
/* Called from thread context */
-void pa_source_output_set_max_rewind(pa_source_output *o, size_t nbytes /* in the source's sample spec */) {
+void pa_source_output_update_max_rewind(pa_source_output *o, size_t nbytes /* in the source's sample spec */) {
pa_source_output_assert_ref(o);
pa_assert(PA_SOURCE_OUTPUT_LINKED(o->thread_info.state));
pa_assert(pa_frame_aligned(nbytes, &o->source->sample_spec));
- if (o->set_max_rewind)
- o->set_max_rewind(o, o->thread_info.resampler ? pa_resampler_result(o->thread_info.resampler, nbytes) : nbytes);
+ if (o->update_max_rewind)
+ o->update_max_rewind(o, o->thread_info.resampler ? pa_resampler_result(o->thread_info.resampler, nbytes) : nbytes);
}
pa_usec_t pa_source_output_set_requested_latency(pa_source_output *o, pa_usec_t usec) {
diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h
index f79761ae..e7d8963f 100644
--- a/src/pulsecore/source-output.h
+++ b/src/pulsecore/source-output.h
@@ -84,11 +84,11 @@ struct pa_source_output {
/* Only relevant for monitor sources right now: called when the
* recorded stream is rewound. */
- void (*rewind)(pa_source_output *o, size_t nbytes);
+ void (*process_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 */
+ void (*update_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 */
@@ -209,7 +209,7 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest);
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);
+void pa_source_output_update_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);
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 0de78f41..8138a43f 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -582,7 +582,7 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
pa_hashmap_put(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index), pa_source_output_ref(o));
- pa_source_output_set_max_rewind(o, s->thread_info.max_rewind);
+ pa_source_output_update_max_rewind(o, s->thread_info.max_rewind);
pa_assert(!o->thread_info.attached);
o->thread_info.attached = TRUE;
@@ -769,7 +769,7 @@ void pa_source_set_max_rewind(pa_source *s, size_t max_rewind) {
s->thread_info.max_rewind = max_rewind;
while ((o = pa_hashmap_iterate(s->thread_info.outputs, &state, NULL)))
- pa_source_output_set_max_rewind(o, s->thread_info.max_rewind);
+ pa_source_output_update_max_rewind(o, s->thread_info.max_rewind);
}
void pa_source_invalidate_requested_latency(pa_source *s) {