[pulseaudio-commits] r2284 - in /branches/glitch-free/src/pulsecore: play-memblockq.c protocol-native.c sink-input.c sink-input.h sink.c sound-file-stream.c source-output.c source-output.h source.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Apr 20 13:35:45 PDT 2008


Author: lennart
Date: Sun Apr 20 22:35:44 2008
New Revision: 2284

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2284&root=pulseaudio&view=rev
Log:
rename sink_input->rewind to process_rewind() and set_max_rewind to update_max_rewind()

Modified:
    branches/glitch-free/src/pulsecore/play-memblockq.c
    branches/glitch-free/src/pulsecore/protocol-native.c
    branches/glitch-free/src/pulsecore/sink-input.c
    branches/glitch-free/src/pulsecore/sink-input.h
    branches/glitch-free/src/pulsecore/sink.c
    branches/glitch-free/src/pulsecore/sound-file-stream.c
    branches/glitch-free/src/pulsecore/source-output.c
    branches/glitch-free/src/pulsecore/source-output.h
    branches/glitch-free/src/pulsecore/source.c

Modified: branches/glitch-free/src/pulsecore/play-memblockq.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/play-memblockq.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/play-memblockq.c (original)
+++ branches/glitch-free/src/pulsecore/play-memblockq.c Sun Apr 20 22:35:44 2008
@@ -127,7 +127,7 @@
     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 @@
     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 @@
         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;
 

Modified: branches/glitch-free/src/pulsecore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/protocol-native.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/protocol-native.c (original)
+++ branches/glitch-free/src/pulsecore/protocol-native.c Sun Apr 20 22:35:44 2008
@@ -209,8 +209,8 @@
 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 @@
 
     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 @@
     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 @@
     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);

Modified: branches/glitch-free/src/pulsecore/sink-input.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sink-input.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sink-input.c (original)
+++ branches/glitch-free/src/pulsecore/sink-input.c Sun Apr 20 22:35:44 2008
@@ -98,8 +98,8 @@
     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 @@
 
     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 @@
                 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 @@
 }
 
 /* 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) {

Modified: branches/glitch-free/src/pulsecore/sink-input.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sink-input.h?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sink-input.h (original)
+++ branches/glitch-free/src/pulsecore/sink-input.h Sun Apr 20 22:35:44 2008
@@ -103,11 +103,11 @@
      * 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 @@
 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);
 

Modified: branches/glitch-free/src/pulsecore/sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sink.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sink.c (original)
+++ branches/glitch-free/src/pulsecore/sink.c Sun Apr 20 22:35:44 2008
@@ -981,7 +981,7 @@
                 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 @@
                 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 @@
     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);

Modified: branches/glitch-free/src/pulsecore/sound-file-stream.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sound-file-stream.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sound-file-stream.c (original)
+++ branches/glitch-free/src/pulsecore/sound-file-stream.c Sun Apr 20 22:35:44 2008
@@ -198,7 +198,7 @@
     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 @@
     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 @@
         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;
 

Modified: branches/glitch-free/src/pulsecore/source-output.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/source-output.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/source-output.c (original)
+++ branches/glitch-free/src/pulsecore/source-output.c Sun Apr 20 22:35:44 2008
@@ -80,8 +80,8 @@
     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 @@
         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 @@
     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 @@
         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 @@
 }
 
 /* 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) {

Modified: branches/glitch-free/src/pulsecore/source-output.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/source-output.h?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/source-output.h (original)
+++ branches/glitch-free/src/pulsecore/source-output.h Sun Apr 20 22:35:44 2008
@@ -84,11 +84,11 @@
 
     /* 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 @@
 
 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);
 

Modified: branches/glitch-free/src/pulsecore/source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/source.c?rev=2284&root=pulseaudio&r1=2283&r2=2284&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/source.c (original)
+++ branches/glitch-free/src/pulsecore/source.c Sun Apr 20 22:35:44 2008
@@ -582,7 +582,7 @@
 
             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 @@
     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) {




More information about the pulseaudio-commits mailing list