presentations/pes-march-2024/pes-march-2024.md

104 lines
3.4 KiB
Markdown

---
title:
- A Day in the Life of a Media Plumber
author:
- Sanchayan Maity
theme:
- default
classoption:
- aspectratio=169
---
# Who
- Who am I?
* Embedded Systems background
* Prefer C, Haskell and Rust
* Organize and speak at Rust and Haskell meet-ups in Bangalore
- Work?
* Software Engineer @ [asymptotic](https://asymptotic.io/)
* Open source consulting firm based out of Bangalore and Toronto
* Work on low level systems software centred around multimedia
* GStreamer, PipeWire, PulseAudio
* Language Polyglots
# Open source contributions
- [GStreamer](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [gst-plugins-rs](https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [PulseAudio](https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [Linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=author&q=Sanchayan+Maity)
- [u-boot](https://source.denx.de/u-boot/u-boot/-/commits/master?search=Sanchayan%20Maity)
# GStreamer
- Multiplatform Pipeline based multimedia framework
- Bindings for various languages
- Allows building complex media processing workflows
- Some applications
* PiTiVi (Video Editor)
* amaroK, Banshee, Clementine (audio players)
* Empathy (VOIP and video conferencing)
* GstLAL (gravitational wave data analysis)
* Rygel (DLNA streaming server and renderer)
* Totem (movie player for the GNOME desktop)
# Simple pipeline
```bash
gst-launch-1.0 videotestsrc ! autovideosink
gst-launch-1.0 audiotestsrc ! autoaudiosink
```
# Media pipeline[^1]
![*_Simple Player_*](simple-player.png){width=80%}
[^1]: [Dynamic Pipelines](https://gstreamer.freedesktop.org/documentation/tutorials/basic/dynamic-pipelines.html?gi-language=c)
# Internals[^2]
![*_RGB_*](RGB-image-consisting-of-three-layers.png){width=60%}
[^2]: [Raw Video Media Types](https://gstreamer.freedesktop.org/documentation/additional/design/mediatype-video-raw.html?gi-language=c)
# Alpha compositing[^3]
- How does it look?
[^3]: [Alpha Compositing - Bartosz Ciechanowski](https://ciechanow.ski/alpha-compositing/)
# Demo
- Using Cairo[^4][^5]
[^4]: [GStreamer Cairo example](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/tests/examples/cairo/cairo_overlay.c?ref_type=heads)
[^5]: [GStreamer Cairo example project](https://git.sanchayanmaity.net/sanchayanmaity/cairo-overlay-example)
# Rounded corners
![*_Rounded Corners_*](roundedcorners.jpg){width=60%}
```bash
gst-launch-1.0 filesrc location=bunny.mp4 ! decodebin ! videoconvert !
roundedcorners border-radius-px=100 ! videoconvert ! gtksink
```
# Getting started
- [GStreamer Basic Tutorial](https://gstreamer.freedesktop.org/documentation/tutorials/basic/index.html?gi-language=c)
- [GStreamer Application Development](https://gstreamer.freedesktop.org/documentation/application-development/index.html?gi-language=c)
# Questions
- Reach out on
* Email: sanchayan@sanchayanmaity.net
* Mastodon: https://sanchayanmaity.com/@sanchayan
* Telegram: https://t.me/SanchayanMaity
* Blog: sanchayanmaity.net