def.h

Go to the documentation of this file.
00001 #ifndef foodefhfoo
00002 #define foodefhfoo
00003 
00004 /* $Id: def.h 2067 2007-11-21 01:30:40Z lennart $ */
00005 
00006 /***
00007   This file is part of PulseAudio.
00008 
00009   Copyright 2004-2006 Lennart Poettering
00010   Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
00011 
00012   PulseAudio is free software; you can redistribute it and/or modify
00013   it under the terms of the GNU Lesser General Public License as
00014   published by the Free Software Foundation; either version 2.1 of the
00015   License, or (at your option) any later version.
00016 
00017   PulseAudio is distributed in the hope that it will be useful, but
00018   WITHOUT ANY WARRANTY; without even the implied warranty of
00019   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00020   Lesser General Public License for more details.
00021 
00022   You should have received a copy of the GNU Lesser General Public
00023   License along with PulseAudio; if not, write to the Free Software
00024   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025   USA.
00026 ***/
00027 
00028 #include <inttypes.h>
00029 #include <sys/time.h>
00030 #include <time.h>
00031 
00032 #include <pulse/cdecl.h>
00033 #include <pulse/sample.h>
00034 
00038 PA_C_DECL_BEGIN
00039 
00041 typedef enum pa_context_state {
00042     PA_CONTEXT_UNCONNECTED,    
00043     PA_CONTEXT_CONNECTING,     
00044     PA_CONTEXT_AUTHORIZING,    
00045     PA_CONTEXT_SETTING_NAME,   
00046     PA_CONTEXT_READY,          
00047     PA_CONTEXT_FAILED,         
00048     PA_CONTEXT_TERMINATED      
00049 } pa_context_state_t;
00050 
00052 typedef enum pa_stream_state {
00053     PA_STREAM_UNCONNECTED, 
00054     PA_STREAM_CREATING,     
00055     PA_STREAM_READY,        
00056     PA_STREAM_FAILED,       
00057     PA_STREAM_TERMINATED    
00058 } pa_stream_state_t;
00059 
00061 typedef enum pa_operation_state {
00062     PA_OPERATION_RUNNING,      
00063     PA_OPERATION_DONE,         
00064     PA_OPERATION_CANCELED      
00065 } pa_operation_state_t;
00066 
00068 #define PA_INVALID_INDEX ((uint32_t) -1)
00069 
00071 typedef enum pa_context_flags {
00072     PA_CONTEXT_NOAUTOSPAWN = 1 
00073 } pa_context_flags_t;
00074 
00076 typedef enum pa_stream_direction {
00077     PA_STREAM_NODIRECTION,   
00078     PA_STREAM_PLAYBACK,      
00079     PA_STREAM_RECORD,        
00080     PA_STREAM_UPLOAD         
00081 } pa_stream_direction_t;
00082 
00084 typedef enum pa_stream_flags {
00085     PA_STREAM_START_CORKED = 1,       
00086     PA_STREAM_INTERPOLATE_TIMING = 2, 
00109     PA_STREAM_NOT_MONOTONOUS = 4,    
00125     PA_STREAM_AUTO_TIMING_UPDATE = 8, 
00135     PA_STREAM_NO_REMAP_CHANNELS = 16, 
00144     PA_STREAM_NO_REMIX_CHANNELS = 32, 
00154     PA_STREAM_FIX_FORMAT = 64, 
00175     PA_STREAM_FIX_RATE = 128, 
00183     PA_STREAM_FIX_CHANNELS = 256, 
00193     PA_STREAM_DONT_MOVE = 512, 
00204     PA_STREAM_VARIABLE_RATE = 1024, 
00212 } pa_stream_flags_t;
00213 
00215 typedef struct pa_buffer_attr {
00216     uint32_t maxlength;      
00217     uint32_t tlength;        
00218     uint32_t prebuf;         
00219     uint32_t minreq;         
00220     uint32_t fragsize;       
00221 } pa_buffer_attr;
00222 
00224 enum {
00225     PA_OK = 0,                     
00226     PA_ERR_ACCESS,                 
00227     PA_ERR_COMMAND,                
00228     PA_ERR_INVALID,                
00229     PA_ERR_EXIST,                  
00230     PA_ERR_NOENTITY,               
00231     PA_ERR_CONNECTIONREFUSED,      
00232     PA_ERR_PROTOCOL,               
00233     PA_ERR_TIMEOUT,                
00234     PA_ERR_AUTHKEY,                
00235     PA_ERR_INTERNAL,               
00236     PA_ERR_CONNECTIONTERMINATED,   
00237     PA_ERR_KILLED,                 
00238     PA_ERR_INVALIDSERVER,          
00239     PA_ERR_MODINITFAILED,          
00240     PA_ERR_BADSTATE,               
00241     PA_ERR_NODATA,                 
00242     PA_ERR_VERSION,                
00243     PA_ERR_TOOLARGE,               
00244     PA_ERR_NOTSUPPORTED,           
00245     PA_ERR_MAX                     
00246 };
00247 
00249 typedef enum pa_subscription_mask {
00250     PA_SUBSCRIPTION_MASK_NULL = 0,               
00251     PA_SUBSCRIPTION_MASK_SINK = 1,               
00252     PA_SUBSCRIPTION_MASK_SOURCE = 2,             
00253     PA_SUBSCRIPTION_MASK_SINK_INPUT = 4,         
00254     PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT = 8,      
00255     PA_SUBSCRIPTION_MASK_MODULE = 16,            
00256     PA_SUBSCRIPTION_MASK_CLIENT = 32,            
00257     PA_SUBSCRIPTION_MASK_SAMPLE_CACHE = 64,      
00258     PA_SUBSCRIPTION_MASK_SERVER = 128,           
00259     PA_SUBSCRIPTION_MASK_AUTOLOAD = 256,         
00260     PA_SUBSCRIPTION_MASK_ALL = 511               
00261 } pa_subscription_mask_t;
00262 
00264 typedef enum pa_subscription_event_type {
00265     PA_SUBSCRIPTION_EVENT_SINK = 0,           
00266     PA_SUBSCRIPTION_EVENT_SOURCE = 1,         
00267     PA_SUBSCRIPTION_EVENT_SINK_INPUT = 2,     
00268     PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT = 3,  
00269     PA_SUBSCRIPTION_EVENT_MODULE = 4,         
00270     PA_SUBSCRIPTION_EVENT_CLIENT = 5,         
00271     PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE = 6,   
00272     PA_SUBSCRIPTION_EVENT_SERVER = 7,         
00273     PA_SUBSCRIPTION_EVENT_AUTOLOAD = 8,       
00274     PA_SUBSCRIPTION_EVENT_FACILITY_MASK = 15, 
00276     PA_SUBSCRIPTION_EVENT_NEW = 0,            
00277     PA_SUBSCRIPTION_EVENT_CHANGE = 16,        
00278     PA_SUBSCRIPTION_EVENT_REMOVE = 32,        
00279     PA_SUBSCRIPTION_EVENT_TYPE_MASK = 16+32   
00280 } pa_subscription_event_type_t;
00281 
00283 #define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
00284 
00301 typedef struct pa_timing_info {
00302     struct timeval timestamp; 
00303     int synchronized_clocks;  
00312     pa_usec_t sink_usec;      
00313     pa_usec_t source_usec;    
00314     pa_usec_t transport_usec; 
00316     int playing;              
00318     int write_index_corrupt;  
00326     int64_t write_index;      
00334     int read_index_corrupt;   
00340     int64_t read_index;       
00347 } pa_timing_info;
00348 
00356 typedef struct pa_spawn_api {
00357     void (*prefork)(void);     
00358     void (*postfork)(void);    
00359     void (*atfork)(void);      
00366 } pa_spawn_api;
00367 
00369 typedef enum pa_seek_mode {
00370     PA_SEEK_RELATIVE = 0,           
00371     PA_SEEK_ABSOLUTE = 1,           
00372     PA_SEEK_RELATIVE_ON_READ = 2,   
00373     PA_SEEK_RELATIVE_END = 3        
00374 } pa_seek_mode_t;
00375 
00377 typedef enum pa_sink_flags {
00378     PA_SINK_HW_VOLUME_CTRL = 1,   
00379     PA_SINK_LATENCY = 2,          
00380     PA_SINK_HARDWARE = 4,         
00381     PA_SINK_NETWORK = 8           
00382 } pa_sink_flags_t;
00383 
00385 typedef enum pa_source_flags {
00386     PA_SOURCE_HW_VOLUME_CTRL = 1,  
00387     PA_SOURCE_LATENCY = 2,         
00388     PA_SOURCE_HARDWARE = 4,        
00389     PA_SOURCE_NETWORK = 8          
00390 } pa_source_flags_t;
00391 
00393 typedef void (*pa_free_cb_t)(void *p);
00394 
00395 PA_C_DECL_END
00396 
00397 #endif

Generated on Tue Apr 24 02:06:15 2012 for PulseAudio by  doxygen 1.4.7