27 #include <libvisual/lv_audio.h>
28 #include <libvisual/lv_plugin.h>
37 #include <libvisual/lv_intrusive_ptr.hpp>
57 static InputPtr load (std::string
const& name);
66 VisPluginData* get_plugin ();
84 void set_callback (std::function<
bool (
Audio&)>
const& callback);
86 Audio const& get_audio ();
101 friend void intrusive_ptr_add_ref (
Input const* input);
102 friend void intrusive_ptr_release (
Input const* input);
105 const std::unique_ptr<Impl> m_impl;
107 mutable unsigned int m_ref_count;
109 explicit Input (std::string
const& name);
112 inline void intrusive_ptr_add_ref (
Input const* input)
114 input->m_ref_count++;
117 inline void intrusive_ptr_release (Input
const* input)
119 if (--input->m_ref_count == 0) {
130 typedef struct _VisInput VisInput;
172 LV_API VisInput *visual_input_new (
const char *name);
173 LV_API
void visual_input_ref (VisInput *input);
174 LV_API
void visual_input_unref (VisInput *input);
175 LV_API
int visual_input_realize (VisInput *input);
176 LV_API
int visual_input_run (VisInput *input);
178 LV_API VisPluginData *visual_input_get_plugin (VisInput *input);
179 LV_API
VisAudio *visual_input_get_audio (VisInput *audio);