summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkotontrion <[email protected]>2024-07-22 14:29:40 +0200
committerkotontrion <[email protected]>2024-07-22 14:29:40 +0200
commit4a7ecd70a476f48901391e2011490c21a1bd41a2 (patch)
treec9a996e9a492d1eb839232942287ab571ba29347 /include
parentd5596c421da581479382394a6ead9bb422779564 (diff)
add video device support
Diffstat (limited to 'include')
-rw-r--r--include/astal/wireplumber/device.h5
-rw-r--r--include/astal/wireplumber/endpoint.h5
-rw-r--r--include/astal/wireplumber/meson.build1
-rw-r--r--include/astal/wireplumber/video.h32
4 files changed, 42 insertions, 1 deletions
diff --git a/include/astal/wireplumber/device.h b/include/astal/wireplumber/device.h
index 6e5f6d4..9f633e3 100644
--- a/include/astal/wireplumber/device.h
+++ b/include/astal/wireplumber/device.h
@@ -11,6 +11,10 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(AstalWpDevice, astal_wp_device, ASTAL_WP, DEVICE, GObject)
+#define ASTAL_WP_TYPE_DEVICE_TYPE (astal_wp_device_type_get_type())
+
+typedef enum { ASTAL_WP_DEVICE_TYPE_AUDIO, ASTAL_WP_DEVICE_TYPE_VIDEO } AstalWpDeviceType;
+
guint astal_wp_device_get_id(AstalWpDevice *self);
const gchar *astal_wp_device_get_description(AstalWpDevice *self);
const gchar *astal_wp_device_get_icon(AstalWpDevice *self);
@@ -18,6 +22,7 @@ AstalWpProfile *astal_wp_device_get_profile(AstalWpDevice *self, gint id);
GList *astal_wp_device_get_profiles(AstalWpDevice *self);
void astal_wp_device_set_active_profile(AstalWpDevice *self, int profile_id);
gint astal_wp_device_get_active_profile(AstalWpDevice *self);
+AstalWpDeviceType astal_wp_device_get_device_type(AstalWpDevice *self);
G_END_DECLS
diff --git a/include/astal/wireplumber/endpoint.h b/include/astal/wireplumber/endpoint.h
index 391fafc..dcf6601 100644
--- a/include/astal/wireplumber/endpoint.h
+++ b/include/astal/wireplumber/endpoint.h
@@ -16,7 +16,10 @@ typedef enum {
ASTAL_WP_MEDIA_CLASS_AUDIO_SPEAKER,
ASTAL_WP_MEDIA_CLASS_AUDIO_RECORDER,
ASTAL_WP_MEDIA_CLASS_AUDIO_STREAM,
- ASTAL_WP_MEDIA_CLASS_AUDIO_DEVICE,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_SOURCE,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_SINK,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_RECORDER,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_STREAM,
} AstalWpMediaClass;
void astal_wp_endpoint_update_volume(AstalWpEndpoint *self);
diff --git a/include/astal/wireplumber/meson.build b/include/astal/wireplumber/meson.build
index 6cd0147..d02563c 100644
--- a/include/astal/wireplumber/meson.build
+++ b/include/astal/wireplumber/meson.build
@@ -2,6 +2,7 @@ astal_wireplumber_subheaders = files(
'wp.h',
'endpoint.h',
'device.h',
+ 'video.h',
'audio.h',
'profile.h',
)
diff --git a/include/astal/wireplumber/video.h b/include/astal/wireplumber/video.h
new file mode 100644
index 0000000..8b17e31
--- /dev/null
+++ b/include/astal/wireplumber/video.h
@@ -0,0 +1,32 @@
+#ifndef ASTAL_WIREPLUMBER_VIDEO_H
+#define ASTAL_WIREPLUMBER_VIDEO_H
+
+#include <glib-object.h>
+
+#include "device.h"
+#include "endpoint.h"
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_VIDEO (astal_wp_video_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpVideo, astal_wp_video, ASTAL_WP, VIDEO, GObject)
+
+AstalWpEndpoint *astal_wp_video_get_source(AstalWpVideo *self, guint id);
+AstalWpEndpoint *astal_wp_video_get_sink(AstalWpVideo *self, guint id);
+AstalWpEndpoint *astal_wp_video_get_recorder(AstalWpVideo *self, guint id);
+AstalWpEndpoint *astal_wp_video_get_stream(AstalWpVideo *self, guint id);
+AstalWpDevice *astal_wp_video_get_device(AstalWpVideo *self, guint id);
+
+GList *astal_wp_video_get_sources(AstalWpVideo *self);
+GList *astal_wp_video_get_sinks(AstalWpVideo *self);
+GList *astal_wp_video_get_recorders(AstalWpVideo *self);
+GList *astal_wp_video_get_streams(AstalWpVideo *self);
+GList *astal_wp_video_get_devices(AstalWpVideo *self);
+
+AstalWpVideo *astal_wp_video_get_default();
+AstalWpVideo *astal_wp_get_default_video();
+
+G_END_DECLS
+
+#endif // !ASTAL_WIREPLUMBER_VIDEO_H