mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: remove unnecessary indirection for some spa_log_topics
This results in shorter machine code since it removes one pointer load and a NULL check.
This commit is contained in:
parent
d2b5b53c08
commit
8256a2d5a6
13 changed files with 39 additions and 35 deletions
|
|
@ -7,12 +7,13 @@
|
|||
#include <spa/support/plugin.h>
|
||||
#include <spa/support/log.h>
|
||||
|
||||
#include "v4l2.h"
|
||||
|
||||
extern const struct spa_handle_factory spa_v4l2_source_factory;
|
||||
extern const struct spa_handle_factory spa_v4l2_udev_factory;
|
||||
extern const struct spa_handle_factory spa_v4l2_device_factory;
|
||||
|
||||
struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.v4l2");
|
||||
struct spa_log_topic *v4l2_log_topic = &log_topic;
|
||||
struct spa_log_topic v4l2_log_topic = SPA_LOG_TOPIC(0, "spa.v4l2");
|
||||
|
||||
SPA_EXPORT
|
||||
int spa_handle_factory_enum(const struct spa_handle_factory **factory,
|
||||
|
|
|
|||
|
|
@ -4,15 +4,17 @@
|
|||
|
||||
#include <errno.h>
|
||||
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include <spa/support/log.h>
|
||||
|
||||
#undef SPA_LOG_TOPIC_DEFAULT
|
||||
#define SPA_LOG_TOPIC_DEFAULT v4l2_log_topic
|
||||
extern struct spa_log_topic *v4l2_log_topic;
|
||||
#define SPA_LOG_TOPIC_DEFAULT &v4l2_log_topic
|
||||
extern struct spa_log_topic v4l2_log_topic;
|
||||
|
||||
static inline void v4l2_log_topic_init(struct spa_log *log)
|
||||
{
|
||||
spa_log_topic_init(log, v4l2_log_topic);
|
||||
spa_log_topic_init(log, &v4l2_log_topic);
|
||||
}
|
||||
|
||||
struct spa_v4l2_device {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue