• Pl chevron_right

      Thibault Saunier: GStreamer 2.0 at the GStreamer Conference 2026

      news.movim.eu / PlanetGnome • 12:30 • 9 minutes

    At the GStreamer Conference in Prague in October, a whole block of the second day was a session about GStreamer 2.0: an overview, three talks and a panel discussion. This post is my summary of that session and of my own talk in it. The next one will be about what I have worked on since.

    As in my talk: what I describe here is an early research prototype. The GStreamer project has not made any decision about 2.0.

    The session

    The GStreamer 2.0 session had four parts:

    • Whither GStreamer 2.0?, by Tim-Philipp Müller (Centricular): an overview of what we know and don’t know about the shape of 2.0 and how we might get there, followed by a panel discussion to bounce ideas around, identify priorities and collect input from the audience.
    • GStreamer 2.x without breaking API?, by Edward Hervey (Centricular): a short talk proposing to port all the 1.x elements to Rust now. It would make GStreamer safer today, and make moving the core to Rust much simpler later.
    • Let’s (re) negotiate!, by Mathieu Duponchelle (Centricular): experiments with new, non backwards compatible negotiation designs, which keep what the current system can do while fixing its shortcomings.
    • Let’s solve our long standing issues: time for GStreamer 2.0?, my talk, summarized below.

    Two talks were already about this work, Mathieu’s experiments with negotiation and my new core, so we decided to build a whole session around the future of GStreamer: this 2.0 session.

    My talk: why a new major release?

    GStreamer 1.0 is 14 years old. It has served us well, and a lot can and should keep improving within 1.x: porting elements to Rust, for example, already removes many memory bugs from the code that parses untrusted data. But some issues come from the design of the core itself, and fixing them needs a deep rework of it, which changes what elements and applications have to do. These are the kinds of changes a major version is for:

    • The core is written in C, on top of GLib. A great foundation 25 years ago, but elements ported to Rust still plug into a C and GObject object model, with its locking rules kept in documentation, and GObject is one more thing newcomers have to learn first.
    • The threading model is not flexible enough. We have found ways around its limitations, notably with the threadshare plugin, but scheduling flexibility should be part of the core design, so applications can choose how pipeline work runs and integrates with their own threads and event loops.
    • Negotiation is left to each element, with base classes helping only so much, and its errors are hard to debug. Mathieu’s talk was about exactly that.
    • Allocation that waits behind the data flow, because the allocation query is serialized with it, and a query that is not good enough in the first place, as Nicolas explained in the panel.
    • Changing a running pipeline is too complex and too easy to get wrong: races, deadlocks, and every element that does it for real has its own machinery. This is the one I want to solve.
    • …

    Those ideas come from the 2.0 wishlist that GStreamer developers have been writing together. I presented a new core written in Rust, with no GLib in it. I started it to try some of those ideas in real code and see which ones hold up. Two principles guide it: move complexity out of elements and applications into the core, and use Rust’s types to enforce rules that would otherwise live in documentation.

    The design separates a data plane, where pad tasks move the data, from a control plane, where one task per pipeline handles every change to it. Both run on an executor that the application can provide, so GStreamer can fit into the async runtime or event loop an application already has.

    The scheduling design: an executor running pad tasks on the data plane and one control task on the control plane

    The control task is what makes the goal reachable: transactional dynamic pipelines, where you stage a change to a running pipeline and commit it as a whole, or arm it to happen at a given point of the stream, without any streaming thread relinking pads.

    I ended with what I propose for the transition. 1.x keeps being maintained for a long time. A stable C API on top of the Rust core gives C elements and applications a path to 2.0: elements that are not worth rewriting in Rust can stay in C and be ported to that new API. And the plugins being written in Rust for 1.x today should carry over. Nobody should have to jump all at once.

    The panel

    After the talks came the panel discussion, moderated by Tim, with Nicolas Dufresne (Collabora), Sebastian Dröge, Jan Schmidt and Mathieu Duponchelle (Centricular), Håvard Graff (Pexip), and myself, Thibault Saunier (Igalia). It stayed at a high level rather than going into designs, and it showed a broad agreement on the direction.

    Why a new GStreamer. Tim opened by asking Håvard whether Pexip wants a new GStreamer or “just a faster horse”. Pexip has been built on GStreamer from the start. It runs video conferences and bridges them with services like Microsoft Teams and Google Meet, and its hardest problems today come with scale: many small video calls, a few very large ones, and forwarding the media without re-encoding it whenever possible. GStreamer does not reach the numbers they need there. His gut feeling is that more chipping at the current core will not be enough, and that it is not one single thing: sharing threads alone did not bring the gain they hoped for. Nicolas described the same limits from the embedded side. The push-based, multithreaded model is now set in stone: scheduling is left to the operating system, negotiation is spread over every element with no single place that sees the whole graph, and the allocation query has never really worked as intended. He has been trying to make sense of it since 1.2: it carries lists of pools and allocators of which only the first is used, loosely defined parameters, and no way to intersect or merge proposals as caps negotiation does, a sign that it is in the wrong place. Every fix to make elements work together adds work for every new plugin.

    Breaking the API, but carefully. Sebastian noted that the problems are well known, and that what we need now are solutions. Writing most elements should be as simple as providing a processing function and describing what goes in and out, while keeping the powerful API for the cases that need it. He also suggested that, while breaking compatibility, we could offer a compatibility layer for the small part of the API most applications actually use. Mathieu’s point was that if we never start, 2.0 will always be three years away: we should experiment now, expecting to throw those prototypes away and to bring the results together into one design. Jan put it in perspective: GStreamer 0.8 had its own green threads scheduler, 0.10 threw it away and relied on operating system threads, and probably used them too much. An async runtime is a middle ground, though we will still need boundaries where we wrap code that runs its own threads.

    What must not be lost. Håvard’s favorite part of GStreamer is its building blocks: an element can be tested on its own, then trusted inside a bigger pipeline, and the same API can wrap V4L2, FFmpeg or any third party system. People in the audience added a learning curve that starts low for simple applications, modularity (shipping only the plugins a product needs matters for a medical device and its security paperwork), the sheer number of existing plugins, and the flexibility to handle exotic use cases.

    What people want. The audience brought a long list:

    • Simple dynamic pipelines. Applications start simple, then need to change the pipeline while it runs, and that is where the pain starts. Switching audio and video together at the same point is still hard. This is exactly what transactional dynamic pipelines are about.
    • Structured logging and tracing, with scopes, where Rust’s tracing ecosystem would give us a lot for free.
    • Negative and fractional timestamps.
    • Easier access to the data for computer vision applications, which find OpenCV much simpler than appsrc and appsink: writing an element as a single function would help there too.
    • Sampled and structured data beyond audio, video and text as a first class citizen, for analytics in particular.
    • Predictable threading for game engines, and better cache locality: keeping related elements on the same thread instead of jumping between cores.
    • A smaller API surface, and bins that can hide their internals.
    • Negotiation that picks the best formats for the whole pipeline, not one link at a time.

    The discussion also covered porting. Nobody wants a one to one translation of the existing plugins, by hand or with an LLM: porting is a chance to rethink an element, while keeping the workarounds for broken streams that accumulated over the years, since they encode real knowledge. The panel ended on a “brave new world” note, and a call to stop talking and start doing.

    At the hackfest

    The two hackfest days after the conference were a good opportunity to go deeper into some of these topics with the people working on them:

    • The C API and ABI, with Sebastian Dröge: how a Rust core should expose a stable C interface, and how to implement it.
    • Negotiation, with Mathieu: how his caps negotiation APIs could evolve, and whether memory and buffer pool negotiation could become part of it rather than a separate step.
    • Scheduling, with Edward and Nicolas. The word covers too many different things in GStreamer to be useful in design discussions, and we will need more precise terms. We also talked about the core taking on much more of this work, acting as a kind of constraint solver: figuring out which data each element will need and when, and moving it between elements accordingly. This is still very theoretical, but it is a direction worth exploring.
    • Bolder ideas, with Jan Schmidt, who has plenty of them. Many are in his section of the wishlist: bins that do too much and could be split into separate groupings for state changes, synchronization and shared context; links that carry several streams at once, with downstream subscribing to the ones it needs; timestamps that say what they are (stream time, running time, clock time) instead of one type for everything, and explicit clock domains; and even a pipeline without the Paused state.

    What is next?

    The wishlist keeps growing: it now has sections from nine people. On my side, the control task has landed on main of the prototype, and I am close to landing a first transaction API on top of it. That will be the subject of my next post.

    I would also like to get people hacking on it together: I have proposed a hackfest dedicated to GStreamer 2.0 hacking, possibly hosted in Santiago de Chile, where I live.

    The recordings of the session will be on the conference video archive.