<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rust on Thibault Saunier</title><link>https://blog.thibaultsaunier.com/</link><description>Thibault Saunier's blog: GStreamer, multimedia, open source.</description><language>en</language><lastBuildDate>Thu, 03 Dec 2026 12:36:36 +0000</lastBuildDate><atom:link href="https://blog.thibaultsaunier.com/tags/rust/" rel="self" type="application/rss+xml"/><item><title>GStreamer 2.0 at the GStreamer Conference 2026</title><link>https://blog.thibaultsaunier.com/2026/12/gstreamer-2-0-at-the-gstreamer-conference-2026/</link><pubDate>Thu, 03 Dec 2026 09:30:00 -0300</pubDate><guid isPermaLink="true">https://blog.thibaultsaunier.com/2026/12/gstreamer-2-0-at-the-gstreamer-conference-2026/</guid><description>&lt;p&gt;At the &lt;a href="https://gstreamer.freedesktop.org/conference/2026/"&gt;GStreamer Conference&lt;/a&gt; in Prague in October, a whole block of the&#10;second day was a session about GStreamer 2.0: an overview, three talks and a&#10;panel discussion. This post is my summary of that session and of my own talk in&#10;it. The next one will be about what I have worked on since.&lt;/p&gt;&#10;&lt;p&gt;As in my talk: what I describe here is an early research prototype. The&#10;GStreamer project has not made any decision about 2.0.&lt;/p&gt;&#10;&lt;h2 id="the-session"&gt;The session&lt;/h2&gt;&#10;&lt;p&gt;The &lt;a href="https://indico.freedesktop.org/event/14/timetable/"&gt;GStreamer 2.0 session&lt;/a&gt; had four parts:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;a href="https://indico.freedesktop.org/event/14/contributions/626/"&gt;Whither GStreamer 2.0?&lt;/a&gt;&lt;/strong&gt;, by Tim-Philipp Müller (Centricular): an&#10;overview of what we know and don&amp;rsquo;t know about the shape of 2.0 and how we&#10;might get there, followed by a panel discussion to bounce ideas around,&#10;identify priorities and collect input from the audience.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;a href="https://indico.freedesktop.org/event/14/contributions/602/"&gt;GStreamer 2.x without breaking API?&lt;/a&gt;&lt;/strong&gt;, by Edward Hervey&#10;(Centricular): a short talk proposing to port all the 1.x elements to Rust&#10;now. It would make GStreamer safer today, and make moving the core to Rust&#10;much simpler later.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;a href="https://indico.freedesktop.org/event/14/contributions/621/"&gt;Let&amp;rsquo;s (re) negotiate!&lt;/a&gt;&lt;/strong&gt;, by Mathieu Duponchelle (Centricular):&#10;experiments with new, non backwards compatible negotiation designs, which&#10;keep what the current system can do while fixing its shortcomings.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;a href="https://indico.freedesktop.org/event/14/contributions/625/"&gt;Let&amp;rsquo;s solve our long standing issues: time for GStreamer 2.0?&lt;/a&gt;&lt;/strong&gt;, my&#10;talk, summarized below.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Two talks were already about this work, Mathieu&amp;rsquo;s experiments with negotiation&#10;and my new core, so we decided to build a whole session around the future of&#10;GStreamer: this 2.0 session.&lt;/p&gt;&#10;&lt;h2 id="my-talk-why-a-new-major-release"&gt;My talk: why a new major release?&lt;/h2&gt;&#10;&lt;p&gt;GStreamer 1.0 is 14 years old. It has served us well, and a lot can and should&#10;keep improving within 1.x: porting elements to Rust, for example, already&#10;removes many memory bugs from the code that parses untrusted data. But some&#10;issues come from the design of the core itself, and fixing them needs a deep&#10;rework of it, which changes what elements and applications have to do. These are&#10;the kinds of changes a major version is for:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;The core is written in C, on top of GLib.&lt;/strong&gt; A great foundation 25 years ago,&#10;but elements ported to Rust still plug into a C and GObject object model, with&#10;its locking rules kept in documentation, and GObject is one more thing&#10;newcomers have to learn first.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;The threading model is not flexible enough.&lt;/strong&gt; We have found ways around its&#10;limitations, notably with the threadshare plugin, but scheduling flexibility&#10;should be part of the core design, so applications can choose how pipeline&#10;work runs and integrates with their own threads and event loops.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Negotiation&lt;/strong&gt; is left to each element, with base classes helping only so&#10;much, and its errors are hard to debug. Mathieu&amp;rsquo;s talk was about exactly that.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Allocation&lt;/strong&gt; that waits behind the data flow, because the allocation query&#10;is serialized with it, and a query that is not good enough in the first&#10;place, as Nicolas explained in the panel.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Changing a running pipeline&lt;/strong&gt; is too complex and too easy to get wrong:&#10;races, deadlocks, and every element that does it for real has its own&#10;machinery. This is the one I want to solve.&lt;/li&gt;&#10;&lt;li&gt;&amp;hellip;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Those ideas come from the&#10;&lt;a href="https://notes.gstreamer.org/lTrOaKD8T0G9W80wEcU2fQ?view"&gt;2.0 wishlist&lt;/a&gt; that&#10;GStreamer developers have been writing together. I presented a&#10;&lt;a href="https://gitlab.freedesktop.org/thiblahute/gstreamer2"&gt;new core written in Rust&lt;/a&gt;, with no GLib in it. I started it to try&#10;some of those ideas in real code and see which ones hold up. Two principles&#10;guide it: move complexity out of elements and applications into the core, and&#10;use Rust&amp;rsquo;s types to enforce rules that would otherwise live in documentation.&lt;/p&gt;&#10;&lt;p&gt;The design separates a &lt;strong&gt;data plane&lt;/strong&gt;, where pad tasks move the data, from a&#10;&lt;strong&gt;control plane&lt;/strong&gt;, where one task per pipeline handles every change to it. Both&#10;run on an executor that the application can provide, so GStreamer can fit into&#10;the async runtime or event loop an application already has.&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="The scheduling design: an executor running pad tasks on the data plane and one control task on the control plane" loading="lazy" src="https://blog.thibaultsaunier.com/2026/12/gstreamer-2-0-at-the-gstreamer-conference-2026/scheduling-design.svg"&gt;&lt;/p&gt;&#10;&lt;p&gt;The control task is what makes the goal reachable: &lt;strong&gt;transactional dynamic&#10;pipelines&lt;/strong&gt;, where you stage a change to a running pipeline and commit it as a&#10;whole, or arm it to happen at a given point of the stream, without any&#10;streaming thread relinking pads.&lt;/p&gt;&#10;&lt;p&gt;I ended with what I propose for the transition. 1.x keeps being maintained for&#10;a long time. A stable C API on top of the Rust core gives C elements and&#10;applications a path to 2.0: elements that are not worth rewriting in Rust can&#10;stay in C and be ported to that new API.&#10;And the plugins being written in Rust for 1.x today should carry over. Nobody&#10;should have to jump all at once.&lt;/p&gt;&#10;&lt;h2 id="the-panel"&gt;The panel&lt;/h2&gt;&#10;&lt;p&gt;After the talks came the panel discussion, moderated by Tim, with Nicolas&#10;Dufresne (Collabora), Sebastian Dröge, Jan Schmidt and Mathieu Duponchelle&#10;(Centricular), Håvard Graff (Pexip), and myself, Thibault Saunier (Igalia). It&#10;stayed at a high level rather than going into designs, and it showed a broad&#10;agreement on the direction.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Why a new GStreamer.&lt;/strong&gt; Tim opened by asking Håvard whether Pexip wants a new&#10;GStreamer or &amp;ldquo;just a faster horse&amp;rdquo;. Pexip has been built on GStreamer from the&#10;start. It runs video conferences and bridges them with services like Microsoft&#10;Teams and Google Meet, and its hardest problems today come with scale: many&#10;small video calls, a few very large ones, and forwarding the media without&#10;re-encoding it whenever possible. GStreamer does not reach the numbers they&#10;need there. His gut feeling is that more&#10;chipping at the current core will not be enough, and that it is not one single&#10;thing: sharing threads alone did not bring the gain they hoped for. Nicolas&#10;described the same limits from the embedded side. The push-based, multithreaded&#10;model is now set in stone: scheduling is left to the operating system,&#10;negotiation is spread over every element with no single place that sees the&#10;whole graph, and the allocation query has never really worked as intended. He&#10;has been trying to make sense of it since 1.2: it carries lists of pools and&#10;allocators of which only the first is used, loosely defined parameters, and no&#10;way to intersect or merge proposals as caps negotiation does, a sign that it is&#10;in the wrong place.&#10;Every fix to make elements work together adds work for every new plugin.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Breaking the API, but carefully.&lt;/strong&gt; Sebastian noted that the problems are well&#10;known, and that what we need now are solutions. Writing most elements should be&#10;as simple as providing a processing function and describing what goes in and&#10;out, while keeping the powerful API for the cases that need it. He also&#10;suggested that, while breaking compatibility, we could offer a compatibility&#10;layer for the small part of the API most applications actually use. Mathieu&amp;rsquo;s&#10;point was that if we never start, 2.0 will always be three years away: we should&#10;experiment now, expecting to throw those prototypes away and to bring the&#10;results together into one design. Jan put it in perspective: GStreamer 0.8 had&#10;its own green threads scheduler, 0.10 threw it away and relied on operating&#10;system threads, and probably used them too much. An async runtime is a middle&#10;ground, though we will still need boundaries where we wrap code that runs its&#10;own threads.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;What must not be lost.&lt;/strong&gt; Håvard&amp;rsquo;s favorite part of GStreamer is its building&#10;blocks: an element can be tested on its own, then trusted inside a bigger&#10;pipeline, and the same API can wrap V4L2, FFmpeg or any third party system.&#10;People in the audience added a learning curve that starts low for simple&#10;applications, modularity (shipping only the plugins a product needs matters for&#10;a medical device and its security paperwork), the sheer number of existing&#10;plugins, and the flexibility to handle exotic use cases.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;What people want.&lt;/strong&gt; The audience brought a long list:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Simple dynamic pipelines. Applications start simple, then need to change the&#10;pipeline while it runs, and that is where the pain starts. Switching audio&#10;and video together at the same point is still hard. This is exactly what&#10;transactional dynamic pipelines are about.&lt;/li&gt;&#10;&lt;li&gt;Structured logging and tracing, with scopes, where Rust&amp;rsquo;s tracing ecosystem&#10;would give us a lot for free.&lt;/li&gt;&#10;&lt;li&gt;Negative and fractional timestamps.&lt;/li&gt;&#10;&lt;li&gt;Easier access to the data for computer vision applications, which find&#10;OpenCV much simpler than &lt;code&gt;appsrc&lt;/code&gt; and &lt;code&gt;appsink&lt;/code&gt;: writing an element as a&#10;single function would help there too.&lt;/li&gt;&#10;&lt;li&gt;Sampled and structured data beyond audio, video and text as a first class&#10;citizen, for analytics in particular.&lt;/li&gt;&#10;&lt;li&gt;Predictable threading for game engines, and better cache locality: keeping&#10;related elements on the same thread instead of jumping between cores.&lt;/li&gt;&#10;&lt;li&gt;A smaller API surface, and bins that can hide their internals.&lt;/li&gt;&#10;&lt;li&gt;Negotiation that picks the best formats for the whole pipeline, not one link&#10;at a time.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The discussion also covered porting. Nobody wants a one to one translation of&#10;the existing plugins, by hand or with an LLM: porting is a chance to rethink an&#10;element, while keeping the workarounds for broken streams that accumulated over&#10;the years, since they encode real knowledge. The panel ended on a &amp;ldquo;brave new&#10;world&amp;rdquo; note, and a call to stop talking and start doing.&lt;/p&gt;&#10;&lt;h2 id="at-the-hackfest"&gt;At the hackfest&lt;/h2&gt;&#10;&lt;p&gt;The two hackfest days after the conference were a good opportunity to go deeper&#10;into some of these topics with the people working on them:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;The C API and ABI&lt;/strong&gt;, with Sebastian Dröge: how a Rust core should expose a&#10;stable C interface, and how to implement it.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Negotiation&lt;/strong&gt;, with Mathieu: how his caps negotiation APIs could evolve, and&#10;whether memory and buffer pool negotiation could become part of it rather&#10;than a separate step.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Scheduling&lt;/strong&gt;, with Edward and Nicolas. The word covers too many different things in&#10;GStreamer to be useful in design discussions, and we will need more precise&#10;terms. We also talked about the core taking on much more of this work,&#10;acting as a kind of constraint solver: figuring out which data each element&#10;will need and when, and moving it between elements accordingly. This is still&#10;very theoretical, but it is a direction worth exploring.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Bolder ideas&lt;/strong&gt;, with Jan Schmidt, who has plenty of them. Many are in his&#10;section of the &lt;a href="https://notes.gstreamer.org/lTrOaKD8T0G9W80wEcU2fQ?view"&gt;wishlist&lt;/a&gt;: bins that do too much and could be split&#10;into separate groupings for state changes, synchronization and shared context;&#10;links that carry several streams at once, with downstream subscribing to the&#10;ones it needs; timestamps that say what they are (stream time, running time,&#10;clock time) instead of one type for everything, and explicit clock domains;&#10;and even a pipeline without the &lt;code&gt;Paused&lt;/code&gt; state.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="what-is-next"&gt;What is next?&lt;/h2&gt;&#10;&lt;p&gt;The wishlist keeps growing: it now has sections from nine people. On my side,&#10;the control task has landed on &lt;code&gt;main&lt;/code&gt; of the prototype, and I am close to&#10;landing a first transaction API on top of it. That will be the subject of my&#10;next post.&lt;/p&gt;&#10;&lt;p&gt;I would also like to get people hacking on it together: I have proposed a&#10;hackfest &lt;strong&gt;dedicated to GStreamer 2.0 hacking&lt;/strong&gt;, possibly hosted in Santiago de&#10;Chile, where I live.&lt;/p&gt;&#10;&lt;p&gt;The recordings of the session will be on the&#10;&lt;a href="https://gstconf.ubicast.tv/channels/#gstreamer-conference-2026"&gt;conference video archive&lt;/a&gt;.&lt;/p&gt;&#10;</description></item></channel></rss>