Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions plugins/linux-pipewire/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if(NOT ENABLE_PIPEWIRE)
endif()

find_package(PipeWire 0.3.33 REQUIRED)
find_package(FFmpeg REQUIRED COMPONENTS avcodec avutil avformat)
find_package(Gio 2.76 REQUIRED)
find_package(Libdrm REQUIRED)
get_target_property(libdrm_include_directories Libdrm::Libdrm INTERFACE_INCLUDE_DIRECTORIES)
Expand All @@ -26,6 +27,8 @@ target_sources(
PRIVATE
$<$<BOOL:${_HAS_PIPEWIRE_CAMERA}>:camera-portal.c>
$<$<BOOL:${_HAS_PIPEWIRE_CAMERA}>:camera-portal.h>
$<$<BOOL:${_HAS_PIPEWIRE_CAMERA}>:video-decoder.c>
$<$<BOOL:${_HAS_PIPEWIRE_CAMERA}>:video-decoder.h>
formats.c
formats.h
linux-pipewire.c
Expand Down
15 changes: 13 additions & 2 deletions plugins/linux-pipewire/camera-portal.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* camera-portal.c
*
* Copyright 2021 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
* Copyright 2024-2026 Dimitris Papaioannou <dimtpap@protonmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -361,8 +362,18 @@ static void camera_format_list(struct camera_device *dev, obs_property_t *prop)
obs_data_set_int(data, "video_format", format);

format_name = obs_pw_video_format.pretty_name;
} else {
continue;
} else if (media_subtype == SPA_MEDIA_SUBTYPE_mjpg || media_subtype == SPA_MEDIA_SUBTYPE_h264) {
obs_data_set_bool(data, "encoded", true);
obs_data_set_int(data, "video_format", SPA_VIDEO_FORMAT_ENCODED);

switch (media_subtype) {
case SPA_MEDIA_SUBTYPE_mjpg:
format_name = "MJPG";
break;
case SPA_MEDIA_SUBTYPE_h264:
format_name = "H264";
break;
}
}

if (spa_pod_parse_object(p->param, SPA_TYPE_OBJECT_Format, format ? &format : NULL,
Expand Down
Loading
Loading