spa: use log topics everywhere

Use log topics properly everywhere, convert from "#define NAME".
This commit is contained in:
Pauli Virtanen 2024-03-10 17:32:56 +02:00
parent c963ca47c1
commit e784de3933
27 changed files with 170 additions and 102 deletions

View file

@ -20,6 +20,10 @@
#include "ffmpeg.h"
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &log_topic
SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.ffmpeg.dec");
#define IS_VALID_PORT(this,d,id) ((id) == 0)
#define GET_IN_PORT(this,p) (&this->in_ports[p])
#define GET_OUT_PORT(this,p) (&this->out_ports[p])

View file

@ -19,6 +19,10 @@
#include "ffmpeg.h"
#undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &log_topic
SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.ffmpeg.enc");
#define IS_VALID_PORT(this,d,id) ((id) == 0)
#define GET_IN_PORT(this,p) (&this->in_ports[p])
#define GET_OUT_PORT(this,p) (&this->out_ports[p])

View file

@ -6,6 +6,7 @@
#include <stdio.h>
#include <spa/support/plugin.h>
#include <spa/support/log.h>
#include <spa/node/node.h>
#include <libavcodec/avcodec.h>
@ -104,6 +105,8 @@ static const AVCodec *find_codec_by_index(uint32_t index)
}
#endif
SPA_LOG_TOPIC_ENUM_DEFINE_REGISTERED;
SPA_EXPORT
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
{