~ubuntu-branches/ubuntu/karmic/pulseaudio/karmic-updates

« back to all changes in this revision

Viewing changes to src/modules/module-tunnel.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 12:02:18 UTC
  • Revision ID: james.westby@ubuntu.com-20090805120218-202a8uz8lfjw1vy4
Tags: 1:0.9.16~test4-0ubuntu1
* New upstream release
* debian/patches/0008-clean-out-old-files.patch: Dropped, applied upstream
* debian/control: Fix pulseaudio-module-rygel-media-server debug package name

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
#include <pulsecore/core-error.h>
56
56
#include <pulsecore/proplist-util.h>
57
57
#include <pulsecore/auth-cookie.h>
 
58
#include <pulsecore/mcalign.h>
58
59
 
59
60
#ifdef TUNNEL_SINK
60
61
#include "module-tunnel-sink-symdef.h"
194
195
#else
195
196
    char *source_name;
196
197
    pa_source *source;
 
198
    pa_mcalign *mcalign;
197
199
#endif
198
200
 
199
201
    pa_auth_cookie *auth_cookie;
614
616
            return 0;
615
617
        }
616
618
 
617
 
        case SOURCE_MESSAGE_POST:
618
 
 
619
 
            if (PA_SOURCE_IS_OPENED(u->source->thread_info.state))
620
 
                pa_source_post(u->source, chunk);
621
 
 
622
 
            u->counter += (int64_t) chunk->length;
 
619
        case SOURCE_MESSAGE_POST: {
 
620
            pa_memchunk c;
 
621
 
 
622
            pa_mcalign_push(u->mcalign, chunk);
 
623
 
 
624
            while (pa_mcalign_pop(u->mcalign, &c) >= 0) {
 
625
 
 
626
                if (PA_SOURCE_IS_OPENED(u->source->thread_info.state))
 
627
                    pa_source_post(u->source, &c);
 
628
 
 
629
                pa_memblock_unref(c.memblock);
 
630
 
 
631
                u->counter += (int64_t) c.length;
 
632
            }
623
633
 
624
634
            return 0;
 
635
        }
625
636
 
626
637
        case SOURCE_MESSAGE_REMOTE_SUSPEND:
627
638
 
1937
1948
 
1938
1949
    pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
1939
1950
    pa_source_set_rtpoll(u->source, u->rtpoll);
 
1951
 
 
1952
    u->mcalign = pa_mcalign_new(pa_frame_size(&u->source->sample_spec));
1940
1953
#endif
1941
1954
 
1942
1955
    pa_xfree(dn);
2030
2043
    if (u->time_event)
2031
2044
        u->core->mainloop->time_free(u->time_event);
2032
2045
 
 
2046
#ifndef TUNNEL_SINK
 
2047
    if (u->mcalign)
 
2048
        pa_mcalign_free(u->mcalign);
 
2049
#endif
 
2050
 
2033
2051
#ifdef TUNNEL_SINK
2034
2052
    pa_xfree(u->sink_name);
2035
2053
#else