pipewire-gobject 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pipewire_gobject-0.3.1/.dockerignore +17 -0
- pipewire_gobject-0.3.1/.github/ISSUE_TEMPLATE/api_proposal.yml +54 -0
- pipewire_gobject-0.3.1/.github/ISSUE_TEMPLATE/bug_report.yml +58 -0
- pipewire_gobject-0.3.1/.github/ISSUE_TEMPLATE/community_feedback.yml +41 -0
- pipewire_gobject-0.3.1/.github/ISSUE_TEMPLATE/config.yml +2 -0
- pipewire_gobject-0.3.1/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- pipewire_gobject-0.3.1/.github/dependabot.yml +11 -0
- pipewire_gobject-0.3.1/.github/workflows/ci.yml +372 -0
- pipewire_gobject-0.3.1/.github/workflows/codeql.yml +109 -0
- pipewire_gobject-0.3.1/.github/workflows/dependency-review.yml +28 -0
- pipewire_gobject-0.3.1/.github/workflows/pages.yml +70 -0
- pipewire_gobject-0.3.1/.github/workflows/release.yml +301 -0
- pipewire_gobject-0.3.1/.gitignore +10 -0
- pipewire_gobject-0.3.1/AGENTS.md +295 -0
- pipewire_gobject-0.3.1/CHANGELOG.md +68 -0
- pipewire_gobject-0.3.1/CONTRIBUTING.md +29 -0
- pipewire_gobject-0.3.1/Dockerfile +36 -0
- pipewire_gobject-0.3.1/LICENSE +21 -0
- pipewire_gobject-0.3.1/PKG-INFO +218 -0
- pipewire_gobject-0.3.1/README.md +195 -0
- pipewire_gobject-0.3.1/SECURITY.md +13 -0
- pipewire_gobject-0.3.1/docs/api/getting-started.md +47 -0
- pipewire_gobject-0.3.1/docs/api/main-loop-and-registry.md +201 -0
- pipewire_gobject-0.3.1/docs/api/pipewire-version-policy.md +33 -0
- pipewire_gobject-0.3.1/docs/community-feedback.md +50 -0
- pipewire_gobject-0.3.1/docs/pwg.toml +44 -0
- pipewire_gobject-0.3.1/docs/rationale.md +77 -0
- pipewire_gobject-0.3.1/docs/release.md +141 -0
- pipewire_gobject-0.3.1/docs/roadmap.md +124 -0
- pipewire_gobject-0.3.1/docs/support-policy.md +56 -0
- pipewire_gobject-0.3.1/docs/system-dependencies.md +84 -0
- pipewire_gobject-0.3.1/examples/python/audio_blocks.py +55 -0
- pipewire_gobject-0.3.1/examples/python/default_metadata.py +61 -0
- pipewire_gobject-0.3.1/examples/python/graph_summary.py +90 -0
- pipewire_gobject-0.3.1/examples/python/list_clients.py +64 -0
- pipewire_gobject-0.3.1/examples/python/list_devices.py +64 -0
- pipewire_gobject-0.3.1/examples/python/list_globals.py +35 -0
- pipewire_gobject-0.3.1/examples/python/list_links.py +56 -0
- pipewire_gobject-0.3.1/examples/python/list_node_params.py +111 -0
- pipewire_gobject-0.3.1/examples/python/list_nodes.py +61 -0
- pipewire_gobject-0.3.1/examples/python/list_ports.py +63 -0
- pipewire_gobject-0.3.1/examples/python/peak_meter.py +37 -0
- pipewire_gobject-0.3.1/meson.build +238 -0
- pipewire_gobject-0.3.1/meson_options.txt +6 -0
- pipewire_gobject-0.3.1/pyproject.toml +50 -0
- pipewire_gobject-0.3.1/python/pipewire_gobject/__init__.py +151 -0
- pipewire_gobject-0.3.1/ruff.toml +17 -0
- pipewire_gobject-0.3.1/src/pwg-audio-block.c +261 -0
- pipewire_gobject-0.3.1/src/pwg-audio-block.h +119 -0
- pipewire_gobject-0.3.1/src/pwg-audio-capture.c +422 -0
- pipewire_gobject-0.3.1/src/pwg-audio-capture.h +152 -0
- pipewire_gobject-0.3.1/src/pwg-audio-format.c +256 -0
- pipewire_gobject-0.3.1/src/pwg-audio-format.h +112 -0
- pipewire_gobject-0.3.1/src/pwg-client-info.c +129 -0
- pipewire_gobject-0.3.1/src/pwg-client-info.h +183 -0
- pipewire_gobject-0.3.1/src/pwg-core-private.h +12 -0
- pipewire_gobject-0.3.1/src/pwg-core.c +237 -0
- pipewire_gobject-0.3.1/src/pwg-core.h +119 -0
- pipewire_gobject-0.3.1/src/pwg-defs.h +22 -0
- pipewire_gobject-0.3.1/src/pwg-device-info.c +153 -0
- pipewire_gobject-0.3.1/src/pwg-device-info.h +224 -0
- pipewire_gobject-0.3.1/src/pwg-error.c +3 -0
- pipewire_gobject-0.3.1/src/pwg-error.h +41 -0
- pipewire_gobject-0.3.1/src/pwg-global-private.h +15 -0
- pipewire_gobject-0.3.1/src/pwg-global.c +425 -0
- pipewire_gobject-0.3.1/src/pwg-global.h +266 -0
- pipewire_gobject-0.3.1/src/pwg-impl-module-private.h +15 -0
- pipewire_gobject-0.3.1/src/pwg-impl-module.c +294 -0
- pipewire_gobject-0.3.1/src/pwg-impl-module.h +96 -0
- pipewire_gobject-0.3.1/src/pwg-link-info.c +140 -0
- pipewire_gobject-0.3.1/src/pwg-link-info.h +178 -0
- pipewire_gobject-0.3.1/src/pwg-metadata.c +959 -0
- pipewire_gobject-0.3.1/src/pwg-metadata.h +261 -0
- pipewire_gobject-0.3.1/src/pwg-node-info.c +97 -0
- pipewire_gobject-0.3.1/src/pwg-node-info.h +123 -0
- pipewire_gobject-0.3.1/src/pwg-node.c +787 -0
- pipewire_gobject-0.3.1/src/pwg-node.h +221 -0
- pipewire_gobject-0.3.1/src/pwg-param-info-private.h +9 -0
- pipewire_gobject-0.3.1/src/pwg-param-info.c +253 -0
- pipewire_gobject-0.3.1/src/pwg-param-info.h +106 -0
- pipewire_gobject-0.3.1/src/pwg-param-private.h +17 -0
- pipewire_gobject-0.3.1/src/pwg-param.c +953 -0
- pipewire_gobject-0.3.1/src/pwg-param.h +332 -0
- pipewire_gobject-0.3.1/src/pwg-port-info.c +146 -0
- pipewire_gobject-0.3.1/src/pwg-port-info.h +178 -0
- pipewire_gobject-0.3.1/src/pwg-registry.c +638 -0
- pipewire_gobject-0.3.1/src/pwg-registry.h +210 -0
- pipewire_gobject-0.3.1/src/pwg-stream.c +1076 -0
- pipewire_gobject-0.3.1/src/pwg-stream.h +266 -0
- pipewire_gobject-0.3.1/src/pwg.c +27 -0
- pipewire_gobject-0.3.1/src/pwg.h +66 -0
- pipewire_gobject-0.3.1/tests/test_gir_metadata.py +804 -0
- pipewire_gobject-0.3.1/tests/test_import.py +114 -0
- pipewire_gobject-0.3.1/tests/test_live_pipewire.py +331 -0
- pipewire_gobject-0.3.1/tests/test_live_stream_audio.py +322 -0
- pipewire_gobject-0.3.1/tests/test_stream_dispatch.c +198 -0
- pipewire_gobject-0.3.1/tests/test_symbols.py +245 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: API Proposal
|
|
2
|
+
description: Propose a new public Pwg API or a change to existing behavior.
|
|
3
|
+
title: "api: "
|
|
4
|
+
labels:
|
|
5
|
+
- api
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Public API is unstable in 0.x, but proposals should preserve the project boundary: safe GI PipeWire application APIs for discovery, metadata, params, app-owned modules, and app-owned streams, without raw PipeWire ownership or WirePlumber session-management policy.
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: use_case
|
|
13
|
+
attributes:
|
|
14
|
+
label: Use case
|
|
15
|
+
description: What application workflow needs this API?
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: proposed_api
|
|
20
|
+
attributes:
|
|
21
|
+
label: Proposed API shape
|
|
22
|
+
description: Function, property, signal, or type names if you have them.
|
|
23
|
+
render: c
|
|
24
|
+
validations:
|
|
25
|
+
required: false
|
|
26
|
+
- type: dropdown
|
|
27
|
+
id: consumers
|
|
28
|
+
attributes:
|
|
29
|
+
label: Primary GI consumers
|
|
30
|
+
multiple: true
|
|
31
|
+
options:
|
|
32
|
+
- Python/PyGObject
|
|
33
|
+
- GJS
|
|
34
|
+
- Vala
|
|
35
|
+
- C
|
|
36
|
+
- Other
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
- type: textarea
|
|
40
|
+
id: boundary
|
|
41
|
+
attributes:
|
|
42
|
+
label: Boundary with WirePlumber
|
|
43
|
+
description: Why does this belong in Pwg as generic PipeWire application API instead of WirePlumber session-management or policy API?
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
- type: checkboxes
|
|
47
|
+
id: safety
|
|
48
|
+
attributes:
|
|
49
|
+
label: Safety expectations
|
|
50
|
+
options:
|
|
51
|
+
- label: This does not expose raw pw_stream, pw_buffer, spa_buffer, or spa_pod ownership to GI consumers.
|
|
52
|
+
required: true
|
|
53
|
+
- label: This does not add routing policy or session-manager behavior.
|
|
54
|
+
required: true
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a crash, build problem, binding issue, or unexpected behavior.
|
|
3
|
+
title: "bug: "
|
|
4
|
+
labels:
|
|
5
|
+
- bug
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thanks for reporting a bug. This project is experimental; please include enough environment detail to reproduce the issue.
|
|
11
|
+
- type: input
|
|
12
|
+
id: version
|
|
13
|
+
attributes:
|
|
14
|
+
label: pipewire-gobject version or commit
|
|
15
|
+
placeholder: "0.1.0 or git commit"
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: input
|
|
19
|
+
id: pipewire_version
|
|
20
|
+
attributes:
|
|
21
|
+
label: PipeWire version
|
|
22
|
+
placeholder: "pkg-config --modversion libpipewire-0.3"
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: dropdown
|
|
26
|
+
id: language
|
|
27
|
+
attributes:
|
|
28
|
+
label: Consumer language
|
|
29
|
+
options:
|
|
30
|
+
- C
|
|
31
|
+
- Python/PyGObject
|
|
32
|
+
- GJS
|
|
33
|
+
- Vala
|
|
34
|
+
- Other
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: problem
|
|
39
|
+
attributes:
|
|
40
|
+
label: Problem
|
|
41
|
+
description: What happened, and what did you expect?
|
|
42
|
+
validations:
|
|
43
|
+
required: true
|
|
44
|
+
- type: textarea
|
|
45
|
+
id: reproduce
|
|
46
|
+
attributes:
|
|
47
|
+
label: Reproducer
|
|
48
|
+
description: Minimal code, commands, or steps that reproduce the issue.
|
|
49
|
+
render: shell
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
- type: textarea
|
|
53
|
+
id: logs
|
|
54
|
+
attributes:
|
|
55
|
+
label: Logs
|
|
56
|
+
description: Meson logs, Python traceback, PipeWire log, or relevant terminal output.
|
|
57
|
+
render: text
|
|
58
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Community Scope Feedback
|
|
2
|
+
description: Discuss project scope, WirePlumber overlap, or upstream placement.
|
|
3
|
+
title: "scope: "
|
|
4
|
+
labels:
|
|
5
|
+
- scope
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
This template is for feedback on the project boundary: standalone Pwg project, WirePlumber extension, PipeWire companion library, or another shape.
|
|
11
|
+
- type: dropdown
|
|
12
|
+
id: perspective
|
|
13
|
+
attributes:
|
|
14
|
+
label: Perspective
|
|
15
|
+
options:
|
|
16
|
+
- PipeWire user
|
|
17
|
+
- WirePlumber user
|
|
18
|
+
- Application developer
|
|
19
|
+
- Distribution/package maintainer
|
|
20
|
+
- PipeWire/WirePlumber contributor
|
|
21
|
+
- Other
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
- type: textarea
|
|
25
|
+
id: feedback
|
|
26
|
+
attributes:
|
|
27
|
+
label: Feedback
|
|
28
|
+
description: What boundary or project organization would you prefer, and why?
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: concerns
|
|
33
|
+
attributes:
|
|
34
|
+
label: Concerns
|
|
35
|
+
description: API overlap, maintenance, packaging, stability, or ecosystem concerns.
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: alternatives
|
|
38
|
+
attributes:
|
|
39
|
+
label: Alternatives
|
|
40
|
+
description: Existing APIs or project homes that should be considered.
|
|
41
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe the change and the application workflow or maintenance problem it
|
|
4
|
+
addresses.
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
- [ ] This keeps the public API GI-friendly and GObject-native.
|
|
9
|
+
- [ ] This does not expose raw PipeWire or SPA ownership to language bindings.
|
|
10
|
+
- [ ] This does not add WirePlumber session-management or routing policy.
|
|
11
|
+
- [ ] Public API/ABI changes are intentional and documented.
|
|
12
|
+
|
|
13
|
+
## Validation
|
|
14
|
+
|
|
15
|
+
List the checks you ran, or explain why they were not run.
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
meson test -C build --print-errorlogs
|
|
19
|
+
meson compile -C build docs
|
|
20
|
+
ruff check .
|
|
21
|
+
```
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: "17 4 * * 1"
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
changes:
|
|
23
|
+
name: Change detection
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
outputs:
|
|
26
|
+
run_build: ${{ steps.detect.outputs.run_build }}
|
|
27
|
+
run_docs: ${{ steps.detect.outputs.run_docs }}
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v6
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- name: Detect build-relevant changes
|
|
35
|
+
id: detect
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
set -euo pipefail
|
|
39
|
+
|
|
40
|
+
run_build=true
|
|
41
|
+
event="${{ github.event_name }}"
|
|
42
|
+
|
|
43
|
+
if [ "$event" = "pull_request" ]; then
|
|
44
|
+
base="${{ github.event.pull_request.base.sha }}"
|
|
45
|
+
head="${{ github.sha }}"
|
|
46
|
+
run_build=false
|
|
47
|
+
run_docs=false
|
|
48
|
+
elif [ "$event" = "push" ]; then
|
|
49
|
+
base="${{ github.event.before }}"
|
|
50
|
+
head="${{ github.sha }}"
|
|
51
|
+
if [[ "$base" =~ ^0+$ ]]; then
|
|
52
|
+
run_build=true
|
|
53
|
+
run_docs=true
|
|
54
|
+
else
|
|
55
|
+
run_build=false
|
|
56
|
+
run_docs=false
|
|
57
|
+
fi
|
|
58
|
+
else
|
|
59
|
+
base=""
|
|
60
|
+
head=""
|
|
61
|
+
run_build=true
|
|
62
|
+
run_docs=true
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
if [ -n "$base" ] && [ "$run_build" = "false" ]; then
|
|
66
|
+
git diff --name-only "$base" "$head" > changed-files.txt
|
|
67
|
+
cat changed-files.txt
|
|
68
|
+
|
|
69
|
+
while IFS= read -r path; do
|
|
70
|
+
case "$path" in
|
|
71
|
+
src/*|tests/*|examples/*|python/*|meson.build|meson_options.txt|pyproject.toml|Dockerfile|.dockerignore|ruff.toml|.github/workflows/ci.yml)
|
|
72
|
+
run_build=true
|
|
73
|
+
run_docs=true
|
|
74
|
+
;;
|
|
75
|
+
docs/*)
|
|
76
|
+
run_docs=true
|
|
77
|
+
;;
|
|
78
|
+
esac
|
|
79
|
+
done < changed-files.txt
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
echo "run_build=$run_build" >> "$GITHUB_OUTPUT"
|
|
83
|
+
echo "run_docs=$run_docs" >> "$GITHUB_OUTPUT"
|
|
84
|
+
echo "run_build=$run_build"
|
|
85
|
+
echo "run_docs=$run_docs"
|
|
86
|
+
|
|
87
|
+
python-lint:
|
|
88
|
+
name: Python lint
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v6
|
|
93
|
+
|
|
94
|
+
- name: Install Ruff
|
|
95
|
+
run: |
|
|
96
|
+
python3 -m venv /tmp/ruff
|
|
97
|
+
/tmp/ruff/bin/pip install --upgrade pip
|
|
98
|
+
/tmp/ruff/bin/pip install ruff==0.15.12
|
|
99
|
+
|
|
100
|
+
- name: Ruff
|
|
101
|
+
run: /tmp/ruff/bin/ruff check .
|
|
102
|
+
|
|
103
|
+
api-docs:
|
|
104
|
+
name: API docs
|
|
105
|
+
needs: changes
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
container: debian:trixie-slim
|
|
108
|
+
env:
|
|
109
|
+
RUN_DOCS: ${{ needs.changes.outputs.run_docs }}
|
|
110
|
+
|
|
111
|
+
steps:
|
|
112
|
+
- name: Skip notice
|
|
113
|
+
if: env.RUN_DOCS != 'true'
|
|
114
|
+
run: echo "No API-doc-relevant files changed; API docs check is satisfied."
|
|
115
|
+
|
|
116
|
+
- name: Install dependencies
|
|
117
|
+
if: env.RUN_DOCS == 'true'
|
|
118
|
+
env:
|
|
119
|
+
DEBIAN_FRONTEND: noninteractive
|
|
120
|
+
run: |
|
|
121
|
+
apt-get update
|
|
122
|
+
apt-get install -y --no-install-recommends \
|
|
123
|
+
build-essential \
|
|
124
|
+
ca-certificates \
|
|
125
|
+
gi-docgen \
|
|
126
|
+
git \
|
|
127
|
+
meson \
|
|
128
|
+
ninja-build \
|
|
129
|
+
pkg-config \
|
|
130
|
+
libglib2.0-dev \
|
|
131
|
+
libpipewire-0.3-dev \
|
|
132
|
+
gobject-introspection \
|
|
133
|
+
libgirepository1.0-dev \
|
|
134
|
+
python3-gi
|
|
135
|
+
|
|
136
|
+
- uses: actions/checkout@v6
|
|
137
|
+
if: env.RUN_DOCS == 'true'
|
|
138
|
+
|
|
139
|
+
- name: Build API docs
|
|
140
|
+
if: env.RUN_DOCS == 'true'
|
|
141
|
+
run: |
|
|
142
|
+
meson setup build
|
|
143
|
+
meson compile -C build docs
|
|
144
|
+
|
|
145
|
+
distro:
|
|
146
|
+
name: Debian packaged PipeWire
|
|
147
|
+
needs: changes
|
|
148
|
+
runs-on: ubuntu-latest
|
|
149
|
+
container: debian:trixie-slim
|
|
150
|
+
env:
|
|
151
|
+
RUN_BUILD: ${{ needs.changes.outputs.run_build }}
|
|
152
|
+
|
|
153
|
+
steps:
|
|
154
|
+
- name: Skip notice
|
|
155
|
+
if: env.RUN_BUILD != 'true'
|
|
156
|
+
run: echo "No build-relevant files changed; Debian packaged PipeWire check is satisfied."
|
|
157
|
+
|
|
158
|
+
- name: Install dependencies
|
|
159
|
+
if: env.RUN_BUILD == 'true'
|
|
160
|
+
env:
|
|
161
|
+
DEBIAN_FRONTEND: noninteractive
|
|
162
|
+
run: |
|
|
163
|
+
apt-get update
|
|
164
|
+
apt-get install -y --no-install-recommends \
|
|
165
|
+
build-essential \
|
|
166
|
+
ca-certificates \
|
|
167
|
+
gi-docgen \
|
|
168
|
+
git \
|
|
169
|
+
meson \
|
|
170
|
+
ninja-build \
|
|
171
|
+
pkg-config \
|
|
172
|
+
libglib2.0-dev \
|
|
173
|
+
libpipewire-0.3-dev \
|
|
174
|
+
gobject-introspection \
|
|
175
|
+
libgirepository1.0-dev \
|
|
176
|
+
python3-gi \
|
|
177
|
+
python3-pip \
|
|
178
|
+
python3-venv \
|
|
179
|
+
dbus \
|
|
180
|
+
pipewire \
|
|
181
|
+
libspa-0.2-modules \
|
|
182
|
+
wireplumber
|
|
183
|
+
|
|
184
|
+
- uses: actions/checkout@v6
|
|
185
|
+
if: env.RUN_BUILD == 'true'
|
|
186
|
+
|
|
187
|
+
- name: Build
|
|
188
|
+
if: env.RUN_BUILD == 'true'
|
|
189
|
+
run: |
|
|
190
|
+
meson setup build
|
|
191
|
+
meson compile -C build
|
|
192
|
+
|
|
193
|
+
- name: Test
|
|
194
|
+
if: env.RUN_BUILD == 'true'
|
|
195
|
+
run: meson test -C build --print-errorlogs
|
|
196
|
+
|
|
197
|
+
- name: Strict runtime warning check
|
|
198
|
+
if: env.RUN_BUILD == 'true'
|
|
199
|
+
env:
|
|
200
|
+
G_DEBUG: fatal-warnings,fatal-criticals
|
|
201
|
+
G_SLICE: debug-blocks
|
|
202
|
+
run: meson test -C build --print-errorlogs
|
|
203
|
+
|
|
204
|
+
- name: Sanitizer check
|
|
205
|
+
if: env.RUN_BUILD == 'true'
|
|
206
|
+
run: |
|
|
207
|
+
meson setup build-sanitize -Db_sanitize=address,undefined -Db_lundef=false
|
|
208
|
+
meson compile -C build-sanitize
|
|
209
|
+
|
|
210
|
+
asan="$(gcc -print-file-name=libasan.so)"
|
|
211
|
+
ubsan="$(gcc -print-file-name=libubsan.so)"
|
|
212
|
+
preload="$asan:$ubsan${LD_PRELOAD:+:$LD_PRELOAD}"
|
|
213
|
+
sanitizer_wrapper="env LD_PRELOAD=$preload ASAN_OPTIONS=detect_leaks=0:halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1"
|
|
214
|
+
|
|
215
|
+
meson test -C build-sanitize --print-errorlogs --wrapper "$sanitizer_wrapper"
|
|
216
|
+
|
|
217
|
+
leak_wrapper="env LD_PRELOAD=$preload ASAN_OPTIONS=detect_leaks=1:halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1"
|
|
218
|
+
meson test -C build-sanitize --print-errorlogs stream-dispatch --wrapper "$leak_wrapper"
|
|
219
|
+
|
|
220
|
+
- name: Strict warning check
|
|
221
|
+
if: env.RUN_BUILD == 'true'
|
|
222
|
+
run: |
|
|
223
|
+
meson setup build-strict -Dwerror=true
|
|
224
|
+
meson compile -C build-strict
|
|
225
|
+
meson test -C build-strict --print-errorlogs
|
|
226
|
+
|
|
227
|
+
- name: Install check
|
|
228
|
+
if: env.RUN_BUILD == 'true'
|
|
229
|
+
run: DESTDIR="$PWD/install-root" meson install -C build --no-rebuild
|
|
230
|
+
|
|
231
|
+
- name: Dist check
|
|
232
|
+
if: env.RUN_BUILD == 'true'
|
|
233
|
+
run: |
|
|
234
|
+
git config --global --add safe.directory "$PWD"
|
|
235
|
+
meson dist -C build
|
|
236
|
+
|
|
237
|
+
- name: Build Python package
|
|
238
|
+
if: env.RUN_BUILD == 'true'
|
|
239
|
+
run: |
|
|
240
|
+
python3 -m venv --system-site-packages .venv
|
|
241
|
+
.venv/bin/python -m pip install --upgrade pip
|
|
242
|
+
.venv/bin/python -m pip install build meson-python twine
|
|
243
|
+
rm -rf dist
|
|
244
|
+
.venv/bin/python -m build
|
|
245
|
+
.venv/bin/python -m twine check dist/*
|
|
246
|
+
|
|
247
|
+
- name: Smoke-test local wheel
|
|
248
|
+
if: env.RUN_BUILD == 'true'
|
|
249
|
+
run: |
|
|
250
|
+
python3 -m venv --system-site-packages /tmp/pwg-wheel-test
|
|
251
|
+
/tmp/pwg-wheel-test/bin/python -m pip install dist/*.whl
|
|
252
|
+
/tmp/pwg-wheel-test/bin/python - <<'PY'
|
|
253
|
+
import pipewire_gobject
|
|
254
|
+
|
|
255
|
+
import gi
|
|
256
|
+
|
|
257
|
+
gi.require_version("Pwg", "0.1")
|
|
258
|
+
from gi.repository import Pwg
|
|
259
|
+
|
|
260
|
+
assert Pwg.get_library_version() == "0.3.1"
|
|
261
|
+
assert pipewire_gobject.typelib_paths()
|
|
262
|
+
assert pipewire_gobject.library_paths()
|
|
263
|
+
print("Pwg wheel import ok", Pwg.get_library_version())
|
|
264
|
+
PY
|
|
265
|
+
|
|
266
|
+
- name: Live PipeWire smoke test
|
|
267
|
+
if: env.RUN_BUILD == 'true'
|
|
268
|
+
run: |
|
|
269
|
+
mkdir -p /tmp/pwg-runtime
|
|
270
|
+
chmod 700 /tmp/pwg-runtime
|
|
271
|
+
export XDG_RUNTIME_DIR=/tmp/pwg-runtime
|
|
272
|
+
pipewire >/tmp/pwg-pipewire.log 2>&1 &
|
|
273
|
+
pw_pid=$!
|
|
274
|
+
trap 'kill "$pw_pid" 2>/dev/null || true' EXIT
|
|
275
|
+
sleep 1
|
|
276
|
+
GI_TYPELIB_PATH="$PWD/build" \
|
|
277
|
+
LD_LIBRARY_PATH="$PWD/build" \
|
|
278
|
+
python3 tests/test_live_pipewire.py
|
|
279
|
+
|
|
280
|
+
- name: Live stream audio smoke test
|
|
281
|
+
if: env.RUN_BUILD == 'true'
|
|
282
|
+
run: |
|
|
283
|
+
GI_TYPELIB_PATH="$PWD/build" \
|
|
284
|
+
LD_LIBRARY_PATH="$PWD/build" \
|
|
285
|
+
python3 tests/test_live_stream_audio.py
|
|
286
|
+
|
|
287
|
+
pipewire-source:
|
|
288
|
+
name: PipeWire ${{ matrix.pipewire_version }}
|
|
289
|
+
needs: changes
|
|
290
|
+
runs-on: ubuntu-latest
|
|
291
|
+
strategy:
|
|
292
|
+
fail-fast: false
|
|
293
|
+
matrix:
|
|
294
|
+
pipewire_version:
|
|
295
|
+
- "1.0.2"
|
|
296
|
+
- "1.6.4"
|
|
297
|
+
|
|
298
|
+
env:
|
|
299
|
+
RUN_BUILD: ${{ needs.changes.outputs.run_build }}
|
|
300
|
+
PIPEWIRE_PREFIX: /tmp/pipewire-${{ matrix.pipewire_version }}
|
|
301
|
+
PIPEWIRE_TARBALL: https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${{ matrix.pipewire_version }}/pipewire-${{ matrix.pipewire_version }}.tar.bz2
|
|
302
|
+
|
|
303
|
+
steps:
|
|
304
|
+
- uses: actions/checkout@v6
|
|
305
|
+
if: env.RUN_BUILD == 'true'
|
|
306
|
+
|
|
307
|
+
- name: Skip notice
|
|
308
|
+
if: env.RUN_BUILD != 'true'
|
|
309
|
+
run: echo "No build-relevant files changed; PipeWire ${{ matrix.pipewire_version }} check is satisfied."
|
|
310
|
+
|
|
311
|
+
- name: Install dependencies
|
|
312
|
+
if: env.RUN_BUILD == 'true'
|
|
313
|
+
run: |
|
|
314
|
+
sudo apt-get update
|
|
315
|
+
sudo apt-get install -y --no-install-recommends \
|
|
316
|
+
build-essential \
|
|
317
|
+
meson \
|
|
318
|
+
ninja-build \
|
|
319
|
+
pkg-config \
|
|
320
|
+
python3 \
|
|
321
|
+
python3-gi \
|
|
322
|
+
ca-certificates \
|
|
323
|
+
curl \
|
|
324
|
+
libglib2.0-dev \
|
|
325
|
+
libdbus-1-dev \
|
|
326
|
+
gobject-introspection \
|
|
327
|
+
libgirepository1.0-dev
|
|
328
|
+
|
|
329
|
+
- name: Cache PipeWire prefix
|
|
330
|
+
if: env.RUN_BUILD == 'true'
|
|
331
|
+
id: pipewire-cache
|
|
332
|
+
uses: actions/cache@v5
|
|
333
|
+
with:
|
|
334
|
+
path: ${{ env.PIPEWIRE_PREFIX }}
|
|
335
|
+
key: ${{ runner.os }}-pipewire-${{ matrix.pipewire_version }}-minimal-v1
|
|
336
|
+
|
|
337
|
+
- name: Build PipeWire
|
|
338
|
+
if: env.RUN_BUILD == 'true' && steps.pipewire-cache.outputs.cache-hit != 'true'
|
|
339
|
+
run: |
|
|
340
|
+
set -e
|
|
341
|
+
workdir="$(mktemp -d)"
|
|
342
|
+
curl -L --fail -o "$workdir/pipewire.tar.bz2" "$PIPEWIRE_TARBALL"
|
|
343
|
+
tar -xf "$workdir/pipewire.tar.bz2" -C "$workdir"
|
|
344
|
+
meson setup "$workdir/build" "$workdir/pipewire-${{ matrix.pipewire_version }}" \
|
|
345
|
+
--prefix="$PIPEWIRE_PREFIX" \
|
|
346
|
+
-Dauto_features=disabled \
|
|
347
|
+
-Dtests=disabled \
|
|
348
|
+
-Dexamples=disabled \
|
|
349
|
+
-Dsession-managers=[]
|
|
350
|
+
meson compile -C "$workdir/build"
|
|
351
|
+
meson install -C "$workdir/build"
|
|
352
|
+
|
|
353
|
+
- name: Verify PipeWire version
|
|
354
|
+
if: env.RUN_BUILD == 'true'
|
|
355
|
+
run: |
|
|
356
|
+
export PKG_CONFIG_PATH="$PIPEWIRE_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$PIPEWIRE_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
357
|
+
test "$(pkg-config --modversion libpipewire-0.3)" = "${{ matrix.pipewire_version }}"
|
|
358
|
+
|
|
359
|
+
- name: Build and test
|
|
360
|
+
if: env.RUN_BUILD == 'true'
|
|
361
|
+
run: |
|
|
362
|
+
export PKG_CONFIG_PATH="$PIPEWIRE_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$PIPEWIRE_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
363
|
+
export LD_LIBRARY_PATH="$PIPEWIRE_PREFIX/lib/x86_64-linux-gnu:$PIPEWIRE_PREFIX/lib:$LD_LIBRARY_PATH"
|
|
364
|
+
meson setup build
|
|
365
|
+
meson compile -C build
|
|
366
|
+
meson test -C build --print-errorlogs
|
|
367
|
+
|
|
368
|
+
- name: Install check
|
|
369
|
+
if: env.RUN_BUILD == 'true'
|
|
370
|
+
run: |
|
|
371
|
+
export LD_LIBRARY_PATH="$PIPEWIRE_PREFIX/lib/x86_64-linux-gnu:$PIPEWIRE_PREFIX/lib:$LD_LIBRARY_PATH"
|
|
372
|
+
DESTDIR="$PWD/install-root" meson install -C build --no-rebuild
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
schedule:
|
|
11
|
+
- cron: "31 3 * * 2"
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
security-events: write
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
analyze:
|
|
24
|
+
name: Analyze C/C++
|
|
25
|
+
runs-on: ubuntu-24.04
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Check out repository
|
|
29
|
+
uses: actions/checkout@v6
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
|
|
33
|
+
- name: Detect C/C++ analysis changes
|
|
34
|
+
id: changes
|
|
35
|
+
shell: bash
|
|
36
|
+
run: |
|
|
37
|
+
set -euo pipefail
|
|
38
|
+
|
|
39
|
+
run_codeql=true
|
|
40
|
+
event="${{ github.event_name }}"
|
|
41
|
+
|
|
42
|
+
if [ "$event" = "pull_request" ]; then
|
|
43
|
+
base="${{ github.event.pull_request.base.sha }}"
|
|
44
|
+
head="${{ github.sha }}"
|
|
45
|
+
run_codeql=false
|
|
46
|
+
elif [ "$event" = "push" ]; then
|
|
47
|
+
base="${{ github.event.before }}"
|
|
48
|
+
head="${{ github.sha }}"
|
|
49
|
+
if [[ "$base" =~ ^0+$ ]]; then
|
|
50
|
+
run_codeql=true
|
|
51
|
+
else
|
|
52
|
+
run_codeql=false
|
|
53
|
+
fi
|
|
54
|
+
else
|
|
55
|
+
base=""
|
|
56
|
+
head=""
|
|
57
|
+
run_codeql=true
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
if [ -n "$base" ] && [ "$run_codeql" = "false" ]; then
|
|
61
|
+
git diff --name-only "$base" "$head" > changed-files.txt
|
|
62
|
+
cat changed-files.txt
|
|
63
|
+
|
|
64
|
+
while IFS= read -r path; do
|
|
65
|
+
case "$path" in
|
|
66
|
+
src/*|meson.build|.github/workflows/codeql.yml)
|
|
67
|
+
run_codeql=true
|
|
68
|
+
;;
|
|
69
|
+
esac
|
|
70
|
+
done < changed-files.txt
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
echo "run_codeql=$run_codeql" >> "$GITHUB_OUTPUT"
|
|
74
|
+
echo "run_codeql=$run_codeql"
|
|
75
|
+
|
|
76
|
+
- name: Skip notice
|
|
77
|
+
if: steps.changes.outputs.run_codeql != 'true'
|
|
78
|
+
run: echo "No C/C++ analysis-relevant files changed; Analyze C/C++ check is satisfied."
|
|
79
|
+
|
|
80
|
+
- name: Install dependencies
|
|
81
|
+
if: steps.changes.outputs.run_codeql == 'true'
|
|
82
|
+
run: |
|
|
83
|
+
sudo apt-get update
|
|
84
|
+
sudo apt-get install -y --no-install-recommends \
|
|
85
|
+
build-essential \
|
|
86
|
+
meson \
|
|
87
|
+
ninja-build \
|
|
88
|
+
pkg-config \
|
|
89
|
+
libglib2.0-dev \
|
|
90
|
+
libpipewire-0.3-dev \
|
|
91
|
+
gobject-introspection \
|
|
92
|
+
libgirepository1.0-dev \
|
|
93
|
+
python3-gi
|
|
94
|
+
|
|
95
|
+
- name: Initialize CodeQL
|
|
96
|
+
if: steps.changes.outputs.run_codeql == 'true'
|
|
97
|
+
uses: github/codeql-action/init@v4
|
|
98
|
+
with:
|
|
99
|
+
languages: c-cpp
|
|
100
|
+
|
|
101
|
+
- name: Build
|
|
102
|
+
if: steps.changes.outputs.run_codeql == 'true'
|
|
103
|
+
run: |
|
|
104
|
+
meson setup build-codeql
|
|
105
|
+
meson compile -C build-codeql
|
|
106
|
+
|
|
107
|
+
- name: Perform CodeQL analysis
|
|
108
|
+
if: steps.changes.outputs.run_codeql == 'true'
|
|
109
|
+
uses: github/codeql-action/analyze@v4
|