#include "modules/video_capture/linux/pipewire_session.h"
#include <spa/monitor/device.h>
#include <spa/param/format-utils.h>
#include <spa/param/format.h>
#include <spa/param/video/raw.h>
#include <spa/pod/parser.h>
#include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/video_capture/device_info_impl.h"
#include "rtc_base/logging.h"
#include "rtc_base/sanitizer.h"
#include "rtc_base/string_encode.h"
#include "rtc_base/string_to_number.h"
namespace webrtc {
namespace videocapturemodule {
VideoType PipeWireRawFormatToVideoType(uint32_t id) { … }
void PipeWireNode::PipeWireNodeDeleter::operator()(
PipeWireNode* node) const noexcept { … }
PipeWireNode::PipeWireNodePtr PipeWireNode::Create(PipeWireSession* session,
uint32_t id,
const spa_dict* props) { … }
RTC_NO_SANITIZE("cfi-icall")
PipeWireNode::PipeWireNode(PipeWireSession* session,
uint32_t id,
const spa_dict* props)
: … { … }
RTC_NO_SANITIZE("cfi-icall")
void PipeWireNode::OnNodeInfo(void* data, const pw_node_info* info) { … }
RTC_NO_SANITIZE("cfi-icall")
void PipeWireNode::OnNodeParam(void* data,
int seq,
uint32_t id,
uint32_t index,
uint32_t next,
const spa_pod* param) { … }
bool PipeWireNode::ParseFormat(const spa_pod* param,
VideoCaptureCapability* cap) { … }
CameraPortalNotifier::CameraPortalNotifier(PipeWireSession* session)
: … { … }
void CameraPortalNotifier::OnCameraRequestResult(
xdg_portal::RequestResponse result,
int fd) { … }
PipeWireSession::PipeWireSession()
: … { … }
PipeWireSession::~PipeWireSession() { … }
void PipeWireSession::Init(VideoCaptureOptions::Callback* callback, int fd) { … }
void PipeWireSession::InitPipeWire(int fd) { … }
RTC_NO_SANITIZE("cfi-icall")
bool PipeWireSession::StartPipeWire(int fd) { … }
void PipeWireSession::StopPipeWire() { … }
RTC_NO_SANITIZE("cfi-icall")
void PipeWireSession::PipeWireSync() { … }
void PipeWireSession::OnCoreError(void* data,
uint32_t id,
int seq,
int res,
const char* message) { … }
void PipeWireSession::OnCoreDone(void* data, uint32_t id, int seq) { … }
RTC_NO_SANITIZE("cfi-icall")
void PipeWireSession::OnRegistryGlobal(void* data,
uint32_t id,
uint32_t permissions,
const char* type,
uint32_t version,
const spa_dict* props) { … }
void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { … }
void PipeWireSession::Finish(VideoCaptureOptions::Status status) { … }
void PipeWireSession::Cleanup() { … }
}
}