mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	* remove a lot of compiler warnings introduced by using some new GCC flags
* add typedefs for public structs and enums and drop the struct/enum prefixs from all uses where it makes sense git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@447 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									6c512fb5a3
								
							
						
					
					
						commit
						1f0961368f
					
				
					 200 changed files with 3582 additions and 3468 deletions
				
			
		| 
						 | 
				
			
			@ -34,43 +34,43 @@
 | 
			
		|||
 | 
			
		||||
PA_C_DECL_BEGIN
 | 
			
		||||
 | 
			
		||||
/** \struct pa_stream
 | 
			
		||||
/** \pa_stream
 | 
			
		||||
 * An opaque stream for playback or recording */
 | 
			
		||||
struct pa_stream;
 | 
			
		||||
typedef struct pa_stream pa_stream;
 | 
			
		||||
 | 
			
		||||
/** Create a new, unconnected stream with the specified name and sample type */
 | 
			
		||||
struct pa_stream* pa_stream_new(struct pa_context *c, const char *name, const struct pa_sample_spec *ss);
 | 
			
		||||
pa_stream* pa_stream_new(pa_context *c, const char *name, const pa_sample_spec *ss);
 | 
			
		||||
 | 
			
		||||
/** Decrease the reference counter by one */
 | 
			
		||||
void pa_stream_unref(struct pa_stream *s);
 | 
			
		||||
