Skip to content

Tags: tiny-pilot/ustreamer-debian

Tags

6.36-20250811120059

Toggle 6.36-20250811120059's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Install Janus 1.3.2 as build dependency (#26)

Related tiny-pilot/tinypilot-pro#1494

This PR installs our Janus `1.3.2` Debian package as a build dependency
in order to compile a compatible uStreamer Janus plugin.

Notes:
1. We no longer need to [patch Janus C header
files](tiny-pilot/ansible-role-tinypilot#192)
to allow third-party plugins to be compiled (i.e., uStreamer Janus
plugin) because it's been fixed upstream:
    - meetecho/janus-gateway#3525
1. This PR also includes some minor fixes to be consistent with the way
we build other Debian packages.
1. For testing on device, you can download and install the latest
TinyPilot Pro bundle artifact from this PR's CircleCI workflow:
    - tiny-pilot/tinypilot-pro#1585

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/26"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

6.36-20250505185120

Toggle 6.36-20250505185120's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Upgrade ustreamer to v6.36 (#23)

Related tiny-pilot/tinypilot-pro#1483.

This PR upgrades the uStreamer library from 5.43 to 6.36 (the latest as
of this PR).

[uStreamer’s `6.24`
release](pikvm/ustreamer@v6.23...v6.24)
(specifically in
[`config.c`](pikvm/ustreamer@v6.23...v6.24#diff-e5fe0ac4847bcb988b61f9e93b0d6ac773f22b564b5dd96ac53e5005632a895a)
) introduced breaking changes in the structure of the uStreamer<>Janus
plugin configuration file:

- `memsink.object` is now `video.sink`.
- `audio` is now `acap` (presumably “audio capture”)
- There is a new section available: `aplay` (“audio playback”? Not
sure…). This seems to be related to microphone support, at least it
doesn’t seem to be needed for just *playing* audio.

On a Voyager 2a device, a full working
`/etc/janus/janus.plugin.ustreamer.jcfg` would look like this:

```
video: {
    sink = "tinypilot::ustreamer::h264"
}
acap: {
    device = "hw:1"
    tc358743 = "/dev/video0"
}
```

We’ll have to take over these changes [when writing the config file
during
install](https://github.com/tiny-pilot/tinypilot/blob/a9e7096c25a222741c25060776285e5f6ed43b51/debian-pkg/debian/tinypilot.postinst#L123-L139),
see tiny-pilot/tinypilot#1881.

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/23"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

---------

Co-authored-by: Jan Heuermann <jan@jotaen.net>

ustreamer_6.36-20250505185120

Toggle ustreamer_6.36-20250505185120's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Upgrade ustreamer to v6.36 (#23)

Related tiny-pilot/tinypilot-pro#1483.

This PR upgrades the uStreamer library from 5.43 to 6.36 (the latest as
of this PR).

[uStreamer’s `6.24`
release](pikvm/ustreamer@v6.23...v6.24)
(specifically in
[`config.c`](pikvm/ustreamer@v6.23...v6.24#diff-e5fe0ac4847bcb988b61f9e93b0d6ac773f22b564b5dd96ac53e5005632a895a)
) introduced breaking changes in the structure of the uStreamer<>Janus
plugin configuration file:

- `memsink.object` is now `video.sink`.
- `audio` is now `acap` (presumably “audio capture”)
- There is a new section available: `aplay` (“audio playback”? Not
sure…). This seems to be related to microphone support, at least it
doesn’t seem to be needed for just *playing* audio.

On a Voyager 2a device, a full working
`/etc/janus/janus.plugin.ustreamer.jcfg` would look like this:

```
video: {
    sink = "tinypilot::ustreamer::h264"
}
acap: {
    device = "hw:1"
    tc358743 = "/dev/video0"
}
```

We’ll have to take over these changes [when writing the config file
during
install](https://github.com/tiny-pilot/tinypilot/blob/a9e7096c25a222741c25060776285e5f6ed43b51/debian-pkg/debian/tinypilot.postinst#L123-L139),
see tiny-pilot/tinypilot#1881.

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/23"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

---------

Co-authored-by: Jan Heuermann <jan@jotaen.net>

5.43-20231004144402

Toggle 5.43-20231004144402's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update to uStreamer 5.43 (#15)

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/15"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

ustreamer_5.38-20230802141939

Toggle ustreamer_5.38-20230802141939's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Migrate uStreamer directory permissions to the uStreamer Debian packa…

…ge (#14)

This change sets the correct permissions of the uStreamer directory
(i.e., /opt/ustreamer) using the uStreamer Debian package, replacing the
Ansible task.

Related: tiny-pilot/tinypilot#1467

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/14"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

5.38-20230620124412

Toggle 5.38-20230620124412's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Create ustreamer user/group in post install script (#13)

Resolves #11

In our continued war on Ansible, this PR replicates [these Ansible
tasks](https://github.com/tiny-pilot/tinypilot/blob/0fce6c4530880b76d1c5b212b57a3aebed446226/ansible-role-ustreamer/tasks/main.yml#L37-L49)
by creating the `ustreamer` user/group as part of Debian's post-install
script.

Notes
1. Once we tiny-pilot/tinypilot#1428 we can
also remove the above referenced Ansible tasks.

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/13"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>

ustreamer_5.38-20230525134432

Toggle ustreamer_5.38-20230525134432's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Set correct path for man-pages (#9)

Related #3
Dependent on #8

After installing our uStreamer Debian package, the man-pages didn't
work:
```bash
$ man ustreamer
No manual entry for ustreamer
```

This is because the uStreamer's man-pages were being copied to
`/opt/ustreamer` instead of `/usr/share/man`.

I've tested this on device.

5.38-20230524143200

Toggle 5.38-20230524143200's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Build uStreamer Debian package with Janus plugin (#6)

Resolves #3

This PR builds a uStreamer Debian package (with Janus plugin) in CI. The
reason why we couldn't just use the [official(?) uStreamer Debian
package](https://salsa.debian.org/reedy/ustreamer/) is because it
doesn't compile the Janus plugin (which we need for WebRTC support).

Now we can avoid building uStreamer from source every time TinyPilot is
installed or updated.

You can test the uStreamer Debian package on a device via this [scratch
TinyPilot Pro build
bundle](https://app.circleci.com/pipelines/github/tiny-pilot/tinypilot-pro/2801/workflows/ba68bf47-f01c-4240-a008-6456f956dca4/jobs/20659/artifacts).

Notes:

* We compile the uStreamer Debian package for both [`armhf` and `amd64`
architectures](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R33-R38)
because the `amd64` version will be used when testing the uStreamer
Ansible role in CI (using molecule) and the `armhf` version will be used
when installing TinyPilot on a device.

* FYI, compiling for multiple architectures produces Debian packages in
the following [directory
structure](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R46-R49):
  * `/build/linux_arm_v7/*.deb`
  * `/build/linux_amd64/*.deb`
  
As opposed to just `/build/*.deb` when compiling for a single
architecture.

* Most of the [lintian
code](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R52-R80)
is copy/pasted from [TinyPilot Community
repo](https://github.com/tiny-pilot/tinypilot/blob/b984ab93a58533220ad6358831ce8e405810db8f/.circleci/continue_config.yml#L97-L122),
besides the [loop to check multiple Debian
packages](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R71-R80).

* Seeing as [uStreamer makes use of a simple `v${MAJOR}.${MINOR}`
versioning schema](https://github.com/tiny-pilot/ustreamer/tags), I used
that (without the `v` prefix) as the Debian package version with an
added a timestamp revision number to allow for the Debian package to be
updated even when the uStreamer version has stayed the same. The
resulting uStreamer Debian package versioning schema being
[`MAJOR.MINOR-YYYYMMDDhhmmss`](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R63)

* Seeing as Docker doesn't support dynamic `WORKDIR` values based on a
command's output, I stole these
([1](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R46-R70),
[2](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R140-R146))
clever workarounds from Michael's
[PR](https://github.com/tiny-pilot/tinypilot/pull/1352/files#diff-d3aed37eb2a4156ced425c7bcab79741d1234d58d182d91099b780c3c3136ce4R31-R53).

* The [copyright notice I've used
here](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-eb1289be1c2cdfc905cecdba0c6810aa4d987d52e34f9dee681c1ff9cd69c34fR1-R2)
was given to me my Michael via email

* When we built uStreamer on the device, we technically [only ever ran
`make`](https://github.com/tiny-pilot/ansible-role-ustreamer/blob/b1017f8f4436071b5d8dcf812ee351fc846e1fa6/tasks/main.yml#L153-L161)
and never `make install`. This Debian package builds using `make && make
install` which results in the binary being moved to `bin/ustreamer`. I
thought running the `make install` is a good thing, so I just [added a
symlink (`/opt/ustreamer/ustreamer ->
bin/ustreamer`)](https://github.com/tiny-pilot/ustreamer-debian/pull/6/files#diff-fe915a3611d3df024aa33709affc37ff7a049adc629d69f2f0fe0dd063ad155fR1-R2)
to maintain TinyPilot's path to uStreamer.

Helpful resources on creating Debian packages:
* https://vincent.bernat.ch/en/blog/2019-pragmatic-debian-packaging
* https://github.com/vincentbernat/pragmatic-debian-packages/
* https://salsa.debian.org/reedy/ustreamer/
* https://github.com/tiny-pilot/tinypilot/pull/1352/files

<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/ustreamer-debian/6"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>