[pulseaudio-commits] r1476 - /branches/lennart/src/pulsecore/protocol-simple.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jun 14 10:01:01 PDT 2007


Author: lennart
Date: Thu Jun 14 19:01:01 2007
New Revision: 1476

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1476&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Move a few things between the threads

Modified:
    branches/lennart/src/pulsecore/protocol-simple.c

Modified: branches/lennart/src/pulsecore/protocol-simple.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
protocol-simple.c?rev=3D1476&root=3Dpulseaudio&r1=3D1475&r2=3D1476&view=3Dd=
iff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/protocol-simple.c (original)
+++ branches/lennart/src/pulsecore/protocol-simple.c Thu Jun 14 19:01:01 20=
07
@@ -88,6 +88,7 @@
 =

 enum {
     SINK_INPUT_MESSAGE_POST_DATA =3D PA_SINK_INPUT_MESSAGE_MAX, /* data fr=
om main loop to sink input */
+    SINK_INPUT_MESSAGE_DISABLE_PREBUF /* disabled prebuf, get playback sta=
rted. */
 };
 =

 enum {
@@ -189,7 +190,7 @@
 =

     c->playback.memblock_index +=3D r;
 =

-    pa_asyncmsgq_post(c->protocol->core->asyncmsgq, PA_MSGOBJECT(c->sink_i=
nput), SINK_INPUT_MESSAGE_POST_DATA, NULL, &chunk, NULL);
+    pa_asyncmsgq_post(c->sink_input->sink->asyncmsgq, PA_MSGOBJECT(c->sink=
_input), SINK_INPUT_MESSAGE_POST_DATA, NULL, &chunk, NULL);
 =

     return 0;
 }
@@ -259,7 +260,7 @@
         pa_iochannel_free(c->io);
         c->io =3D NULL;
 =

-        pa_memblockq_prebuf_disable(c->input_memblockq);
+        pa_asyncmsgq_post(c->sink_input->sink->asyncmsgq, PA_MSGOBJECT(c->=
sink_input), SINK_INPUT_MESSAGE_DISABLE_PREBUF, NULL, NULL, NULL);
     } else
         connection_drop(c);
 }
@@ -282,7 +283,6 @@
         case MESSAGE_DROP_CONNECTION:
             connection_drop(c);
             break;
-
     }
 =

     return 0;
@@ -307,7 +307,14 @@
             /* New data from the main loop */
             pa_memblockq_push_align(c->input_memblockq, chunk);
             pa_atomic_store(&c->playback.missing, pa_memblockq_missing(c->=
input_memblockq));
+
+/*             pa_log("got data, %u", pa_memblockq_get_length(c->input_mem=
blockq)); */
             =

+            return 0;
+        }
+
+        case SINK_INPUT_MESSAGE_DISABLE_PREBUF: {
+            pa_memblockq_prebuf_disable(c->input_memblockq);
             return 0;
         }
 =

@@ -336,6 +343,8 @@
     pa_assert(chunk);
 =

     r =3D pa_memblockq_peek(c->input_memblockq, chunk);
+
+/*     pa_log("peeked %u %i", r >=3D 0 ? chunk->length: 0, r); */
 =

     if (c->dead && r < 0)
         pa_asyncmsgq_post(c->protocol->core->asyncmsgq, PA_MSGOBJECT(c), M=
ESSAGE_DROP_CONNECTION, c, NULL, NULL);




More information about the pulseaudio-commits mailing list