Compare commits
No commits in common. "main" and "kinetic" have entirely different histories.
1
.github/build-canary-v3
vendored
1
.github/build-canary-v3
vendored
@ -1 +0,0 @@
|
|||||||
1
|
|
1
.github/build-nest-v3
vendored
1
.github/build-nest-v3
vendored
@ -1 +0,0 @@
|
|||||||
1
|
|
1
.github/release-canary-v3
vendored
1
.github/release-canary-v3
vendored
@ -1 +0,0 @@
|
|||||||
7
|
|
1
.github/release-nest-v3
vendored
1
.github/release-nest-v3
vendored
@ -1 +0,0 @@
|
|||||||
2
|
|
37
.github/workflows/build-canaryv3.yml
vendored
37
.github/workflows/build-canaryv3.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: PikaOS Package Build Only (Canary) (amd64-v3)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- '.github/build-canary-v3'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/pikaos-linux/pikaos-builder:canaryv3
|
|
||||||
volumes:
|
|
||||||
- /proc:/proc
|
|
||||||
options: --privileged -it
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: shimataro/ssh-key-action@v2
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
name: id_rsa
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
if_key_exists: replace
|
|
||||||
|
|
||||||
- name: Update APT Cache
|
|
||||||
run: apt-get update -y
|
|
||||||
|
|
||||||
- name: Set Build Config
|
|
||||||
run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh
|
|
||||||
|
|
||||||
- name: Build Package
|
|
||||||
run: ./main.sh
|
|
37
.github/workflows/build-nestv3.yml
vendored
37
.github/workflows/build-nestv3.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: PikaOS Package Build Only (amd64-v3)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- '.github/build-nest-v3'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/pikaos-linux/pikaos-builder:nestv3
|
|
||||||
volumes:
|
|
||||||
- /proc:/proc
|
|
||||||
options: --privileged -it
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: shimataro/ssh-key-action@v2
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
name: id_rsa
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
if_key_exists: replace
|
|
||||||
|
|
||||||
- name: Update APT Cache
|
|
||||||
run: apt-get update -y
|
|
||||||
|
|
||||||
- name: Set Build Config
|
|
||||||
run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh
|
|
||||||
|
|
||||||
- name: Build Package
|
|
||||||
run: ./main.sh
|
|
40
.github/workflows/release-canaryv3.yml
vendored
40
.github/workflows/release-canaryv3.yml
vendored
@ -1,40 +0,0 @@
|
|||||||
name: PikaOS Package Build & Release (Canary) (amd64-v3)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- '.github/release-canary-v3'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/pikaos-linux/pikaos-builder:canaryv3
|
|
||||||
volumes:
|
|
||||||
- /proc:/proc
|
|
||||||
options: --privileged -it
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: shimataro/ssh-key-action@v2
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
name: id_rsa
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
if_key_exists: replace
|
|
||||||
|
|
||||||
- name: Update APT Cache
|
|
||||||
run: apt-get update -y
|
|
||||||
|
|
||||||
- name: Set Build Config
|
|
||||||
run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh
|
|
||||||
|
|
||||||
- name: Build Package
|
|
||||||
run: ./main.sh
|
|
||||||
|
|
||||||
- name: Release Package
|
|
||||||
run: ./release.sh
|
|
40
.github/workflows/release-nestv3.yml
vendored
40
.github/workflows/release-nestv3.yml
vendored
@ -1,40 +0,0 @@
|
|||||||
name: PikaOS Package Build & Release (amd64-v3)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- '.github/release-nest-v3'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/pikaos-linux/pikaos-builder:nestv3
|
|
||||||
volumes:
|
|
||||||
- /proc:/proc
|
|
||||||
options: --privileged -it
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: shimataro/ssh-key-action@v2
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY }}
|
|
||||||
name: id_rsa
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
if_key_exists: replace
|
|
||||||
|
|
||||||
- name: Update APT Cache
|
|
||||||
run: apt-get update -y
|
|
||||||
|
|
||||||
- name: Set Build Config
|
|
||||||
run: cp -vf ./pika-build-config/amd64-v3.sh ./pika-build-config.sh
|
|
||||||
|
|
||||||
- name: Build Package
|
|
||||||
run: ./main.sh
|
|
||||||
|
|
||||||
- name: Release Package
|
|
||||||
run: ./release.sh
|
|
40
.github/workflows/release.yml
vendored
Normal file
40
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: PikaOS Package Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: self-hosted
|
||||||
|
container:
|
||||||
|
image: ubuntu:22.10
|
||||||
|
volumes:
|
||||||
|
- /proc:/proc
|
||||||
|
options: --privileged -it
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install needed packages
|
||||||
|
run: apt update && apt install software-properties-common sudo git bc gpg gpg-agent bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd tar reprepro dpkg-sig devscripts dh-make -y
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
id: import_gpg
|
||||||
|
uses: crazy-max/ghaction-import-gpg@v5
|
||||||
|
with:
|
||||||
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
name: id_rsa
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
|
||||||
|
- name: Build Package
|
||||||
|
run: ./main.sh
|
||||||
|
|
||||||
|
- name: Release Package
|
||||||
|
run: ./release.sh
|
24
LICENSE.md
24
LICENSE.md
@ -1,24 +0,0 @@
|
|||||||
MIT License (With DPKG packaging compatibility)
|
|
||||||
|
|
||||||
Copyright (c) 2024 PikaOS
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
The files covered by this license are any files and directories in the root of this repository (including but not limited to: `main.sh`, `release.sh`, and `.github`), with the exception of the `debian` directory and its contents if `debian/copyright` exists, and declares any files or directories as a different LICENSE/COPYRIGHT.
|
|
36
debian/changelog
vendored
36
debian/changelog
vendored
@ -1,39 +1,3 @@
|
|||||||
obs-studio (1:30.2.1-101pika3) pika; urgency=low
|
|
||||||
|
|
||||||
Update to 30.2.1
|
|
||||||
|
|
||||||
-- Kevin Henkel <obs.goldace@gmail.com> Sat, 04 Feb 2023 12:48:06 +0100
|
|
||||||
|
|
||||||
obs-studio (30.2.1-101pika2) pika; urgency=low
|
|
||||||
|
|
||||||
Update to 30.2.1
|
|
||||||
|
|
||||||
-- Kevin Henkel <obs.goldace@gmail.com> Sat, 04 Feb 2023 12:48:06 +0100
|
|
||||||
|
|
||||||
obs-studio (30.2.1-101pika1) pika; urgency=low
|
|
||||||
|
|
||||||
Update to 30.2.1
|
|
||||||
|
|
||||||
-- Kevin Henkel <obs.goldace@gmail.com> Sat, 04 Feb 2023 12:48:06 +0100
|
|
||||||
|
|
||||||
obs-studio (30.0.2-100pika3) pikauwu; urgency=low
|
|
||||||
|
|
||||||
Update to 30.0.2
|
|
||||||
|
|
||||||
-- Kevin Henkel <obs.goldace@gmail.com> Sat, 04 Feb 2023 12:48:06 +0100
|
|
||||||
|
|
||||||
obs-studio (30.0.2-100pika2) pikauwu; urgency=low
|
|
||||||
|
|
||||||
Update to 30.0.2
|
|
||||||
|
|
||||||
-- Kevin Henkel <obs.goldace@gmail.com> Sat, 04 Feb 2023 12:48:06 +0100
|
|
||||||
|
|
||||||
obs-studio (29.0.2.git2ac3767-99pika1.lunar) lunar; urgency=low
|
|
||||||
|
|
||||||
Update to lunar
|
|
||||||
|
|
||||||
-- Kevin Henkel <obs.goldace@gmail.com> Sat, 04 Feb 2023 12:48:06 +0100
|
|
||||||
|
|
||||||
obs-studio (29.0.2-0obsproject1~kinetic) kinetic; urgency=low
|
obs-studio (29.0.2-0obsproject1~kinetic) kinetic; urgency=low
|
||||||
|
|
||||||
OBS Studio 29.0.2
|
OBS Studio 29.0.2
|
||||||
|
36
debian/control
vendored
36
debian/control
vendored
@ -3,35 +3,15 @@ Section: video
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: John Bradley <jrb@turrettech.com>
|
Maintainer: John Bradley <jrb@turrettech.com>
|
||||||
Uploaders: Kevin Henkel <obs.goldace@gmail.com>
|
Uploaders: Kevin Henkel <obs.goldace@gmail.com>
|
||||||
Build-Depends: debhelper (>= 9), libsimde-dev, cdbs, cmake, git, libx11-dev, libgl1-mesa-dev | libgl-dev, libpulse-dev, libvulkan-dev, libxcb-composite0-dev, libxinerama-dev, libv4l-dev, libudev-dev, libfreetype6-dev, libfontconfig-dev, qt6-base-dev, qt6-base-private-dev, libqt6svg6-dev, libx264-dev, libxcb-xinerama0-dev, libxcb-shm0-dev, libavformat-dev, libavcodec-dev, libavutil-dev, libswscale-dev, libswresample-dev, libavdevice-dev, libavfilter-dev, libfdk-aac-dev, libjack-jackd2-dev, libcurl4-openssl-dev, libspeexdsp-dev, libvlc-dev, libasound2-dev, libluajit-5.1-dev, python3-dev, swig, libmbedtls-dev, pkg-config, libxcb-randr0-dev, libxcb-xfixes0-dev, libx11-xcb-dev, libxcb1-dev, libjansson-dev, libnss3-dev, libxtst-dev, libatspi2.0-dev, libatk-bridge2.0-dev, libatk1.0-dev, libgtk2.0-dev, libgtkglext1-dev, libxss-dev, v4l2loopback-dkms, libwayland-dev, libpci-dev, libdrm-dev, libpipewire-0.3-dev, librist-dev, libsrt-openssl-dev, libva-dev, libuuid1, nlohmann-json3-dev, libwebsocketpp-dev, libasio-dev, amf-codec-headers, glslang-tools, glslang-dev, glslc, cdbs, cmake, git, libx11-dev, libgl1-mesa-dev | libgl-dev, libpulse-dev, libxcb-composite0-dev, libxinerama-dev, libv4l-dev, libudev-dev, libfreetype6-dev, libfontconfig-dev, qt6-base-dev, qt6-base-private-dev, libqt6svg6-dev, libx264-dev, libxcb-xinerama0-dev, libxcb-shm0-dev, libavformat-dev, libavcodec-dev, libavutil-dev, libswscale-dev, libswresample-dev, libavdevice-dev, libavfilter-dev, libfdk-aac-dev, libjack-jackd2-dev, libcurl4-openssl-dev, libspeexdsp-dev, libvlc-dev, libasound2-dev, libluajit-5.1-dev, python3-dev, swig, libmbedtls-dev, pkg-config, libxcb-randr0-dev, libxcb-xfixes0-dev, libx11-xcb-dev, libxcb1-dev, libjansson-dev, libnss3-dev, libxtst-dev, libatspi2.0-dev, libatk-bridge2.0-dev, libatk1.0-dev, libgtk2.0-dev, libgtkglext1-dev, libxss-dev, v4l2loopback-dkms, libwayland-dev, libpci-dev, libdrm-dev, libpipewire-0.3-dev, librist-dev, libsrt-openssl-dev, libva-dev, libuuid1, nlohmann-json3-dev, libwebsocketpp-dev, libasio-dev, libvpl-dev, libqrcodegencpp-dev, libwebrtc-audio-processing-dev, uthash-dev, libffmpeg-nvenc-dev
|
Build-Depends: debhelper (>= 9), cdbs, cmake, git, libx11-dev, libgl1-mesa-dev | libgl-dev, libpulse-dev, libxcb-composite0-dev, libxinerama-dev, libv4l-dev, libudev-dev, libfreetype6-dev, libfontconfig-dev, qt6-base-dev, qt6-base-private-dev, libqt6svg6-dev, libx264-dev, libxcb-xinerama0-dev, libxcb-shm0-dev, libavformat-dev, libavcodec-dev, libavutil-dev, libswscale-dev, libswresample-dev, libavdevice-dev, libavfilter-dev, libfdk-aac-dev, libjack-jackd2-dev, libcurl4-openssl-dev, libspeexdsp-dev, libvlc-dev, libasound2-dev, libluajit-5.1-dev, python3-dev, swig, libmbedtls-dev, pkg-config, libxcb-randr0-dev, libxcb-xfixes0-dev, libx11-xcb-dev, libxcb1-dev, libjansson-dev, libnss3-dev, libxtst-dev, libatspi2.0-dev, libatk-bridge2.0-dev, libatk1.0-dev, libgtk2.0-dev, libgtkglext1-dev, libxss-dev, linux-generic, v4l2loopback-dkms, libwayland-dev, libpci-dev, libdrm-dev, libpipewire-0.3-dev, librist-dev, libsrt-openssl-dev, libva-dev
|
||||||
Homepage: http://obsproject.org
|
Homepage: http://obsproject.org
|
||||||
|
|
||||||
Package: obs-studio
|
Package: obs-studio
|
||||||
Architecture: linux-any
|
Architecture: amd64
|
||||||
Depends:
|
Depends: ${shlibs:Depends}, ${misc:Depends}, qt6-wayland, qt6-qpa-plugins, obs-gstreamer-vaapi-plugin, obs-gamecapture-plugin
|
||||||
${shlibs:Depends},
|
|
||||||
${misc:Depends},
|
|
||||||
${python3:Depends},
|
|
||||||
qt6-wayland,
|
|
||||||
qt6-qpa-plugins,
|
|
||||||
obs-gstreamer-vaapi-plugin,
|
|
||||||
obs-gamecapture-plugin,
|
|
||||||
libqt6svg6,
|
|
||||||
libsimde-dev,
|
|
||||||
Recommends: obs-gamecapture-plugin:i386
|
Recommends: obs-gamecapture-plugin:i386
|
||||||
Provides:
|
Provides: libobs0, obs-plugins
|
||||||
libobs0 (= ${binary:Version}),
|
Conflicts: libobs0, obs-plugins
|
||||||
obs-plugins (= ${binary:Version}),
|
Replaces: libobs0, obs-plugins
|
||||||
libobs0t64 (= ${binary:Version}),
|
Description: OBS Studio for Ubuntu
|
||||||
libobs-dev (= ${binary:Version})
|
|
||||||
Conflicts:
|
|
||||||
libobs0,
|
|
||||||
obs-plugins,
|
|
||||||
libobs0t64,
|
|
||||||
libobs-dev,
|
|
||||||
Replaces:
|
|
||||||
libobs0,
|
|
||||||
obs-plugins,
|
|
||||||
libobs0t64,
|
|
||||||
libobs-dev,
|
|
||||||
Description: OBS Studio for Pika
|
|
||||||
|
8
debian/rules
vendored
8
debian/rules
vendored
@ -1,11 +1,11 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
BASE_DIR := $(CURDIR)
|
BASE_DIR := $(CURDIR)
|
||||||
CEF_DIR := $(BASE_DIR)/cef_binary_5060_linux64
|
CEF_DIR := $(BASE_DIR)/build_dependencies/cef_binary_5060_linux64
|
||||||
AJA_DIR := $(BASE_DIR)/ntv2
|
#AJA_DIR := $(BASE_DIR)/build_dependencies/aja
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
#dh_auto_configure -- -DOBS_VERSION_OVERRIDE="29.1.3" -DBUILD_FOR_PPA=ON -DTWITCH_CLIENTID='unla3~mb`xq9`1dhr?1lhhg`65mah0' -DTWITCH_HASH='2D4A98C454B4B0B6' -DRESTREAM_CLIENTID='ml6b16ec(n9?1#9g?m#>9f0,gnkojhhd;oh6' -DRESTREAM_HASH='2DE8E8C514397EE9' -DYOUTUBE_CLIENTID='153066229607$$;a7mw2ig756r?vc<f{`3tr3|i4gq167?$$lrpw,``jbnerwb{ibltals!fjo' -DYOUTUBE_CLIENTID_HASH='2DA97470255F7240' -DYOUTUBE_SECRET=';kV4NTXP5r>D`7bdLO^>gT8U' -DYOUTUBE_SECRET_HASH='F6215E72FC78C76F' -DENABLE_PIPEWIRE=ON -DENABLE_AJA=ON -DENABLE_NEW_MPEGTS_OUTPUT=ON -DCMAKE_PREFIX_PATH=$(AJA_DIR) -DCEF_ROOT_DIR=$(CEF_DIR) -DCMAKE_BUILD_TYPE=Release
|
dh_auto_configure -- -DOBS_VERSION_OVERRIDE="29.0.2" -DBUILD_FOR_PPA=ON -DTWITCH_CLIENTID='unla3~mb`xq9`1dhr?1lhhg`65mah0' -DTWITCH_HASH='2D4A98C454B4B0B6' -DRESTREAM_CLIENTID='ml6b16ec(n9?1#9g?m#>9f0,gnkojhhd;oh6' -DRESTREAM_HASH='2DE8E8C514397EE9' -DYOUTUBE_CLIENTID='153066229607$$;a7mw2ig756r?vc<f{`3tr3|i4gq167?$$lrpw,``jbnerwb{ibltals!fjo' -DYOUTUBE_CLIENTID_HASH='2DA97470255F7240' -DYOUTUBE_SECRET=';kV4NTXP5r>D`7bdLO^>gT8U' -DYOUTUBE_SECRET_HASH='F6215E72FC78C76F' -DENABLE_PIPEWIRE=ON -DENABLE_NEW_MPEGTS_OUTPUT=ON -DCEF_ROOT_DIR=$(CEF_DIR)
|
||||||
dh_auto_configure -- -DBUILD_FOR_PPA=ON -DTWITCH_CLIENTID='unla3~mb`xq9`1dhr?1lhhg`65mah0' -DTWITCH_HASH='2D4A98C454B4B0B6' -DRESTREAM_CLIENTID='ml6b16ec(n9?1#9g?m#>9f0,gnkojhhd;oh6' -DRESTREAM_HASH='2DE8E8C514397EE9' -DYOUTUBE_CLIENTID='153066229607$$;a7mw2ig756r?vc<f{`3tr3|i4gq167?$$lrpw,``jbnerwb{ibltals!fjo' -DYOUTUBE_CLIENTID_HASH='2DA97470255F7240' -DYOUTUBE_SECRET=';kV4NTXP5r>D`7bdLO^>gT8U' -DYOUTUBE_SECRET_HASH='F6215E72FC78C76F' -DENABLE_PIPEWIRE=ON -DENABLE_NEW_MPEGTS_OUTPUT=ON -DENABLE_AJA=OFF -DCEF_ROOT_DIR=$(CEF_DIR) -DCMAKE_BUILD_TYPE=Release -DENABLE_WEBRTC=OFF
|
|
||||||
|
2
debian/source/format
vendored
2
debian/source/format
vendored
@ -1 +1 @@
|
|||||||
3.0 (quilt)
|
3.0 (native)
|
||||||
|
44
main.sh
44
main.sh
@ -1,40 +1,38 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
# Add dependent repositories
|
||||||
VERSION="30.2.1"
|
wget -q -O - https://ppa.pika-os.com/key.gpg | sudo apt-key add -
|
||||||
|
add-apt-repository https://ppa.pika-os.com
|
||||||
source ./pika-build-config.sh
|
add-apt-repository ppa:pikaos/pika
|
||||||
|
add-apt-repository ppa:kubuntu-ppa/backports
|
||||||
echo "$PIKA_BUILD_ARCH" > pika-build-arch
|
|
||||||
|
|
||||||
# Clone Upstream
|
# Clone Upstream
|
||||||
git clone --recursive https://github.com/obsproject/obs-studio.git -b "$VERSION"
|
git clone --recursive https://github.com/obsproject/obs-studio.git
|
||||||
|
|
||||||
cp -rvf ./debian ./obs-studio/
|
cp -rvf ./debian ./obs-studio/
|
||||||
cd ./obs-studio
|
cd ./obs-studio
|
||||||
|
|
||||||
wget https://cdn-fastly.obsproject.com/downloads/cef_binary_5060_linux64.tar.bz2
|
|
||||||
tar -xf ./cef_binary_5060_linux64.tar.bz2 -C ./
|
|
||||||
#git clone https://github.com/aja-video/ntv2.git
|
|
||||||
|
|
||||||
# remove -Werror flag to mitigate FTBFS with ffmpeg
|
# remove -Werror flag to mitigate FTBFS with ffmpeg
|
||||||
#sed -i 's|-Werror-implicit-function-declaration||g' CMakeLists.txt
|
sed -i 's|-Werror-implicit-function-declaration||g' CMakeLists.txt
|
||||||
|
|
||||||
## remove Werror to fix compile error
|
## remove Werror to fix compile error
|
||||||
#sed -i 's| -Werror||g' cmake/Modules/CompilerConfig.cmake
|
sed -i 's| -Werror||g' cmake/Modules/CompilerConfig.cmake
|
||||||
sed -i 's| -Wswitch||g' cmake/Modules/CompilerConfig.cmake
|
sed -i 's| -Wswitch||g' cmake/Modules/CompilerConfig.cmake
|
||||||
|
|
||||||
for i in $(cat ../patches/series) ; do echo "Applying Patch: $i" && patch -Np1 -i ../patches/$i || echo "Applying Patch $i Failed!"; done
|
for i in ../patches/*.patch; do patch -Np1 -i $i ;done
|
||||||
|
|
||||||
# Get build deps
|
# Get build deps brute force
|
||||||
apt-get build-dep ./ -y
|
apt-get install -y cmake ninja-build pkg-config clang clang-format build-essential curl ccache git libffmpeg-amf-dev
|
||||||
|
apt-get install -y libavcodec-dev libavdevice-dev libnss3-dev libnspr4-dev libpipewire-0.3-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libcurl4-openssl-dev libmbedtls-dev libgl1-mesa-dev libjansson-dev libluajit-5.1-dev python3-dev libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcb-composite0-dev libxcomposite-dev libxinerama-dev libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev swig libcmocka-dev libxss-dev libglvnd-dev libgles2-mesa libgles2-mesa-dev libwayland-dev librist-dev libsrt-openssl-dev libpci-dev
|
||||||
|
apt-get install -y qt6-base-dev qt6-base-private-dev libqt6svg6-dev qt6-wayland qt6-image-formats-plugins
|
||||||
|
apt-get install -y libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev libpulse-dev libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev
|
||||||
|
|
||||||
# Build package
|
./CI/linux/01_install_dependencies.sh
|
||||||
LOGNAME=root dh_make --createorig -y -l -p obs-studio_"$VERSION" || echo "dh-make: Ignoring Last Error"
|
./CI/linux/02_build_obs.sh
|
||||||
dpkg-buildpackage --no-sign
|
./CI/linux/03_package_obs.sh
|
||||||
|
|
||||||
# Move the debs to output
|
# Move the debs to output
|
||||||
|
|
||||||
|
mkdir -p ../output
|
||||||
|
ls build/
|
||||||
|
mv build/*.deb ../output/
|
||||||
cd ../
|
cd ../
|
||||||
mkdir -p ./output
|
|
||||||
mv ./*.deb ./output/
|
|
||||||
|
2
orig.source.txt
Normal file
2
orig.source.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Warning cef_binary_5060_linux64 & aja must be pasted in the $(BASE_DIR)/build_dependencies
|
||||||
|
https://github.com/obsproject/obs-studio
|
@ -1,47 +0,0 @@
|
|||||||
--- a/libobs/CMakeLists.txt
|
|
||||||
+++ b/libobs/CMakeLists.txt
|
|
||||||
@@ -145,24 +145,6 @@ target_sources(
|
|
||||||
target_sources(
|
|
||||||
libobs
|
|
||||||
PRIVATE # cmake-format: sortable
|
|
||||||
- util/simde/check.h
|
|
||||||
- util/simde/debug-trap.h
|
|
||||||
- util/simde/hedley.h
|
|
||||||
- util/simde/simde-align.h
|
|
||||||
- util/simde/simde-arch.h
|
|
||||||
- util/simde/simde-common.h
|
|
||||||
- util/simde/simde-constify.h
|
|
||||||
- util/simde/simde-detect-clang.h
|
|
||||||
- util/simde/simde-diagnostic.h
|
|
||||||
- util/simde/simde-features.h
|
|
||||||
- util/simde/simde-math.h
|
|
||||||
- util/simde/x86/mmx.h
|
|
||||||
- util/simde/x86/sse.h
|
|
||||||
- util/simde/x86/sse2.h)
|
|
||||||
-
|
|
||||||
-target_sources(
|
|
||||||
- libobs
|
|
||||||
- PRIVATE # cmake-format: sortable
|
|
||||||
callback/calldata.c
|
|
||||||
callback/calldata.h
|
|
||||||
callback/decl.c
|
|
||||||
--- a/libobs/util/sse-intrin.h
|
|
||||||
+++ b/libobs/util/sse-intrin.h
|
|
||||||
@@ -28,6 +28,6 @@
|
|
||||||
#endif
|
|
||||||
#define SIMDE_ENABLE_NATIVE_ALIASES
|
|
||||||
PRAGMA_WARN_PUSH
|
|
||||||
-#include "simde/x86/sse2.h"
|
|
||||||
+#include <simde/x86/sse2.h>
|
|
||||||
PRAGMA_WARN_POP
|
|
||||||
#endif
|
|
||||||
--- a/cmake/Modules/CompilerConfig.cmake
|
|
||||||
+++ b/cmake/Modules/CompilerConfig.cmake
|
|
||||||
@@ -157,7 +157,6 @@ if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATC
|
|
||||||
endif()
|
|
||||||
elseif(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64(le)?")
|
|
||||||
set(ARCH_SIMD_DEFINES -DNO_WARN_X86_INTRINSICS)
|
|
||||||
- set(ARCH_SIMD_FLAGS -mvsx)
|
|
||||||
else()
|
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang|GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang|GNU")
|
|
||||||
check_c_compiler_flag("-fopenmp-simd" C_COMPILER_SUPPORTS_OPENMP_SIMD)
|
|
@ -1,10 +0,0 @@
|
|||||||
--- a/cmake/Modules/CompilerConfig.cmake
|
|
||||||
+++ b/cmake/Modules/CompilerConfig.cmake
|
|
||||||
@@ -108,7 +108,6 @@ else()
|
|
||||||
- https://github.com/obsproject/obs-studio/issues/8850 for 13.1.1
|
|
||||||
]]
|
|
||||||
add_compile_options(
|
|
||||||
- -Werror
|
|
||||||
-Wextra
|
|
||||||
-Wvla
|
|
||||||
-Wswitch
|
|
@ -1,612 +0,0 @@
|
|||||||
From dbd2bca8060de57c3a8309de38556371aa60182f Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Rosca <nowrep@gmail.com>
|
|
||||||
Date: Sun, 28 Aug 2022 10:15:16 +0200
|
|
||||||
Subject: [PATCH] obs-ffmpeg: Make AMF encoder work on Linux
|
|
||||||
|
|
||||||
Only the fallback encoders are available (no texture support).
|
|
||||||
|
|
||||||
Requires AMD proprietary Vulkan driver, using different driver
|
|
||||||
will be detected on startup and the encoders disabled.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
--- a/plugins/obs-ffmpeg/CMakeLists.txt
|
|
||||||
+++ b/plugins/obs-ffmpeg/CMakeLists.txt
|
|
||||||
@@ -72,7 +72,10 @@ target_link_libraries(
|
|
||||||
|
|
||||||
if(OS_WINDOWS)
|
|
||||||
configure_file(cmake/windows/obs-module.rc.in obs-ffmpeg.rc)
|
|
||||||
- target_sources(obs-ffmpeg PRIVATE obs-ffmpeg.rc)
|
|
||||||
+ target_sources(obs-ffmpeg PRIVATE obs-ffmpeg.rc texture-amf.cpp)
|
|
||||||
+
|
|
||||||
+elseif(OS_LINUX OR OS_FREEBSD)
|
|
||||||
+ add_subdirectory(obs-amf-test)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# cmake-format: off
|
|
||||||
--- a/plugins/obs-ffmpeg/cmake/legacy.cmake
|
|
||||||
+++ b/plugins/obs-ffmpeg/cmake/legacy.cmake
|
|
||||||
@@ -109,10 +109,11 @@ if(OS_WINDOWS)
|
|
||||||
obs-ffmpeg.rc)
|
|
||||||
|
|
||||||
elseif(OS_POSIX AND NOT OS_MACOS)
|
|
||||||
+ add_subdirectory(obs-amf-test)
|
|
||||||
find_package(Libva REQUIRED)
|
|
||||||
find_package(Libpci REQUIRED)
|
|
||||||
find_package(Libdrm REQUIRED)
|
|
||||||
- target_sources(obs-ffmpeg PRIVATE obs-ffmpeg-vaapi.c vaapi-utils.c vaapi-utils.h)
|
|
||||||
+ target_sources(obs-ffmpeg PRIVATE obs-ffmpeg-vaapi.c vaapi-utils.c vaapi-utils.h texture-amf.cpp)
|
|
||||||
target_link_libraries(obs-ffmpeg PRIVATE Libva::va Libva::drm LIBPCI::LIBPCI Libdrm::Libdrm)
|
|
||||||
|
|
||||||
if(ENABLE_NATIVE_NVENC)
|
|
||||||
--- a/plugins/obs-ffmpeg/obs-amf-test/CMakeLists.txt
|
|
||||||
+++ b/plugins/obs-ffmpeg/obs-amf-test/CMakeLists.txt
|
|
||||||
@@ -1,15 +1,20 @@
|
|
||||||
-cmake_minimum_required(VERSION 3.24...3.25)
|
|
||||||
+project(obs-amf-test)
|
|
||||||
|
|
||||||
-legacy_check()
|
|
||||||
+add_executable(obs-amf-test)
|
|
||||||
|
|
||||||
find_package(AMF 1.4.29 REQUIRED)
|
|
||||||
|
|
||||||
-add_executable(obs-amf-test)
|
|
||||||
-add_executable(OBS::amf-test ALIAS obs-amf-test)
|
|
||||||
+target_include_directories(obs-amf-test PRIVATE ${CMAKE_SOURCE_DIR}/libobs)
|
|
||||||
+
|
|
||||||
+if(OS_WINDOWS)
|
|
||||||
+ target_sources(obs-amf-test PRIVATE obs-amf-test.cpp)
|
|
||||||
+ target_link_libraries(obs-amf-test d3d11 dxgi dxguid AMF::AMF)
|
|
||||||
+elseif(OS_POSIX AND NOT OS_MACOS)
|
|
||||||
+ find_package(Vulkan REQUIRED)
|
|
||||||
+ target_sources(obs-amf-test PRIVATE obs-amf-test-linux.cpp)
|
|
||||||
+ target_link_libraries(obs-amf-test dl Vulkan::Vulkan AMF::AMF)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
-target_sources(obs-amf-test PRIVATE obs-amf-test.cpp)
|
|
||||||
-target_link_libraries(obs-amf-test PRIVATE OBS::COMutils AMF::AMF d3d11 dxgi dxguid)
|
|
||||||
+set_target_properties(obs-amf-test PROPERTIES FOLDER "plugins/obs-ffmpeg")
|
|
||||||
|
|
||||||
-# cmake-format: off
|
|
||||||
-set_target_properties_obs(obs-amf-test PROPERTIES FOLDER plugins/obs-ffmpeg)
|
|
||||||
-# cmake-format: on
|
|
||||||
+setup_binary_target(obs-amf-test)
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/plugins/obs-ffmpeg/obs-amf-test/obs-amf-test-linux.cpp
|
|
||||||
@@ -0,0 +1,140 @@
|
|
||||||
+#include <AMF/core/Factory.h>
|
|
||||||
+#include <AMF/core/Trace.h>
|
|
||||||
+#include <AMF/components/VideoEncoderVCE.h>
|
|
||||||
+#include <AMF/components/VideoEncoderHEVC.h>
|
|
||||||
+#include <AMF/components/VideoEncoderAV1.h>
|
|
||||||
+
|
|
||||||
+#include <dlfcn.h>
|
|
||||||
+#include <vulkan/vulkan.hpp>
|
|
||||||
+
|
|
||||||
+#include <string>
|
|
||||||
+#include <map>
|
|
||||||
+
|
|
||||||
+using namespace amf;
|
|
||||||
+
|
|
||||||
+struct adapter_caps {
|
|
||||||
+ bool is_amd = false;
|
|
||||||
+ bool supports_avc = false;
|
|
||||||
+ bool supports_hevc = false;
|
|
||||||
+ bool supports_av1 = false;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static AMFFactory *amf_factory = nullptr;
|
|
||||||
+static std::map<uint32_t, adapter_caps> adapter_info;
|
|
||||||
+
|
|
||||||
+static bool has_encoder(AMFContextPtr &amf_context, const wchar_t *encoder_name)
|
|
||||||
+{
|
|
||||||
+ AMFComponentPtr encoder;
|
|
||||||
+ AMF_RESULT res = amf_factory->CreateComponent(amf_context, encoder_name,
|
|
||||||
+ &encoder);
|
|
||||||
+ return res == AMF_OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static bool get_adapter_caps(uint32_t adapter_idx)
|
|
||||||
+{
|
|
||||||
+ if (adapter_idx)
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ adapter_caps &caps = adapter_info[adapter_idx];
|
|
||||||
+
|
|
||||||
+ AMF_RESULT res;
|
|
||||||
+ AMFContextPtr amf_context;
|
|
||||||
+ res = amf_factory->CreateContext(&amf_context);
|
|
||||||
+ if (res != AMF_OK)
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
+ AMFContext1 *context1 = NULL;
|
|
||||||
+ res = amf_context->QueryInterface(AMFContext1::IID(),
|
|
||||||
+ (void **)&context1);
|
|
||||||
+ if (res != AMF_OK)
|
|
||||||
+ return false;
|
|
||||||
+ res = context1->InitVulkan(nullptr);
|
|
||||||
+ context1->Release();
|
|
||||||
+ if (res != AMF_OK)
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ caps.is_amd = true;
|
|
||||||
+ caps.supports_avc = has_encoder(amf_context, AMFVideoEncoderVCE_AVC);
|
|
||||||
+ caps.supports_hevc = has_encoder(amf_context, AMFVideoEncoder_HEVC);
|
|
||||||
+ caps.supports_av1 = has_encoder(amf_context, AMFVideoEncoder_AV1);
|
|
||||||
+
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main(void)
|
|
||||||
+try {
|
|
||||||
+ AMF_RESULT res;
|
|
||||||
+ VkResult vkres;
|
|
||||||
+
|
|
||||||
+ VkApplicationInfo app_info = {};
|
|
||||||
+ app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
|
||||||
+ app_info.pApplicationName = "obs-amf-test";
|
|
||||||
+ app_info.apiVersion = VK_API_VERSION_1_2;
|
|
||||||
+
|
|
||||||
+ VkInstanceCreateInfo info = {};
|
|
||||||
+ info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
|
||||||
+ info.pApplicationInfo = &app_info;
|
|
||||||
+
|
|
||||||
+ VkInstance instance;
|
|
||||||
+ vkres = vkCreateInstance(&info, nullptr, &instance);
|
|
||||||
+ if (vkres != VK_SUCCESS)
|
|
||||||
+ throw "Failed to initialize Vulkan";
|
|
||||||
+
|
|
||||||
+ uint32_t device_count;
|
|
||||||
+ vkres = vkEnumeratePhysicalDevices(instance, &device_count, nullptr);
|
|
||||||
+ if (vkres != VK_SUCCESS || !device_count)
|
|
||||||
+ throw "Failed to enumerate Vulkan devices";
|
|
||||||
+
|
|
||||||
+ VkPhysicalDevice *devices = new VkPhysicalDevice[device_count];
|
|
||||||
+ vkres = vkEnumeratePhysicalDevices(instance, &device_count, devices);
|
|
||||||
+ if (vkres != VK_SUCCESS)
|
|
||||||
+ throw "Failed to enumerate Vulkan devices";
|
|
||||||
+
|
|
||||||
+ VkPhysicalDeviceDriverProperties driver_props = {};
|
|
||||||
+ driver_props.sType =
|
|
||||||
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES;
|
|
||||||
+ VkPhysicalDeviceProperties2 device_props = {};
|
|
||||||
+ device_props.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
|
|
||||||
+ device_props.pNext = &driver_props;
|
|
||||||
+ vkGetPhysicalDeviceProperties2(devices[0], &device_props);
|
|
||||||
+
|
|
||||||
+ if (strcmp(driver_props.driverName, "AMD proprietary driver"))
|
|
||||||
+ throw "Not running AMD proprietary driver";
|
|
||||||
+
|
|
||||||
+ vkDestroyInstance(instance, nullptr);
|
|
||||||
+
|
|
||||||
+ /* --------------------------------------------------------- */
|
|
||||||
+ /* try initializing amf, I guess */
|
|
||||||
+
|
|
||||||
+ void *amf_module = dlopen(AMF_DLL_NAMEA, RTLD_LAZY);
|
|
||||||
+ if (!amf_module)
|
|
||||||
+ throw "Failed to load AMF lib";
|
|
||||||
+
|
|
||||||
+ auto init = (AMFInit_Fn)dlsym(amf_module, AMF_INIT_FUNCTION_NAME);
|
|
||||||
+ if (!init)
|
|
||||||
+ throw "Failed to get init func";
|
|
||||||
+
|
|
||||||
+ res = init(AMF_FULL_VERSION, &amf_factory);
|
|
||||||
+ if (res != AMF_OK)
|
|
||||||
+ throw "AMFInit failed";
|
|
||||||
+
|
|
||||||
+ uint32_t idx = 0;
|
|
||||||
+ while (get_adapter_caps(idx++))
|
|
||||||
+ ;
|
|
||||||
+
|
|
||||||
+ for (auto &[idx, caps] : adapter_info) {
|
|
||||||
+ printf("[%u]\n", idx);
|
|
||||||
+ printf("is_amd=%s\n", caps.is_amd ? "true" : "false");
|
|
||||||
+ printf("supports_avc=%s\n",
|
|
||||||
+ caps.supports_avc ? "true" : "false");
|
|
||||||
+ printf("supports_hevc=%s\n",
|
|
||||||
+ caps.supports_hevc ? "true" : "false");
|
|
||||||
+ printf("supports_av1=%s\n",
|
|
||||||
+ caps.supports_av1 ? "true" : "false");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+} catch (const char *text) {
|
|
||||||
+ printf("[error]\nstring=%s\n", text);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
--- a/plugins/obs-ffmpeg/obs-ffmpeg.c
|
|
||||||
+++ b/plugins/obs-ffmpeg/obs-ffmpeg.c
|
|
||||||
@@ -393,7 +393,7 @@ bool obs_module_load(void)
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef _WIN32
|
|
||||||
+#if defined(_WIN32) || defined(__linux__)
|
|
||||||
amf_load();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--- a/plugins/obs-ffmpeg/texture-amf-opts.hpp
|
|
||||||
+++ b/plugins/obs-ffmpeg/texture-amf-opts.hpp
|
|
||||||
@@ -321,7 +321,7 @@ static void amf_apply_opt(amf_base *enc,
|
|
||||||
val = atoi(opt->value);
|
|
||||||
}
|
|
||||||
|
|
||||||
- os_utf8_to_wcs(opt->name, 0, wname, _countof(wname));
|
|
||||||
+ os_utf8_to_wcs(opt->name, 0, wname, amf_countof(wname));
|
|
||||||
if (is_bool) {
|
|
||||||
bool bool_val = (bool)val;
|
|
||||||
set_amf_property(enc, wname, bool_val);
|
|
||||||
--- a/plugins/obs-ffmpeg/texture-amf.cpp
|
|
||||||
+++ b/plugins/obs-ffmpeg/texture-amf.cpp
|
|
||||||
@@ -11,6 +11,7 @@
|
|
||||||
#include <mutex>
|
|
||||||
#include <deque>
|
|
||||||
#include <map>
|
|
||||||
+#include <inttypes.h>
|
|
||||||
|
|
||||||
#include <AMF/components/VideoEncoderHEVC.h>
|
|
||||||
#include <AMF/components/VideoEncoderVCE.h>
|
|
||||||
@@ -18,6 +19,7 @@
|
|
||||||
#include <AMF/core/Factory.h>
|
|
||||||
#include <AMF/core/Trace.h>
|
|
||||||
|
|
||||||
+#ifdef _WIN32
|
|
||||||
#include <dxgi.h>
|
|
||||||
#include <d3d11.h>
|
|
||||||
#include <d3d11_1.h>
|
|
||||||
@@ -25,6 +27,8 @@
|
|
||||||
#include <util/windows/device-enum.h>
|
|
||||||
#include <util/windows/HRError.hpp>
|
|
||||||
#include <util/windows/ComPtr.hpp>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#include <util/platform.h>
|
|
||||||
#include <util/util.hpp>
|
|
||||||
#include <util/pipe.h>
|
|
||||||
@@ -55,8 +59,10 @@ struct amf_error {
|
|
||||||
|
|
||||||
struct handle_tex {
|
|
||||||
uint32_t handle;
|
|
||||||
+#ifdef _WIN32
|
|
||||||
ComPtr<ID3D11Texture2D> tex;
|
|
||||||
ComPtr<IDXGIKeyedMutex> km;
|
|
||||||
+#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
struct adapter_caps {
|
|
||||||
@@ -72,7 +78,7 @@ static std::map<uint32_t, adapter_caps>
|
|
||||||
static bool h264_supported = false;
|
|
||||||
static AMFFactory *amf_factory = nullptr;
|
|
||||||
static AMFTrace *amf_trace = nullptr;
|
|
||||||
-static HMODULE amf_module = nullptr;
|
|
||||||
+static void *amf_module = nullptr;
|
|
||||||
static uint64_t amf_version = 0;
|
|
||||||
|
|
||||||
/* ========================================================================= */
|
|
||||||
@@ -124,9 +130,11 @@ struct amf_base {
|
|
||||||
virtual void init() = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
-using d3dtex_t = ComPtr<ID3D11Texture2D>;
|
|
||||||
using buf_t = std::vector<uint8_t>;
|
|
||||||
|
|
||||||
+#ifdef _WIN32
|
|
||||||
+using d3dtex_t = ComPtr<ID3D11Texture2D>;
|
|
||||||
+
|
|
||||||
struct amf_texencode : amf_base, public AMFSurfaceObserver {
|
|
||||||
volatile bool destroying = false;
|
|
||||||
|
|
||||||
@@ -163,6 +171,7 @@ struct amf_texencode : amf_base, public
|
|
||||||
throw amf_error("InitDX11 failed", res);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
struct amf_fallback : amf_base, public AMFSurfaceObserver {
|
|
||||||
volatile bool destroying = false;
|
|
||||||
@@ -190,9 +199,21 @@ struct amf_fallback : amf_base, public A
|
|
||||||
|
|
||||||
void init() override
|
|
||||||
{
|
|
||||||
+#if defined(_WIN32)
|
|
||||||
AMF_RESULT res = amf_context->InitDX11(nullptr, AMF_DX11_1);
|
|
||||||
if (res != AMF_OK)
|
|
||||||
throw amf_error("InitDX11 failed", res);
|
|
||||||
+#elif defined(__linux__)
|
|
||||||
+ AMFContext1 *context1 = NULL;
|
|
||||||
+ AMF_RESULT res = amf_context->QueryInterface(
|
|
||||||
+ AMFContext1::IID(), (void **)&context1);
|
|
||||||
+ if (res != AMF_OK)
|
|
||||||
+ throw amf_error("CreateContext1 failed", res);
|
|
||||||
+ res = context1->InitVulkan(nullptr);
|
|
||||||
+ context1->Release();
|
|
||||||
+ if (res != AMF_OK)
|
|
||||||
+ throw amf_error("InitVulkan failed", res);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -234,13 +255,18 @@ static void set_amf_property(amf_base *e
|
|
||||||
: (enc->codec == amf_codec_type::HEVC) \
|
|
||||||
? AMF_VIDEO_ENCODER_HEVC_##name \
|
|
||||||
: AMF_VIDEO_ENCODER_AV1_##name)
|
|
||||||
+#define get_opt_name_enum(name) \
|
|
||||||
+ ((enc->codec == amf_codec_type::AVC) ? (int)AMF_VIDEO_ENCODER_##name \
|
|
||||||
+ : (enc->codec == amf_codec_type::HEVC) \
|
|
||||||
+ ? (int)AMF_VIDEO_ENCODER_HEVC_##name \
|
|
||||||
+ : (int)AMF_VIDEO_ENCODER_AV1_##name)
|
|
||||||
#define set_opt(name, value) set_amf_property(enc, get_opt_name(name), value)
|
|
||||||
#define get_opt(name, value) get_amf_property(enc, get_opt_name(name), value)
|
|
||||||
#define set_avc_opt(name, value) set_avc_property(enc, name, value)
|
|
||||||
#define set_hevc_opt(name, value) set_hevc_property(enc, name, value)
|
|
||||||
#define set_av1_opt(name, value) set_av1_property(enc, name, value)
|
|
||||||
#define set_enum_opt(name, value) \
|
|
||||||
- set_amf_property(enc, get_opt_name(name), get_opt_name(name##_##value))
|
|
||||||
+ set_amf_property(enc, get_opt_name(name), get_opt_name_enum(name##_##value))
|
|
||||||
#define set_avc_enum(name, value) \
|
|
||||||
set_avc_property(enc, name, AMF_VIDEO_ENCODER_##name##_##value)
|
|
||||||
#define set_hevc_enum(name, value) \
|
|
||||||
@@ -251,6 +277,7 @@ static void set_amf_property(amf_base *e
|
|
||||||
/* ------------------------------------------------------------------------- */
|
|
||||||
/* Implementation */
|
|
||||||
|
|
||||||
+#ifdef _WIN32
|
|
||||||
static HMODULE get_lib(const char *lib)
|
|
||||||
{
|
|
||||||
HMODULE mod = GetModuleHandleA(lib);
|
|
||||||
@@ -397,6 +424,7 @@ static void get_tex_from_handle(amf_texe
|
|
||||||
*km_out = km.Detach();
|
|
||||||
*tex_out = tex.Detach();
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static constexpr amf_int64 macroblock_size = 16;
|
|
||||||
|
|
||||||
@@ -513,7 +541,7 @@ static void convert_to_encoder_packet(am
|
|
||||||
enc->packet_data = AMFBufferPtr(data);
|
|
||||||
data->GetProperty(L"PTS", &packet->pts);
|
|
||||||
|
|
||||||
- const wchar_t *get_output_type;
|
|
||||||
+ const wchar_t *get_output_type = NULL;
|
|
||||||
switch (enc->codec) {
|
|
||||||
case amf_codec_type::AVC:
|
|
||||||
get_output_type = AMF_VIDEO_ENCODER_OUTPUT_DATA_TYPE;
|
|
||||||
@@ -746,6 +774,7 @@ static void amf_encode_base(amf_base *en
|
|
||||||
static bool amf_encode_tex(void *data, uint32_t handle, int64_t pts,
|
|
||||||
uint64_t lock_key, uint64_t *next_key,
|
|
||||||
encoder_packet *packet, bool *received_packet)
|
|
||||||
+#ifdef _WIN32
|
|
||||||
try {
|
|
||||||
amf_texencode *enc = (amf_texencode *)data;
|
|
||||||
ID3D11DeviceContext *context = enc->context;
|
|
||||||
@@ -822,6 +851,18 @@ try {
|
|
||||||
*received_packet = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
+#else
|
|
||||||
+{
|
|
||||||
+ UNUSED_PARAMETER(data);
|
|
||||||
+ UNUSED_PARAMETER(handle);
|
|
||||||
+ UNUSED_PARAMETER(pts);
|
|
||||||
+ UNUSED_PARAMETER(lock_key);
|
|
||||||
+ UNUSED_PARAMETER(next_key);
|
|
||||||
+ UNUSED_PARAMETER(packet);
|
|
||||||
+ UNUSED_PARAMETER(received_packet);
|
|
||||||
+ return false;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static buf_t alloc_buf(amf_fallback *enc)
|
|
||||||
{
|
|
||||||
@@ -1286,6 +1327,7 @@ static const char *amf_avc_get_name(void
|
|
||||||
|
|
||||||
static inline int get_avc_preset(amf_base *enc, const char *preset)
|
|
||||||
{
|
|
||||||
+ UNUSED_PARAMETER(enc);
|
|
||||||
if (astrcmpi(preset, "quality") == 0)
|
|
||||||
return AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY;
|
|
||||||
else if (astrcmpi(preset, "speed") == 0)
|
|
||||||
@@ -1408,7 +1450,7 @@ static bool amf_avc_init(void *data, obs
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (bf != 0) {
|
|
||||||
- warn("B-Frames set to %lld but b-frames are not "
|
|
||||||
+ warn("B-Frames set to %" PRId64 " but b-frames are not "
|
|
||||||
"supported by this device",
|
|
||||||
bf);
|
|
||||||
bf = 0;
|
|
||||||
@@ -1453,12 +1495,12 @@ static bool amf_avc_init(void *data, obs
|
|
||||||
|
|
||||||
info("settings:\n"
|
|
||||||
"\trate_control: %s\n"
|
|
||||||
- "\tbitrate: %d\n"
|
|
||||||
- "\tcqp: %d\n"
|
|
||||||
+ "\tbitrate: %" PRId64 "\n"
|
|
||||||
+ "\tcqp: %" PRId64 "\n"
|
|
||||||
"\tkeyint: %d\n"
|
|
||||||
"\tpreset: %s\n"
|
|
||||||
"\tprofile: %s\n"
|
|
||||||
- "\tb-frames: %d\n"
|
|
||||||
+ "\tb-frames: %" PRId64 "\n"
|
|
||||||
"\twidth: %d\n"
|
|
||||||
"\theight: %d\n"
|
|
||||||
"\tparams: %s",
|
|
||||||
@@ -1531,6 +1573,7 @@ static void amf_avc_create_internal(amf_
|
|
||||||
|
|
||||||
static void *amf_avc_create_texencode(obs_data_t *settings,
|
|
||||||
obs_encoder_t *encoder)
|
|
||||||
+#ifdef _WIN32
|
|
||||||
try {
|
|
||||||
check_texture_encode_capability(encoder, amf_codec_type::AVC);
|
|
||||||
|
|
||||||
@@ -1553,6 +1596,12 @@ try {
|
|
||||||
blog(LOG_ERROR, "[texture-amf-h264] %s: %s", __FUNCTION__, err);
|
|
||||||
return obs_encoder_create_rerouted(encoder, "h264_fallback_amf");
|
|
||||||
}
|
|
||||||
+#else
|
|
||||||
+{
|
|
||||||
+ UNUSED_PARAMETER(settings);
|
|
||||||
+ return obs_encoder_create_rerouted(encoder, "h264_fallback_amf");
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static void *amf_avc_create_fallback(obs_data_t *settings,
|
|
||||||
obs_encoder_t *encoder)
|
|
||||||
@@ -1647,6 +1696,7 @@ static const char *amf_hevc_get_name(voi
|
|
||||||
|
|
||||||
static inline int get_hevc_preset(amf_base *enc, const char *preset)
|
|
||||||
{
|
|
||||||
+ UNUSED_PARAMETER(enc);
|
|
||||||
if (astrcmpi(preset, "balanced") == 0)
|
|
||||||
return AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_BALANCED;
|
|
||||||
else if (astrcmpi(preset, "speed") == 0)
|
|
||||||
@@ -1770,8 +1820,8 @@ static bool amf_hevc_init(void *data, ob
|
|
||||||
|
|
||||||
info("settings:\n"
|
|
||||||
"\trate_control: %s\n"
|
|
||||||
- "\tbitrate: %d\n"
|
|
||||||
- "\tcqp: %d\n"
|
|
||||||
+ "\tbitrate: %" PRId64 "\n"
|
|
||||||
+ "\tcqp: %" PRId64 "\n"
|
|
||||||
"\tkeyint: %d\n"
|
|
||||||
"\tpreset: %s\n"
|
|
||||||
"\tprofile: %s\n"
|
|
||||||
@@ -1892,6 +1942,7 @@ static void amf_hevc_create_internal(amf
|
|
||||||
|
|
||||||
static void *amf_hevc_create_texencode(obs_data_t *settings,
|
|
||||||
obs_encoder_t *encoder)
|
|
||||||
+#ifdef _WIN32
|
|
||||||
try {
|
|
||||||
check_texture_encode_capability(encoder, amf_codec_type::HEVC);
|
|
||||||
|
|
||||||
@@ -1914,6 +1965,12 @@ try {
|
|
||||||
blog(LOG_ERROR, "[texture-amf-h265] %s: %s", __FUNCTION__, err);
|
|
||||||
return obs_encoder_create_rerouted(encoder, "h265_fallback_amf");
|
|
||||||
}
|
|
||||||
+#else
|
|
||||||
+{
|
|
||||||
+ UNUSED_PARAMETER(settings);
|
|
||||||
+ return obs_encoder_create_rerouted(encoder, "h265_fallback_amf");
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static void *amf_hevc_create_fallback(obs_data_t *settings,
|
|
||||||
obs_encoder_t *encoder)
|
|
||||||
@@ -2004,6 +2061,7 @@ static const char *amf_av1_get_name(void
|
|
||||||
|
|
||||||
static inline int get_av1_preset(amf_base *enc, const char *preset)
|
|
||||||
{
|
|
||||||
+ UNUSED_PARAMETER(enc);
|
|
||||||
if (astrcmpi(preset, "highquality") == 0)
|
|
||||||
return AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_HIGH_QUALITY;
|
|
||||||
else if (astrcmpi(preset, "quality") == 0)
|
|
||||||
@@ -2142,8 +2200,8 @@ static bool amf_av1_init(void *data, obs
|
|
||||||
|
|
||||||
info("settings:\n"
|
|
||||||
"\trate_control: %s\n"
|
|
||||||
- "\tbitrate: %d\n"
|
|
||||||
- "\tcqp: %d\n"
|
|
||||||
+ "\tbitrate: %" PRId64 "\n"
|
|
||||||
+ "\tcqp: %" PRId64 "\n"
|
|
||||||
"\tkeyint: %d\n"
|
|
||||||
"\tpreset: %s\n"
|
|
||||||
"\tprofile: %s\n"
|
|
||||||
@@ -2211,6 +2269,7 @@ static void amf_av1_create_internal(amf_
|
|
||||||
|
|
||||||
static void *amf_av1_create_texencode(obs_data_t *settings,
|
|
||||||
obs_encoder_t *encoder)
|
|
||||||
+#ifdef _WIN32
|
|
||||||
try {
|
|
||||||
check_texture_encode_capability(encoder, amf_codec_type::AV1);
|
|
||||||
|
|
||||||
@@ -2233,6 +2292,12 @@ try {
|
|
||||||
blog(LOG_ERROR, "[texture-amf-av1] %s: %s", __FUNCTION__, err);
|
|
||||||
return obs_encoder_create_rerouted(encoder, "av1_fallback_amf");
|
|
||||||
}
|
|
||||||
+#else
|
|
||||||
+{
|
|
||||||
+ UNUSED_PARAMETER(settings);
|
|
||||||
+ return obs_encoder_create_rerouted(encoder, "av1_fallback_amf");
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static void *amf_av1_create_fallback(obs_data_t *settings,
|
|
||||||
obs_encoder_t *encoder)
|
|
||||||
@@ -2332,9 +2397,16 @@ static bool enum_luids(void *param, uint
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifdef _WIN32
|
|
||||||
+#define OBS_AMF_TEST "obs-amf-test.exe"
|
|
||||||
+#else
|
|
||||||
+#define OBS_AMF_TEST "obs-amf-test"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
extern "C" void amf_load(void)
|
|
||||||
try {
|
|
||||||
AMF_RESULT res;
|
|
||||||
+#ifdef _WIN32
|
|
||||||
HMODULE amf_module_test;
|
|
||||||
|
|
||||||
/* Check if the DLL is present before running the more expensive */
|
|
||||||
@@ -2344,18 +2416,26 @@ try {
|
|
||||||
if (!amf_module_test)
|
|
||||||
throw "No AMF library";
|
|
||||||
FreeLibrary(amf_module_test);
|
|
||||||
+#else
|
|
||||||
+ void *amf_module_test = os_dlopen(AMF_DLL_NAMEA);
|
|
||||||
+ if (!amf_module_test)
|
|
||||||
+ throw "No AMF library";
|
|
||||||
+ os_dlclose(amf_module_test);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* ----------------------------------- */
|
|
||||||
/* Check for supported codecs */
|
|
||||||
|
|
||||||
- BPtr<char> test_exe = os_get_executable_path_ptr("obs-amf-test.exe");
|
|
||||||
+ BPtr<char> test_exe = os_get_executable_path_ptr(OBS_AMF_TEST);
|
|
||||||
std::stringstream cmd;
|
|
||||||
std::string caps_str;
|
|
||||||
|
|
||||||
cmd << '"';
|
|
||||||
cmd << test_exe;
|
|
||||||
cmd << '"';
|
|
||||||
+#ifdef _WIN32
|
|
||||||
enum_graphics_device_luids(enum_luids, &cmd);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
os_process_pipe_t *pp = os_process_pipe_create(cmd.str().c_str(), "r");
|
|
||||||
if (!pp)
|
|
||||||
@@ -2415,12 +2495,12 @@ try {
|
|
||||||
/* ----------------------------------- */
|
|
||||||
/* Init AMF */
|
|
||||||
|
|
||||||
- amf_module = LoadLibraryW(AMF_DLL_NAME);
|
|
||||||
+ amf_module = os_dlopen(AMF_DLL_NAMEA);
|
|
||||||
if (!amf_module)
|
|
||||||
throw "AMF library failed to load";
|
|
||||||
|
|
||||||
AMFInit_Fn init =
|
|
||||||
- (AMFInit_Fn)GetProcAddress(amf_module, AMF_INIT_FUNCTION_NAME);
|
|
||||||
+ (AMFInit_Fn)os_dlsym(amf_module, AMF_INIT_FUNCTION_NAME);
|
|
||||||
if (!init)
|
|
||||||
throw "Failed to get AMFInit address";
|
|
||||||
|
|
||||||
@@ -2432,7 +2512,7 @@ try {
|
|
||||||
if (res != AMF_OK)
|
|
||||||
throw amf_error("GetTrace failed", res);
|
|
||||||
|
|
||||||
- AMFQueryVersion_Fn get_ver = (AMFQueryVersion_Fn)GetProcAddress(
|
|
||||||
+ AMFQueryVersion_Fn get_ver = (AMFQueryVersion_Fn)os_dlsym(
|
|
||||||
amf_module, AMF_QUERY_VERSION_FUNCTION_NAME);
|
|
||||||
if (!get_ver)
|
|
||||||
throw "Failed to get AMFQueryVersion address";
|
|
||||||
@@ -2471,7 +2551,7 @@ try {
|
|
||||||
} catch (const amf_error &err) {
|
|
||||||
/* doing an error here because it means at least the library has loaded
|
|
||||||
* successfully, so they probably have AMD at this point */
|
|
||||||
- blog(LOG_ERROR, "%s: %s: 0x%lX", __FUNCTION__, err.str,
|
|
||||||
+ blog(LOG_ERROR, "%s: %s: 0x%uX", __FUNCTION__, err.str,
|
|
||||||
(uint32_t)err.res);
|
|
||||||
}
|
|
||||||
|
|
2271
patches/6207.patch
Normal file
2271
patches/6207.patch
Normal file
File diff suppressed because it is too large
Load Diff
101
patches/8293.patch
Normal file
101
patches/8293.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
From 6b022ae4b58af7a069a422d346f102bf18684249 Mon Sep 17 00:00:00 2001
|
||||||
|
From: columbarius <co1umbarius@protonmail.com>
|
||||||
|
Date: Sat, 21 Jan 2023 08:45:38 +0100
|
||||||
|
Subject: [PATCH] pipewire: calc spa buffer size
|
||||||
|
|
||||||
|
Modern GPUs might support a lot of modifiers. As such the hardcoded size
|
||||||
|
for the ENUM_Formats PipeWire params are not enough and we should
|
||||||
|
calculate the required size manually.
|
||||||
|
|
||||||
|
Added logs if a ENUM_Format can't be assembled, which happens when the
|
||||||
|
buffer size was not large enough.
|
||||||
|
---
|
||||||
|
plugins/linux-pipewire/pipewire.c | 47 +++++++++++++++++++++++++++++--
|
||||||
|
1 file changed, 45 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipewire/pipewire.c
|
||||||
|
index d639e86df0f25..e7a941d778b04 100644
|
||||||
|
--- a/plugins/linux-pipewire/pipewire.c
|
||||||
|
+++ b/plugins/linux-pipewire/pipewire.c
|
||||||
|
@@ -144,6 +144,41 @@ static void update_pw_versions(obs_pipewire *obs_pw, const char *version)
|
||||||
|
blog(LOG_WARNING, "[pipewire] failed to parse server version");
|
||||||
|
}
|
||||||
|
|
||||||
|
+static uint32_t calc_spa_enumformat_buffer_size(obs_pipewire *obs_pw)
|
||||||
|
+{
|
||||||
|
+ // from spa/pod/pod.h
|
||||||
|
+ uint32_t spa_pod_object_size = sizeof(struct spa_pod_object);
|
||||||
|
+ uint32_t spa_pod_prop_size = sizeof(struct spa_pod_prop);
|
||||||
|
+ uint32_t spa_pod_value_size = 1 * sizeof(uint64_t);
|
||||||
|
+ uint32_t spa_pod_choice_size = 2 * sizeof(uint64_t);
|
||||||
|
+ // This is counted from the build_format function
|
||||||
|
+ uint32_t n_objects = 0;
|
||||||
|
+ uint32_t n_props = 0;
|
||||||
|
+ uint32_t n_values = 0;
|
||||||
|
+ uint32_t n_choices = 0;
|
||||||
|
+ uint32_t size;
|
||||||
|
+
|
||||||
|
+ for (size_t i = 0; i < obs_pw->format_info.num; i++) {
|
||||||
|
+ if (obs_pw->format_info.array[i].modifiers.num == 0)
|
||||||
|
+ continue;
|
||||||
|
+ n_objects += 1;
|
||||||
|
+ n_props += 5 + 1;
|
||||||
|
+ n_values += 9 + 2 + obs_pw->format_info.array[i].modifiers.num;
|
||||||
|
+ n_choices += 2 + 1;
|
||||||
|
+ }
|
||||||
|
+ for (size_t i = 0; i < obs_pw->format_info.num; i++) {
|
||||||
|
+ n_objects += 1;
|
||||||
|
+ n_props += 5;
|
||||||
|
+ n_values += 9;
|
||||||
|
+ n_choices += 2;
|
||||||
|
+ }
|
||||||
|
+ size = n_objects * spa_pod_object_size + n_props * spa_pod_prop_size +
|
||||||
|
+ n_values * spa_pod_value_size + n_choices * spa_pod_choice_size;
|
||||||
|
+ blog(LOG_DEBUG, "[pipewire]: calculated spa enumFormat buffer size %u",
|
||||||
|
+ size);
|
||||||
|
+ return size;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void teardown_pipewire(obs_pipewire *obs_pw)
|
||||||
|
{
|
||||||
|
if (obs_pw->thread_loop) {
|
||||||
|
@@ -408,6 +443,10 @@ static bool build_format_params(obs_pipewire *obs_pw,
|
||||||
|
obs_pw->format_info.array[i].spa_format,
|
||||||
|
obs_pw->format_info.array[i].modifiers.array,
|
||||||
|
obs_pw->format_info.array[i].modifiers.num);
|
||||||
|
+ if (!params[params_count - 1]) {
|
||||||
|
+ blog(LOG_ERROR, "[pipewire] Failed to format param");
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
build_shm:
|
||||||
|
@@ -415,6 +454,10 @@ static bool build_format_params(obs_pipewire *obs_pw,
|
||||||
|
params[params_count++] = build_format(
|
||||||
|
pod_builder, &obs_pw->video_info,
|
||||||
|
obs_pw->format_info.array[i].spa_format, NULL, 0);
|
||||||
|
+ if (!params[params_count - 1]) {
|
||||||
|
+ blog(LOG_ERROR, "[pipewire] Failed to format param");
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
*param_list = params;
|
||||||
|
*n_params = params_count;
|
||||||
|
@@ -521,7 +564,7 @@ static void renegotiate_format(void *data, uint64_t expirations)
|
||||||
|
|
||||||
|
pw_thread_loop_lock(obs_pw->thread_loop);
|
||||||
|
|
||||||
|
- uint8_t params_buffer[2048];
|
||||||
|
+ uint8_t params_buffer[calc_spa_enumformat_buffer_size(obs_pw)];
|
||||||
|
struct spa_pod_builder pod_builder =
|
||||||
|
SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer));
|
||||||
|
uint32_t n_params;
|
||||||
|
@@ -970,7 +1013,7 @@ void obs_pipewire_connect_stream(obs_pipewire *obs_pw, int pipewire_node,
|
||||||
|
struct spa_pod_builder pod_builder;
|
||||||
|
const struct spa_pod **params = NULL;
|
||||||
|
uint32_t n_params;
|
||||||
|
- uint8_t params_buffer[2048];
|
||||||
|
+ uint8_t params_buffer[calc_spa_enumformat_buffer_size(obs_pw)];
|
||||||
|
|
||||||
|
pw_thread_loop_lock(obs_pw->thread_loop);
|
||||||
|
|
2667
patches/amf.patch
Normal file
2667
patches/amf.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,39 @@
|
|||||||
From 11dae1dd5a7600534807e254dfa30c9613779dd7 Mon Sep 17 00:00:00 2001
|
From 323db1c9072aa1338a00dc0ddd35c655bf1e4918 Mon Sep 17 00:00:00 2001
|
||||||
From: GloriousEggroll <gloriouseggroll@gmail.com>
|
From: GloriousEggroll <gloriouseggroll@gmail.com>
|
||||||
Date: Sat, 29 Apr 2023 14:46:16 -0600
|
Date: Mon, 16 Jan 2023 11:30:15 -0700
|
||||||
Subject: [PATCH] encoder rename
|
Subject: [PATCH] encoder rename
|
||||||
|
|
||||||
---
|
---
|
||||||
|
plugins/obs-ffmpeg/jim-nvenc.c | 4 ++--
|
||||||
plugins/obs-ffmpeg/obs-ffmpeg-av1.c | 4 ++--
|
plugins/obs-ffmpeg/obs-ffmpeg-av1.c | 4 ++--
|
||||||
plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c | 4 ++--
|
plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c | 4 ++--
|
||||||
|
plugins/obs-ffmpeg/texture-amf.cpp | 4 ++--
|
||||||
plugins/obs-x264/obs-x264.c | 2 +-
|
plugins/obs-x264/obs-x264.c | 2 +-
|
||||||
5 files changed, 10 insertions(+), 10 deletions(-)
|
5 files changed, 9 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/obs-ffmpeg/jim-nvenc.c b/plugins/obs-ffmpeg/jim-nvenc.c
|
||||||
|
index 7b247c8..5c4be0f 100644
|
||||||
|
--- a/plugins/obs-ffmpeg/jim-nvenc.c
|
||||||
|
+++ b/plugins/obs-ffmpeg/jim-nvenc.c
|
||||||
|
@@ -227,14 +227,14 @@ static void nv_texture_free(struct nvenc_data *enc, struct nv_texture *nvtex)
|
||||||
|
static const char *h264_nvenc_get_name(void *type_data)
|
||||||
|
{
|
||||||
|
UNUSED_PARAMETER(type_data);
|
||||||
|
- return "NVIDIA NVENC H.264";
|
||||||
|
+ return "GPU: Nvidia NVENC H.264";
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_HEVC
|
||||||
|
static const char *hevc_nvenc_get_name(void *type_data)
|
||||||
|
{
|
||||||
|
UNUSED_PARAMETER(type_data);
|
||||||
|
- return "NVIDIA NVENC HEVC";
|
||||||
|
+ return "GPU: Nvidia NVENC H.265/HEVC";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-av1.c b/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
|
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-av1.c b/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
|
||||||
index 0b671ae..681f728 100644
|
index de7e237..7ea3cf7 100644
|
||||||
--- a/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
|
--- a/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
|
||||||
+++ b/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
|
+++ b/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
|
||||||
@@ -41,13 +41,13 @@ struct av1_encoder {
|
@@ -41,13 +41,13 @@ struct av1_encoder {
|
||||||
@ -18,41 +41,63 @@ index 0b671ae..681f728 100644
|
|||||||
{
|
{
|
||||||
UNUSED_PARAMETER(unused);
|
UNUSED_PARAMETER(unused);
|
||||||
- return "AOM AV1";
|
- return "AOM AV1";
|
||||||
+ return "CPU: AOM AV1 (FFmpeg)";
|
+ return "CPU: AOM AV1";
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *svt_av1_getname(void *unused)
|
static const char *svt_av1_getname(void *unused)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(unused);
|
UNUSED_PARAMETER(unused);
|
||||||
- return "SVT-AV1";
|
- return "SVT-AV1";
|
||||||
+ return "CPU: SVT-AV1 (FFmpeg)";
|
+ return "CPU: SVT-AV1";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void av1_video_info(void *data, struct video_scale_info *info)
|
static void av1_video_info(void *data, struct video_scale_info *info)
|
||||||
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c b/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
|
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c b/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
|
||||||
index 8cd8138..add8e02 100644
|
index f0f7747..b5f5d0d 100644
|
||||||
--- a/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
|
--- a/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
|
||||||
+++ b/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
|
+++ b/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
|
||||||
@@ -45,7 +45,7 @@ struct nvenc_encoder {
|
@@ -43,7 +43,7 @@ struct nvenc_encoder {
|
||||||
extern bool ubuntu_20_04_nvenc_fallback;
|
extern bool ubuntu_20_04_nvenc_fallback;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
-#define ENCODER_NAME_H264 "NVIDIA NVENC H.264 (FFmpeg)"
|
-#define ENCODER_NAME_H264 "NVIDIA NVENC H.264 (FFmpeg)"
|
||||||
+#define ENCODER_NAME_H264 "GPU: NVIDIA NVENC H.264 (FFmpeg)"
|
+#define ENCODER_NAME_H264 "GPU: Nvidia NVENC H.264"
|
||||||
static const char *h264_nvenc_getname(void *unused)
|
static const char *h264_nvenc_getname(void *unused)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(unused);
|
UNUSED_PARAMETER(unused);
|
||||||
@@ -53,7 +53,7 @@ static const char *h264_nvenc_getname(void *unused)
|
@@ -51,7 +51,7 @@ static const char *h264_nvenc_getname(void *unused)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_HEVC
|
#ifdef ENABLE_HEVC
|
||||||
-#define ENCODER_NAME_HEVC "NVIDIA NVENC HEVC (FFmpeg)"
|
-#define ENCODER_NAME_HEVC "NVIDIA NVENC HEVC (FFmpeg)"
|
||||||
+#define ENCODER_NAME_HEVC "GPU: NVIDIA NVENC H.265/HEVC (FFmpeg)"
|
+#define ENCODER_NAME_HEVC "GPU: Nvidia NVENC H.265/HEVC"
|
||||||
static const char *hevc_nvenc_getname(void *unused)
|
static const char *hevc_nvenc_getname(void *unused)
|
||||||
{
|
{
|
||||||
UNUSED_PARAMETER(unused);
|
UNUSED_PARAMETER(unused);
|
||||||
|
diff --git a/plugins/obs-ffmpeg/texture-amf.cpp b/plugins/obs-ffmpeg/texture-amf.cpp
|
||||||
|
index 7916cf8..92e57e0 100644
|
||||||
|
--- a/plugins/obs-ffmpeg/texture-amf.cpp
|
||||||
|
+++ b/plugins/obs-ffmpeg/texture-amf.cpp
|
||||||
|
@@ -1173,7 +1173,7 @@ static obs_properties_t *amf_av1_properties(void *unused)
|
||||||
|
|
||||||
|
static const char *amf_avc_get_name(void *)
|
||||||
|
{
|
||||||
|
- return "AMD HW H.264 (AVC)";
|
||||||
|
+ return "GPU: AMD AMF H.264";
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int get_avc_preset(amf_base *enc, const char *preset)
|
||||||
|
@@ -1508,7 +1508,7 @@ static void register_avc()
|
||||||
|
|
||||||
|
static const char *amf_hevc_get_name(void *)
|
||||||
|
{
|
||||||
|
- return "AMD HW H.265 (HEVC)";
|
||||||
|
+ return "GPU: AMD AMF H.265/HEVC";
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int get_hevc_preset(amf_base *enc, const char *preset)
|
||||||
diff --git a/plugins/obs-x264/obs-x264.c b/plugins/obs-x264/obs-x264.c
|
diff --git a/plugins/obs-x264/obs-x264.c b/plugins/obs-x264/obs-x264.c
|
||||||
index 1de88d3..d4c377d 100644
|
index 3955dff..b60e990 100644
|
||||||
--- a/plugins/obs-x264/obs-x264.c
|
--- a/plugins/obs-x264/obs-x264.c
|
||||||
+++ b/plugins/obs-x264/obs-x264.c
|
+++ b/plugins/obs-x264/obs-x264.c
|
||||||
@@ -68,7 +68,7 @@ struct obs_x264 {
|
@@ -68,7 +68,7 @@ struct obs_x264 {
|
||||||
@ -64,34 +109,6 @@ index 1de88d3..d4c377d 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void obs_x264_stop(void *data);
|
static void obs_x264_stop(void *data);
|
||||||
diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c b/plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c
|
|
||||||
index 370f9b7..e0bbd82 100644
|
|
||||||
--- a/plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c
|
|
||||||
+++ b/plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c
|
|
||||||
@@ -89,20 +89,20 @@ struct vaapi_encoder {
|
|
||||||
static const char *h264_vaapi_getname(void *unused)
|
|
||||||
{
|
|
||||||
UNUSED_PARAMETER(unused);
|
|
||||||
- return "FFmpeg VAAPI H.264";
|
|
||||||
+ return "GPU: AMD/Intel VAAPI H.264 (FFmpeg)";
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *av1_vaapi_getname(void *unused)
|
|
||||||
{
|
|
||||||
UNUSED_PARAMETER(unused);
|
|
||||||
- return "FFmpeg VAAPI AV1";
|
|
||||||
+ return "GPU: AMD/Intel VAAPI AV1 (FFmpeg)";
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ENABLE_HEVC
|
|
||||||
static const char *hevc_vaapi_getname(void *unused)
|
|
||||||
{
|
|
||||||
UNUSED_PARAMETER(unused);
|
|
||||||
- return "FFmpeg VAAPI HEVC";
|
|
||||||
+ return "GPU: AMD/Intel VAAPI H.265/HEVC (FFmpeg)";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--
|
--
|
||||||
2.40.0
|
2.39.0
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
01_use-sysytem-libsimde.patch
|
|
||||||
03_FTBFS-Werror.patch
|
|
||||||
encoder-rename.patch
|
|
@ -1,10 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
export PIKA_BUILD_ARCH="amd64-v3"
|
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS="optimize=+lto -march=x86-64-v3 -O3 -flto=auto"
|
|
||||||
export DEB_CFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto"
|
|
||||||
export DEB_CPPFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto"
|
|
||||||
export DEB_CXXFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto"
|
|
||||||
export DEB_LDFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto=auto"
|
|
||||||
export DEB_BUILD_OPTIONS="nocheck notest terse"
|
|
||||||
export DPKG_GENSYMBOLS_CHECK_LEVEL=0
|
|
@ -1,5 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
export PIKA_BUILD_ARCH="i386"
|
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
|
||||||
export DEB_BUILD_OPTIONS="nocheck notest terse"
|
|
||||||
export DPKG_GENSYMBOLS_CHECK_LEVEL=0
|
|
13
release.sh
13
release.sh
@ -1,2 +1,11 @@
|
|||||||
# send debs to server
|
# Sign the packages
|
||||||
rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/cockatiel-incoming/
|
dpkg-sig --sign builder ./output/*.deb
|
||||||
|
|
||||||
|
# Pull down existing ppa repo db files etc
|
||||||
|
rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo
|
||||||
|
|
||||||
|
# Add the new package to the repo
|
||||||
|
reprepro -V --basedir ./output/repo/ includedeb kinetic ./output/*.deb
|
||||||
|
|
||||||
|
# Push the updated ppa repo to the server
|
||||||
|
rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/
|
||||||
|
Loading…
Reference in New Issue
Block a user