2004-06-15 17:05:03 +00:00
|
|
|
#ifndef foosourceoutputhfoo
|
|
|
|
|
#define foosourceoutputhfoo
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-07-16 19:56:36 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
|
|
/***
|
2006-06-19 21:53:48 +00:00
|
|
|
This file is part of PulseAudio.
|
2004-07-16 19:56:36 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
2004-11-14 14:58:54 +00:00
|
|
|
it under the terms of the GNU Lesser General Public License as published
|
2004-07-16 19:56:36 +00:00
|
|
|
by the Free Software Foundation; either version 2 of the License,
|
|
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
2004-07-16 19:56:36 +00:00
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
2004-11-14 14:58:54 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2006-06-19 21:53:48 +00:00
|
|
|
along with PulseAudio; if not, write to the Free Software
|
2004-07-16 19:56:36 +00:00
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#include <inttypes.h>
|
2004-06-15 17:05:03 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
typedef struct pa_source_output pa_source_output;
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
#include <pulse/sample.h>
|
|
|
|
|
#include <pulsecore/source.h>
|
|
|
|
|
#include <pulsecore/memblockq.h>
|
|
|
|
|
#include <pulsecore/resampler.h>
|
|
|
|
|
#include <pulsecore/module.h>
|
|
|
|
|
#include <pulsecore/client.h>
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
typedef enum {
|
2004-09-14 20:53:25 +00:00
|
|
|
PA_SOURCE_OUTPUT_RUNNING,
|
2004-09-26 17:02:26 +00:00
|
|
|
PA_SOURCE_OUTPUT_CORKED,
|
2004-09-14 20:53:25 +00:00
|
|
|
PA_SOURCE_OUTPUT_DISCONNECTED
|
2006-01-27 16:25:31 +00:00
|
|
|
} pa_source_output_state_t;
|
2004-09-14 20:53:25 +00:00
|
|
|
|
2004-07-03 23:35:12 +00:00
|
|
|
struct pa_source_output {
|
2004-09-14 20:53:25 +00:00
|
|
|
int ref;
|
2004-06-08 23:54:24 +00:00
|
|
|
uint32_t index;
|
2006-01-27 16:25:31 +00:00
|
|
|
pa_source_output_state_t state;
|
|
|
|
|
|
|
|
|
|
char *name, *driver;
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_module *owner;
|
2006-01-27 16:25:31 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_source *source;
|
2006-01-27 16:25:31 +00:00
|
|
|
pa_client *client;
|
|
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_sample_spec sample_spec;
|
2006-01-27 16:25:31 +00:00
|
|
|
pa_channel_map channel_map;
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
void (*push)(pa_source_output *o, const pa_memchunk *chunk);
|
|
|
|
|
void (*kill)(pa_source_output* o);
|
2006-04-14 23:46:32 +00:00
|
|
|
pa_usec_t (*get_latency) (pa_source_output *o);
|
2004-06-15 17:05:03 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_resampler* resampler;
|
2006-08-03 22:30:45 +00:00
|
|
|
pa_resample_method_t resample_method;
|
2004-07-03 00:19:17 +00:00
|
|
|
|
2004-06-15 17:05:03 +00:00
|
|
|
void *userdata;
|
2004-06-08 23:54:24 +00:00
|
|
|
};
|
|
|
|
|
|
2006-01-27 16:25:31 +00:00
|
|
|
pa_source_output* pa_source_output_new(
|
|
|
|
|
pa_source *s,
|
|
|
|
|
const char *driver,
|
|
|
|
|
const char *name,
|
|
|
|
|
const pa_sample_spec *spec,
|
|
|
|
|
const pa_channel_map *map,
|
|
|
|
|
int resample_method);
|
|
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_source_output_unref(pa_source_output* o);
|
|
|
|
|
pa_source_output* pa_source_output_ref(pa_source_output *o);
|
2004-06-08 23:54:24 +00:00
|
|
|
|
2004-09-14 20:53:25 +00:00
|
|
|
/* To be called by the implementing module only */
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_source_output_disconnect(pa_source_output*o);
|
2004-09-14 20:53:25 +00:00
|
|
|
|
|
|
|
|
/* External code may request disconnection with this funcion */
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_source_output_kill(pa_source_output*o);
|
2004-06-14 20:30:50 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk);
|
2004-07-03 00:19:17 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_source_output_set_name(pa_source_output *i, const char *name);
|
2004-09-14 20:53:25 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
pa_usec_t pa_source_output_get_latency(pa_source_output *i);
|
2004-09-16 00:05:56 +00:00
|
|
|
|
2006-01-11 01:17:39 +00:00
|
|
|
void pa_source_output_cork(pa_source_output *i, int b);
|
2004-09-26 17:02:26 +00:00
|
|
|
|
2006-01-27 16:25:31 +00:00
|
|
|
pa_resample_method_t pa_source_output_get_resample_method(pa_source_output *o);
|
2004-09-16 00:05:56 +00:00
|
|
|
|
2006-08-03 22:30:45 +00:00
|
|
|
int pa_source_output_move_to(pa_source_output *o, pa_source *dest);
|
|
|
|
|
|
2004-06-08 23:54:24 +00:00
|
|
|
#endif
|