[pulseaudio-commits] r2125 - in /branches/glitch-free/src: Makefile.am modules/alsa-util.h modules/rtp/module-rtp-recv.c modules/rtp/module-rtp-send.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat Mar 15 08:24:39 PDT 2008


Author: lennart
Date: Sat Mar 15 16:24:36 2008
New Revision: 2125

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2125&root=pulseaudio&view=rev
Log:
commit glitch-free work

Modified:
    branches/glitch-free/src/Makefile.am
    branches/glitch-free/src/modules/alsa-util.h
    branches/glitch-free/src/modules/rtp/module-rtp-recv.c
    branches/glitch-free/src/modules/rtp/module-rtp-send.c

Modified: branches/glitch-free/src/Makefile.am
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/Makefile.am?rev=2125&root=pulseaudio&r1=2124&r2=2125&view=diff
==============================================================================
--- branches/glitch-free/src/Makefile.am (original)
+++ branches/glitch-free/src/Makefile.am Sat Mar 15 16:24:36 2008
@@ -695,7 +695,8 @@
 		pulse/utf8.c pulse/utf8.h \
 		pulse/util.c pulse/util.h \
 		pulse/volume.c pulse/volume.h \
-		pulse/xmalloc.c pulse/xmalloc.h
+		pulse/xmalloc.c pulse/xmalloc.h \
+		pulse/proplist.c pulse/proplist.h
 
 # Pure core stuff (some are shared in libpulse though).
 libpulsecore_la_SOURCES += \

Modified: branches/glitch-free/src/modules/alsa-util.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/modules/alsa-util.h?rev=2125&root=pulseaudio&r1=2124&r2=2125&view=diff
==============================================================================
--- branches/glitch-free/src/modules/alsa-util.h (original)
+++ branches/glitch-free/src/modules/alsa-util.h Sat Mar 15 16:24:36 2008
@@ -43,10 +43,12 @@
         pa_sample_spec *ss,
         uint32_t *periods,
         snd_pcm_uframes_t *period_size,
+        snd_pcm_uframes_t tsched_size,
         pa_bool_t *use_mmap,
+        pa_bool_t *use_tsched,
         pa_bool_t require_exact_channel_number);
 
-int pa_alsa_set_sw_params(snd_pcm_t *pcm);
+int pa_alsa_set_sw_params(snd_pcm_t *pcm, size_t avail_min);
 
 int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev);
 snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const char *fallback);
@@ -59,7 +61,9 @@
         int mode,
         uint32_t *nfrags,
         snd_pcm_uframes_t *period_size,
-        pa_bool_t *use_mmap);
+        snd_pcm_uframes_t tsched_size,
+        pa_bool_t *use_mmap,
+        pa_bool_t *use_tsched);
 
 snd_pcm_t *pa_alsa_open_by_device_string(
         const char *device,
@@ -69,8 +73,13 @@
         int mode,
         uint32_t *nfrags,
         snd_pcm_uframes_t *period_size,
-        pa_bool_t *use_mmap);
+        snd_pcm_uframes_t tsched_size,
+        pa_bool_t *use_mmap,
+        pa_bool_t *use_tsched);
 
 int pa_alsa_calc_mixer_map(snd_mixer_elem_t *elem, const pa_channel_map *channel_map, snd_mixer_selem_channel_id_t mixer_map[], pa_bool_t playback);
 
+void pa_alsa_0dB_playback(snd_mixer_elem_t *elem);
+void pa_alsa_0dB_capture(snd_mixer_elem_t *elem);
+
 #endif

Modified: branches/glitch-free/src/modules/rtp/module-rtp-recv.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/modules/rtp/module-rtp-recv.c?rev=2125&root=pulseaudio&r1=2124&r2=2125&view=diff
==============================================================================
--- branches/glitch-free/src/modules/rtp/module-rtp-recv.c (original)
+++ branches/glitch-free/src/modules/rtp/module-rtp-recv.c Sat Mar 15 16:24:36 2008
@@ -133,21 +133,17 @@
 }
 
 /* Called from I/O thread context */
-static int sink_input_peek(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
+static int sink_input_pop(pa_sink_input *i, size_t length, pa_memchunk *chunk) {
     struct session *s;
     pa_sink_input_assert_ref(i);
     pa_assert_se(s = i->userdata);
 
-    return pa_memblockq_peek(s->memblockq, chunk);
-}
-
-/* Called from I/O thread context */
-static void sink_input_drop(pa_sink_input *i, size_t length) {
-    struct session *s;
-    pa_sink_input_assert_ref(i);
-    pa_assert_se(s = i->userdata);
-
-    pa_memblockq_drop(s->memblockq, length);
+    if (pa_memblockq_peek(s->memblockq, chunk) < 0)
+        return -1;
+
+    pa_memblockq_drop(s->memblockq, chunk->length);
+
+    return 0;
 }
 
 /* Called from main context */
@@ -354,12 +350,13 @@
     pa_sink_input_new_data_init(&data);
     data.sink = sink;
     data.driver = __FILE__;
-    data.name = c;
+    pa_proplist_sets(data.proplist, PA_PROP_MEDIA_NAME, c);
+    pa_xfree(c);
     data.module = u->module;
     pa_sink_input_new_data_set_sample_spec(&data, &sdp_info->sample_spec);
 
     s->sink_input = pa_sink_input_new(u->module->core, &data, 0);
-    pa_xfree(c);
+    pa_sink_input_new_data_done(&data);
 
     if (!s->sink_input) {
         pa_log("Failed to create sink input.");
@@ -369,8 +366,7 @@
     s->sink_input->userdata = s;
 
     s->sink_input->parent.process_msg = sink_input_process_msg;
-    s->sink_input->peek = sink_input_peek;
-    s->sink_input->drop = sink_input_drop;
+    s->sink_input->pop = sink_input_pop;
     s->sink_input->kill = sink_input_kill;
     s->sink_input->attach = sink_input_attach;
     s->sink_input->detach = sink_input_detach;
@@ -386,6 +382,7 @@
             MEMBLOCKQ_MAXLENGTH,
             pa_frame_size(&s->sink_input->sample_spec),
             pa_bytes_per_second(&s->sink_input->sample_spec)/10+1,
+            0,
             0,
             silence);
 

Modified: branches/glitch-free/src/modules/rtp/module-rtp-send.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/modules/rtp/module-rtp-send.c?rev=2125&root=pulseaudio&r1=2124&r2=2125&view=diff
==============================================================================
--- branches/glitch-free/src/modules/rtp/module-rtp-send.c (original)
+++ branches/glitch-free/src/modules/rtp/module-rtp-send.c Sat Mar 15 16:24:36 2008
@@ -288,14 +288,17 @@
     pa_make_fd_cloexec(sap_fd);
 
     pa_source_output_new_data_init(&data);
-    data.name = "RTP Monitor Stream";
+    pa_proplist_sets(data.proplist, PA_PROP_MEDIA_NAME, "RTP Monitor Stream");
     data.driver = __FILE__;
     data.module = m;
     data.source = s;
     pa_source_output_new_data_set_sample_spec(&data, &ss);
     pa_source_output_new_data_set_channel_map(&data, &cm);
 
-    if (!(o = pa_source_output_new(m->core, &data, 0))) {
+    o = pa_source_output_new(m->core, &data, 0);
+    pa_source_output_new_data_done(&data);
+
+    if (!o) {
         pa_log("failed to create source output.");
         goto fail;
     }
@@ -318,6 +321,7 @@
             pa_frame_size(&ss),
             1,
             0,
+            0,
             NULL);
 
     u->mtu = mtu;




More information about the pulseaudio-commits mailing list