Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Drop support for uStreamer 4.x and Debian 10 (#105)
Browse files Browse the repository at this point in the history
Resolves #99.

This PR drops support for uStreamer 4.x and Debian 10. This implies
abandoning support for the OMX encoder, which was uStreamer-4-only.
<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ansible-role-ustreamer/105"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
  • Loading branch information
jotaen4tinypilot authored May 5, 2023
1 parent 99babd8 commit f5e7036
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 132 deletions.
10 changes: 2 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
name: Decode the EDID
command: tests/decode-edid
build:
parameters:
scenario:
type: string
machine:
image: ubuntu-2004:202010-01
resource_class: large
Expand All @@ -62,15 +59,12 @@ jobs:
pip install -r molecule/requirements.txt && \
ansible --version && \
molecule --version && \
molecule test --scenario-name << parameters.scenario >>
molecule test
workflows:
version: 2
all-tests:
jobs:
- check_whitespace
- check_bash
- decode_edid
- build:
matrix:
parameters:
scenario: [legacy, default]
- build
6 changes: 1 addition & 5 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ustreamer_port: null
# Path to video device, such as /dev/video1.
ustreamer_video_path: null

# Encoding method to use, such as omx.
# Encoding method to use, such as `m2m-image`.
ustreamer_encoder: null

# Device input format, such as uyvy .
Expand Down Expand Up @@ -82,10 +82,6 @@ ustreamer_edid: |
# Location to store EDID files.
ustreamer_edids_dir: /home/{{ ustreamer_user }}/edids

# For versions of uStreamer prior to 5.0, H264 sink options are only available
# when OpenMax IL hardware acceleration is enabled via the dynamically defined
# ustreamer_compile_omx variable.

# Use the specified shared memory object to sink H264 frames encoded by MMAL
# (e.g., tinypilot::ustreamer::h264). Disabled by default.
ustreamer_h264_sink: null
Expand Down
1 change: 0 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
platforms:
- name: Debian
versions:
- buster
- bullseye
- name: Ubuntu
versions:
Expand Down
7 changes: 0 additions & 7 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ dependency:
driver:
name: docker
platforms:
- name: debian10
image: geerlingguy/docker-debian10-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
- name: debian11
image: geerlingguy/docker-debian11-ansible
command: ${MOLECULE_DOCKER_COMMAND:-""}
Expand Down
27 changes: 0 additions & 27 deletions molecule/legacy/converge.yml

This file was deleted.

47 changes: 0 additions & 47 deletions molecule/legacy/molecule.yml

This file was deleted.

33 changes: 1 addition & 32 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,7 @@
- name: decide whether to support audio streaming
set_fact:
# Audio streaming requires Janus because MJPEG can't carry audio.
# We exclude audio support from Raspbian Buster (10) because it's
# technically possible for a Raspbian Buster system to stream audio with CPU
# video encoding, it's unlikely for any clients to want that, and we don't
# want to add extra dependencies for audio they won't use. Raspbian Buster
# can't do GPU-based (OMX) encoding with audio because uStreamer added audio
# support in 5.x, but 5.x dropped support for OMX.
ustreamer_enable_audio_streaming: "{{
ustreamer_install_janus and not (
ustreamer_is_os_raspbian
and ((ansible_distribution_major_version | int) <= 10)
)}}"
ustreamer_enable_audio_streaming: "{{ ustreamer_install_janus }}"

- name: install Janus
include_tasks: install_janus.yml
Expand Down Expand Up @@ -76,10 +66,6 @@
import_tasks: check_saved_settings.yml
when: ustreamer_settings_file_result.stat.exists | bool

- name: check if OS supports OpenMAX IL acceleration (OMX)
set_fact:
ustreamer_os_supports_omx: "{{ ustreamer_is_os_raspbian and ((ansible_distribution_major_version | int) <= 10) }}"

- name: configure TC358743 HDMI capture chip
import_tasks: provision_tc358743.yml
when: ustreamer_capture_device == 'tc358743'
Expand All @@ -88,17 +74,6 @@
import_tasks: remove_tc358743.yml
when: ustreamer_capture_device != 'tc358743'

- name: enable OpenMax IL acceleration (legacy)
set_fact:
ustreamer_compile_omx: >-
{{ (ustreamer_encoder != None and ustreamer_encoder.lower() == 'omx') or
(ustreamer_install_janus and ustreamer_os_supports_omx) }}
- name: check that OpenMax IL acceleration is only compiled on Raspberry Pi OS 10 (Buster) and earlier
fail:
msg: OpenMax IL acceleration (OMX) is only available on Raspberry Pi OS 10 (Buster) and earlier.
when: ustreamer_compile_omx and not ustreamer_os_supports_omx

- name: collect universal required apt packages
set_fact:
ustreamer_packages:
Expand All @@ -118,11 +93,6 @@
ustreamer_packages: "{{ ustreamer_packages }} + ['libasound2-dev', 'libspeex-dev', 'libspeexdsp-dev', 'libopus-dev']"
when: ustreamer_install_janus and ustreamer_enable_audio_streaming

- name: install libraspberrypi-dev if we're using OpenMax IL acceleration
set_fact:
ustreamer_packages: "{{ ustreamer_packages }} + ['libraspberrypi-dev']"
when: ustreamer_compile_omx

- name: collect Debian-specific required apt packages
set_fact:
ustreamer_packages: "{{ ustreamer_packages }} + ['libjpeg62-turbo-dev']"
Expand Down Expand Up @@ -184,7 +154,6 @@
make:
chdir: "{{ ustreamer_dir }}"
params:
WITH_OMX: "{{ ustreamer_compile_omx | int }}"
WITH_JANUS: "{{ ustreamer_install_janus | int }}"
notify:
- restart uStreamer
Expand Down
5 changes: 0 additions & 5 deletions tasks/provision_tc358743.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
- load TC358743 EDID file
- configure TC358743 EDID loader to run at boot

- name: default to legacy OpenMAX encoder on Raspbian 10 and earlier
set_fact:
ustreamer_encoder: "{{ 'omx' if ustreamer_encoder == None else ustreamer_encoder }}"
when: ustreamer_is_os_raspbian and ustreamer_os_supports_omx

- name: use custom settings for TC358743 chip for any facts not already defined
set_fact:
ustreamer_encoder: "{{ 'm2m-image' if ustreamer_encoder == None else ustreamer_encoder }}"
Expand Down

0 comments on commit f5e7036

Please sign in to comment.