mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-19 06:46:26 -04:00
make static inline -> SPA_API_IMPL
So that we can export the symbols as well.
This commit is contained in:
parent
84bd4b7ea9
commit
90b0e45037
91 changed files with 563 additions and 552 deletions
|
|
@ -23,7 +23,7 @@ extern "C" {
|
|||
#include <spa/debug/types.h>
|
||||
#include <spa/buffer/type-info.h>
|
||||
|
||||
static inline int spa_debugc_buffer(struct spa_debug_context *ctx, int indent, const struct spa_buffer *buffer)
|
||||
SPA_API_IMPL int spa_debugc_buffer(struct spa_debug_context *ctx, int indent, const struct spa_buffer *buffer)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ static inline int spa_debugc_buffer(struct spa_debug_context *ctx, int indent, c
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debug_buffer(int indent, const struct spa_buffer *buffer)
|
||||
SPA_API_IMPL int spa_debug_buffer(int indent, const struct spa_buffer *buffer)
|
||||
{
|
||||
return spa_debugc_buffer(NULL, indent, buffer);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct spa_debug_context {
|
|||
|
||||
#define spa_debugc(_c,_fmt,...) (_c)?((_c)->log((_c),_fmt, ## __VA_ARGS__)):(void)spa_debug(_fmt, ## __VA_ARGS__)
|
||||
|
||||
static inline void spa_debugc_error_location(struct spa_debug_context *c,
|
||||
SPA_API_IMPL void spa_debugc_error_location(struct spa_debug_context *c,
|
||||
struct spa_error_location *loc)
|
||||
{
|
||||
int i, skip = loc->col > 80 ? loc->col - 40 : 0, lc = loc->col-skip-1;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ extern "C" {
|
|||
#include <spa/debug/context.h>
|
||||
#include <spa/utils/dict.h>
|
||||
|
||||
static inline int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
|
||||
SPA_API_IMPL int spa_debugc_dict(struct spa_debug_context *ctx, int indent, const struct spa_dict *dict)
|
||||
{
|
||||
const struct spa_dict_item *item;
|
||||
spa_debugc(ctx, "%*sflags:%08x n_items:%d", indent, "", dict->flags, dict->n_items);
|
||||
|
|
@ -27,7 +27,7 @@ static inline int spa_debugc_dict(struct spa_debug_context *ctx, int indent, con
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debug_dict(int indent, const struct spa_dict *dict)
|
||||
SPA_API_IMPL int spa_debug_dict(int indent, const struct spa_dict *dict)
|
||||
{
|
||||
return spa_debugc_dict(NULL, indent, dict);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct spa_debug_file_ctx {
|
|||
};
|
||||
|
||||
SPA_PRINTF_FUNC(2,3)
|
||||
static inline void spa_debug_file_log(struct spa_debug_context *ctx, const char *fmt, ...)
|
||||
SPA_API_IMPL void spa_debug_file_log(struct spa_debug_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
struct spa_debug_file_ctx *c = SPA_CONTAINER_OF(ctx, struct spa_debug_file_ctx, ctx);
|
||||
va_list args;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ extern "C" {
|
|||
#include <spa/param/type-info.h>
|
||||
#include <spa/param/format-utils.h>
|
||||
|
||||
static inline int
|
||||
SPA_API_IMPL int
|
||||
spa_debug_strbuf_format_value(struct spa_strbuf *buffer, const struct spa_type_info *info,
|
||||
uint32_t type, void *body, uint32_t size)
|
||||
{
|
||||
|
|
@ -96,7 +96,7 @@ spa_debug_strbuf_format_value(struct spa_strbuf *buffer, const struct spa_type_i
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
SPA_API_IMPL int
|
||||
spa_debug_format_value(const struct spa_type_info *info,
|
||||
uint32_t type, void *body, uint32_t size)
|
||||
{
|
||||
|
|
@ -108,7 +108,7 @@ spa_debug_format_value(const struct spa_type_info *info,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debugc_format(struct spa_debug_context *ctx, int indent,
|
||||
SPA_API_IMPL int spa_debugc_format(struct spa_debug_context *ctx, int indent,
|
||||
const struct spa_type_info *info, const struct spa_pod *format)
|
||||
{
|
||||
const char *media_type;
|
||||
|
|
@ -198,7 +198,7 @@ static inline int spa_debugc_format(struct spa_debug_context *ctx, int indent,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debug_format(int indent,
|
||||
SPA_API_IMPL int spa_debug_format(int indent,
|
||||
const struct spa_type_info *info, const struct spa_pod *format)
|
||||
{
|
||||
return spa_debugc_format(NULL, indent, info, format);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct spa_debug_log_ctx {
|
|||
};
|
||||
|
||||
SPA_PRINTF_FUNC(2,3)
|
||||
static inline void spa_debug_log_log(struct spa_debug_context *ctx, const char *fmt, ...)
|
||||
SPA_API_IMPL void spa_debug_log_log(struct spa_debug_context *ctx, const char *fmt, ...)
|
||||
{
|
||||
struct spa_debug_log_ctx *c = SPA_CONTAINER_OF(ctx, struct spa_debug_log_ctx, ctx);
|
||||
va_list args;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ extern "C" {
|
|||
|
||||
#include <spa/debug/context.h>
|
||||
|
||||
static inline int spa_debugc_mem(struct spa_debug_context *ctx, int indent, const void *data, size_t size)
|
||||
SPA_API_IMPL int spa_debugc_mem(struct spa_debug_context *ctx, int indent, const void *data, size_t size)
|
||||
{
|
||||
const uint8_t *t = (const uint8_t*)data;
|
||||
char buffer[512];
|
||||
|
|
@ -36,7 +36,7 @@ static inline int spa_debugc_mem(struct spa_debug_context *ctx, int indent, cons
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debug_mem(int indent, const void *data, size_t size)
|
||||
SPA_API_IMPL int spa_debug_mem(int indent, const void *data, size_t size)
|
||||
{
|
||||
return spa_debugc_mem(NULL, indent, data, size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ extern "C" {
|
|||
#include <spa/debug/context.h>
|
||||
#include <spa/debug/dict.h>
|
||||
|
||||
static inline int spa_debugc_port_info(struct spa_debug_context *ctx, int indent, const struct spa_port_info *info)
|
||||
SPA_API_IMPL int spa_debugc_port_info(struct spa_debug_context *ctx, int indent, const struct spa_port_info *info)
|
||||
{
|
||||
spa_debugc(ctx, "%*s" "struct spa_port_info %p:", indent, "", info);
|
||||
spa_debugc(ctx, "%*s" " flags: \t%08" PRIx64, indent, "", info->flags);
|
||||
|
|
@ -31,7 +31,7 @@ static inline int spa_debugc_port_info(struct spa_debug_context *ctx, int indent
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debug_port_info(int indent, const struct spa_port_info *info)
|
||||
SPA_API_IMPL int spa_debug_port_info(int indent, const struct spa_port_info *info)
|
||||
{
|
||||
return spa_debugc_port_info(NULL, indent, info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ extern "C" {
|
|||
#include <spa/pod/pod.h>
|
||||
#include <spa/pod/iter.h>
|
||||
|
||||
static inline int
|
||||
SPA_API_IMPL int
|
||||
spa_debugc_pod_value(struct spa_debug_context *ctx, int indent, const struct spa_type_info *info,
|
||||
uint32_t type, void *body, uint32_t size)
|
||||
{
|
||||
|
|
@ -174,7 +174,7 @@ spa_debugc_pod_value(struct spa_debug_context *ctx, int indent, const struct spa
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int spa_debugc_pod(struct spa_debug_context *ctx, int indent,
|
||||
SPA_API_IMPL int spa_debugc_pod(struct spa_debug_context *ctx, int indent,
|
||||
const struct spa_type_info *info, const struct spa_pod *pod)
|
||||
{
|
||||
return spa_debugc_pod_value(ctx, indent, info ? info : SPA_TYPE_ROOT,
|
||||
|
|
@ -183,14 +183,14 @@ static inline int spa_debugc_pod(struct spa_debug_context *ctx, int indent,
|
|||
SPA_POD_BODY_SIZE(pod));
|
||||
}
|
||||
|
||||
static inline int
|
||||
SPA_API_IMPL int
|
||||
spa_debug_pod_value(int indent, const struct spa_type_info *info,
|
||||
uint32_t type, void *body, uint32_t size)
|
||||
{
|
||||
return spa_debugc_pod_value(NULL, indent, info, type, body, size);
|
||||
}
|
||||
|
||||
static inline int spa_debug_pod(int indent,
|
||||
SPA_API_IMPL int spa_debug_pod(int indent,
|
||||
const struct spa_type_info *info, const struct spa_pod *pod)
|
||||
{
|
||||
return spa_debugc_pod(NULL, indent, info, pod);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ extern "C" {
|
|||
|
||||
#include <string.h>
|
||||
|
||||
static inline const struct spa_type_info *spa_debug_type_find(const struct spa_type_info *info, uint32_t type)
|
||||
SPA_API_IMPL const struct spa_type_info *spa_debug_type_find(const struct spa_type_info *info, uint32_t type)
|
||||
{
|
||||
const struct spa_type_info *res;
|
||||
|
||||
|
|
@ -37,19 +37,19 @@ static inline const struct spa_type_info *spa_debug_type_find(const struct spa_t
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline const char *spa_debug_type_short_name(const char *name)
|
||||
SPA_API_IMPL const char *spa_debug_type_short_name(const char *name)
|
||||
{
|
||||
return spa_type_short_name(name);
|
||||
}
|
||||
|
||||
static inline const char *spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
|
||||
SPA_API_IMPL const char *spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
|
||||
{
|
||||
if ((info = spa_debug_type_find(info, type)) == NULL)
|
||||
return NULL;
|
||||
return info->name;
|
||||
}
|
||||
|
||||
static inline const char *spa_debug_type_find_short_name(const struct spa_type_info *info, uint32_t type)
|
||||
SPA_API_IMPL const char *spa_debug_type_find_short_name(const struct spa_type_info *info, uint32_t type)
|
||||
{
|
||||
const char *str;
|
||||
if ((str = spa_debug_type_find_name(info, type)) == NULL)
|
||||
|
|
@ -57,7 +57,7 @@ static inline const char *spa_debug_type_find_short_name(const struct spa_type_i
|
|||
return spa_debug_type_short_name(str);
|
||||
}
|
||||
|
||||
static inline uint32_t spa_debug_type_find_type(const struct spa_type_info *info, const char *name)
|
||||
SPA_API_IMPL uint32_t spa_debug_type_find_type(const struct spa_type_info *info, const char *name)
|
||||
{
|
||||
if (info == NULL)
|
||||
info = SPA_TYPE_ROOT;
|
||||
|
|
@ -73,7 +73,7 @@ static inline uint32_t spa_debug_type_find_type(const struct spa_type_info *info
|
|||
return SPA_ID_INVALID;
|
||||
}
|
||||
|
||||
static inline const struct spa_type_info *spa_debug_type_find_short(const struct spa_type_info *info, const char *name)
|
||||
SPA_API_IMPL const struct spa_type_info *spa_debug_type_find_short(const struct spa_type_info *info, const char *name)
|
||||
{
|
||||
while (info && info->name) {
|
||||
if (strcmp(spa_debug_type_short_name(info->name), name) == 0)
|
||||
|
|
@ -87,7 +87,7 @@ static inline const struct spa_type_info *spa_debug_type_find_short(const struct
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline uint32_t spa_debug_type_find_type_short(const struct spa_type_info *info, const char *name)
|
||||
SPA_API_IMPL uint32_t spa_debug_type_find_type_short(const struct spa_type_info *info, const char *name)
|
||||
{
|
||||
if ((info = spa_debug_type_find_short(info, name)) == NULL)
|
||||
return SPA_ID_INVALID;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue