def.h

Go to the documentation of this file.
00001 #ifndef foodefhfoo
00002 #define foodefhfoo
00003 
00004 /* $Id: def.h 1426 2007-02-13 15:35:19Z ossman $ */
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_flags_t;
00136 
00138 typedef struct pa_buffer_attr {
00139     uint32_t maxlength;      
00140     uint32_t tlength;        
00141     uint32_t prebuf;         
00142     uint32_t minreq;         
00143     uint32_t fragsize;       
00144 } pa_buffer_attr;
00145 
00147 enum {
00148     PA_OK = 0,                     
00149     PA_ERR_ACCESS,                 
00150     PA_ERR_COMMAND,                
00151     PA_ERR_INVALID,                
00152     PA_ERR_EXIST,                  
00153     PA_ERR_NOENTITY,               
00154     PA_ERR_CONNECTIONREFUSED,      
00155     PA_ERR_PROTOCOL,               
00156     PA_ERR_TIMEOUT,                
00157     PA_ERR_AUTHKEY,                
00158     PA_ERR_INTERNAL,               
00159     PA_ERR_CONNECTIONTERMINATED,   
00160     PA_ERR_KILLED,                 
00161     PA_ERR_INVALIDSERVER,          
00162     PA_ERR_MODINITFAILED,          
00163     PA_ERR_BADSTATE,               
00164     PA_ERR_NODATA,                 
00165     PA_ERR_VERSION,                
00166     PA_ERR_TOOLARGE,               
00167     PA_ERR_NOTSUPPORTED,           
00168     PA_ERR_MAX                     
00169 };
00170 
00172 typedef enum pa_subscription_mask {
00173     PA_SUBSCRIPTION_MASK_NULL = 0,               
00174     PA_SUBSCRIPTION_MASK_SINK = 1,               
00175     PA_SUBSCRIPTION_MASK_SOURCE = 2,             
00176     PA_SUBSCRIPTION_MASK_SINK_INPUT = 4,         
00177     PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT = 8,      
00178     PA_SUBSCRIPTION_MASK_MODULE = 16,            
00179     PA_SUBSCRIPTION_MASK_CLIENT = 32,            
00180     PA_SUBSCRIPTION_MASK_SAMPLE_CACHE = 64,      
00181     PA_SUBSCRIPTION_MASK_SERVER = 128,           
00182     PA_SUBSCRIPTION_MASK_AUTOLOAD = 256,         
00183     PA_SUBSCRIPTION_MASK_ALL = 511               
00184 } pa_subscription_mask_t;
00185 
00187 typedef enum pa_subscription_event_type {
00188     PA_SUBSCRIPTION_EVENT_SINK = 0,           
00189     PA_SUBSCRIPTION_EVENT_SOURCE = 1,         
00190     PA_SUBSCRIPTION_EVENT_SINK_INPUT = 2,     
00191     PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT = 3,  
00192     PA_SUBSCRIPTION_EVENT_MODULE = 4,         
00193     PA_SUBSCRIPTION_EVENT_CLIENT = 5,         
00194     PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE = 6,   
00195     PA_SUBSCRIPTION_EVENT_SERVER = 7,         
00196     PA_SUBSCRIPTION_EVENT_AUTOLOAD = 8,       
00197     PA_SUBSCRIPTION_EVENT_FACILITY_MASK = 15, 
00199     PA_SUBSCRIPTION_EVENT_NEW = 0,            
00200     PA_SUBSCRIPTION_EVENT_CHANGE = 16,        
00201     PA_SUBSCRIPTION_EVENT_REMOVE = 32,        
00202     PA_SUBSCRIPTION_EVENT_TYPE_MASK = 16+32   
00203 } pa_subscription_event_type_t;
00204 
00206 #define pa_subscription_match_flags(m, t) (!!((m) & (1 << ((t) & PA_SUBSCRIPTION_EVENT_FACILITY_MASK))))
00207 
00224 typedef struct pa_timing_info {
00225     struct timeval timestamp; 
00226     int synchronized_clocks;  
00235     pa_usec_t sink_usec;      
00236     pa_usec_t source_usec;    
00237     pa_usec_t transport_usec; 
00239     int playing;              
00241     int write_index_corrupt;  
00249     int64_t write_index;      
00257     int read_index_corrupt;   
00263     int64_t read_index;       
00270 } pa_timing_info;
00271 
00279 typedef struct pa_spawn_api {
00280     void (*prefork)(void);     
00281     void (*postfork)(void);    
00282     void (*atfork)(void);      
00289 } pa_spawn_api;
00290 
00292 typedef enum pa_seek_mode {
00293     PA_SEEK_RELATIVE = 0,           
00294     PA_SEEK_ABSOLUTE = 1,           
00295     PA_SEEK_RELATIVE_ON_READ = 2,   
00296     PA_SEEK_RELATIVE_END = 3        
00297 } pa_seek_mode_t;
00298 
00300 typedef enum pa_sink_flags {
00301     PA_SINK_HW_VOLUME_CTRL = 1,   
00302     PA_SINK_LATENCY = 2,          
00303     PA_SINK_HARDWARE = 4          
00304 } pa_sink_flags_t;
00305 
00307 typedef enum pa_source_flags {
00308     PA_SOURCE_HW_VOLUME_CTRL = 1,  
00309     PA_SOURCE_LATENCY = 2,         
00310     PA_SOURCE_HARDWARE = 4         
00311 } pa_source_flags_t;
00312 
00314 typedef void (*pa_free_cb_t)(void *p);
00315 
00316 PA_C_DECL_END
00317 
00318 #endif

Generated on Wed Jan 23 11:06:29 2008 for PulseAudio by  doxygen 1.5.4