void pa_stream_unref(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
/** Increase the reference counter by one */
 | 
			
		||||
struct pa_stream *pa_stream_ref(struct pa_stream *s);
 | 
			
		||||
pa_stream *pa_stream_ref(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
/** Return the current state of the stream */
 | 
			
		||||
enum pa_stream_state pa_stream_get_state(struct pa_stream *p);
 | 
			
		||||
pa_stream_state pa_stream_get_state(pa_stream *p);
 | 
			
		||||
 | 
			
		||||
/** Return the context this stream is attached to */
 | 
			
		||||
struct pa_context* pa_stream_get_context(struct pa_stream *p);
 | 
			
		||||
pa_context* pa_stream_get_context(pa_stream *p);
 | 
			
		||||
 | 
			
		||||
/** Return the device (sink input or source output) index this stream is connected to */
 | 
			
		||||
uint32_t pa_stream_get_index(struct pa_stream *s);
 | 
			
		||||
uint32_t pa_stream_get_index(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
/** Connect the stream to a sink */
 | 
			
		||||
void pa_stream_connect_playback(struct pa_stream *s, const char *dev, const struct pa_buffer_attr *attr, enum pa_stream_flags flags, pa_volume_t volume);
 | 
			
		||||
void pa_stream_connect_playback(pa_stream *s, const char *dev, const pa_buffer_attr *attr, pa_stream_flags flags, pa_volume_t volume);
 | 
			
		||||
 | 
			
		||||
/** Connect the stream to a source */
 | 
			
		||||
void pa_stream_connect_record(struct pa_stream *s, const char *dev, const struct pa_buffer_attr *attr, enum pa_stream_flags flags);
 | 
			
		||||
void pa_stream_connect_record(pa_stream *s, const char *dev, const pa_buffer_attr *attr, pa_stream_flags flags);
 | 
			
		||||
 | 
			
		||||
/** Disconnect a stream from a source/sink */
 | 
			
		||||
void pa_stream_disconnect(struct pa_stream *s);
 | 
			
		||||
void pa_stream_disconnect(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
/** Write some data to the server (for playback sinks), if free_cb is
 | 
			
		||||
 * non-NULL this routine is called when all data has been written out
 | 
			
		||||
 * and an internal reference to the specified data is kept, the data
 | 
			
		||||
 * is not copied. If NULL, the data is copied into an internal
 | 
			
		||||
 * buffer. */ 
 | 
			
		||||
void pa_stream_write(struct pa_stream *p      /**< The stream to use */,
 | 
			
		||||
void pa_stream_write(pa_stream *p      /**< The stream to use */,
 | 
			
		||||
                     const void *data         /**< The data to write */,
 | 
			
		||||
                     size_t length            /**< The length of the data to write */,
 | 
			
		||||
                     void (*free_cb)(void *p) /**< A cleanup routine for the data or NULL to request an internal copy */,
 | 
			
		||||
| 
						 | 
				
			
			@ -96,74 +96,74 @@ void pa_stream_write(struct pa_stream *p      /**< The stream to use */,
 | 
			
		|||
                                                 upload streams. */);
 | 
			
		||||
 | 
			
		||||
/** Return the amount of bytes that may be written using pa_stream_write() */
 | 
			
		||||
size_t pa_stream_writable_size(struct pa_stream *p);
 | 
			
		||||
size_t pa_stream_writable_size(pa_stream *p);
 | 
			
		||||
 | 
			
		||||
/** Drain a playback stream */
 | 
			
		||||
struct pa_operation* pa_stream_drain(struct pa_stream *s, void (*cb) (struct pa_stream*s, int success, void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_drain(pa_stream *s, void (*cb) (pa_stream*s, int success, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Get the playback latency of a stream */
 | 
			
		||||
struct pa_operation* pa_stream_get_latency_info(struct pa_stream *p, void (*cb)(struct pa_stream *p, const struct pa_latency_info *i, void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_get_latency_info(pa_stream *p, void (*cb)(pa_stream *p, const pa_latency_info *i, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Set the callback function that is called whenever the state of the stream changes */
 | 
			
		||||
void pa_stream_set_state_callback(struct pa_stream *s, void (*cb)(struct pa_stream *s, void *userdata), void *userdata);
 | 
			
		||||
void pa_stream_set_state_callback(pa_stream *s, void (*cb)(pa_stream *s, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Set the callback function that is called when new data may be
 | 
			
		||||
 * written to the stream. */
 | 
			
		||||
void pa_stream_set_write_callback(struct pa_stream *p, void (*cb)(struct pa_stream *p, size_t length, void *userdata), void *userdata);
 | 
			
		||||
void pa_stream_set_write_callback(pa_stream *p, void (*cb)(pa_stream *p, size_t length, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Set the callback function that is called when new data is available from the stream */
 | 
			
		||||
void pa_stream_set_read_callback(struct pa_stream *p, void (*cb)(struct pa_stream *p, const void*data, size_t length, void *userdata), void *userdata);
 | 
			
		||||
void pa_stream_set_read_callback(pa_stream *p, void (*cb)(pa_stream *p, const void*data, size_t length, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Pause (or resume) playback of this stream temporarily. Available on both playback and recording streams. \since 0.3 */
 | 
			
		||||
struct pa_operation* pa_stream_cork(struct pa_stream *s, int b, void (*cb) (struct pa_stream*s, int success, void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_cork(pa_stream *s, int b, void (*cb) (pa_stream*s, int success, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Flush the playback buffer of this stream. Most of the time you're
 | 
			
		||||
 * better off using the parameter delta of pa_stream_write() instead of this
 | 
			
		||||
 * function. Available on both playback and recording streams. \since 0.3 */
 | 
			
		||||
struct pa_operation* pa_stream_flush(struct pa_stream *s, void (*cb)(struct pa_stream *s, int success, void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_flush(pa_stream *s, void (*cb)(pa_stream *s, int success, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Reenable prebuffering. Available for playback streams only. \since 0.6 */
 | 
			
		||||
struct pa_operation* pa_stream_prebuf(struct pa_stream *s, void (*cb)(struct pa_stream *s, int success, void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_prebuf(pa_stream *s, void (*cb)(pa_stream *s, int success, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Request immediate start of playback on this stream. This disables
 | 
			
		||||
 * prebuffering as specified in the pa_buffer_attr structure. Available for playback streams only. \since
 | 
			
		||||
 * 0.3 */
 | 
			
		||||
struct pa_operation* pa_stream_trigger(struct pa_stream *s, void (*cb)(struct pa_stream *s, int success, void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_trigger(pa_stream *s, void (*cb)(pa_stream *s, int success, void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Rename the stream. \since 0.5 */
 | 
			
		||||
struct pa_operation* pa_stream_set_name(struct pa_stream *s, const char *name, void(*cb)(struct pa_stream*c, int success,  void *userdata), void *userdata);
 | 
			
		||||
pa_operation* pa_stream_set_name(pa_stream *s, const char *name, void(*cb)(pa_stream*c, int success,  void *userdata), void *userdata);
 | 
			
		||||
 | 
			
		||||
/** Return the total number of bytes written to/read from the
 | 
			
		||||
 * stream. This counter is not reset on pa_stream_flush(), you may do
 | 
			
		||||
 * this yourself using pa_stream_reset_counter(). \since 0.6 */
 | 
			
		||||
uint64_t pa_stream_get_counter(struct pa_stream *s);
 | 
			
		||||
uint64_t pa_stream_get_counter(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
/** Return the current playback/recording time. This is based on the
 | 
			
		||||
 * counter accessible with pa_stream_get_counter(). This function
 | 
			
		||||
 * requires a pa_latency_info structure as argument, which should be
 | 
			
		||||
 * acquired using pa_stream_get_latency(). \since 0.6 */
 | 
			
		||||
pa_usec_t pa_stream_get_time(struct pa_stream *s, const struct pa_latency_info *i);
 | 
			
		||||
pa_usec_t pa_stream_get_time(pa_stream *s, const pa_latency_info *i);
 | 
			
		||||
 | 
			
		||||
/** Return the total stream latency. Thus function requires a
 | 
			
		||||
 * pa_latency_info structure as argument, which should be aquired
 | 
			
		||||
 * using pa_stream_get_latency(). In case the stream is a monitoring
 | 
			
		||||
 * stream the result can be negative, i.e. the captured samples are
 | 
			
		||||
 * not yet played. In this case *negative is set to 1. \since 0.6 */
 | 
			
		||||
pa_usec_t pa_stream_get_latency(struct pa_stream *s, const struct pa_latency_info *i, int *negative);
 | 
			
		||||
pa_usec_t pa_stream_get_latency(pa_stream *s, const pa_latency_info *i, int *negative);
 | 
			
		||||
 | 
			
		||||
/** Return the interpolated playback/recording time. Requires the
 | 
			
		||||
 *  PA_STREAM_INTERPOLATE_LATENCY bit set when creating the stream. In
 | 
			
		||||
 *  contrast to pa_stream_get_latency() this function doesn't require
 | 
			
		||||
 *  a whole roundtrip for response. \since 0.6 */
 | 
			
		||||
pa_usec_t pa_stream_get_interpolated_time(struct pa_stream *s);
 | 
			
		||||
pa_usec_t pa_stream_get_interpolated_time(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
/** Return the interpolated playback/recording latency. Requires the
 | 
			
		||||
 * PA_STREAM_INTERPOLATE_LATENCY bit set when creating the
 | 
			
		||||
 * stream. \since 0.6 */
 | 
			
		||||
pa_usec_t pa_stream_get_interpolated_latency(struct pa_stream *s, int *negative);
 | 
			
		||||
pa_usec_t pa_stream_get_interpolated_latency(pa_stream *s, int *negative);
 | 
			
		||||
 | 
			
		||||
/** Return a pointer to the streams sample specification. \since 0.6 */
 | 
			
		||||
const struct pa_sample_spec* pa_stream_get_sample_spec(struct pa_stream *s);
 | 
			
		||||
const pa_sample_spec* pa_stream_get_sample_spec(pa_stream *s);
 | 
			
		||||
 | 
			
		||||
PA_C_DECL_END
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue