mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
indent
This commit is contained in:
parent
b899d43401
commit
08522a162e
2 changed files with 104 additions and 109 deletions
|
|
@ -921,7 +921,8 @@ pw_stream_connect(struct pw_stream *stream,
|
||||||
enum pw_stream_mode mode,
|
enum pw_stream_mode mode,
|
||||||
const char *port_path,
|
const char *port_path,
|
||||||
enum pw_stream_flags flags,
|
enum pw_stream_flags flags,
|
||||||
uint32_t n_possible_formats, struct spa_format **possible_formats)
|
uint32_t n_possible_formats,
|
||||||
|
struct spa_format **possible_formats)
|
||||||
{
|
{
|
||||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,7 @@ extern "C" {
|
||||||
#include <spa/audio/format-utils.h>
|
#include <spa/audio/format-utils.h>
|
||||||
#include <spa/format-builder.h>
|
#include <spa/format-builder.h>
|
||||||
|
|
||||||
struct props
|
struct props {
|
||||||
{
|
|
||||||
char device[64];
|
char device[64];
|
||||||
char device_name[128];
|
char device_name[128];
|
||||||
char card_name[128];
|
char card_name[128];
|
||||||
|
|
@ -49,8 +48,7 @@ struct props
|
||||||
|
|
||||||
#define MAX_BUFFERS 64
|
#define MAX_BUFFERS 64
|
||||||
|
|
||||||
struct buffer
|
struct buffer {
|
||||||
{
|
|
||||||
struct spa_buffer *outbuf;
|
struct spa_buffer *outbuf;
|
||||||
struct spa_meta_header *h;
|
struct spa_meta_header *h;
|
||||||
struct spa_meta_ringbuffer *rb;
|
struct spa_meta_ringbuffer *rb;
|
||||||
|
|
@ -58,8 +56,7 @@ struct buffer
|
||||||
struct spa_list link;
|
struct spa_list link;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct type
|
struct type {
|
||||||
{
|
|
||||||
uint32_t node;
|
uint32_t node;
|
||||||
uint32_t clock;
|
uint32_t clock;
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
|
|
@ -81,8 +78,7 @@ struct type
|
||||||
struct spa_type_param_alloc_meta_enable param_alloc_meta_enable;
|
struct spa_type_param_alloc_meta_enable param_alloc_meta_enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void
|
static inline void init_type(struct type *type, struct spa_type_map *map)
|
||||||
init_type (struct type *type, struct spa_type_map *map)
|
|
||||||
{
|
{
|
||||||
type->node = spa_type_map_get_id(map, SPA_TYPE__Node);
|
type->node = spa_type_map_get_id(map, SPA_TYPE__Node);
|
||||||
type->clock = spa_type_map_get_id(map, SPA_TYPE__Clock);
|
type->clock = spa_type_map_get_id(map, SPA_TYPE__Clock);
|
||||||
|
|
@ -104,9 +100,9 @@ init_type (struct type *type, struct spa_type_map *map)
|
||||||
spa_type_command_node_map(map, &type->command_node);
|
spa_type_command_node_map(map, &type->command_node);
|
||||||
spa_type_param_alloc_buffers_map(map, &type->param_alloc_buffers);
|
spa_type_param_alloc_buffers_map(map, &type->param_alloc_buffers);
|
||||||
spa_type_param_alloc_meta_enable_map(map, &type->param_alloc_meta_enable);
|
spa_type_param_alloc_meta_enable_map(map, &type->param_alloc_meta_enable);
|
||||||
} struct state
|
}
|
||||||
|
|
||||||
{
|
struct state {
|
||||||
struct spa_handle handle;
|
struct spa_handle handle;
|
||||||
struct spa_node node;
|
struct spa_node node;
|
||||||
struct spa_clock clock;
|
struct spa_clock clock;
|
||||||
|
|
@ -180,11 +176,9 @@ init_type (struct type *type, struct spa_type_map *map)
|
||||||
|
|
||||||
int
|
int
|
||||||
spa_alsa_enum_format(struct state *state,
|
spa_alsa_enum_format(struct state *state,
|
||||||
struct spa_format **format,
|
struct spa_format **format, const struct spa_format *filter, uint32_t index);
|
||||||
const struct spa_format *filter, uint32_t index);
|
|
||||||
|
|
||||||
int spa_alsa_set_format (struct state *state, struct spa_audio_info *info,
|
int spa_alsa_set_format(struct state *state, struct spa_audio_info *info, uint32_t flags);
|
||||||
uint32_t flags);
|
|
||||||
|
|
||||||
int spa_alsa_start(struct state *state, bool xrun_recover);
|
int spa_alsa_start(struct state *state, bool xrun_recover);
|
||||||
int spa_alsa_pause(struct state *state, bool xrun_recover);
|
int spa_alsa_pause(struct state *state, bool xrun_recover);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue