We're hiring!
*

Building GStreamer text rendering and overlays on Windows with gst-build

Aaron Boxer avatar

Aaron Boxer
September 28, 2020

Share this post:

Reading time:

Note: In September 2021, the GStreamer project merged all its git repositories into a single, unified repository, often called monorepo. The build system referred in this post as "gst-build" is now in the root of this combined/mono repository.

There are two ways of building GStreamer on Windows - using either cerbero or gst-build. As gst-build is a lot quicker, we will use this approach in this post.

GStreamer relies on various 2D font rendering and layout libraries such as Pango and Cairo to generate text for the Pango plugin, which contains elements such as textoverlay. However, building GStreamer on Windows using gst-build does not currently include support for Pango.

In this post, we will learn how to add the Pango plugin to a gst-build installation on Windows.

Building Pango

If you haven't already followed my previous guide on GStreamer and Windows, please follow the steps there to build GStreamer from source.

Now, we will need to clone a few more repositories into our source directory :

  1. freetype2 https://gitlab.collabora.com/gstreameronwindows/freetype2.git
  2. pixman https://gitlab.freedesktop.org/pixman/pixman
  3. harfbuzz https://github.com/harfbuzz/harfbuzz
  4. cairo https://gitlab.collabora.com/gstreameronwindows/cairo.git
  5. pango https://gitlab.gnome.org/GNOME/pango.git

Next we open a Visual Studio x64 command prompt and execute the following:

> cd freetype2 && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\pixman && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\harfbuzz && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\cairo && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\pango && meson build -Dintrospection=false --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\gst-build-x64 && meson build --reconfigure --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install

At this stage, it is a good idea to delete our plugin cache:

> rmdir /Q /S  c:\\Users\YOUR_USER_NAME\AppData\Local\Microsoft\Windows\INetCache\gstreamer-1.0

And finally:

> gst-inspect-1.0 textoverlay

should find the overlay plugin!

If you have any questions about GStreamer text rendering on Windows, or any other platform, please contact us.

Comments (0)


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Mesa CI and the power of pre-merge testing

08/10/2024

Having multiple developers work on pre-merge testing distributes the process and ensures that every contribution is rigorously tested before…

A shifty tale about unit testing with Maxwell, NVK's backend compiler

15/08/2024

After rigorous debugging, a new unit testing framework was added to the backend compiler for NVK. This is a walkthrough of the steps taken…

A journey towards reliable testing in the Linux Kernel

01/08/2024

We're reflecting on the steps taken as we continually seek to improve Linux kernel integration. This will include more detail about the…

Building a Board Farm for Embedded World

27/06/2024

With each board running a mainline-first Linux software stack and tested in a CI loop with the LAVA test framework, the Farm showcased Collabora's…

Smart audio filters with WirePlumber 0.5

26/06/2024

WirePlumber 0.5 arrived recently with many new and essential features including the Smart Filter Policy, enabling audio filters to automatically…

The latest on cmtp-responder, a permissively-licensed MTP responder implementation

12/06/2024

Part 3 of the cmtp-responder series with a focus on USB gadgets explores several new elements including a unified build environment with…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2024. All rights reserved. Privacy Notice. Sitemap.