<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="en">
	<title>Herostratus’ legacy</title>
	<subtitle>Igalian blog.</subtitle>
	<link href="https://blogs.igalia.com/vjaquez/feed/feed.xml" rel="self"/>
	<link href="https://blogs.igalia.com/vjaquez/"/>
	<updated>2026-07-03T00:00:00Z</updated>
	<id>https://blogs.igalia.com/</id>
	<author>
		<name>Víctor Jáquez</name>
		<email>vjaquez@igalia.com</email>
	</author>
	
	<entry>
		<title>Notes on hacking gfxreconstruct to enable H.265 video encoding</title>
		<link href="https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/"/>
		<updated>2026-07-03T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/</id>
		<content type="html">&lt;p&gt;While working on Vulkan Video encode support in Mesa, I needed to capture H.265
encoding traces. &lt;code&gt;gfxreconstruct&lt;/code&gt; already handled H.264 video and several other
extensions, but &lt;code&gt;VK_KHR_video_encode_h265&lt;/code&gt; was explicitly blocked. Here’s how I
unblocked it and what I learned about &lt;code&gt;gfxreconstruct&lt;/code&gt;’s code generation
machinery along the way.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/LunarG/gfxreconstruct&quot;&gt;&lt;code&gt;gfxreconstruct&lt;/code&gt;&lt;/a&gt; is LunarG’s suite
of tools for capturing and replaying graphics API calls. It intercepts Vulkan
(and D3D12) calls at the layer level, serializes them into a compressed binary
trace file, and can later replay that trace verbatim. This is useful for driver
regression testing, GPU bring up, architecture simulation, and bug reporting.&lt;/p&gt;
&lt;h2 id=&quot;the-blocking-mechanism&quot; tabindex=&quot;-1&quot;&gt;The blocking mechanism &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/#the-blocking-mechanism&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;gfxreconstruct&lt;/code&gt; has two independent mechanisms that prevent an extension from
being captured.&lt;/p&gt;
&lt;p&gt;The first is a runtime blocklist in
&lt;a href=&quot;https://github.com/LunarG/gfxreconstruct/blob/dev/framework/encode/vulkan_entry_base.cpp&quot;&gt;&lt;code&gt;framework/encode/vulkan_entry_base.cpp&lt;/code&gt;&lt;/a&gt;.
A static array called &lt;code&gt;kVulkanUnsupportedDeviceExtensions&lt;/code&gt; lists extension name
strings that the layer strips from &lt;code&gt;vkEnumerateDeviceExtensionProperties&lt;/code&gt;
results. If your extension is on that list, applications cannot even see it when
the capture layer is loaded, so they never attempt to use it and nothing gets
recorded.&lt;/p&gt;
&lt;p&gt;The second is a generation-time exclusion list in the Python code generator.
&lt;code&gt;gfxreconstruct&lt;/code&gt; does not hand-write capture and replay handlers for each Vulkan
function. Instead, it parses the Khronos XML registry (&lt;code&gt;vk.xml&lt;/code&gt;, &lt;code&gt;video.xml&lt;/code&gt;)
and auto-generates thousands of lines of C++ for encoding, decoding, and
consuming API calls. The generator has exclusion lists that tell it which
extensions and struct families to skip entirely.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;VK_KHR_video_encode_h265&lt;/code&gt; was on both lists.&lt;/p&gt;
&lt;h2 id=&quot;removing-the-runtime-block&quot; tabindex=&quot;-1&quot;&gt;Removing the runtime block &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/#removing-the-runtime-block&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This part is trivial: open &lt;code&gt;framework/encode/vulkan_entry_base.cpp&lt;/code&gt; and delete
the line&lt;/p&gt;
&lt;pre class=&quot;language-cpp&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-cpp&quot;&gt;VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;from &lt;code&gt;kVulkanUnsupportedDeviceExtensions&lt;/code&gt;. One line. After rebuilding, the layer
reports the extension to applications. But that is not enough: without generated
capture/replay code, intercepted calls would have no handlers.&lt;/p&gt;
&lt;h2 id=&quot;removing-the-generator-exclusions&quot; tabindex=&quot;-1&quot;&gt;Removing the generator exclusions &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/#removing-the-generator-exclusions&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The code generator lives under &lt;code&gt;framework/generated/&lt;/code&gt;. The file
&lt;a href=&quot;https://github.com/LunarG/gfxreconstruct/blob/dev/framework/generated/khronos_generators/vulkan_generators/vulkan_base_generator.py&quot;&gt;&lt;code&gt;khronos_generators/vulkan_generators/vulkan_base_generator.py&lt;/code&gt;&lt;/a&gt;
maintains two exclusion lists:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;_remove_extensions&lt;/code&gt;: extensions whose entire API surface the generator should
skip.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;_remove_video_extensions&lt;/code&gt;: lower-level codec standard headers
(&lt;code&gt;vulkan_video_codec_h265std*&lt;/code&gt;) that define the &lt;code&gt;StdVideoH265*&lt;/code&gt; struct
families.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From &lt;code&gt;_remove_extensions&lt;/code&gt; I removed:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;VK_KHR_video_decode_h265&lt;br&gt;VK_KHR_video_encode_h265&lt;br&gt;VK_KHR_video_maintenance2&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From &lt;code&gt;_remove_video_extensions&lt;/code&gt; I removed:&lt;/p&gt;
&lt;pre class=&quot;language-text&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;vulkan_video_codec_h265std&lt;br&gt;vulkan_video_codec_h265std_decode&lt;br&gt;vulkan_video_codec_h265std_encode&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I included &lt;code&gt;VK_KHR_video_maintenance2&lt;/code&gt; because its structs interact with video
session parameters relevant to H.265 sessions.&lt;/p&gt;
&lt;h2 id=&quot;the-xml-patch-when-the-generator-breaks&quot; tabindex=&quot;-1&quot;&gt;The XML patch: when the generator breaks &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/#the-xml-patch-when-the-generator-breaks&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After removing the exclusions, I ran the generator and hit an error. The
generator could not resolve a &lt;code&gt;len&lt;/code&gt; attribute in &lt;code&gt;video.xml&lt;/code&gt; for
&lt;code&gt;StdVideoH265HrdParameters&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The problematic members are &lt;code&gt;pSubLayerHrdParametersNal&lt;/code&gt; and
&lt;code&gt;pSubLayerHrdParametersVcl&lt;/code&gt;. Both are pointers, and &lt;code&gt;video.xml&lt;/code&gt; specifies
&lt;code&gt;len=&amp;quot;*_max_sub_layers_minus1 + 1&amp;quot;&lt;/code&gt; for them. The expression references
&lt;code&gt;*_max_sub_layers_minus1&lt;/code&gt;, a field that lives in an outer struct (VPS or SPS),
not in &lt;code&gt;StdVideoH265HrdParameters&lt;/code&gt; itself.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gfxreconstruct&lt;/code&gt;’s code generator resolves &lt;code&gt;len&lt;/code&gt; expressions by walking the
current struct’s members, but it cannot follow cross-struct references. This is
a reasonable limitation: the generator would need to understand the full
semantics of the Vulkan Video specification to know which outer struct provides
the length field.&lt;/p&gt;
&lt;p&gt;The fix is a small XML tree patch in
&lt;a href=&quot;https://github.com/LunarG/gfxreconstruct/blob/dev/framework/generated/khronos_generators/vulkan_generators/gencode.py&quot;&gt;&lt;code&gt;gencode.py&lt;/code&gt;&lt;/a&gt;.
Before the generator runs, I strip the &lt;code&gt;len&lt;/code&gt; attribute from both members:&lt;/p&gt;
&lt;pre class=&quot;language-python&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;hrd_type &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; video_tree&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;find&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;types/type[@name=&quot;StdVideoH265HrdParameters&quot;]&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; hrd_type &lt;span class=&quot;token keyword&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; member_name &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;pSubLayerHrdParametersNal&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;pSubLayerHrdParametersVcl&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br&gt;        &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; member &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; hrd_type&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;findall&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;member&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br&gt;            name_elem &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; member&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;find&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;name&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;            &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; name_elem &lt;span class=&quot;token keyword&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;and&lt;/span&gt; name_elem&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;text &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; member_name&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;br&gt;                member&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;attrib&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;pop&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;len&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Without a &lt;code&gt;len&lt;/code&gt; attribute, the generator falls back to treating each pointer as
pointing to a single element. This is safe for practical capture scenarios where
only one sub-layer is in use.&lt;/p&gt;
&lt;h2 id=&quot;regenerating-the-code&quot; tabindex=&quot;-1&quot;&gt;Regenerating the code &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/#regenerating-the-code&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With the generator changes in place, regenerating is a single command:&lt;/p&gt;
&lt;pre class=&quot;language-shell&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shell&quot;&gt;uv run &lt;span class=&quot;token parameter variable&quot;&gt;--with&lt;/span&gt; pyparsing python3 framework/generated/generate_vulkan.py&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;uv run --with pyparsing&lt;/code&gt; ensures the &lt;code&gt;pyparsing&lt;/code&gt; dependency is available
without a manual &lt;code&gt;pip install&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The generator overwrites all files under
&lt;code&gt;framework/generated/generated_vulkan_*.cpp&lt;/code&gt; and
&lt;code&gt;framework/generated/generated_vulkan_*.h&lt;/code&gt;. The diff was substantial: hundreds
of new functions for encoding and decoding &lt;code&gt;StdVideoH265*&lt;/code&gt; structs, plus all the
video session parameter handling infrastructure.&lt;/p&gt;
&lt;h2 id=&quot;the-bigger-picture&quot; tabindex=&quot;-1&quot;&gt;The bigger picture &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding/#the-bigger-picture&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The interesting part of this exercise was understanding &lt;code&gt;gfxreconstruct&lt;/code&gt;’s
architecture. The capture layer is not a monolithic block of hand-written
interceptors. It is a generator pipeline: Python scripts consume the Khronos XML
registry and emit C++ that handles serialization, deserialization, and replay
for every struct and function in the Vulkan API surface.&lt;/p&gt;
&lt;p&gt;This means enabling a new extension is mostly a matter of telling the generator
to stop ignoring it, then fixing any edge cases where the XML description
does not match the generator’s assumptions. The actual capture and replay logic
comes for free once the generator produces code for the extension’s types and
entry points.&lt;/p&gt;
&lt;p&gt;If you are considering enabling other video extensions (H.264 encode is still
blocked), the same recipe applies: remove from the runtime blocklist, remove
from &lt;code&gt;_remove_extensions&lt;/code&gt; and &lt;code&gt;_remove_video_extensions&lt;/code&gt;, regenerate, and fix
any XML &lt;code&gt;len&lt;/code&gt; expression issues that surface.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Getting ready for the GStreamer Spring Hackfest 2026 in Nice</title>
		<link href="https://blogs.igalia.com/vjaquez/getting-ready-for-the-gstreamer-spring-hackfest-2026-in-nice/"/>
		<updated>2026-05-22T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/getting-ready-for-the-gstreamer-spring-hackfest-2026-in-nice/</id>
		<content type="html">&lt;p&gt;Next week, several Igalians will be heading to Nice for a bunch of open source
gatherings and hackfests.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://indico.freedesktop.org/event/13/&quot;&gt;Display Next Hackfest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://embedded-recipes.org/2026/&quot;&gt;Embedded Recipes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://discourse.gstreamer.org/t/gstreamer-spring-hackfest-2026-on-29-31-may-2026-in-nice-france/5762&quot;&gt;GStreamer Spring
Hackfest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/PipeWire-Hackfest-in-Nice---May-2026&quot;&gt;PipeWire
Hackfest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/orgs/bluez/discussions/1881&quot;&gt;BlueZ F2F&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://lore.kernel.org/linux-media/e6c07c24-da54-4269-b42f-b9af544da2d8@kernel.org/&quot;&gt;Media
Summit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I’ll attend the &lt;em&gt;Media Summit&lt;/em&gt; remotely (I’m interested in the discussion about
the usage of Vulkan Video API in embedded devices), then I’ll travel, as other
multimedia folks, to the &lt;em&gt;GStreamer Hackfest&lt;/em&gt;. While other Igalians will be at
the &lt;em&gt;Display Next Hackfest&lt;/em&gt; and &lt;em&gt;Embedded Recipes&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;My goal for the hackfest is to chat with other GStreamer developers about
hardware-accelerated encoders and how to test them, especially those using
VA-API and Vulkan.&lt;/p&gt;
&lt;p&gt;Here’s what my multimedia colleagues are planning for the hackfest:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stéphane Cerveau&lt;/strong&gt; will talk about new features in
&lt;a href=&quot;https://dabrain34.pages.freedesktop.org/GstPipelineStudio/&quot;&gt;GstPipelineStudio&lt;/a&gt;
and its future integration with
&lt;a href=&quot;https://github.com/dabrain34/gstpop&quot;&gt;GstPrinceOfParser&lt;/a&gt;, along with several
core GStreamer improvements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alicia Boya&lt;/strong&gt; will tackle subtle timing issues, out-of-order and race
conditions in frame processing, and other GStreamer bugs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Xabier Rodríguez Calvar&lt;/strong&gt; plans to close the issues around static compilation
of &lt;code&gt;gstreamer-rs&lt;/code&gt;, including selected plugins with &lt;code&gt;system-deps&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thibault Saunier&lt;/strong&gt; will aim to finish upstreaming some new features and focus
on WebAssembly support.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Conference 2025</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/"/>
		<updated>2025-11-20T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/</id>
		<content type="html">&lt;p&gt;The GStreamer Conference is an annual gathering that brings together developers,
contributors, and users of the GStreamer multimedia framework. It serves as a
platform for sharing knowledge, discussing the latest advancements, and
fostering collaboration within the open-source multimedia community.&lt;/p&gt;
&lt;p&gt;This year’s conference was held in London at the impressive &lt;a href=&quot;https://en.wikipedia.org/wiki/Barbican_Centre&quot;&gt;Barbican
Center&lt;/a&gt;, located within the
Barbican Estate, a residential complex rebuilt after World War II in the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Brutalist_architecture&quot;&gt;brutalist architectural
style&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/barbican.jpg&quot; alt=&quot;Barbican Estate&quot;&gt;&lt;figcaption&gt;Barbican Estate in the London City&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;It was a pleasure to meet in person with the colleagues, from different
companies and backgrounds, I usually collaborate with remotely, sharing and
discussing their projects and results.&lt;/p&gt;
&lt;p&gt;Recently, &lt;a href=&quot;https://www.ubicast.eu/&quot;&gt;UbiCast&lt;/a&gt;, which generously records and
streams the conference, has uploaded all talks of this year conference to &lt;a href=&quot;https://gstconf.ubicast.tv/channels/gstreamer-conference-2025&quot;&gt;their
site, exclusively for the GStreamer
Conference&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this blog post, I’ll share the talks delivered by my fellow igalians:&lt;/p&gt;
&lt;h2 id=&quot;animate-your-subtimelines-in-ges&quot; tabindex=&quot;-1&quot;&gt;Animate Your Subtimelines in GES &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#animate-your-subtimelines-in-ges&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9elk8sukf/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9elk8sukf/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;gstva-and-gstreamer-vaapi-updates&quot; tabindex=&quot;-1&quot;&gt;GstVA and GStreamer-VAAPI updates &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#gstva-and-gstreamer-vaapi-updates&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9efn4ca1s/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9efn4ca1s/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;time-remapping-and-ges-implementation-details-and-latest-updates&quot; tabindex=&quot;-1&quot;&gt;Time Remapping and GES: Implementation Details and Latest Updates &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#time-remapping-and-ges-implementation-details-and-latest-updates&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f19ce2b1gxisi2/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f19ce2b1gxisi2/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;soothe-a-proposal-for-encoder-testing&quot; tabindex=&quot;-1&quot;&gt;soothe: a proposal for encoder testing &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#soothe-a-proposal-for-encoder-testing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9exjy1bm7/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9exjy1bm7/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;gstwebrtc-in-webkit-current-status-and-plans&quot; tabindex=&quot;-1&quot;&gt;GstWebRTC in WebKit, current status &amp;amp; plans &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#gstwebrtc-in-webkit-current-status-and-plans&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f1942324duzet3/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f1942324duzet3/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;vvc-h-266-in-gstreamer&quot; tabindex=&quot;-1&quot;&gt;VVC/H.266 in GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#vvc-h-266-in-gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0a93861csad46/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0a93861csad46/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;video-reshaping-with-skia&quot; tabindex=&quot;-1&quot;&gt;Video Reshaping with Skia &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#video-reshaping-with-skia&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9ezsgafgc/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9ezsgafgc/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&quot;vulkan-video-pipeline-update&quot; tabindex=&quot;-1&quot;&gt;Vulkan Video: pipeline update &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-conference-2025/#vulkan-video-pipeline-update&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;figure&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9e768jou7/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;&lt;a href=&quot;https://gstconf.ubicast.tv/permalink/v126b0f0b2b9e768jou7/&quot;&gt;Direct link&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Following the GStreamer Conference, we hosted our &lt;em&gt;Autumn hackfest&lt;/em&gt; at Amazon’s
offices in the City of London. This time I worked on GStreamer Vulkan.&lt;/p&gt;
&lt;p&gt;This year, two other conferences typically held in the US,
&lt;a href=&quot;https://foms-workshop.org/foms2025/&quot;&gt;FOMS&lt;/a&gt; and
&lt;a href=&quot;https://2025.demuxed.com/&quot;&gt;Demuxed&lt;/a&gt;, also took place in London. I attended
FOMS, where I discovered the vibrant &lt;a href=&quot;https://moq.dev/&quot;&gt;MOQ project&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, I’d like to thank &lt;a href=&quot;https://centricular.com/&quot;&gt;Centricular&lt;/a&gt; for
organizing the event, especially Tim-Philipp Müller, and even more particularly
&lt;a href=&quot;https://www.igalia.com/&quot;&gt;Igalia&lt;/a&gt; for sponsoring it and allowing me to
participate in this project that’s close to my heart.&lt;/p&gt;
&lt;p&gt;And that’s all, mates. Cheers!&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/guinness.jpg&quot; alt=&quot;Pint of Guinness&quot;&gt;&lt;figcaption&gt;Pint of Guinness&lt;/figcaption&gt;&lt;/figure&gt;
</content>
	</entry>
	
	<entry>
		<title>Summer updates</title>
		<link href="https://blogs.igalia.com/vjaquez/summer-updates/"/>
		<updated>2025-07-25T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/summer-updates/</id>
		<content type="html">&lt;p&gt;Somehow I internalized that my duty as software programmer was to silently work
in a piece of code as if it were a &lt;em&gt;magnum opus&lt;/em&gt;, until it’s finished, and then
release it to the world with no need of explanations, because it should speak
for itself. In other words, I tend to consider my work as a form of art, and
myself as an artist. But I’m not. There’s no &lt;em&gt;magnus opus&lt;/em&gt; and there will never
be one. I’m rather a craftsman, in the sense of Richard Sennett: somebody who
cares about their craft, making small, quick but thoughtful and clean changes,
here and there, hoping that they will be useful to someone, now and in the
future. And those little efforts need to be exposed openly, in spaces as this
one and social media, as if I were a bazaar merchant.&lt;/p&gt;
&lt;p&gt;This reflection invites me to add another task to my duties as software
programmer: a periodical exposition of the work done. And this is the first
intent to forge a (monthly) discipline in that direction, not in the sense of
bragging, or looking to overprice a product (in the sense of commodity
fetishism), but to build bridges with those that might find useful those pieces
of software.&lt;/p&gt;
&lt;p&gt;Let’s start.&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-yuv4mpeg2-encoder-and-decoder&quot; tabindex=&quot;-1&quot;&gt;GStreamer YUV4MPEG2 encoder and decoder &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/summer-updates/#gstreamer-yuv4mpeg2-encoder-and-decoder&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We have been working lately on video encoding, and we wanted an easy way to test
our work, using common samples such as those shared by the &lt;a href=&quot;https://media.xiph.org/video/derf/&quot;&gt;Derf’s
collection&lt;/a&gt;. They are in a file format known
as YUV4MPEG2, or more commonly known as &lt;code&gt;y4m&lt;/code&gt;, because of their file name
extension.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://manned.org/yuv4mpeg.5&quot;&gt;YUV4MPEG2&lt;/a&gt; is a simple file format designed to
hold uncompressed frames of YUV video, formatted as YCbCr 4:2:0, YCbCr 4:2:2 or
YCbCr 4:4:4 data for the purpose of encoding. Instead of using raw YUV streams,
where the frame size and color format have to be provided out-of-band, these
metadata are embedded in the file.&lt;/p&gt;
&lt;p&gt;There were already GStreamer elements for encoding and decoding &lt;code&gt;y4m&lt;/code&gt; streams,
but &lt;code&gt;y4mdec&lt;/code&gt; was in gst-plugins-bad while &lt;code&gt;y4menc&lt;/code&gt; in gst-plugins-good.&lt;/p&gt;
&lt;p&gt;Our first task was to fix and improve &lt;code&gt;y4menc&lt;/code&gt;
[&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8654&quot;&gt;!8654&lt;/a&gt;],
then move &lt;code&gt;y4mdec&lt;/code&gt; to gst-plugins-good
[&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8719&quot;&gt;!8719&lt;/a&gt;],
but that implied to rewrite the element and add unit tests, while add more
features such as handling more color formats.&lt;/p&gt;
&lt;h2 id=&quot;soothe-video-encoders-testing-framework&quot; tabindex=&quot;-1&quot;&gt;Soothe — video encoders testing framework &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/summer-updates/#soothe-video-encoders-testing-framework&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Heavily inspired by &lt;a href=&quot;https://github.com/fluendo/fluster&quot;&gt;Fluster&lt;/a&gt;, a testing
framework written in Python for decoder conformance, we are sketching
&lt;a href=&quot;https://github.com/Igalia/soothe&quot;&gt;Soothe&lt;/a&gt;, a script that aims to be a testing
framework for video encoders, using &lt;a href=&quot;https://github.com/Netflix/vmaf&quot;&gt;VMAF&lt;/a&gt;, a
perceptual video quality assessment algorithm.&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-vulkan-h-264-encoder&quot; tabindex=&quot;-1&quot;&gt;GStreamer Vulkan H.264 encoder &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/summer-updates/#gstreamer-vulkan-h-264-encoder&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is the reason of the efforts expressed above: &lt;code&gt;vulkanh264enc&lt;/code&gt;, a H.264
encoder using the Vulkan Video extension
[&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7197&quot;&gt;!7197&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;One interesting side of this task was to propose a base class for hardware
accelerated H.264 encoders, based on the &lt;code&gt;vah264enc&lt;/code&gt;, the GStreamer VA-API H.264
encoder. We talked about &lt;a href=&quot;https://youtu.be/-fQY54KHH38&quot;&gt;this base class in the GStreamer Conference
2024&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now the H.264 encoder merged and it will be part of the future release of
GStreamer 1.28.&lt;/p&gt;
&lt;h2 id=&quot;removal-of-gstreamer-vaapi-subproject&quot; tabindex=&quot;-1&quot;&gt;Removal of GStreamer-VAAPI subproject &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/summer-updates/#removal-of-gstreamer-vaapi-subproject&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We’re very grateful with
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/&quot;&gt;GStreamer-VAAPI&lt;/a&gt;.
When its maintenance were handed over to us, after a few months we got the
privilege to &lt;a href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-under-the-umbrella-of-gstreamer/&quot;&gt;merge it as an official GStreamer
subproject&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now GStreamer-VAAPI functionality has been replaced with the VA plugin in
gst-plugins-bad. Still, it isn’t a full featured replacement
[&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3947&quot;&gt;#3947&lt;/a&gt;], but
it’s complete and stable enough to be widely deployed. As Tim said in the
GStreamer Conference 2024: &lt;em&gt;it just works&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So, GStreamer-VAAPI subproject has been removed from main branch in git
repository
[&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9200&quot;&gt;!9200&lt;/a&gt;],
and its Gitlab project, archived.&lt;/p&gt;
&lt;h2 id=&quot;vulkan-video-status-page&quot; tabindex=&quot;-1&quot;&gt;Vulkan Video Status page &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/summer-updates/#vulkan-video-status-page&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We believe that Vulkan Video extension will be one of the main APIs for video
encoding, decoding and processing. Igalia participate in the Vulkan Video
Technical Sub Group (TSG) and helps with the Conformance Test Suite (CTS).&lt;/p&gt;
&lt;p&gt;Vulkan Video extension is big and constantly updated. In order to keep track of
it we maintain a web page with the latest news about the specification,
proprietary drivers, open source drivers and open source applications, along
with articles and talks about it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://vulkan-video-status.igalia.com&quot;&gt;https://vulkan-video-status.igalia.com&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-planet&quot; tabindex=&quot;-1&quot;&gt;GStreamer Planet &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/summer-updates/#gstreamer-planet&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Last but not least, &lt;a href=&quot;https://gstreamer.freedesktop.org/planet&quot;&gt;GStreamer
Planet&lt;/a&gt; has been updated and
overhauled.&lt;/p&gt;
&lt;p&gt;Given that the old Planet script, written in Python 2, is unmaintained, we
worked on a new one in Rust:
&lt;a href=&quot;https://gitlab.freedesktop.org/vjaquez/planet-rs/&quot;&gt;planet-rs&lt;/a&gt;. It internally
uses &lt;a href=&quot;https://keats.github.io/tera/docs/&quot;&gt;tera&lt;/a&gt; for templates,
&lt;a href=&quot;https://github.com/feed-rs/feed-rs&quot;&gt;feed-rs&lt;/a&gt; for feed parsing, and
&lt;a href=&quot;https://github.com/seanmonstar/reqwest&quot;&gt;reqwest&lt;/a&gt; for HTTP handling. The planet
is generated using Gitlab scheduled CI pipelines.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/planet&quot;&gt;https://gstreamer.freedesktop.org/planet&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer 1.26 and Igalia</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/"/>
		<updated>2025-05-29T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/</id>
		<content type="html">&lt;p&gt;The release of &lt;a href=&quot;https://gstreamer.freedesktop.org/releases/1.26/&quot;&gt;GStreamer
1.26&lt;/a&gt;, last March, delivered
new features, optimization and improvements.
&lt;a href=&quot;https://www.igalia.com/technology/multimedia&quot;&gt;Igalia&lt;/a&gt; played its role as long
standing contributor, with 382 commits (194 merge requests) from a total of 2666
of commits merged in this release.This blog post takes a closer look on those contributions.&lt;/p&gt;
&lt;h2 id=&quot;gst-devtools&quot; tabindex=&quot;-1&quot;&gt;gst-devtools &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-devtools&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This module contains development and validation tools.&lt;/p&gt;
&lt;h3 id=&quot;gst-dot-viewer&quot; tabindex=&quot;-1&quot;&gt;gst-dot-viewer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-dot-viewer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-devtools/dots-viewer&quot;&gt;gst-dot-viewer&lt;/a&gt;
is a &lt;em&gt;new&lt;/em&gt; web tool for real-time pipeline visualization. Our colleague,
Thibault, wrote a &lt;a href=&quot;https://blogs.gnome.org/tsaunier/2025/05/16/gst-dots-viewer-a-new-tool-for-gstreamer-pipeline-visualization/&quot;&gt;blog post about its
usage&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;validate&quot; tabindex=&quot;-1&quot;&gt;validate &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#validate&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-devtools/gst-validate.html?gi-language=c&quot;&gt;GstValidate&lt;/a&gt;
is a tool to check if elements are behaving as expected.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added support for HTTP Testing.&lt;/li&gt;
&lt;li&gt;Scenario fixes such as reset pipelines on expected errors to avoid
inconsistent states, improved error logging, and async action handling to
prevent busy loops.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gst-editing-services&quot; tabindex=&quot;-1&quot;&gt;gst-editing-services &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-editing-services&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-editing-services/index.html?gi-language=c&quot;&gt;GStreamer Editing
Services&lt;/a&gt;
is a library to simplify the creation of multimedia editing applications.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enabled reverse playback, by adding a &lt;code&gt;reverse&lt;/code&gt; property to &lt;code&gt;nlesource&lt;/code&gt; for
seamless backward clip playback.&lt;/li&gt;
&lt;li&gt;Added internal tests for Non-Linear Engine elements.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gst-libav&quot; tabindex=&quot;-1&quot;&gt;gst-libav &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-libav&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/libav/index.html?gi-language=c&quot;&gt;GStreamer Libav
plug-in&lt;/a&gt;
contains a set of many popular decoders and encoders using FFmpeg.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As part of the effort to &lt;a href=&quot;https://blogs.igalia.com/cadubentzen/vvc-h-266-in-gstreamer-1-26/&quot;&gt;support VVC/H.266 in
GStreamer&lt;/a&gt;
FFmpeg VVC/H.266 decoder was exposed.&lt;/li&gt;
&lt;li&gt;Optimized framerate renegotiation in &lt;code&gt;avviddec&lt;/code&gt; without decoder resets.&lt;/li&gt;
&lt;li&gt;Mapped GST_VIDEO_FORMAT_GRAY10_LE16 format to FFmpeg’s equivalent.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gstreamer&quot; tabindex=&quot;-1&quot;&gt;gstreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html?gi-language=c&quot;&gt;Core library&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added a tracer for &lt;code&gt;gst-dots-viewer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Log tracers improvements such as, replaced integer codes with readable
strings, to track pad’s sticky events, and simplify parameters handling, etc.&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;pads&lt;/code&gt;, don’t push sticky events in response to a FLUSH_STOP event.&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;queue&lt;/code&gt; element, fixed missing &lt;code&gt;notify&lt;/code&gt; signals for level changes.&lt;/li&gt;
&lt;li&gt;Pipeline parser now logs bus error messages during pipeline construction.&lt;/li&gt;
&lt;li&gt;Fixed &lt;code&gt;gst_util_ceil_log2&lt;/code&gt; utility function.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gst-plugins-base&quot; tabindex=&quot;-1&quot;&gt;gst-plugins-base &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-plugins-base&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GStreamer Base Plugins is a well-groomed and well-maintained collection of
plugins. It also contains helper libraries and base classes useful for writing
elements.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;audiorate&lt;/strong&gt;: respect tolerance property to avoid unnecessary sample
adjustments for minor gaps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;audioconvert&lt;/strong&gt;: support reordering of unpositioned input channels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;videoconvertscale&lt;/strong&gt;: improve aspect ratio handling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;glcolorconvert&lt;/strong&gt;: added I422_10XX, I422_12XX, Y444_10XX, and Y444_16XX
color formats, and fixed caps negotiation for DMABuf.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;glvideomixer&lt;/strong&gt;: handle mouse events.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;pbutils&lt;/strong&gt;: added VVC/H.266 codec support&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;encodebasebin&lt;/strong&gt;: parser fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;oggdemux&lt;/strong&gt;: fixed seek to the end of files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rtp&lt;/strong&gt;: fixed precision for UNIX timestamp.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;sdp&lt;/strong&gt;: enhanced debugging messages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;parsebin&lt;/strong&gt;: improved caps negotiation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;decodebin3&lt;/strong&gt;: added missing locks to prevent race conditions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;streamsynchronizer&lt;/strong&gt;: improved documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gst-plugins-good&quot; tabindex=&quot;-1&quot;&gt;gst-plugins-good &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-plugins-good&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GStreamer Good Plugins is a set of plugins considered to have good quality code,
correct functionality, and uses LGPL/LGPL+compatible licenses.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;hlsdemux2&lt;/strong&gt;: handle empty segments at the beginning of a stream.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;qtmux&lt;/strong&gt; and &lt;strong&gt;matroska&lt;/strong&gt;: add support for VVC/H.266.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;matroskademux&lt;/strong&gt;:support seek with stop in push mode.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;rtp&lt;/strong&gt;: several fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;osxaudio&lt;/strong&gt;: fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;videoflip&lt;/strong&gt;: support Y444_16LE and Y444_16BE color formats.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;vpx&lt;/strong&gt;: enhance error and warning messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gst-plugins-bad&quot; tabindex=&quot;-1&quot;&gt;gst-plugins-bad &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-1-26-and-igalia/#gst-plugins-bad&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GStreamer Bad Plug+ins is a set of plugins that aren’t up to par compared to the
rest. They might be close to being good quality, but they’re missing something,
be it a good code review, some documentation, a set of tests, etc.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;dashsink&lt;/strong&gt;: a lot of improvements and cleanups, such as unit tests, state
and event management.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;h266parse&lt;/strong&gt;: enabled &lt;code&gt;vvc1&lt;/code&gt; and &lt;code&gt;vvi1&lt;/code&gt; stream formats, improved code data
parsing and negotiatios, along with cleanups and fixes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mpegtsmux&lt;/strong&gt; and &lt;strong&gt;tsdemux&lt;/strong&gt;: added support for VVC/H.266 codec.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;vulkan&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Added compatibility for timeline semaphores and barriers.&lt;/li&gt;
&lt;li&gt;Initial support of multiple GPU and dynamic element registering.&lt;/li&gt;
&lt;li&gt;Vulkan image buffer pool improvements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;vulkanh264dec&lt;/strong&gt;: support interlaced streams.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;vulkanencoding&lt;/strong&gt;: rate control and quality level adjustments, update
SPS/PPS, support layered DPBs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;webrtcbin&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;Resolved duplicate payload types in SDP offers with RTX and multiple codecs.&lt;/li&gt;
&lt;li&gt;Transceivers are now created earlier during negotiation to avoid linkage
issues.&lt;/li&gt;
&lt;li&gt;Allow session level in &lt;code&gt;setup&lt;/code&gt; attribute in SDP answer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;wpevideosrc&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;code cleanups&lt;/li&gt;
&lt;li&gt;cached SHM buffers are cleared after caps renegotiation.&lt;/li&gt;
&lt;li&gt;handle latency queries and post progress messages on bus.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;srtdec&lt;/strong&gt;: fixes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;jpegparse&lt;/strong&gt;: handle &lt;code&gt;avi1&lt;/code&gt; tag for progressive images&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;va&lt;/strong&gt;: improve encoders configuration when properties change in run+time,
specially rate control.&lt;/li&gt;
&lt;/ul&gt;
</content>
	</entry>
	
	<entry>
		<title>Using pre-commit in GStreamer</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-pre-commit/"/>
		<updated>2025-03-12T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-pre-commit/</id>
		<content type="html">&lt;p&gt;Recently, GStreamer development story integrated the &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5192&quot;&gt;usage of
pre-commit&lt;/a&gt;.
&lt;a href=&quot;https://pre-commit.com/&quot;&gt;pre-commit&lt;/a&gt; is a Git hook script that chain different
linters, checkers, validators, formatters, etc., that are executed at &lt;code&gt;git commit&lt;/code&gt;. This script is in Python. And there’s other GStreamer utility in
Python: &lt;a href=&quot;https://hotdoc.github.io/&quot;&gt;hotdoc&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The challenge is that Debian doesn’t allow to install Python packages through
&lt;code&gt;pip&lt;/code&gt;, they have to be installed as Debian packages or inside virtual
environments, such as &lt;a href=&quot;https://docs.python.org/3/library/venv.html&quot;&gt;venv&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, instead of activating a virtual environment when I work in GStreamer, let’s
just use &lt;a href=&quot;https://direnv.net/&quot;&gt;direnv&lt;/a&gt; to activate it automatically.&lt;/p&gt;
&lt;p&gt;Here’s a screencast of what I did to setup a Python virtual environment, within
&lt;code&gt;direnv&lt;/code&gt;, and installing &lt;code&gt;pre-commit&lt;/code&gt;, &lt;code&gt;hotdoc&lt;/code&gt; and &lt;code&gt;gst-indent-1.0&lt;/code&gt;.&lt;/p&gt;
&lt;!-- markdownlint-disable no-inline-html --&gt;
&lt;div id=&quot;screencast&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://blogs.igalia.com/vjaquez/scripts/asciinema-player.min.js&quot; data-theme=&quot;solarized-dark&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  var link = document.createElement(&#39;link&#39;);
  link.type = &#39;text/css&#39;;
  link.rel = &#39;stylesheet&#39;;
  link.href = &#39;/vjaquez/css/asciinema-player.css&#39;;
  document.head.appendChild(link);

  AsciinemaPlayer.create(&#39;/vjaquez/casts/gstreamer-devenv.cast&#39;,
    document.getElementById(&#39;screencast&#39;), {
      idleTimeLimit: 0.5,
    });
&lt;/script&gt;
&lt;!-- markdownlint-enable no-inline-html --&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Tim told me that wit &lt;a href=&quot;https://pipx.pypa.io/stable/&quot;&gt;pipx&lt;/a&gt; we can do
the same without the &lt;code&gt;venv&lt;/code&gt; hassle.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://mastodon.social/@tp_muller@fosstodon.org/114150178786863565&quot;&gt;https://mastodon.social/@tp_muller@fosstodon.org/114150178786863565&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Igalia Multimedia achievements (2024)</title>
		<link href="https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/"/>
		<updated>2024-12-18T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/</id>
		<content type="html">&lt;p&gt;As 2024 draws to a close, it’s a perfect time to reflect on the year’s
accomplishments done by the Multimedia team in Igalia. In our consideration,
there were three major achievements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;WebRTC’s support in WPE/WebKitGTK with GStreamer.&lt;/li&gt;
&lt;li&gt;GES maturity improved for real-life use-cases.&lt;/li&gt;
&lt;li&gt;Vulkan Video development and support in GStreamer.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;webrtc-support-in-wpe-webkitgtk-with-gstreamer&quot; tabindex=&quot;-1&quot;&gt;WebRTC support in WPE/WebKitGTK with GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/#webrtc-support-in-wpe-webkitgtk-with-gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPE&lt;/a&gt; and &lt;a href=&quot;https://webkitgtk.org/&quot;&gt;WebKitGTK&lt;/a&gt; are
&lt;a href=&quot;https://webkit.org/&quot;&gt;WebKit&lt;/a&gt; ports maintained by Igalia, the former for
embedded devices and the latter for applications with a full-featured Web
integration.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.w3.org/TR/webrtc/&quot;&gt;WebRTC&lt;/a&gt; is a web API that allows real-time
communication (RTC) directly between web browser and applications. Examples of
these real-time communications are video conferencing, cloud gaming,
live-streaming, etc.&lt;/p&gt;
&lt;p&gt;Some WebKit ports support
&lt;a href=&quot;https://webrtc.googlesource.com/src/+/refs/heads/main&quot;&gt;libwebrtc&lt;/a&gt;, an
open-source library that implements the WebRTC specification, developed and
maintained by Google. WPE and WebKitGTK originally also supports libwebrtc, but
we started to use also
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/webrtc&quot;&gt;GstWebRTC&lt;/a&gt;, a set of
&lt;a href=&quot;https://gstreamer.freedesktop.org&quot;&gt;GStreamer&lt;/a&gt; plugins and libraries that
implement WebRTC, which adapts perfectly to the multimedia implementation in
both ports, also in GStreamer.&lt;/p&gt;
&lt;p&gt;This year the fruits of this work have been unlocked by enabling &lt;a href=&quot;https://luna.amazon.com/&quot;&gt;Amazon
Luna&lt;/a&gt; gaming:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=lyO7Hqj1jMs&quot;&gt;https://www.youtube.com/watch?v=lyO7Hqj1jMs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And also enabling a CAD modeling, server-side rendered service, known as
&lt;a href=&quot;https://zoo.dev/&quot;&gt;Zoo&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=CiuYjSCDsUM&quot;&gt;https://www.youtube.com/watch?v=CiuYjSCDsUM&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;webkit-multimedia&quot; tabindex=&quot;-1&quot;&gt;WebKit Multimedia &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/#webkit-multimedia&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;WebKit made significant improvements in multimedia handling, addressing various
issues to enhance stability and playback quality. Key updates include preventing
premature &lt;code&gt;play()&lt;/code&gt; calls during seeking, fixing memory leaks. The management of
track identifiers was also streamlined by transitioning from string-based to
integer-based IDs. Additionally, GStreamer-related race conditions were resolved
to prevent hangs during playback state transitions. Memory leaks in WebAudio and
event listener management were addressed, along with a focus on memory usage
optimizations.&lt;/p&gt;
&lt;p&gt;The handling of media buffering and seeking was enhanced with buffering
hysteresis for smoother playback. &lt;a href=&quot;https://www.w3.org/TR/media-source-2/&quot;&gt;Media Source
Extensions&lt;/a&gt; (MSE) behavior was refined to
improve playback accuracy, such as supporting &lt;code&gt;markEndOfStream()&lt;/code&gt; before
&lt;code&gt;appendBuffer()&lt;/code&gt; and simplifying playback checks. Platform-specific issues were
also tackled, including AV1 and Opus support for encrypted media and better
detection of audio sinks. And other improvements on multimedia performance and
efficiency.&lt;/p&gt;
&lt;h2 id=&quot;ges-maturity-improved-for-real-live-use-cases&quot; tabindex=&quot;-1&quot;&gt;GES maturity improved for real-live use-cases &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/#ges-maturity-improved-for-real-live-use-cases&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-editing-services/index.html?gi-language=c&quot;&gt;GStreamer Editing
Services&lt;/a&gt;
(GES) is a set of GStreamer plugins and a library that allow &lt;a href=&quot;https://en.wikipedia.org/wiki/Non-linear_editing&quot;&gt;non-linear video
editing&lt;/a&gt;. For example, GES is
what’s behind of &lt;a href=&quot;https://www.pitivi.org/&quot;&gt;Pitivi&lt;/a&gt;, the open source video editor
application.&lt;/p&gt;
&lt;p&gt;Last year, GES was deployed in web-based video editors, where the actual video
processing is done server-side. These projects allowed, in great deal, the
enhancement and maturity of the library and plugins.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.tella.tv/&quot;&gt;Tella&lt;/a&gt; is a browser-based tool that allow to screen
record and webcam, without any extra software. Finished the recording, the user
can edit, in the browser, the video and publish it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=uSWqWHBRDWE&quot;&gt;https://www.youtube.com/watch?v=uSWqWHBRDWE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://sequence.film/&quot;&gt;Sequence&lt;/a&gt; is a complete, browser-based, video editor
with collaborative features. GES is used in the backend to render the editing
operations.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=bXNdDIiG9lE&quot;&gt;https://www.youtube.com/watch?v=bXNdDIiG9lE&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;vulkan-video-development-and-gstreamer-support&quot; tabindex=&quot;-1&quot;&gt;Vulkan Video development and GStreamer support &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/#vulkan-video-development-and-gstreamer-support&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The last but not the least, this year we continue our work with the &lt;a href=&quot;https://blogs.igalia.com/vjaquez/vulkan-video-status/&quot;&gt;Vulkan
Video ecosystem&lt;/a&gt; by
working the task subgroup (TSG) enabling H.264/H.265 encoding, and AV1 decoding
and encoding.&lt;/p&gt;
&lt;p&gt;Early this year we delivered a talk in the Vulkanised about our work, which
ranges from the Conformance Test Suite (CTS), &lt;a href=&quot;https://www.mesa3d.org/&quot;&gt;Mesa&lt;/a&gt;,
and GStreamer.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=z1HcWrmdwzI&quot;&gt;https://www.youtube.com/watch?v=z1HcWrmdwzI&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot; tabindex=&quot;-1&quot;&gt;Conclusion &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/igalia-multimedia-achievements-2024/#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As we wrap up 2024, it’s clear that the year has been one of significant
progress, driven by innovation and collaboration. Here’s to continuing the
momentum and making 2025 even better!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Conference 2024</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-conference-2024/"/>
		<updated>2024-10-23T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-conference-2024/</id>
		<content type="html">&lt;p&gt;Early this month I spent a couple weeks in Montreal, visiting the city, but
mostly to attend the GStreamer Conference and the following hackfest, which
happened to be co-located with the XDC Conference. It was my first time in
Canada and I utterly enjoyed it. Thanks to all those from the GStreamer
community that organized and attended the event.&lt;/p&gt;
&lt;p&gt;For now you can replay the whole streams of both days of conference, but soon
the split videos for each talk will be published:&lt;/p&gt;
&lt;p&gt;GStreamer Conference 2024 - Day 1, Room 1 - October 7, 2024&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=KLUL1D53VQI&quot;&gt;https://www.youtube.com/watch?v=KLUL1D53VQI&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;GStreamer Conference 2024 - Day 1, Room 2 - October 7, 2024&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=DH64D_6gc80&quot;&gt;https://www.youtube.com/watch?v=DH64D_6gc80&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;GStreamer Conference 2024 - Day 2, Room 2 - October 8, 2024&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=jt6KyV757Dk&quot;&gt;https://www.youtube.com/watch?v=jt6KyV757Dk&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;GStreamer Conference 2024 - Day 2, Room 1 - October 8, 2024&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=W4Pjtg0DfIo&quot;&gt;https://www.youtube.com/watch?v=W4Pjtg0DfIo&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;And a couple pictures of igalians :)&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/IMG_8842.jpg&quot; alt=&quot;GStreamer Skia plugin&quot;&gt;&lt;figcaption&gt;GStreamer Skia plugin&lt;/figcaption&gt;&lt;/figure&gt;
&lt;hr&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/IMG_8845.jpg&quot; alt=&quot;GStreamer VA&quot;&gt;&lt;figcaption&gt;GStreamer VA&lt;/figcaption&gt;&lt;/figure&gt;
&lt;hr&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/PXL_20241008_153742811.jpg&quot; alt=&quot;GstWebRTC&quot;&gt;&lt;figcaption&gt;GstWebRTC&lt;/figcaption&gt;&lt;/figure&gt;
&lt;hr&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/PXL_20241008_193137020.MP.jpg&quot; alt=&quot;GstVulkan&quot;&gt;&lt;figcaption&gt;GstVulkan&lt;/figcaption&gt;&lt;/figure&gt;
&lt;hr&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/PXL_20241008_203046450.jpg&quot; alt=&quot;GStreamer Editing Services&quot;&gt;&lt;figcaption&gt;gstreamer editing services&lt;/figcaption&gt;&lt;/figure&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Vulkan Operation API</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-vulkan-operation-api/"/>
		<updated>2024-06-06T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-vulkan-operation-api/</id>
		<content type="html">&lt;p&gt;Two weeks ago the GStreamer Spring Hackfest took place in Thessaloniki,
Greece. I had a great time. I hacked a bit on VA, Vulkan and my toy,
&lt;a href=&quot;https://gitlab.freedesktop.org/vjaquez/planet-rs&quot;&gt;planet-rs&lt;/a&gt;, but mostly I ate
delicious Greek food ☻. A big thanks to our hosts: Vivia, Jordan and Sebastian!&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/gstreamer-hackfest-thessaloniki-2024.jpg&quot; alt=&quot;GStreamer Spring Hackfest
2024&quot;&gt;&lt;figcaption&gt;First day of the
GStreamer Spring Hackfest 2024 -
&lt;a href=&quot;https://floss.social/@gstreamer/112511912596084571&quot;&gt;https://floss.social/@gstreamer/112511912596084571&lt;/a&gt;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And now, writing this supposed small note, I recalled that I have in my to-do
list an item to write a comment about
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkoperation.html&quot;&gt;GstVulkanOperation&lt;/a&gt;,
an addition to &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/&quot;&gt;GstVulkan
API&lt;/a&gt; which helps
with the synchronization of operations on frames, in order to enable &lt;a href=&quot;https://blogs.igalia.com/vjaquez/vulkan-video-status/&quot;&gt;Vulkan
Video&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Originally, GstVulkan API didn’t provide almost any synchronization operation,
beside
&lt;a href=&quot;https://docs.vulkan.org/spec/latest/chapters/synchronization.html&quot;&gt;fences&lt;/a&gt;, and
that appeared to be enough for elements, since they do &lt;em&gt;simple&lt;/em&gt; Vulkan
operations. Nonetheless, as soon as we enabled
&lt;code&gt;VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT&lt;/code&gt; feature, which
&lt;em&gt;reports resource access conflicts due to missing or incorrect synchronization
operations between action&lt;/em&gt;
[&lt;a href=&quot;https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeatureEnableEXT.html&quot;&gt;*&lt;/a&gt;],
a sea of &lt;em&gt;hazard operation&lt;/em&gt; warnings drowned us
[&lt;a href=&quot;https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/main/docs/synchronization.md&quot;&gt;*&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hazard operations&lt;/em&gt; are a sequence of read/write commands in a memory area, such
as an image, that might be re-ordered, or racy even.&lt;/p&gt;
&lt;p&gt;Why are those &lt;em&gt;hazard operations&lt;/em&gt; reported by the Vulkan Validation Layer, if
the programmer pushes the commands to execute in queue in order? Why is explicit
synchronization required? Because, as the great blog post from Hans-Kristian
Arntzen, &lt;a href=&quot;http://themaister.net/blog/2019/08/14/yet-another-blog-explaining-vulkan-synchronization/&quot;&gt;Yet another blog explaining Vulkan
synchronization&lt;/a&gt;,
(make sure you read it!) states:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[…] all commands in a queue execute out of order. Reordering may happen across
command buffers and even vkQueueSubmits&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In order to explain how synchronization is done in Vulkan, allow me to yank a
couple definitions stated by the specification:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Commands&lt;/strong&gt; are instructions that are recorded in a device’s queue. There are
four types of commands: action, state, synchronization and indirection.
&lt;strong&gt;Synchronization commands&lt;/strong&gt; impose ordering constraints on action commands, by
introducing explicit execution and memory dependencies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Operation&lt;/strong&gt; is an arbitrary amount of commands recorded in a device’s queue.&lt;/p&gt;
&lt;p&gt;Since the driver can reorder commands (perhaps for better performance, dunno),
we need to send explicit synchronization commands to the device’s queue to
enforce a specific sequence of action commands.&lt;/p&gt;
&lt;p&gt;Nevertheless, Vulkan doesn’t offer fine-grained dependencies between individual
operations. Instead, dependencies are expressed as a relation of two elements,
where each element is composed by the intersection of &lt;em&gt;scope&lt;/em&gt; and &lt;em&gt;operation&lt;/em&gt;. A
&lt;em&gt;scope&lt;/em&gt; is a concept in the specification that, in practical terms, can be
either &lt;em&gt;pipeline stage&lt;/em&gt; (for execution dependencies), or both &lt;em&gt;pipeline stage&lt;/em&gt;
and &lt;em&gt;memory access type&lt;/em&gt; (for memory dependencies).&lt;/p&gt;
&lt;p&gt;First let’s review execution dependencies through &lt;em&gt;pipeline stages&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;Every command submitted to a device’s queue goes through a sequence of steps
known as &lt;strong&gt;pipeline stages&lt;/strong&gt;. This &lt;a href=&quot;https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPipelineStageFlagBits.html&quot;&gt;sequence of
steps&lt;/a&gt;
is one of the very few implicit ordering guarantees that Vulkan has. Draw calls,
copy commands, compute dispatches, all go through certain sequential stages,
which amount of stages to cover depends on the specific command and the current
command buffer state.&lt;/p&gt;
&lt;p&gt;In order to visualize an abstract execution dependency let’s imagine two compute
operations and the first must happen before the second.&lt;/p&gt;
&lt;pre class=&quot;language-text&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;Operation 1&lt;br&gt;Sync command&lt;br&gt;Operation 2&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;The programmer has to specify the &lt;code&gt;Sync command&lt;/code&gt; in terms of two scopes
(&lt;code&gt;Scope 1&lt;/code&gt; and &lt;code&gt;Scope 2&lt;/code&gt;), in this execution dependency case, two pipeline
stages.&lt;/li&gt;
&lt;li&gt;The driver generates an intersection between commands in &lt;code&gt;Operation 1&lt;/code&gt; and
&lt;code&gt;Scope 1&lt;/code&gt; defined as &lt;code&gt;Scoped operation 1&lt;/code&gt;. The intersection contains all the
commands in &lt;code&gt;Operation 1&lt;/code&gt; that go through up to the pipeline stage defined in
&lt;code&gt;Scope 1&lt;/code&gt;. The same is done with &lt;code&gt;Operation 2&lt;/code&gt; and &lt;code&gt;Scope 2&lt;/code&gt; generating
&lt;code&gt;Scoped operation 2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finally, we got an &lt;em&gt;execution dependency&lt;/em&gt; that guarantees that &lt;code&gt;Scoped operation 1&lt;/code&gt; happens before &lt;code&gt;Scoped operation 2&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now let’s talk about memory dependencies:&lt;/p&gt;
&lt;p&gt;First we need to understand the concepts of memory &lt;em&gt;availability&lt;/em&gt; and
&lt;em&gt;visibility&lt;/em&gt;. Their &lt;a href=&quot;https://docs.vulkan.org/spec/latest/appendices/memorymodel.html#memory-model-availability-visibility&quot;&gt;formal
definition&lt;/a&gt;
in Vulkan are a bit hard to grasp since they come from the Vulkan memory model,
which is intended to abstract all the ways of how hardware access memory.
Perhaps we could say that &lt;em&gt;availability&lt;/em&gt; is the operation that assures the
existence of the required memory; while &lt;em&gt;visibility&lt;/em&gt; is the operation that
assures it’s possible to read/write the data in that memory area.&lt;/p&gt;
&lt;p&gt;Memory dependencies are limited the &lt;code&gt;Operation 1&lt;/code&gt; that be done before memory
&lt;em&gt;availability&lt;/em&gt; and &lt;code&gt;Operation 2&lt;/code&gt; that have to be done after its &lt;em&gt;visibility&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But again, there’s no fine-grained way to declare that memory dependency.
Instead, there are &lt;a href=&quot;https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkAccessFlagBits.html&quot;&gt;memory access
types&lt;/a&gt;,
which are functions used by descriptor types, or functions for pipeline stage to
access memory, and they are used as &lt;em&gt;access scopes&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;All in all, if a synchronization command defining a memory dependency between
two operations, it’s composed by the intersection of between each command and a
&lt;em&gt;pipeline stage&lt;/em&gt;, intersected with the &lt;em&gt;memory access type&lt;/em&gt; associated with the
memory processed by those commands.&lt;/p&gt;
&lt;p&gt;Now that the concepts are more or less explained we could see those concepts
expressed in code. The synchronization command for execution and memory
dependencies is defined by
&lt;a href=&quot;https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDependencyInfoKHR.html&quot;&gt;VkDependencyInfoKHR&lt;/a&gt;.
And it contains a set of barrier arrays, for memory, buffers and
images. Barriers express the relation of dependency between two operations. For
example, Image barriers use
&lt;a href=&quot;https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageMemoryBarrier2.html&quot;&gt;VkImageMemoryBarrier2&lt;/a&gt;
which contain the mask for source pipeline stage (to define &lt;code&gt;Scoped operation 1&lt;/code&gt;), and the mask for the destination pipeline stage (to define &lt;code&gt;Scoped operation 2&lt;/code&gt;); the mask for source memory access type and the mask for the
destination memory access to define &lt;em&gt;access scopes&lt;/em&gt;; and also layout
transformation declaration.&lt;/p&gt;
&lt;p&gt;A Vulkan synchronization example from &lt;a href=&quot;https://github.com/KhronosGroup/Vulkan-Docs/wiki/Synchronization-Examples#first-draw-samples-a-texture-in-the-fragment-shader-second-draw-writes-to-that-texture-as-a-color-attachment&quot;&gt;Vulkan Documentation
wiki&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-c&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdDraw&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// First render pass teardown etc.&lt;/span&gt;&lt;br&gt;&lt;br&gt;VkImageMemoryBarrier2KHR imageMemoryBarrier &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;srcStageMask &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;dstStageMask &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;dstAccessMask &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;oldLayout &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;newLayout &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL&lt;br&gt;  &lt;span class=&quot;token comment&quot;&gt;/* .image and .subresourceRange should identify image subresource accessed */&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;VkDependencyInfoKHR dependencyInfo &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;                      &lt;span class=&quot;token comment&quot;&gt;// imageMemoryBarrierCount&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt;imageMemoryBarrier&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;    &lt;span class=&quot;token comment&quot;&gt;// pImageMemoryBarriers&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdPipelineBarrier2KHR&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;commandBuffer&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt;dependencyInfo&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// Second render pass setup etc.&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdDraw&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;First draw samples a texture in the fragment shader. Second draw writes to
that texture as a color attachment.&lt;/p&gt;
&lt;p&gt;This is a Write-After-Read (WAR) hazard, which you would usually only need an
execution dependency for - meaning you wouldn’t need to supply any memory
barriers. In this case you still need a memory barrier to do a layout
transition though, but you don’t need any access types in the src access mask.
The layout transition itself is considered a write operation though, so you do
need the destination access mask to be correct - or there would be a
Write-After-Write (WAW) hazard between the layout transition and the color
attachment write.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Other explicit synchronization mechanisms, along with barriers, are &lt;em&gt;semaphores&lt;/em&gt;
and &lt;em&gt;fences&lt;/em&gt;. &lt;em&gt;Semaphores&lt;/em&gt; are a synchronization primitive that can be used to
insert a dependency between operations without notifying the host; while
&lt;em&gt;fences&lt;/em&gt; are a synchronization primitive that can be used to insert a dependency
from a queue to the host. &lt;em&gt;Semaphores&lt;/em&gt; and &lt;em&gt;fences&lt;/em&gt; are expressed in the
&lt;code&gt;VkSubmitInfo2KHR&lt;/code&gt; structure.&lt;/p&gt;
&lt;p&gt;As a preliminary conclusion, synchronization in Vulkan is hard and a helper API
would be very helpful. Inspired by &lt;a href=&quot;https://ffmpeg.org/&quot;&gt;FFmpeg&lt;/a&gt; work done by
&lt;a href=&quot;https://lynne.ee/&quot;&gt;Lynne&lt;/a&gt;, I added &lt;code&gt;GstVulkanOperation&lt;/code&gt; object helper to
GStreamer Vulkan API.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;GstVulkanOperation&lt;/code&gt; object helper aims to represent an operation in the sense
of the Vulkan specification mentioned before. It owns a command buffer as public
member where external commands can be pushed to the associated device’s queue.&lt;/p&gt;
&lt;p&gt;It has a set of methods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkoperation.html?gi-language=c#gst_vulkan_operation_begin&quot;&gt;gst_vulkan_operation_begin&lt;/a&gt;
wraps &lt;code&gt;vkBeginCommandBuffer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkoperation.html?gi-language=c#gst_vulkan_operation_end&quot;&gt;gst_vulkan_operation_end&lt;/a&gt;
wraps both &lt;code&gt;vkEndCommandBuffer&lt;/code&gt; and either &lt;code&gt;vkQueueSubmit&lt;/code&gt; or
&lt;code&gt;vkQueueSubmit2&lt;/code&gt; (the object internally handle both depending on the driver
support).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkoperation.html?gi-language=c#gst_vulkan_operation_wait&quot;&gt;gst_vulkan_operation_wait&lt;/a&gt;
wraps &lt;code&gt;vkWaitForFences&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Internally, &lt;code&gt;GstVulkanOperation&lt;/code&gt; contains two arrays:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The array of dependency frames, which are the set of frames, each
representing an operation, which will hold dependency relationships with
other dependency frames.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkoperation.html?gi-language=c#gst_vulkan_operation_add_dependency_frame&quot;&gt;gst_vulkan_operation_add_dependency_frame&lt;/a&gt;
appends frames to this array.&lt;/p&gt;
&lt;p&gt;When calling &lt;code&gt;gst_vulkan_operation_end&lt;/code&gt; the frame’s barrier state for each
frame in the array is updated.&lt;/p&gt;
&lt;p&gt;Also, each dependency frame creates a &lt;a href=&quot;https://docs.vulkan.org/samples/latest/samples/extensions/timeline_semaphore/README.html&quot;&gt;timeline
semaphore&lt;/a&gt;,
which will be signaled when a command, associated with the frame, is executed
in the device’s queue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The array of barriers, which contains a list of synchronization commands.
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkoperation.html?gi-language=c#gst_vulkan_operation_add_frame_barrier&quot;&gt;gst_vulkan_operation_add_frame_barrier&lt;/a&gt;
fills and appends a &lt;code&gt;VkImageMemoryBarrier2KHR&lt;/code&gt; associated with a frame, which
can be in the array of dependency frames.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here’s a generic view of video decoding example:&lt;/p&gt;
&lt;pre class=&quot;language-c&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;&lt;span class=&quot;token function&quot;&gt;gst_vulkan_operation_begin&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;priv&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;exec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;cmd_buf &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; priv&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;exec&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;cmd_buf&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;cmd&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;gst_vulkan_operation_add_dependency_frame&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;exec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; out&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token comment&quot;&gt;/* assume a engine where out frames can be used for DPB frames, */&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token comment&quot;&gt;/* so a barrier for layout transition is required */&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;gst_vulkan_operation_add_frame_barrier&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;exec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; out&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt; dpb_size&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;token operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token function&quot;&gt;gst_vulkan_operation_add_dependency_frame&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;exec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; dpb_frame&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;      VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;      VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br&gt;&lt;br&gt;barriers &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;gst_vulkan_operation_retrieve_image_barriers&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;exec&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdPipelineBarrier2&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;cmd_buf&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;VkDependencyInfo&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;pImageMemoryBarriers &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; barriers&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;data&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;imageMemoryBarrierCount &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; barriers&lt;span class=&quot;token operator&quot;&gt;-&gt;&lt;/span&gt;len&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;g_array_unref&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;barriers&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdBeginVideoCodingKHR&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;cmd_buf&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt;decode_start&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdDecodeVideoKHR&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;cmd_buf&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt;decode_info&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;vkCmdEndVideoCodingKHR&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;cmd_buf&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;&amp;amp;&lt;/span&gt;decode_end&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token function&quot;&gt;gst_vulkan_operation_end&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;exec&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here, just one memory barrier is required for &lt;a href=&quot;https://docs.vulkan.org/samples/latest/samples/performance/layout_transitions/README.html&quot;&gt;memory layout
transition&lt;/a&gt;,
but semaphores are required to signal when an output frame and its DPB frames
are processed, and later, the output frame can be used as a DPB frame.
Otherwise, the output frame might not be fully reconstructed with it’s used as
DPB for the next output frame, generating only noise.&lt;/p&gt;
&lt;p&gt;And that’s all. Thank you.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Hackfest 2024</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2024/"/>
		<updated>2024-05-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2024/</id>
		<content type="html">&lt;p&gt;Last weeks were a bit hectic. First, with a couple friends we biked the
southwest of the Netherlands for almost a week. The next week, the last one, I
attended the &lt;a href=&quot;https://events.pages.igalia.com/linuxdisplaynexthackfest/&quot;&gt;2024 Display Next
Hackfest&lt;/a&gt;&lt;/p&gt;
&lt;!-- markdownlint-disable no-bare-urls --&gt;
&lt;p&gt;&lt;a href=&quot;https://mastodon.social/@igalia@floss.social/112438486139416587&quot;&gt;https://mastodon.social/@igalia@floss.social/112438486139416587&lt;/a&gt;&lt;/p&gt;
&lt;!-- markdownlint-enable no-bare-urls --&gt;
&lt;p&gt;This week was Igalia’s Assembly meetings, and next week, along with other
colleagues, I’ll be in
&lt;a href=&quot;https://en.wikipedia.org/wiki/Thessaloniki&quot;&gt;Thessaloniki&lt;/a&gt; for the &lt;a href=&quot;https://discourse.gstreamer.org/t/gstreamer-spring-2024-hackfest-may-27th-to-may-29th/940/2&quot;&gt;GStreamer
Spring
Hackfest&lt;/a&gt;&lt;/p&gt;
&lt;!-- markdownlint-disable no-bare-urls --&gt;
&lt;p&gt;&lt;a href=&quot;https://mastodon.social/@gstreamer@floss.social/112473279155437759&quot;&gt;https://mastodon.social/@gstreamer@floss.social/112473279155437759&lt;/a&gt;&lt;/p&gt;
&lt;!-- markdownlint-enable no-bare-urls --&gt;
&lt;p&gt;I’m happy to meet again friends from the GStreamer community and talk and move
things forward related with Vulkan, VA-API, KMS, video codecs, etc.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GstVA library in GStreamer 1.22 and some new features in 1.24</title>
		<link href="https://blogs.igalia.com/vjaquez/gstva-library-in-gstreamer-1-22-and-some-new-features-in-1-24/"/>
		<updated>2024-02-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstva-library-in-gstreamer-1-22-and-some-new-features-in-1-24/</id>
		<content type="html">&lt;p&gt;I know, it’s old news, but still, I was pending to write about the &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/index.html&quot;&gt;GstVA
library&lt;/a&gt; to
clarify its purpose and scope.I didn’t want to have a library for GstVA, because to maintain a library is a
though duty. I learnt it in the bad way with &lt;code&gt;GStreamer-VAAPI&lt;/code&gt;. Therefore, I
wanted GstVA as simple as possible, direct in its
&lt;a href=&quot;https://github.com/intel/libva/&quot;&gt;libva&lt;/a&gt; usage, and self-contained.&lt;/p&gt;
&lt;p&gt;As far as I know, the main usage of &lt;code&gt;GStreamer-VAAPI&lt;/code&gt; library was to have access
to the &lt;code&gt;VASurface&lt;/code&gt; from the &lt;code&gt;GstBuffer&lt;/code&gt;, for example, with &lt;code&gt;appsink&lt;/code&gt;. Since the
beginning of GstVA, a mechanism to access the surface ID was provided, as
`GStreamer OpenGL** offers access to the texture ID: &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gl/gstglbasememory.html#GST_MAP_GL&quot;&gt;through a flag when
mapping&lt;/a&gt;
a &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gl/gstglmemory.html&quot;&gt;GstGL
memory&lt;/a&gt;
backed buffer. You can see how this mechanism is used in the one of the &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-bad/tests/examples/va/main.c?ref_type=heads#L96&quot;&gt;GstVA
sample
apps&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Nevertheless, later another use case appeared which demanded a library for
GstVA: Other GStreamer elements needed to produce or consume VA surface backed
buffers. Or to say it more concretely: they needed to use the GstVA allocator
and buffer pool, and the mechanism to share the GstVA context along the pipeline
too. The plugins with those VA related elements are
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/msdk/index.html&quot;&gt;msdk&lt;/a&gt; and
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/qsv/index.html&quot;&gt;qsv&lt;/a&gt;, when they
operate on Linux. Both elements use Intel
&lt;a href=&quot;https://www.intel.com/content/www/us/en/developer/tools/vpl/overview.html&quot;&gt;OneVPL&lt;/a&gt;,
so they are basically competitors. The main difference is that the first is
maintained by Intel, and has more features, specially for Linux, whilst the
former in maintained by &lt;a href=&quot;https://medium.com/@seungha.yang&quot;&gt;Seungha Yang&lt;/a&gt;, and it
appears to be better tested in Windows.&lt;/p&gt;
&lt;p&gt;These are the objects exposed by the GstVA library API:&lt;/p&gt;
&lt;h2 id=&quot;gstvadisplay&quot; tabindex=&quot;-1&quot;&gt;GstVaDisplay &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstva-library-in-gstreamer-1-22-and-some-new-features-in-1-24/#gstvadisplay&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvadisplay.html&quot;&gt;GstVaDisplay&lt;/a&gt;
represents a
&lt;a href=&quot;http://intel.github.io/libva/group__api__core.html#gad534cae750fddc9ad30d0dc267deffa3&quot;&gt;VADisplay&lt;/a&gt;,
the interface between the application and the hardware accelerator. This class
is abstract, and it’s supposed not to be instantiated. Instantiation has to go
through it derived classes, such as&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvadisplaydrm.html&quot;&gt;GstVaDisplayDRM&lt;/a&gt;,
for &lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_Rendering_Manager&quot;&gt;DRM devices&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvadisplaywrapped.htm&quot;&gt;GstVaDisplayWrapped&lt;/a&gt;,
for user-injected display connections, for example, VA X11 or Wayland
connection, through the
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gstreamer/gstcontext.html&quot;&gt;GstContext&lt;/a&gt;
bus message &lt;code&gt;GST_MESSAGE_NEED_CONTEXT&lt;/code&gt;. See the mentioned
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-bad/tests/examples/va/main.c&quot;&gt;example&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The experimental &lt;a href=&quot;https://devblogs.microsoft.com/directx/video-acceleration-api-va-api-now-available-on-windows/&quot;&gt;VA backend for
Windows&lt;/a&gt;:
GstVaDisplayWin32, merged for the next release 1.24.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This class is shared among all the elements in the pipeline via &lt;code&gt;GstContext&lt;/code&gt;, so
all the plugged elements share the same connection the hardware accelerator.
&lt;strong&gt;Unless&lt;/strong&gt; the plugged element in the pipeline has a specific name, as in the
case of multi GPU systems.&lt;/p&gt;
&lt;p&gt;Let’s talk a bit about multi GPU systems. This is the &lt;code&gt;gst-inspect-1.0&lt;/code&gt; output
of a system with an Intel and an AMD GPU, both with VA support:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;gst-inspect-1.0 va&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Plugin Details:&lt;br&gt;  Name                     va&lt;br&gt;  Description              VA-API codecs plugin&lt;br&gt;  Filename                 /home/igalia/vjaquez/gstreamer/build/subprojects/gst-plugins-bad/sys/va/libgstva.so&lt;br&gt;  Version                  1.23.1.1&lt;br&gt;  License                  LGPL&lt;br&gt;  Source module            gst-plugins-bad&lt;br&gt;  Documentation            https://gstreamer.freedesktop.org/documentation/va/&lt;br&gt;  Binary package           GStreamer Bad Plug-ins git&lt;br&gt;  Origin URL               Unknown package origin&lt;br&gt;&lt;br&gt;  vaav1dec: VA-API AV1 Decoder in Intel(R) Gen Graphics&lt;br&gt;  vacompositor: VA-API Video Compositor in Intel(R) Gen Graphics&lt;br&gt;  vadeinterlace: VA-API Deinterlacer in Intel(R) Gen Graphics&lt;br&gt;  vah264dec: VA-API H.264 Decoder in Intel(R) Gen Graphics&lt;br&gt;  vah264lpenc: VA-API H.264 Low Power Encoder in Intel(R) Gen Graphics&lt;br&gt;  vah265dec: VA-API H.265 Decoder in Intel(R) Gen Graphics&lt;br&gt;  vah265lpenc: VA-API H.265 Low Power Encoder in Intel(R) Gen Graphics&lt;br&gt;  vajpegdec: VA-API JPEG Decoder in Intel(R) Gen Graphics&lt;br&gt;  vampeg2dec: VA-API Mpeg2 Decoder in Intel(R) Gen Graphics&lt;br&gt;  vapostproc: VA-API Video Postprocessor in Intel(R) Gen Graphics&lt;br&gt;  varenderD129av1dec: VA-API AV1 Decoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129av1enc: VA-API AV1 Encoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129compositor: VA-API Video Compositor in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129deinterlace: VA-API Deinterlacer in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129h264dec: VA-API H.264 Decoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129h264enc: VA-API H.264 Encoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129h265dec: VA-API H.265 Decoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129h265enc: VA-API H.265 Encoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129jpegdec: VA-API JPEG Decoder in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129postproc: VA-API Video Postprocessor in AMD Radeon Graphics in renderD129&lt;br&gt;  varenderD129vp9dec: VA-API VP9 Decoder in AMD Radeon Graphics in renderD129&lt;br&gt;  vavp9dec: VA-API VP9 Decoder in Intel(R) Gen Graphics&lt;br&gt;&lt;br&gt;  22 features:&lt;br&gt;  +-- 22 elements&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can observe, each card registers the supported element. The first GPU, the
Intel one, doesn’t insert &lt;code&gt;renderD129&lt;/code&gt; after the &lt;code&gt;va&lt;/code&gt; prefix, while the AMD
Radeon, does. As you could imagine, &lt;code&gt;renderD129&lt;/code&gt; is the device name in
&lt;code&gt;/dev/dri&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt; /dev/dri&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;by-path  card0  card1  renderD128  renderD129&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The appended device name expresses the DRM device the elements use. And only
after the second GPU the device name is appended. This allows to use the
&lt;em&gt;untagged&lt;/em&gt; elements either for the first GPU or to allow the usage of a wrapped
display injected by the user application, such as VA X11 or Wayland connections.&lt;/p&gt;
&lt;p&gt;Notice that sharing DMABuf-based buffers between different GPUs is theoretically
possible, but not assured.&lt;/p&gt;
&lt;p&gt;Keep in mind that, currently,
&lt;a href=&quot;https://github.com/elFarto/nvidia-vaapi-driver&quot;&gt;nvidia-vaapi-driver&lt;/a&gt; is &lt;strong&gt;not&lt;/strong&gt;
supported by GstVA, and the driver will be ignored by the plugin register since
1.24.&lt;/p&gt;
&lt;h2 id=&quot;va-allocators&quot; tabindex=&quot;-1&quot;&gt;VA allocators &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstva-library-in-gstreamer-1-22-and-some-new-features-in-1-24/#va-allocators&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There are two types of &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gstreamer/gstallocator.html&quot;&gt;memory
allocators&lt;/a&gt;
in GstVA:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvaallocator.html#GstVaAllocator&quot;&gt;VA surface
allocator&lt;/a&gt;.
It allocates a
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gstreamer/gstmemory.html&quot;&gt;GstMemory&lt;/a&gt;
that wraps a &lt;code&gt;VASurfaceID&lt;/code&gt;, which represents a complete frame directly
consumable by VA-based elements. Thus, a
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html&quot;&gt;GstBuffer&lt;/a&gt;
will hold one and only one &lt;code&gt;GstMemory&lt;/code&gt; of this type. These buffers are the
very same used by the system memory buffers, since the surfaces generally can
map their content to CPU memory (unless they are encrypted, but GstVA haven’t
been tested for that use case).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvaallocator.html#GstVaDmabufAllocator&quot;&gt;VA-DMABuf
allocator&lt;/a&gt;.
It descends from
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/allocators/gstdmabuf.html?&quot;&gt;GstDmaBufAllocator&lt;/a&gt;,
though it’s not an allocator in strict sense, since it only imports DMABufs to
VA surfaces, and exports VA surfaces to DMABufs. Notice that a single VA
surface can be exported as multiple DMABuf-backed GstMemories, and the
contrary, a VA surface can be imported from multiple DMABufs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, VA allocators offer a couple methods that can be useful for applications
that use &lt;code&gt;appsink&lt;/code&gt;, for example
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvaallocator.html#gst_va_buffer_get_surface&quot;&gt;gst_va_buffer_get_surface&lt;/a&gt;
and
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/valib/gstvaallocator.html#gst_va_buffer_peek_display&quot;&gt;gst_va_buffer_peek_display&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One particularity of both allocators is that they keep an internal pool of the
allocated VA surfaces, since the mapping of buffers/memories is not always 1:1,
as in the case of DMABuf; to reuse surfaces even if the buffer pool ditches
them, and to avoid surface leaks, keeping track of them all the time.&lt;/p&gt;
&lt;h2 id=&quot;gstvapool&quot; tabindex=&quot;-1&quot;&gt;GstVaPool &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstva-library-in-gstreamer-1-22-and-some-new-features-in-1-24/#gstvapool&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This class is only useful for other GStreamer elements capable of consume VA
surfaces, so they could instantiate, configure and propose a VA buffer pool, but
not for applications.&lt;/p&gt;
&lt;p&gt;And that’s all for now. Thank you for bear with me up to here. But remember,
the API of the library is unstable, and it can change any time. So, no promises
are made :)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Conference 2023</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-conference-2023/"/>
		<updated>2023-10-31T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-conference-2023/</id>
		<content type="html">&lt;p&gt;This year the &lt;a href=&quot;https://gstreamer.freedesktop.org/conference/2023/&quot;&gt;GStreamer
Conference&lt;/a&gt; happened in A
Coruña, basically at home, along with the hackfest.The conference was the first after a long hiatus of four years of pandemics. The
community craved it and long expected it. Some igalians helped to the GStreamer
Foundation and our warm community with the organization and logistics. I’m very
thankful with my peers and the sponsors of the event. Personally, I’m happy with
the outcome. Though, I ought to say, organizing a conference like this is quite
a challenge and very demanding.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/palexco-marina.jpg&quot; alt=&quot;Palexco Marina&quot;&gt;&lt;figcaption&gt;Marina from Palexco&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The conference were recorded and streamed by &lt;a href=&quot;https://www.ubicast.eu/&quot;&gt;Ubicast&lt;/a&gt;.
And you can watch any presentation of the conference in their &lt;a href=&quot;https://gstconf.ubicast.tv/channels/#gstreamer-conference-2023&quot;&gt;GStreamer
Archive&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/state-of-the-union.jpg&quot; alt=&quot;Tim sharing the State of the Union&quot;&gt;&lt;figcaption&gt;Tim
sharing the State of the Union&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/palexco-lunch.jpg&quot; alt=&quot;Lunch time in Palexco&quot;&gt;&lt;figcaption&gt;Lunch time in Palexco&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;This is the list of talks where fellow Igalians participated:&lt;/p&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266612a0e8e8cbie1q/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v12666129e8f3rl98fq2/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266611b4503y89eyrf/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266611b4d2ayspl9ed/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266612985bboidk020/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266612983d6jfb6hdq/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266611b48c76zr2gxx/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;iframe width=&quot;720&quot; height=&quot;530&quot; src=&quot;https://gstconf.ubicast.tv/permalink/v1266611ab0caxu0i73z/iframe/&quot;&gt;&lt;/iframe&gt;
&lt;p&gt;There were two days of conference. The following two were for the hackfest, at
Igalia’s Head Quarters.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/igaliahq-hackfest.jpg&quot; alt=&quot;Day one of the Hackfest&quot;&gt;&lt;figcaption&gt;Day one of the
Hackfest&lt;/figcaption&gt;&lt;/figure&gt;
</content>
	</entry>
	
	<entry>
		<title>DMABuf modifier negotiation in GStreamer</title>
		<link href="https://blogs.igalia.com/vjaquez/dmabuf-modifier-negotiation-in-gstreamer/"/>
		<updated>2023-08-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/dmabuf-modifier-negotiation-in-gstreamer/</id>
		<content type="html">&lt;p&gt;It took almost a year of design and implementation but finally the DMABuf
modifier negotiation in GStreamer is merged. Big kudos to all the people
involved but mostly to &lt;a href=&quot;https://gitlab.freedesktop.org/He_Junyan&quot;&gt;He Junyan&lt;/a&gt;,
who did the vast majority of the code.## What’s a DMAbuf modifier?&lt;/p&gt;
&lt;p&gt;DMABuf are the Linux kernel mechanism to share buffers among different drivers
or subsystems. A particular case of DMABuf are the &lt;em&gt;DRM PRIME buffers&lt;/em&gt; which are
buffers shared by the &lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_Rendering_Manager&quot;&gt;Display Rendering Manager (DRM)
subsystem&lt;/a&gt;. They allowed
sharing video frames between devices with &lt;em&gt;zero copy&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;When we initially added support for DMABuf in GStreamer, we assumed that only
color format and size mattered, just as old video frames stored in system
memory. But we were wrong. Beside color format and size, also the memory layout
has to be considered when sharing DMABufs. By not considering it, the produced
output had horrible tiled artifacts in screen. This memory layout is known as
&lt;em&gt;modifier&lt;/em&gt;, and it’s &lt;a href=&quot;https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h&quot;&gt;uniquely described by an uint64
number&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-was-designed-and-implemented&quot; tabindex=&quot;-1&quot;&gt;How was designed and implemented? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/dmabuf-modifier-negotiation-in-gstreamer/#how-was-designed-and-implemented&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First, we wrote a &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-docs/markdown/additional/design/dmabuf.md&quot;&gt;design document for caps negotiation with dmabuf
modifiers&lt;/a&gt;,
where we added a new color format (&lt;code&gt;DMA_DRM&lt;/code&gt;) and a new caps field
(&lt;code&gt;drm-format&lt;/code&gt;). This new caps field holds a string, or a list of strings,
composed by the tuple &lt;code&gt;DRM_color_format : DRM_modifier&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Second, we extended the &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.h&quot;&gt;video info
object&lt;/a&gt;
to support DMABuf with helper functions that parse and construct the
&lt;code&gt;drm-format&lt;/code&gt; field.&lt;/p&gt;
&lt;p&gt;Third, we added the dmabuf caps negotiation in &lt;code&gt;glupload&lt;/code&gt;. This part was the
most difficult one, since the capability of importing DMABufs to OpenGL (which
&lt;em&gt;is only available in EGL/GLES&lt;/em&gt;) is run-time defined, by querying the hardware.
Also, there are two code paths to import frames: direct or RGB-emulated. Direct
would be the most efficient, but it depends on the presence of GLES2 API in the
driver; while RGB-emulated is imported as a set of RGB images where each
component is an image. At the end more than a thousand lines of code were added
to the &lt;code&gt;glupload&lt;/code&gt; element, beside the code added to EGL context object.&lt;/p&gt;
&lt;p&gt;Fourth, and unexpectedly, &lt;code&gt;waylandsink&lt;/code&gt; also got DMABuf caps negotiation
support.&lt;/p&gt;
&lt;p&gt;And lastly, decoders in &lt;code&gt;va&lt;/code&gt; plugin merged theirs DMABuf caps negotiation
support.&lt;/p&gt;
&lt;h2 id=&quot;how-i-can-test-it&quot; tabindex=&quot;-1&quot;&gt;How I can test it? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/dmabuf-modifier-negotiation-in-gstreamer/#how-i-can-test-it&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You need, of course, to user the current main branch of GStreamer, since it’s
just fresh and there’s no release yet. Then you need a box with VA support. And
if you inspect, for example, &lt;code&gt;vah264dec&lt;/code&gt;, you might see this output if your box
is Intel (but also AMD through Mesa is supported though the negotiated memory is
linear so far):&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;Pad Templates:&lt;br&gt;  SINK template: &#39;sink&#39;&lt;br&gt;    Availability: Always&lt;br&gt;    Capabilities:&lt;br&gt;      video/x-h264&lt;br&gt;                profile: { (string)main, (string)baseline, (string)high, (string)progressive-high, (string)constrained-high, (string)constrained-baseline }&lt;br&gt;                  width: [ 1, 4096 ]&lt;br&gt;                 height: [ 1, 4096 ]&lt;br&gt;              alignment: au&lt;br&gt;          stream-format: { (string)avc, (string)avc3, (string)byte-stream }&lt;br&gt;&lt;br&gt;  SRC template: &#39;src&#39;&lt;br&gt;    Availability: Always&lt;br&gt;    Capabilities:&lt;br&gt;      video/x-raw(memory:VAMemory)&lt;br&gt;                  width: [ 1, 4096 ]&lt;br&gt;                 height: [ 1, 4096 ]&lt;br&gt;                 format: NV12&lt;br&gt;      video/x-raw(memory:DMABuf)&lt;br&gt;                  width: [ 1, 4096 ]&lt;br&gt;                 height: [ 1, 4096 ]&lt;br&gt;                 format: DMA_DRM&lt;br&gt;             drm-format: NV12:0x0100000000000002&lt;br&gt;      video/x-raw&lt;br&gt;                  width: [ 1, 4096 ]&lt;br&gt;                 height: [ 1, 4096 ]&lt;br&gt;                 format: NV12&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What it’s saying, for &lt;code&gt;memory:DMABuf&lt;/code&gt; caps feature, the &lt;code&gt;drm-format&lt;/code&gt; to
negotiate is &lt;code&gt;NV12:0x0100000000000002&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now some tests:&lt;/p&gt;
&lt;p&gt;NOTE: These commands assume that &lt;code&gt;va&lt;/code&gt; decoders are primary ranked (see &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2312&quot;&gt;merge
request
2312&lt;/a&gt;),
and that you’re in a Wayland session.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;gst-play-1.0 --flags=0x47 video.file --videosink=waylandsink&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;GST_GL_API=gles2 gst-play-1.0 --flags=0x47 video.file --videosink=glimagesink&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;gst-play-1.0 --flags=0x47 video.file --videosink=&#39;glupload ! gtkglsink&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Right now it’s required to add &lt;code&gt;--flags=0x47&lt;/code&gt; to &lt;code&gt;playbin&lt;/code&gt; because it adds video
filters that still don’t negotiate the new DMABuf caps.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;GST_GL_API=gles2&lt;/code&gt; instructs GStreamer OpenGL to use GLES2 API, which allows
direct importation of YUV images.&lt;/p&gt;
&lt;p&gt;Thanks to all the people involved in this effort!&lt;/p&gt;
&lt;p&gt;As usual, if you would like to learn more about DMABuf, VA-API, GStreamer or any
other open multimedia framework, &lt;a href=&quot;https://www.igalia.com/&quot;&gt;contact us&lt;/a&gt;!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Review of Igalia Multimedia activities (2022)</title>
		<link href="https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/"/>
		<updated>2023-03-14T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/</id>
		<content type="html">&lt;p&gt;We, &lt;a href=&quot;https://www.igalia.com/technology/multimedia&quot;&gt;Igalia’s multimedia team&lt;/a&gt;,
would like to share with you our list of achievements along the past 2022.&lt;/p&gt;
&lt;h2 id=&quot;webkit-multimedia&quot; tabindex=&quot;-1&quot;&gt;WebKit Multimedia &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#webkit-multimedia&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;webrtc&quot; tabindex=&quot;-1&quot;&gt;WebRTC &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#webrtc&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Phil already wrote a first blog post, of a series, on this regard: &lt;a href=&quot;https://base-art.net/Articles/webrtc-in-webkitgtk-and-wpe-status-updates-part-i/&quot;&gt;WebRTC in
WebKitGTK and WPE, status updates, part
I&lt;/a&gt;.
Please, be sure to give it a glance, it has nice videos.&lt;/p&gt;
&lt;p&gt;Long story short, last year we started to support &lt;a href=&quot;https://www.w3.org/TR/mediacapture-streams/&quot;&gt;Media Capture and
Streams&lt;/a&gt; in WebKitGTK and WPE using
GStreamer, either for input devices (camera and microphone), desktop sharing,
&lt;em&gt;webaudio&lt;/em&gt;, and web canvas. But this is just the first step. We are currently
working on
&lt;a href=&quot;https://developer.mozilla.org/en/US/docs/Web/API/RTCPeerConnection&quot;&gt;RTCPeerConnection&lt;/a&gt;,
also &lt;a href=&quot;https://github.com/WebKit/WebKit/commit/a530847a7ce739e1b8b7a55cf&quot;&gt;using
GStreamer&lt;/a&gt;,
to share all these captured streams with other web peers. Meanwhile, we’ll wait
for the second episode of Phil’s series :)&lt;/p&gt;
&lt;h3 id=&quot;mediarecorder&quot; tabindex=&quot;-1&quot;&gt;MediaRecorder &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#mediarecorder&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We worked in an initial implementation of
&lt;a href=&quot;https://w3c.github.io/mediacapture-record/MediaRecorder.html&quot;&gt;MediaRecorder&lt;/a&gt;
with
&lt;a href=&quot;https://github.com/WebKit/WebKit/commit/56ec50c054f07cc92f7c331dc2402b36bb10bb0f&quot;&gt;GStreamer&lt;/a&gt;
(1.20 or superior). The specification goes about allowing a web browser to
record a selected stream. For example, a voice-memo or video application which
could encode and upload a capture of your microphone / camera.&lt;/p&gt;
&lt;h3 id=&quot;gamepad&quot; tabindex=&quot;-1&quot;&gt;Gamepad &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#gamepad&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;While WebKitGTK already has &lt;a href=&quot;https://w3c.github.io/gamepad/&quot;&gt;Gamepad&lt;/a&gt; support,
WPE lacked it. We did the implementation last year, and there’s a blog post
about it: &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2022/07/20/gamepad-in-wpewebkit/&quot;&gt;Gamepad in
WPEWebKit&lt;/a&gt;,
with video showing a demo of it.&lt;/p&gt;
&lt;h3 id=&quot;capture-encoded-video-streams-from-webcams&quot; tabindex=&quot;-1&quot;&gt;Capture encoded video streams from webcams &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#capture-encoded-video-streams-from-webcams&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Some webcams only provide high resolution frames encoded in H.264 or so. In
order to support these resolutions with those webcams we added the &lt;a href=&quot;https://github.com/WebKit/WebKit/commit/4e6c9f2028df849574df76dab51e7b94bf34a44f&quot;&gt;support for
negotiate of those
formats&lt;/a&gt;
and decode them internally to handle the streams. Though we are just at the
beginning of more efficient support.&lt;/p&gt;
&lt;h3 id=&quot;flatpak-sdk-maintenance&quot; tabindex=&quot;-1&quot;&gt;Flatpak SDK maintenance &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#flatpak-sdk-maintenance&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A lot of effort went to maintain the Flatpak SDK for WebKit. It is a set of
runtimes that allows to have a reproducible build of WebKit, independently of
the used Linux distribution. Nowadays the Flatpak SDK is used in &lt;a href=&quot;https://trac.webkit.org/wiki/EarlyWarningSystem&quot;&gt;Webkit’s
EWS&lt;/a&gt;, and by many developers.&lt;/p&gt;
&lt;p&gt;Among all the features added during the year we can highlight added Rust
support, a full integrity check before upgrading, and offer a way to override
dependencies as &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2022/05/&quot;&gt;local projects&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;mse-eme-enhancements&quot; tabindex=&quot;-1&quot;&gt;MSE/EME enhancements &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#mse-eme-enhancements&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As every year, massive work was done in WebKit ports using GStreamer for &lt;a href=&quot;https://www.w3.org/TR/media-source-2/&quot;&gt;Media
Source Extensions&lt;/a&gt; and &lt;a href=&quot;https://www.w3.org/TR/encrypted-media/&quot;&gt;Encrypted Media
Extensions&lt;/a&gt;, improving user experience
with different streaming services in the Web, such as Odysee, Amazon, DAZN, etc.&lt;/p&gt;
&lt;p&gt;In the case of encrypted media, GStreamer-based WebKit ports provide the stubs
to communicate with an external Content Decryption Module
(&lt;a href=&quot;https://www.w3.org/TR/encrypted-media/#cdm&quot;&gt;CDM&lt;/a&gt;). If you’re willing to
support this in your platform, &lt;a href=&quot;https://www.igalia.com/contact/&quot;&gt;you can reach
us&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also we worked in a video demo showing how MSE/EME works in a Raspberry Pi 3
using WPE:&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;https://blogs.igalia.com/vjaquez/videos/EME-demo.webm&quot; controls=&quot;&quot; class=&quot;html5-video-player&quot;&gt;
Your browser does not support playing HTML5 video.
You can &lt;a href=&quot;https://blogs.igalia.com/vjaquez/videos/EME-demo.webm&quot; download=&quot;&quot;&gt;download the file&lt;/a&gt; instead.
Here is a description of the content: EME demo
&lt;/video&gt;&lt;/p&gt;
&lt;h3 id=&quot;webaudio-demo&quot; tabindex=&quot;-1&quot;&gt;WebAudio demo &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#webaudio-demo&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We also spent time recording video demos, such as this one, showing WebAudio
using WPE on a desktop computer.&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;https://blogs.igalia.com/vjaquez/videos/WPE-WebAudio-Demo.webm&quot; controls=&quot;&quot; class=&quot;html5-video-player&quot;&gt;
Your browser does not support playing HTML5 video.
You can &lt;a href=&quot;https://blogs.igalia.com/vjaquez/videos/WPE-WebAudio-Demo.webm&quot; download=&quot;&quot;&gt;download the file&lt;/a&gt; instead.
Here is a description of the content: WPE WebAudio
&lt;/video&gt;&lt;/p&gt;
&lt;h2 id=&quot;gstreamer&quot; tabindex=&quot;-1&quot;&gt;GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We managed to merge a lot of bug fixes in GStreamer, which in many cases can be
harder to solve rather than implementing new features, though former are more
interesting to tell, such as those related with making Rust the main developing
language for GStreamer besides C.&lt;/p&gt;
&lt;h3 id=&quot;rust-bindings-and-gstreamer-elements-for-vonage-video-api-opentok&quot; tabindex=&quot;-1&quot;&gt;Rust bindings and GStreamer elements for Vonage Video API / OpenTok &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#rust-bindings-and-gstreamer-elements-for-vonage-video-api-opentok&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;OpenTok is the legacy name of Vonage Video API, and is a
&lt;a href=&quot;https://en.wikipedia.org/wiki/Platform_as_a_service&quot;&gt;PaaS&lt;/a&gt; (Platform As a
Service) to ease the development and deployment of WebRTC services and
applications.&lt;/p&gt;
&lt;p&gt;We published &lt;a href=&quot;https://github.com/opentok-rust&quot;&gt;our work in Github&lt;/a&gt; of Rust
bindings both for the &lt;a href=&quot;https://tokbox.com/developer/sdks/linux/&quot;&gt;Client SDK for
Linux&lt;/a&gt; and the &lt;a href=&quot;https://tokbox.com/developer/rest/&quot;&gt;Server SDK using REST
API&lt;/a&gt;, along with a GStreamer plugin to
publish and subscribe to video and audio streams.&lt;/p&gt;
&lt;h3 id=&quot;gstwebrtcsrc&quot; tabindex=&quot;-1&quot;&gt;GstWebRTCSrc &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#gstwebrtcsrc&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the beginning there was
&lt;a href=&quot;https://docs.gstreamer.com/documentation/webrtc/index.html&quot;&gt;webrtcbin&lt;/a&gt;, an
element that implements the majority of W3C
&lt;a href=&quot;https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection&quot;&gt;RTCPeerConnection&lt;/a&gt; API.
It’s so flexible and powerful that it’s rather hard to use for the most common
cases. Then appeared
&lt;a href=&quot;https://docs.gstreamer.com/documentation/rswebrtc/webrtcsink.html&quot;&gt;webrtcsink&lt;/a&gt;,
a wrapper of &lt;code&gt;webrtcbin&lt;/code&gt;, written in Rust, which receives GStreamer streams
which will be offered and streamed to web peers. Later on, we developed
&lt;a href=&quot;https://docs.gstreamer.com/documentation/rswebrtc/webrtcsrc.html&quot;&gt;webrtcsrc&lt;/a&gt;,
the &lt;code&gt;webrtcsink&lt;/code&gt; counterpart: an element which source pads push streams from web
peers, such as another browser, and forward those Web streams as GStreamer ones
in a pipeline. Both &lt;code&gt;webrtcsink&lt;/code&gt; and &lt;code&gt;webrtcsrc&lt;/code&gt; are written in Rust.&lt;/p&gt;
&lt;h3 id=&quot;behavior-driven-development-test-framework-for-gstreamer&quot; tabindex=&quot;-1&quot;&gt;Behavior-Driven Development test framework for GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#behavior-driven-development-test-framework-for-gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Behavior-driven_development&quot;&gt;Behavior-Driven
Development&lt;/a&gt; is
gaining relevance with tools like &lt;a href=&quot;https://cucumber.io/&quot;&gt;Cucumber&lt;/a&gt; for Java and
its domain specific language, &lt;a href=&quot;https://cucumber.io/docs/gherkin/&quot;&gt;Gherkin&lt;/a&gt; to
define software behaviors. &lt;a href=&quot;https://www.rustaceans.org/&quot;&gt;Rustaceans&lt;/a&gt; have picked
up these ideas and developed
&lt;a href=&quot;https://github.com/cucumber-rs/cucumber&quot;&gt;cucumber-rs&lt;/a&gt;. The logical consequence
was obvious: Why not GStreamer?&lt;/p&gt;
&lt;p&gt;Last year we tinkered with
&lt;a href=&quot;https://github.com/philn/gstreamer-cucumber&quot;&gt;GStreamer-Cucumber&lt;/a&gt;, a BDD to
define behavior tests for GStreamer pipelines.&lt;/p&gt;
&lt;h3 id=&quot;gstvalidate-rust-bindings&quot; tabindex=&quot;-1&quot;&gt;GstValidate Rust bindings &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#gstvalidate-rust-bindings&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There have been some discussion if BDD is the best way to test GStreamer
pipelines, and there’s
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-devtools/gst-validate.html&quot;&gt;GstValidate&lt;/a&gt;,
and also, last year, we added &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/tree/main/gstreamer-validate&quot;&gt;its Rust
bindings&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;gstreamer-editing-services&quot; tabindex=&quot;-1&quot;&gt;GStreamer Editing Services &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#gstreamer-editing-services&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Though not everything was Rust. We work hard on GStreamer’s nuts and bolts.&lt;/p&gt;
&lt;p&gt;Last year, we gathered the team to hack &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-editing-service&quot;&gt;GStreamer Editing
Services&lt;/a&gt;,
particularly to explore adding OpenGL and DMABuf support, such as downloading or
uploading a texture before processing, and selecting a proper filter to avoid
those transfers.&lt;/p&gt;
&lt;h3 id=&quot;gstva-and-gstreamer-vaapi&quot; tabindex=&quot;-1&quot;&gt;GstVA and GStreamer-VAAPI &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#gstva-and-gstreamer-vaapi&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We helped in the maintenance of
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vaapi/index.html&quot;&gt;GStreamer-VAAPI&lt;/a&gt;
and the development of its near replacement:
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/va/index.html&quot;&gt;GstVA&lt;/a&gt;, adding
new elements such as the H.264 encoder, the compositor and the JPEG decoder.
Along with participation on the debate and code reviewing of negotiating DMABuf
streams in the pipeline.&lt;/p&gt;
&lt;h3 id=&quot;vulkan-decoder-and-parser-library-for-cts&quot; tabindex=&quot;-1&quot;&gt;Vulkan decoder and parser library for CTS &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#vulkan-decoder-and-parser-library-for-cts&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You might have heard about &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2022/&quot;&gt;Vulkan has now integrated in its API video
decoding&lt;/a&gt;, while encoding is currently
work-in-progress. We devoted time on helping Khronos with the Vulkan Video
Conformance Tests (CTS), particularly with a parser based on GStreamer and
developing a H.264 decoder in GStreamer using Vulkan Video API.&lt;/p&gt;
&lt;p&gt;You can check the presentation we did last Vulkanised.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=5PV_yTculaM&quot;&gt;https://www.youtube.com/watch?v=5PV_yTculaM&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;wpe-android-experiment&quot; tabindex=&quot;-1&quot;&gt;WPE Android Experiment &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2022/#wpe-android-experiment&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In a joint adventure with Igalia’s Webkit team we did some experiments to port
WPE to Android. This is just an internal proof of concept so far, but we are
looking forward to see how this will evolve in the future, and what new
possibilities this might open up.&lt;/p&gt;
&lt;p&gt;&lt;video src=&quot;https://blogs.igalia.com/vjaquez/videos/wpeview_demo.webm&quot; controls=&quot;&quot; class=&quot;html5-video-player&quot;&gt;
Your browser does not support playing HTML5 video.
You can &lt;a href=&quot;https://blogs.igalia.com/vjaquez/videos/wpeview_demo.webm&quot; download=&quot;&quot;&gt;download the file&lt;/a&gt; instead.
Here is a description of the content: WPE View
&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;If you have any questions about WebKit, GStreamer, Linux video stack, compilers,
&lt;a href=&quot;https://www.igalia.com/technologies/&quot;&gt;etc&lt;/a&gt;., please &lt;a href=&quot;https://www.igalia.com/contact/&quot;&gt;contact
us&lt;/a&gt;.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer compilation with third party libraries</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-compilation-with-third-party-libraries/"/>
		<updated>2023-01-03T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-compilation-with-third-party-libraries/</id>
		<content type="html">&lt;p&gt;Suppose that you have to hack a GStreamer element which requires a library that
is not (yet) packaged by your distribution, nor wrapped as a Meson’s subproject.
How do you do?In our case, we needed the latest version of&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/KhronosGroup/Vulkan-Headers&quot;&gt;Vulkan-Headers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/KhronosGroup/Vulkan-Loader&quot;&gt;Vulkan-Loader&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/KhronosGroup/Vulkan-Tools&quot;&gt;Vulkan-Tools&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which are interrelated CMake projects.&lt;/p&gt;
&lt;p&gt;For these cases, GStreamer’s uninstalled development scripts can use a special
directory: &lt;code&gt;gstreamer/prefix&lt;/code&gt;. As the
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/README.md?plain=1#L281&quot;&gt;README.md&lt;/a&gt;
says:&lt;/p&gt;
&lt;p&gt;NOTE: In the development environment, a fully usable prefix is also configured
in &lt;code&gt;gstreamer/prefix&lt;/code&gt; where you can install any extra dependency/project.&lt;/p&gt;
&lt;p&gt;This means that &lt;code&gt;gstenv.py&lt;/code&gt; script (the responsible of setting up the
uninstalled development environment) will add&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gstreamer/prefix/bin&lt;/code&gt; in &lt;code&gt;PATH&lt;/code&gt; for executable files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstreamer/prefix/lib&lt;/code&gt; and &lt;code&gt;gstreamer/prefix/share/gstreamer-1.0&lt;/code&gt; in
&lt;code&gt;GST_PLUGIN_PATH&lt;/code&gt;, for out-of-tree elements.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstreamer/prefix/lib&lt;/code&gt; in &lt;code&gt;GI_TYPELIB_PATH&lt;/code&gt; for &lt;em&gt;GObject Introspection&lt;/em&gt;
metadata.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstreamer/prefix/lib/pkgconfig&lt;/code&gt; in &lt;code&gt;PKG_CONFIG_PATH&lt;/code&gt; for third party
dependencies (our case!)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstreamer/prefix/etc/xdg&lt;/code&gt; for &lt;code&gt;XDG_CONFIG_DIRS&lt;/code&gt; for XDG compliant
configuration files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstreamer/prefix/lib&lt;/code&gt; and &lt;code&gt;gstreamer/prefix/lib64&lt;/code&gt; in &lt;code&gt;LD_LIBRARY_PATH&lt;/code&gt; for
third party libraries.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, the general idea, is to compile those third party libraries with
their installation prefix as &lt;code&gt;gstreamer/prefix&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In our case, Vulkan repositories are interrelated so they need to be compiled in
certain order. Also, we decided, for self-containment, to clone them in
&lt;code&gt;gstreamer/subprojects&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;vulkan-headers&quot; tabindex=&quot;-1&quot;&gt;Vulkan-Headers &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-compilation-with-third-party-libraries/#vulkan-headers&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/gstreamer/subprojects&lt;br&gt;git clone git@github.com:KhronosGroup/Vulkan-Headers.git&lt;br&gt;cd Vulkan-Headers&lt;br&gt;mkdir build&lt;br&gt;cd build&lt;br&gt;cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/vjaquez/gst/gstreamer/prefix ..&lt;br&gt;cmake --build . --install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;vulkan-loader&quot; tabindex=&quot;-1&quot;&gt;Vulkan-Loader &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-compilation-with-third-party-libraries/#vulkan-loader&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/gstreamer/subprojects&lt;br&gt;git clone git@github.com:KhronosGroup/Vulkan-Loader.git&lt;br&gt;cd Vulkan-Loader&lt;br&gt;mkdir build&lt;br&gt;cd build&lt;br&gt;cmake  -DCMAKE_BUILD_TYPE=Debug -DVULKAN_HEADERS_INSTALL_DIR=/home/vjaquez/gst/gstreamer/prefix DCMAKE_INSTALL_PREFIX=/home/vjaquez/gst/gstreamer/prefix ..&lt;br&gt;cmake --build . --install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;vulkan-tools&quot; tabindex=&quot;-1&quot;&gt;Vulkan-Tools &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-compilation-with-third-party-libraries/#vulkan-tools&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/gstreamer/subprojects&lt;br&gt;git clone git@github.com:KhronosGroup/Vulkan-Tools.git&lt;br&gt;cd Vulkan-Tools&lt;br&gt;mkdir build&lt;br&gt;cd build&lt;br&gt;cmake  -DCMAKE_BUILD_TYPE=Debug -DVULKAN_HEADERS_INSTALL_DIR=/home/vjaquez/gst/gstreamer/prefix DCMAKE_INSTALL_PREFIX=/home/vjaquez/gst/gstreamer/prefix ..&lt;br&gt;cmake --build . --install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Right now we have the Vulkan headers and the Vulkan loader pkg-config file in
place. And we should be able to compile GStreamer. Right?&lt;/p&gt;
&lt;p&gt;Not exactly, because &lt;code&gt;gstenv.py&lt;/code&gt; only sets the environment variables for the
development environment, not for GStreamer compilation. But the solution is
simple, because we have all set in the proper order: just to set
&lt;code&gt;PKG_CONFIG_PATH&lt;/code&gt; when executing &lt;code&gt;meson setup&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;PKG_CONFIG_PATH=/home/vjaquez/gst/gstreamer/prefix/lib/pkgconfig meson setup --buildtype=debug build&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>Video decoding in GStreamer with Vulkan Video extension (part 2)</title>
		<link href="https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan-video-extension-part-2/"/>
		<updated>2022-12-18T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan-video-extension-part-2/</id>
		<content type="html">&lt;p&gt;Its has been a while since I reported my &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2021/07/09/video-decoding-in-gstreamer-with-vulkan/&quot;&gt;tinkering with the Vulkan Video
provisional
extension&lt;/a&gt;.
Now the specification will have its final release soon_ish_, and also there has
been more engagement within the open source communities, such as the
&lt;em&gt;work-in-progress&lt;/em&gt; &lt;a href=&quot;https://lynne.ee/vulkan-video-decoding.html&quot;&gt;FFmpeg
implementation&lt;/a&gt; by Lynne (please,
please, read that post), and the also &lt;em&gt;work-in-progress&lt;/em&gt; Mesa 3D drivers both
for
&lt;a href=&quot;https://airlied.blogspot.com/2022/12/vulkan-video-decoding-radv-status.html&quot;&gt;AMD&lt;/a&gt;
and
&lt;a href=&quot;https://airlied.blogspot.com/2022/12/vulkan-video-decoding-anv-update.html&quot;&gt;Intel&lt;/a&gt;
by Dave Airlie! Along with the well known &lt;a href=&quot;https://developer.nvidia.com/vulkan-driver&quot;&gt;NVIDIA beta drivers for
Vulkan&lt;/a&gt;.From our side, we have been trying to provide an open source alternative to the
video parser used by the Conformance Test Suite and the NVIDIA
&lt;a href=&quot;https://github.com/nvpro-samples/vk_video_samples&quot;&gt;vk_video_samples&lt;/a&gt;, using
GStreamer: &lt;a href=&quot;https://github.com/Igalia/GstVkVideoParser&quot;&gt;GstVkVideoParser&lt;/a&gt;, which
intends to be a drop-in replacement of the current proprietary parser library.&lt;/p&gt;
&lt;p&gt;Along the way, we have sketched the &lt;a href=&quot;https://github.com/LunarG/gfxreconstruct/pull/652&quot;&gt;Vulkan Video support in
gfxreconstruct&lt;/a&gt;, for getting
traces of the API usage. Sadly, its kind of bit-rotten right now, even more
because the specification has changed since then.&lt;/p&gt;
&lt;p&gt;Regarding the H.264 decoder for GStreamer, we just restarted its hacking. &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1361&quot;&gt;The
merge request was moved to
monorepo&lt;/a&gt;,
but for the sake of the well needed complete re-write, we changed the branch to
&lt;a href=&quot;https://gitlab.freedesktop.org/vjaquez/gstreamer/-/tree/vkh264dec&quot;&gt;this one
(vkh264dec)&lt;/a&gt;.
We needed to re-write it because, besides the specification updates, we have
learned many things along the journey, such as the &lt;em&gt;out-of-band parameters
update&lt;/em&gt;, Vulkan’s recommendation for memory pre-allocation as much as possible,
the DPB/references handling, the debate about buffer vs. slice uploading, and
other friction points that Lynne has spotted for future early adopters.&lt;/p&gt;
&lt;p&gt;The way to compile it is grab the branch and compile as usually GStreamer is
compiled with meson:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;meson setup builddir -Dgst-plugins-bad:vulkan-video=enabled --buildtype=debug&lt;br&gt;ninja C builddir&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And run simple pipelines such as&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;gst-launch-1.0 filesrc location=INPUT ! parsebin ! vulkanh264dec ! fakesink -v&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Our objective is to have a functional demo for the next &lt;a href=&quot;https://vulkan.org/events/vulkanised-2023&quot;&gt;Vulkanised in
February&lt;/a&gt;. We are very ambitious, we
want it to work in Linux, Windows and in many GPU as possible. Wish us luck. And
happy December festivities!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Gamepad in WPEWebKit</title>
		<link href="https://blogs.igalia.com/vjaquez/gamepad-in-wpewebkit/"/>
		<updated>2022-07-20T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gamepad-in-wpewebkit/</id>
		<content type="html">&lt;p&gt;This is the brief story of the &lt;a href=&quot;https://w3c.github.io/gamepad/&quot;&gt;Gamepad
implementation&lt;/a&gt; in
&lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPEWebKit&lt;/a&gt;.It started with an &lt;a href=&quot;https://github.com/WebPlatformForEmbedded/libwpe/pull/69&quot;&gt;early development done by Eugene
Mutavchi&lt;/a&gt; (kudos!).
Later, by the end of 2021, I retook those patches and discussed them with my
fellow igalian &lt;a href=&quot;https://perezdecastro.org/&quot;&gt;Adrián&lt;/a&gt;, and we decided to come with
a slightly different approach.&lt;/p&gt;
&lt;p&gt;Before going into the details, let’s quickly review the &lt;a href=&quot;https://wpewebkit.org/blog/02-overview-of-wpe.html&quot;&gt;WPE
architecture&lt;/a&gt;:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/wpe-architecture-diagram.png&quot; alt=&quot;WPE architecture diagram&quot;&gt;&lt;figcaption&gt;WPE
architecture diagram&lt;/figcaption&gt;&lt;/figure&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;cog library&lt;/em&gt; — it’s a shell library that simplifies the task of writing a
WPE browser from the scratch, by providing common functionality and helper
APIs.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;WebKit library&lt;/em&gt; — that’s the web engine that, given an URI and other
following inputs, returns, among other outputs, graphic buffers with the
page rendered.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;WPE library&lt;/em&gt; — it’s the API that bridges &lt;em&gt;cog&lt;/em&gt; (1) (or whatever other
browser application) and &lt;em&gt;WebKit&lt;/em&gt; (2).&lt;/li&gt;
&lt;li&gt;&lt;em&gt;WPE backend&lt;/em&gt; — it’s main duty is to provide graphic buffers to WebKit,
buffers supported by the hardware, the operating system, windowing system,
etc.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Eugene’s implementation has code in WebKit (implementing the gamepad support for
WPE port); code in &lt;em&gt;WPE library&lt;/em&gt; with an API to communicate WebKit’s gamepad and
&lt;em&gt;WPE backend&lt;/em&gt;, which provided a custom implementation of gamepad, reading
directly the event in the Linux device. Almost everything was there, but there
were some issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;WPE backend&lt;/em&gt; is mainly designed as a set of protocols, similar to Wayland, to
deal with graphic buffers or audio buffers, but not for input events. &lt;em&gt;Cog
library&lt;/em&gt; is the place where input events are handled and injected to &lt;em&gt;WebKit&lt;/em&gt;,
such as keyboard.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;https://github.com/WebPlatformForEmbedded/WPEBackend-rdk/pull/52&quot;&gt;gamepad handling in a &lt;em&gt;WPE
backend&lt;/em&gt;&lt;/a&gt;
was ad-hoc and low level, reading directly the events from Linux devices. This
approach is problematic since there are plenty gamepads in the market and each
has its own axis and buttons, so remapping them to the &lt;em&gt;standard map&lt;/em&gt; is
required. To overcome this issue and many others, there’s a GNOME library:
&lt;a href=&quot;https://gitlab.gnome.org/GNOME/libmanette&quot;&gt;libmanette&lt;/a&gt;, which is already used
by WebKitGTK port.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Today’s status of the gamepad support is that it works but it’s not yet fully
upstreamed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;merged&lt;/em&gt; &lt;a href=&quot;https://github.com/WebPlatformForEmbedded/libwpe/pull/88%3C&quot;&gt;libwpe pull
request&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/Igalia/cog/pull/361&quot;&gt;cog pull request&lt;/a&gt; – there are two
implementations: none and libmanette. &lt;em&gt;None&lt;/em&gt; is just a dummy implementation
which will ignore any request for a gamepad provider; it’s provided if
libmanette is not available or if available libwpe hasn’t gamepad support.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/WebKit/WebKit/pull/911&quot;&gt;WebKit pull request&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To prove you all that it works my exhibit &lt;em&gt;A&lt;/em&gt; is this video, where I play
&lt;a href=&quot;https://github.com/craigbuckler/asteroids&quot;&gt;asteroids&lt;/a&gt; in a &lt;a href=&quot;https://www.raspberrypi.com/products/raspberry-pi-4-model-b/&quot;&gt;RasberryPi
4&lt;/a&gt; 64 bits:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=LwNjAKRpaj4&quot;&gt;https://www.youtube.com/watch?v=LwNjAKRpaj4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The image was done with &lt;a href=&quot;https://buildroot.org/&quot;&gt;Buildroot&lt;/a&gt;, using its master
branch (from a week ago) with a bunch of modifications, such as adding
libmanette, a kernel patch for my gamepad device,
&lt;a href=&quot;https://github.com/raspberrypi/linux&quot;&gt;kernel&lt;/a&gt; 5.15.55 and its corresponding
&lt;a href=&quot;https://github.com/raspberrypi/firmware/&quot;&gt;firmware&lt;/a&gt;, etc.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GstVA H.264 encoder, compositor and JPEG decoder</title>
		<link href="https://blogs.igalia.com/vjaquez/gstva-h-264-encoder-compositor-and-jpeg-decoder/"/>
		<updated>2022-07-18T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstva-h-264-encoder-compositor-and-jpeg-decoder/</id>
		<content type="html">&lt;p&gt;There are, right now, three new GstVA elements merged in &lt;code&gt;main&lt;/code&gt;: &lt;code&gt;vah264enc&lt;/code&gt;,
&lt;code&gt;vacompositor&lt;/code&gt; and &lt;code&gt;vajpegdec&lt;/code&gt;.Just to recap, GstVA is a GStreamer plugin in &lt;code&gt;gst-plugins-bad&lt;/code&gt; (yes, &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1316&quot;&gt;we agree
it’s not a great name
anymore&lt;/a&gt;), to
differentiate it from &lt;code&gt;gstreamer-vaapi&lt;/code&gt;. Both plugins use
&lt;a href=&quot;https://github.com/intel/libva/&quot;&gt;libva&lt;/a&gt; to access &lt;em&gt;stateless&lt;/em&gt; video processing
operations; the main difference is, precisely, how stream’s state is handled:
while GstVA uses GStreamer libraries shared by other hardware accelerated
plugins (such as &lt;code&gt;d3d11&lt;/code&gt; and &lt;code&gt;v4l2codecs&lt;/code&gt;), &lt;code&gt;gstreamer-vaapi&lt;/code&gt; uses an internal,
tightly coupled and convoluted library.&lt;/p&gt;
&lt;p&gt;Also, note that right now (release 1.20) GstVA elements are ranked NONE, while
&lt;code&gt;gstreamer-vaapi&lt;/code&gt; ones are mostly PRIMARY+1.&lt;/p&gt;
&lt;p&gt;Back to the three new elements in GstVA, the most complex one is &lt;code&gt;vah264enc&lt;/code&gt;
wrote almost completely by He Junyan, from Intel. For it, He had to write a
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264bitwriter.h&quot;&gt;H.264
bitwriter&lt;/a&gt;
which is, until certain extend, the opposite for H.264 parser: construct the
&lt;em&gt;bitstream&lt;/em&gt; buffer from H.264 structures such as PPS, SPS, slice header, etc.
This API is part of &lt;code&gt;libgstcodecparsers&lt;/code&gt;, ready to be reused by other plugins or
applications. Currently &lt;code&gt;vah264enc&lt;/code&gt; is fairly complete and functional, dealing
with profiles and rate controls, among other parameters. It still have rough
spots, but we’re working on them. But He Junyan is restless and he already has
in the pipeline an encoder common class along with a HEVC and AV1 encoders.&lt;/p&gt;
&lt;p&gt;The second element is &lt;code&gt;vacompositor&lt;/code&gt;, wrote by Artie Eoff. It’s the replacement
of &lt;code&gt;vaapioverlay&lt;/code&gt; in &lt;code&gt;gstreamer-vaapi&lt;/code&gt;. The suffix &lt;code&gt;compositor&lt;/code&gt; is preferred to
follow the name of primary video mixing (software-based) element: &lt;code&gt;compositor&lt;/code&gt;,
successor of &lt;code&gt;videomixer&lt;/code&gt;. See &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1380#note_1184970&quot;&gt;this
discussion&lt;/a&gt;
for further details. The purpose of this element is to compose a single video
stream from multiple video streams. It works with Intel’s media-driver
supporting alpha channel, and also works with AMD Mesa Gallium, but without
alpha channel (in other words, a custom degree of transparency).&lt;/p&gt;
&lt;p&gt;The last, but not the least, element is &lt;code&gt;vajpegdec&lt;/code&gt;, which I worked on. The main
issue was not the decoder itself, but &lt;code&gt;jpegparse&lt;/code&gt;, which didn’t signal the image
caps required for the hardware accelerated decoders. For instance, VA only
decodes images with SOF marker 0 (Baseline DCT). It wasn’t needed before because
the main and only consumer of the parser is &lt;code&gt;jpegdec&lt;/code&gt; which deals with any type
of JPEG image. Long story short, we revamped &lt;code&gt;jpegparse&lt;/code&gt; and now it signals sof
marker, color space (YUV, RGB, etc.) and chroma subsampling (if it has YUV color
space), along with comments and EXIF-like metadata as pipeline’s tags. Thus
&lt;code&gt;vajpegdec&lt;/code&gt; will expose in caps template the supported color space and chroma
subsampling supported by the driver. For example, Intel supports (more or less)
RGB color space, while AMD Mesa Gallium don’t.&lt;/p&gt;
&lt;p&gt;And that’s all for now. Thanks.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>From gst-build to local-projects</title>
		<link href="https://blogs.igalia.com/vjaquez/from-gst-build-to-local-projects/"/>
		<updated>2022-05-02T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/from-gst-build-to-local-projects/</id>
		<content type="html">&lt;p&gt;Two years ago I wrote a blog post about &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/06/16/webkit-flatpak-sdk-and-gst-build/&quot;&gt;using gst-build inside of WebKit SDK
flatpak&lt;/a&gt;.
Well, all that has changed. That’s the true upstream spirit.There were two main reason for the change:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Since the switch to &lt;a href=&quot;https://blogs.gnome.org/tsaunier/2021/09/29/gstreamer-one-repository-to-rule-them-all/&quot;&gt;GStreamer mono
repository&lt;/a&gt;,
&lt;code&gt;gst-build&lt;/code&gt; &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/mono-repository.html&quot;&gt;has been
deprecated&lt;/a&gt;.
The mechanism in WebKit were added, basically, to allow GStreamer upstream,
so keeping &lt;code&gt;gst-build&lt;/code&gt; directory just polluted the conceptual framework.&lt;/li&gt;
&lt;li&gt;By using &lt;code&gt;gst-build&lt;/code&gt; one could override almost any other package in WebKit
SDK. For example, for developing gamepad handling in WPE I added &lt;code&gt;libmanette&lt;/code&gt;
as a GStreamer subproject, to link a modified version of the library rather
than the one in Flatpak. But that approach added an unneeded conceptual depth
in tree.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In order to simplify these operations, by taking advantage of &lt;a href=&quot;https://mesonbuild.com/Subprojects.html&quot;&gt;Meson’s
subproject support&lt;/a&gt; directly,
&lt;code&gt;gst-build&lt;/code&gt; handling were removed and new mechanism was set in place: &lt;a href=&quot;https://trac.webkit.org/wiki/WebKitFlatpakSDK/LocalProjects&quot;&gt;Local
Dependencies&lt;/a&gt;. With
local dependencies, you can add or override almost any dependency, while
flatting the tree layout, by placing at the same level GStreamer and any other
library. Of course, in order add dependencies, they must be built with meson.&lt;/p&gt;
&lt;p&gt;For example, to override libsoup and GStreamer, just clone both repositories
below of &lt;code&gt;Tools/flatpak/local-projects/subprojects&lt;/code&gt;, and declare them in
&lt;code&gt;WEBKIT_LOCAL_DEPS&lt;/code&gt; environment variable:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;export WEBKIT_SDK_LOCAL_DEPS=libsoup,gstreamer-full&lt;br&gt;export WEBKIT_SDK_LOCAL_DEPS_OPTIONS=&quot;-Dgstreamer-full:introspection=disabled -Dgst-plugins-good:soup=disabled&quot;&lt;br&gt;build-webkit --wpe&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>Digging further into Flatpak with NVIDIA</title>
		<link href="https://blogs.igalia.com/vjaquez/digging-further-into-flatpak-with-nvidia/"/>
		<updated>2022-01-17T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/digging-further-into-flatpak-with-nvidia/</id>
		<content type="html">&lt;p&gt;As you may know the development environment used by WebKitGTK and WPE is based
on Flatpak. I feel hacking software within Flatpak like teleoperating a rover in
Mars, since I have to go through Flatpak commands to execute the commands I want
to execute. The learning curve is steeper in exchange of a common development
environment.I started to work on another project where is required to use an NVIDIA GPU,
without stopping to work on WebKitGTK/WPE. So I needed to use the card within
Flatpak, and it’s well known that, currently, that setup is not available
out-of-the-box. Furthermore, I have to use a very specific version of the
graphics card drive for Vulkan.&lt;/p&gt;
&lt;p&gt;This is the story of how I make it work.&lt;/p&gt;
&lt;p&gt;My main reference is, of course, the blog post of my colleague TingPing: &lt;a href=&quot;https://blog.tingping.se/2018/08/26/flatpak-host-extensions.html&quot;&gt;Using
host Nvidia driver with
Flatpak&lt;/a&gt;,
besides &lt;a href=&quot;https://github.com/flathub/org.freedesktop.Platform.GL.nvidia&quot;&gt;Flatpak for NVIDIA GL runtime
platform&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As TingPing explained, Flatpak &lt;em&gt;does not use host libraries&lt;/em&gt;, that’s why it
might need &lt;a href=&quot;https://docs.flatpak.org/en/latest/available-runtimes.html&quot;&gt;runtimes and
extensions&lt;/a&gt; for
specific hardware setups, with the libraries for user-space, such as NVIDIA GL
platform runtime. And it &lt;em&gt;must have the same version as the one running in
kernel&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/flathub/org.freedesktop.Platform.GL.nvidia&quot;&gt;NVIDIA GL platform
extension&lt;/a&gt; is a
small project which generates Flatpak’s runtimes for &lt;em&gt;every&lt;/em&gt; public NVIDIA
driver. The interesting part is that those runtimes are not created in building
time, but at install-time. When the user installs the runtime, a driver blob is
downloaded from NVIDIA servers (see &lt;code&gt;--extra-data&lt;/code&gt; in &lt;code&gt;flatpak build-finish&lt;/code&gt; for
reference), and a small program is executed, which extracts the embedded tarball
in the blob, and from it, it extracts the required libraries. In a few words,
initially, the runtime is composed only by a definition of the file to download,
and the small program that populates the Flatpak’s file system at install-time.&lt;/p&gt;
&lt;p&gt;The trick here, that took me a lot to be aware, is that this small program &lt;em&gt;has
to be statically compiled&lt;/em&gt;, since it has be executed regardless the available
runtime.&lt;/p&gt;
&lt;p&gt;This little program uses &lt;a href=&quot;https://www.libarchive.org/&quot;&gt;libarchive&lt;/a&gt; to extract
the libraries from NVIDIA’s tarball, but &lt;code&gt;libarchive&lt;/code&gt; is not available
statically in any Flatpak’s SDK. Furthermore, our use of &lt;code&gt;libarchive&lt;/code&gt; will
depend on &lt;code&gt;libz&lt;/code&gt; and &lt;code&gt;liblzma&lt;/code&gt;, both statically compile as well. Gladly, there’s
only one, very old version, obsolete, of freedesktop SDK, which offers static
versions of &lt;code&gt;libz&lt;/code&gt; and &lt;code&gt;liblzma&lt;/code&gt;: 1.6. &lt;em&gt;And that’s why
org.freedesktop.Platform.GL.nvidia demands that specific old version of the
SDK&lt;/em&gt;. Then, the manifest of the extension contains basically the static
compilation of &lt;code&gt;libarchive&lt;/code&gt; and the static compilation of the next-to-be
&lt;code&gt;apply_extra&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update&lt;/em&gt;: There’s a &lt;a href=&quot;https://github.com/flathub/org.freedesktop.Platform.GL.nvidia/pull/71&quot;&gt;merge request to use current freedesktop SDK
21.08&lt;/a&gt;,
which, basically, builds statically &lt;code&gt;libz&lt;/code&gt; and &lt;code&gt;liblzma&lt;/code&gt;, besides &lt;code&gt;libarchive&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I needed to modify &lt;code&gt;org.freedesktop.Platform.GL.nvidia&lt;/code&gt; sources a bit, since it,
by default, consist in a big loop of downloading, hashing, templating a json
manifest, and building, for every supported driver. But, as my case is just one
custom driver, I don’t want to waste time in that loop. The hack to achieve it
is fairly simple:&lt;/p&gt;
&lt;pre class=&quot;language-diff&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-diff&quot;&gt;diff --git a/versions.sh b/versions.sh&lt;br&gt;index 8b72664..86686c0 100755&lt;br&gt;&lt;span class=&quot;token coord&quot;&gt;--- a/versions.sh&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token coord&quot;&gt;+++ b/versions.sh&lt;/span&gt;&lt;br&gt;@@ -15,4 +15,5 @@ TESLA_VERSIONS=&quot;450.142.00 450.119.04 450.51.06 450.51.05 440.118.02 440.95.01 4&lt;br&gt;# Probably never: https://ahayzen.com/direct/flathub_downloads_only_nvidia_runtimes.txt&lt;br&gt;UNSUPPORTED_VERSIONS=&quot;390.147 390.144 390.143 390.141 390.138 390.132 390.129 390.116 390.87 390.77 390.67 390.59 390.48 390.42 390.25 390.12 387.34 387.22 387.12 384.130 384.111 384.98 384.90 384.69 384.59 384.47 381.22 381.09 378.13 375.82 375.66 375.39 375.26 370.28 367.57&quot;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token deleted-sign deleted&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;DRIVER_VERSIONS=&quot;$BETA_VERSIONS $VULKAN_VERSIONS $NEW_FEATURE_VERSIONS $PRODUCTION_VERSIONS $LEGACY_VERSIONS $TESLA_VERSIONS $UNSUPPORTED_VERSIONS&quot;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;#DRIVER_VERSIONS=&quot;$BETA_VERSIONS $VULKAN_VERSIONS $NEW_FEATURE_VERSIONS $PRODUCTION_VERSIONS $LEGACY_VERSIONS $TESLA_VERSIONS $UNSUPPORTED_VERSIONS&quot;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;DRIVER_VERSIONS=&quot;470.XX.XX&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But in order to make it work, it needs a file in &lt;code&gt;data/&lt;/code&gt; directory with the
specification of the file to download, with the format:
&lt;code&gt;NAME:SHA256:DOWNLOAD-SIZE:INSTALL-SIZE:URL&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-diff&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-diff&quot;&gt;&lt;span class=&quot;token coord&quot;&gt;--- /dev/null&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token coord&quot;&gt;+++ b/data/nvidia-470.XX.XX-x86_64.data&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token coord&quot;&gt;@@ -0,0 +1 @@&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token inserted-sign inserted&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:34...checksum-sha264...:123456789::http://compu.home.arpa/NVIDIA/NVIDIA-Linux-x86_64-470.XX.XX.run&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last parameter is the URL where the driver shall be downloaded. In my case
is a local server to ease the testing.&lt;/p&gt;
&lt;p&gt;Long story short, the command to execute are:&lt;/p&gt;
&lt;p&gt;To setup the building environment:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;flatpak install org.freedesktop.Sdk//1.6 org.freedesktop.Platform//1.6&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To build the Flatpak repository and package:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The command will output a &lt;code&gt;repo&lt;/code&gt; directory in the current one. There’s where the
generated Flatpak package is stored.&lt;/p&gt;
&lt;p&gt;To install the local repository and the extension:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;flatpak --user remote-add --no-gpg-verify nvidia-local repo&lt;br&gt;flatpak -v install nvidia-local org.freedesktop.Platform.GL.nvidia-470-XX-XX&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To remove the obsolete SDK and platform once built:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;flatpak uninstall org.freedesktop.Sdk//1.6 org.freedesktop.Platform//1.6&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To remove the local repository and the extension if something went wrong:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;flatpak -v uninstall org.freedesktop.Platform.GL.nvidia-470-62-15&lt;br&gt;flatpak --user remote-delete nvidia-local&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One way to verify if the libraries are installed correctly and if they match
with the driver running in the kernel’s host, is to install and run
&lt;a href=&quot;https://gitlab.com/leinardi/gwe&quot;&gt;&lt;code&gt;GreenWithEnvy&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;flatpak install com.leinardi.gwe&lt;br&gt;flatpak run com.leinardi.gwe&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to install the driver in your WebKit development environment, you
just need to set the environment variable &lt;code&gt;FLATPAK_USER_DIR&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;FLATPAK_USER_DIR=~/WebKit/WebKitBuild/UserFlatpak flatpak --user remote-add --no-gpg-verify nvidia-local repo&lt;br&gt;FLATPAK_USER_DIR=~/WebKit/WebKitBuild/UserFlatpak flatpak -v install nvidia-local org.freedesktop.Platform.GL.nvidia-470-XX-XX&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>GstVA in GStreamer 1.20</title>
		<link href="https://blogs.igalia.com/vjaquez/gstva-in-gstreamer-1-20/"/>
		<updated>2021-12-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstva-in-gstreamer-1-20/</id>
		<content type="html">&lt;p&gt;It was a year and half ago when I announced &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/07/10/new-va-api-h-264-decoder-in-gst-plugins-bad/&quot;&gt;a new VA-API H.264 decoder element
in
gst-plugins-bad&lt;/a&gt;.
And it was bundled in GStreamer release 1.18 a couple months later. Since then,
we have been working adding more decoders and filters, fixing bugs, and
enhancing its design. I wanted to publish this blog post as soon as release 1.20
was announced, but, since the developing window is closed, which means no more
new features will be included, I’ll publish it now, to create buzz around the
next GStreamer release.Here’s the list of new GstVA decoders (of course, they are only available if
your driver supports them):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;vah265dec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vavp8dec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vavp9dec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vaav1dec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vampeg2dec&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, there are a couple new features in &lt;code&gt;vah264dec&lt;/code&gt; (common to all
&lt;code&gt;gstcodecs&lt;/code&gt;-based H.264 decoders):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supports interlaced streams (&lt;code&gt;vah265dec&lt;/code&gt; and &lt;code&gt;vampeg2dec&lt;/code&gt; too).&lt;/li&gt;
&lt;li&gt;Added a &lt;code&gt;compliance&lt;/code&gt; property to trick the specification conformance for lower
the latency, for example, or to enable non-standard features.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But not only decoders, there are two new elements for post-processing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;vapostproc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vadeinterlace&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;vapostproc&lt;/code&gt; is similar to &lt;code&gt;vaapipostproc&lt;/code&gt; but without the interlace operation,
since it was moved to another element. The reason for this is because there are
deinterlacing methods which require to hold a list of referenced frames, thus
these methods are broken in &lt;code&gt;vaapipostproc&lt;/code&gt;, and adding them would increase the
complexity of the element with no need. To keep things simple it’s better to
handle deinterlacing in a different element.&lt;/p&gt;
&lt;p&gt;This is the list of filters and features supported by &lt;code&gt;vapostproc&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Color conversion&lt;/li&gt;
&lt;li&gt;Resizing&lt;/li&gt;
&lt;li&gt;Cropping&lt;/li&gt;
&lt;li&gt;Color balance (Intel only -so far-)&lt;/li&gt;
&lt;li&gt;Video direction (Intel only)&lt;/li&gt;
&lt;li&gt;Skin tone enhancement (Intel only)&lt;/li&gt;
&lt;li&gt;Denoise and Sharpen (Intel only)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And, I ought to say, &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1258&quot;&gt;HDR is in the
pipeline&lt;/a&gt;,
but it will be released after 1.20.&lt;/p&gt;
&lt;p&gt;While &lt;code&gt;vadeinterlace&lt;/code&gt; only does that, deinterlacing. But it supports all the
available methods currently in the VA-API specification, using the new way to
select the field to extract, since the old one (used by GStreamer-VAAPI and
FFmpeg) is a bit more expensive.&lt;/p&gt;
&lt;p&gt;Finally, both video filters, if they cannot handle the income format, they are
configured in &lt;em&gt;passthrough mode&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But there are not only new elements, there’s also a new library!&lt;/p&gt;
&lt;p&gt;Since many others elements need to share a common &lt;code&gt;VADisplay&lt;/code&gt; in the GStreamer
pipeline, the new library expose only the &lt;code&gt;GstVaDisplay&lt;/code&gt; object by now. The new
library must be thin and lean, exposing only what it’s requested by other
elements, such as gst-msdk. We have pending to merge after 1.20, for example,
the add of &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1256&quot;&gt;&lt;code&gt;GstContext&lt;/code&gt;
helpers&lt;/a&gt;,
and the plan is to expose the allocators and bufferpools later.&lt;/p&gt;
&lt;p&gt;Another huge task are encoders. After the freeze, we’ll merge &lt;a href=&quot;https://gitlab.freedesktop.org//gstreamer/gstreamer/-/merge_requests/1051&quot;&gt;the first
implementation of the H.264
encoder&lt;/a&gt;,
and add, in different iterations, more encoders.&lt;/p&gt;
&lt;p&gt;As I said in the previous blog post, all these elements are ranked as &lt;em&gt;none&lt;/em&gt;, so
the won’t be autoplugged, for example by &lt;code&gt;playbin&lt;/code&gt;. To do so, users need to
export the environment variable &lt;code&gt;GST_PLUGIN_FEATURE_RANK&lt;/code&gt; &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gstreamer/running.html&quot;&gt;as
documented&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;GST_PLUGIN_FEATURE_RANK=vah264dec:MAX,vah265dec:MAX,vampeg2dec:MAX,vavp8dec:MAX,vavp9dec:MAX gst-play-1.0 stream.mp4&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks a bunch to He Junyan, Seungha Yang and Nicolas Dufresne, for all the
effort and care.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Still, the to-do list is large enough. Just to share what I have in my notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add a new upload method in &lt;code&gt;glupload&lt;/code&gt; to interop with VA surfaces – though
this hardly will be merged since it creates a circular dependency between
-base and -bad.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vavc1dec&lt;/code&gt; – it might need a rewrite of &lt;code&gt;vc1parse&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vajpegdec&lt;/code&gt; – it needs a rewrite of &lt;code&gt;jpegparse&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vaalphacombine&lt;/code&gt; – decoding alpha channel with VA within &lt;code&gt;vp9alphacodebin&lt;/code&gt;
and &lt;code&gt;vp8alphacodebin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vamixer&lt;/code&gt; – similar to &lt;code&gt;compositor&lt;/code&gt;, &lt;code&gt;glmixer&lt;/code&gt; or &lt;code&gt;vaapioverlay&lt;/code&gt;, to compose
a single frame from different video streams.&lt;/li&gt;
&lt;li&gt;And encoders (mainly H.264 and H.265).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a final mode, GStreamer-VAAPI has enter into maintenance mode. The general
plan, without any promise or dates, is to deprecate it when most of its use
cases were covered by GstVA.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Video decoding in GStreamer with Vulkan</title>
		<link href="https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan/"/>
		<updated>2021-07-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan/</id>
		<content type="html">&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: &lt;em&gt;Vulkan video is still work in progress, from specification to
available drivers and applications. Do not use it for production software just
yet.&lt;/em&gt;## Introduction&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.vulkan.org&quot;&gt;Vulkan&lt;/a&gt; is a cross-platform Application Programming
Interface (API), backed by the &lt;a href=&quot;https://www.khronos.org&quot;&gt;Khronos Group&lt;/a&gt;, aimed
at graphics developers for a wide range of different tasks. The interface is
described by a common &lt;a href=&quot;https://khr.io/vkspec&quot;&gt;specification&lt;/a&gt;, and it is
implemented by different drivers, usually provided by GPU vendors and
&lt;a href=&quot;https://mesa3d.org&quot;&gt;Mesa&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One way to visualize Vulkan, at first glance, is like a &lt;em&gt;low-level&lt;/em&gt; OpenGL API,
but better described and easier to extend. Even more, it is possible to
&lt;a href=&quot;https://www.youtube.com/watch?v=ukrB-Lbl_Jg&quot;&gt;implement OpenGL on top of
Vulkan&lt;/a&gt;. And, as far as I am told
by my peers in &lt;a href=&quot;https://www.igalia.com&quot;&gt;Igalia&lt;/a&gt;, Vulkan drivers are easier and
cleaner to implement than OpenGL ones.&lt;/p&gt;
&lt;p&gt;A couple years ago, a technical specification group (TSG), inside the Vulkan
Working Group, proposed the integration of hardware accelerated video
compression and decompression into the Vulkan API. In April 2021 the formed
Vulkan Video TSG published &lt;a href=&quot;https://www.khronos.org/blog/an-introduction-to-vulkan-video&quot;&gt;an introduction to the
specification&lt;/a&gt;.
Please, do not hesitate to read it. It’s quite good.&lt;/p&gt;
&lt;p&gt;Matthew Waters &lt;a href=&quot;https://ystreet00.blogspot.com/2016/02/vulkan-in-gstreamer.html&quot;&gt;worked on a GStreamer plugin using
Vulkan&lt;/a&gt;, mainly
for uploading, composing and rendering frames. Later, he developed a library
mapping Vulkan objects to GStreamer. This work was key for what I am presenting
here. In 2019, during the last GStreamer Conference, &lt;a href=&quot;https://gstconf.ubicast.tv/videos/gstreamer-vulkan/&quot;&gt;Matthew delivered a talk
about his work&lt;/a&gt;. Make sure
to watch it, it’s worth it.&lt;/p&gt;
&lt;p&gt;Other key components for this effort were the &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/codecs/index.html&quot;&gt;base classes for
decoders&lt;/a&gt; and
the &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-plugins-bad-codecparsers/index.html&quot;&gt;bitstream
parsing&lt;/a&gt;
libraries in GStreamer, jointly developed by Intel, Centricular, Collabora and
Igalia. Both libraries allow using APIs for &lt;em&gt;stateless&lt;/em&gt; video decoding and
encoding within the GStreamer framework, such as Vulkan Video, VAAPI, D3D11, and
so on.&lt;/p&gt;
&lt;p&gt;When the &lt;a href=&quot;https://www.igalia.com/technology/graphics&quot;&gt;graphics team&lt;/a&gt; in Igalia
told &lt;a href=&quot;https://www.igalia.com/technology/multimedia&quot;&gt;us&lt;/a&gt; about the Vulkan Video
TSG, we decided to explore the specification. Therefore, Igalia decided to
sponsor part of my time to craft a GStreamer element to decode H.264 streams
using these new Vulkan extensions.&lt;/p&gt;
&lt;h2 id=&quot;assumptions&quot; tabindex=&quot;-1&quot;&gt;Assumptions &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan/#assumptions&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As stated at the beginning of this text, this development has to be considered
unstable and the &lt;strong&gt;APIs may change without further notice&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Right now, the only Vulkan driver that offers these extensions is the &lt;a href=&quot;https://developer.nvidia.com/vulkan-driver&quot;&gt;beta
NVIDIA driver&lt;/a&gt;. You would need, at
least, version 455.50.12 for Linux, but it would be better to grab the latest
one. And, of course, I only tested this on Linux. I would like to thank NVIDIA
for their &lt;a href=&quot;https://github.com/nvpro-samples/vk_video_samples&quot;&gt;Vk Video samples&lt;/a&gt;.
Their test application drove my work.&lt;/p&gt;
&lt;p&gt;Finally, this work assumes the use of the main development branch of GStreamer,
because the base classes for decoders are quite recent. Naturally, you can use
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-build&quot;&gt;gst-build&lt;/a&gt; for an efficient
upstream workflow.&lt;/p&gt;
&lt;h2 id=&quot;work-done&quot; tabindex=&quot;-1&quot;&gt;Work done &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan/#work-done&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This work basically consists of two new objects inside the GstVulkan code:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GstVulkanDeviceDecoder&lt;/code&gt;: a GStreamer object in &lt;code&gt;GstVulkan&lt;/code&gt; library,
inherited from
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/vulkanlib/vkdevice.html&quot;&gt;&lt;code&gt;GstVulkanDevice&lt;/code&gt;&lt;/a&gt;,
which enables &lt;code&gt;VK_KHR_video_queue&lt;/code&gt; and &lt;code&gt;VK_KHR_video_decode_queue&lt;/code&gt;
extensions. Its purpose is to handle codec-agnostic operations.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vulkanh264dec&lt;/code&gt;: a GStreamer element, inherited from
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/codecs/gsth264decoder.html&quot;&gt;&lt;code&gt;GstH264Decoder&lt;/code&gt;&lt;/a&gt;,
which tries to instantiate a &lt;code&gt;GstVulkanDeviceDecoder&lt;/code&gt; to composite it and is
in charge of handling codec-specific operations later, such as matching the
parsed structures. It outputs, in the source pad, &lt;code&gt;memory:VulkanImage&lt;/code&gt;
featured frames, with NV12 color format.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So far this pipeline works without errors:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;gst-launch-1.0 filesrc location=big_buck_bunny_1080p_h264.mov ! parsebin ! vulkanh264dec ! fakesink&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you might see, the pipeline does not use &lt;code&gt;vulkansink&lt;/code&gt; to render frames. This
is because the Vulkan format output by the driver’s decoder device is
&lt;code&gt;VK_FORMAT_G8_B8R8_2PLANE_420_UNORM&lt;/code&gt;, which is NV12 crammed in a single image,
while for &lt;code&gt;GstVulkan&lt;/code&gt; a NV12 frame is a buffer with two images, one per
component. So the current color conversion in &lt;code&gt;GstVulkan&lt;/code&gt; does not support this
Vulkan format. That is future work, among other things.&lt;/p&gt;
&lt;p&gt;You can find the merge request for this work in &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2397&quot;&gt;GStreamer’s
Gitlab&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;future-work&quot; tabindex=&quot;-1&quot;&gt;Future work &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/video-decoding-in-gstreamer-with-vulkan/#future-work&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As was mentioned before, it is required to fully support
&lt;code&gt;VK_FORMAT_G8_B8R8_2PLANE_420_UNORM&lt;/code&gt; format in &lt;code&gt;GstVulkan&lt;/code&gt;. That requires
thinking about how to keep backwards compatibility. Later, an implementation of
the sampler to convert this format to RGB will be needed, so that decoded frames
can be rendered by &lt;code&gt;vulkansink&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Also, before implementing any new feature, the code and its abstractions will
need to be cleaned up, since currently the division between codec-specific and
codec-agnostic code is not strict, and it must be fixed.&lt;/p&gt;
&lt;p&gt;Another important cleanup task is to enhance the way the Vulkan headers are
handled. Since the required headers files for video extensions are beta, they
are not expected to be available in the system, so temporally I had to add the
those headers as part of the &lt;code&gt;GstVulkan&lt;/code&gt; library.&lt;/p&gt;
&lt;p&gt;Then it will be possible to implement the H.265 decoder, since the NVIDIA driver
also supports it.&lt;/p&gt;
&lt;p&gt;Later on, it will be nice to start thinking about encoders. But this requires
extending support for stateless encoders in GStreamer, something I want do to
for the &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/sys/va&quot;&gt;new VAAPI
plugin&lt;/a&gt;
too.&lt;/p&gt;
&lt;p&gt;Thanks for bearing with me, and thanks to Igalia for sponsoring this work.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Review of Igalia Multimedia activities (2020/H2)</title>
		<link href="https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/"/>
		<updated>2021-04-21T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/</id>
		<content type="html">&lt;p&gt;As the first quarter of 2021 has already come to a close, we reckon it’s time to
recap our achievements from the second half of 2020, and update you on the
improvements we have been making to the multimedia experience on the Web and
Linux in general.Our previous reports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2019/02/11/review-of-igalias-multimedia-activities-2018-h2/&quot;&gt;2018/H2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://base-art.net/Articles/review-of-the-igalia-multimedia-team-activities-2019h1/&quot;&gt;2019/H1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/03/16/review-of-the-igalia-multimedia-team-activities-2019-h2/&quot;&gt;2019/H2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/09/07/review-of-igalia-multimedia-activities-2020-h1/&quot;&gt;2020/H1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;wpe-webkitgtk&quot; tabindex=&quot;-1&quot;&gt;&lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPE&lt;/a&gt; / &lt;a href=&quot;https://webkitgtk.org/&quot;&gt;WebKitGTK&lt;/a&gt; &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/#wpe-webkitgtk&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We have closed ~100 issues related with multimedia in WebKitGTK/WPE, such as
fixed seek issues while playback, plugged memory leaks, gardening tests,
improved Flatpak-based developing work-flow, enabled new codecs, etc… Overall,
we improved a bit the multimedia’s user experience on these Webkit engine ports.&lt;/p&gt;
&lt;p&gt;To highlight a couple tasks, we did some maintenance work on WebAudio backends,
and we upstreamed an internal audio mixer, keeping only one connection to the
audio server, such as PulseAudio, instead of multiple connections, one for every
audio resource. The mixer combines all streams into a single audio server
connection.&lt;/p&gt;
&lt;h3 id=&quot;adaptive-media-streaming-for-the-web-mse&quot; tabindex=&quot;-1&quot;&gt;Adaptive media streaming for the Web (&lt;a href=&quot;https://www.w3.org/TR/media-source/&quot;&gt;MSE&lt;/a&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/#adaptive-media-streaming-for-the-web-mse&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We have been working on a new MSE backend for a while, but along the way many
related bugs have appeared and they were squashed. Also many code cleanups has
been carried out. Though it has been like &lt;a href=&quot;http://catb.org/jargon/html/Y/yak-shaving.html&quot;&gt;yak
shaving&lt;/a&gt;, we are confident that
we will reach the end of this &lt;em&gt;long and winding road&lt;/em&gt; soonish.&lt;/p&gt;
&lt;h3 id=&quot;drm-media-playback-for-the-web-eme&quot; tabindex=&quot;-1&quot;&gt;DRM media playback for the Web (&lt;a href=&quot;https://www.w3.org/TR/encrypted-media/&quot;&gt;EME&lt;/a&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/#drm-media-playback-for-the-web-eme&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Regarding digital protected media playback, we worked to upstream OpenCDM,
support with Widevine, through &lt;a href=&quot;https://github.com/rdkcentral/Thunder&quot;&gt;RDK’s Thunder
framework&lt;/a&gt;, while continued with the
usual maintenance of the others key systems, such as &lt;a href=&quot;https://www.w3.org/TR/encrypted-media/#clear-key&quot;&gt;Clear
Key&lt;/a&gt;,
&lt;a href=&quot;https://en.wikipedia.org/wiki/Widevine&quot;&gt;Widevine&lt;/a&gt; and
&lt;a href=&quot;https://en.wikipedia.org/wiki/PlayReady&quot;&gt;PlayReady&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For more details we published a blog post: &lt;a href=&quot;https://blogs.igalia.com/xrcalvar/2020/09/02/serious-encrypted-media-extensions-on-gstreamer-based-webkit-ports/&quot;&gt;Serious Encrypted Media Extensions
on GStreamer based WebKit
ports&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;realtime-communications-for-the-web-webrtc&quot; tabindex=&quot;-1&quot;&gt;Realtime communications for the Web (&lt;a href=&quot;https://www.w3.org/TR/webrtc/&quot;&gt;WebRTC&lt;/a&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/#realtime-communications-for-the-web-webrtc&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Just as EME, WebRTC is not currently enabled by default in browsers such as
Epiphany because license problems, but they are available for custom adopters,
and we are maintaining it. For example, we collaborated to upgrade LibWebRTC to
M87 and fixed the expected regressions and gardening.&lt;/p&gt;
&lt;p&gt;Along the way we experimented a bit with the new GPUProcess for capture devices,
but we decided to stop the experimentation while waiting for a broader adoption
of the process, for example in graphics rendering, in WPE/WebKitGTK.&lt;/p&gt;
&lt;p&gt;GPUProcess work will be retaken at some point, because it’s not, currently, a
hard requirement, since we already have moved capture devices handling from the
UIProcess to the WebProcess, isolating all GStreamer operations in the latter.&lt;/p&gt;
&lt;h2 id=&quot;gstreamer&quot; tabindex=&quot;-1&quot;&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/&quot;&gt;GStreamer&lt;/a&gt; &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/#gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GStreamer is one of our core multimedia technologies, and we contribute on it on
a daily basis. We pushed ~400 commits, with similar number of code reviews,
along the second half of 2020. Among of those contributions let us highlight the
following list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A lot of bug fixing aiming for release 1.18.&lt;/li&gt;
&lt;li&gt;Reworked and enhanced &lt;code&gt;decodebin3&lt;/code&gt;, the &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/transcoder/index.html&quot;&gt;GstTranscoder
API&lt;/a&gt;
and &lt;code&gt;encodebin&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Merged &lt;code&gt;av1parse&lt;/code&gt; in video parsers plugin.&lt;/li&gt;
&lt;li&gt;Merged &lt;code&gt;qroverlay&lt;/code&gt; plugin.&lt;/li&gt;
&lt;li&gt;Iterated on the
&lt;em&gt;&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/474&quot;&gt;mono-repo&lt;/a&gt;&lt;/em&gt;
proposal, which requires consensus and coordination among the whole community.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstwpe&lt;/code&gt; element has been greatly improved from new user requests.&lt;/li&gt;
&lt;li&gt;Contributed on the new &lt;code&gt;libgstcodecs&lt;/code&gt; library, which enables stateless video
decoders through different platforms (for example, v4l2, d3d11, va, etc.).&lt;/li&gt;
&lt;li&gt;Developed a new plugin for VA-API using this library, exposing H.264, H.265,
VP9, VP8, MPEG2 decoders and a full featured postprocessor, with better
performance, according our measurements, than GStreamer-VAAPI.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;conferences&quot; tabindex=&quot;-1&quot;&gt;Conferences &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h2/#conferences&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Despite 2020 was not a year for conferences, many of them went virtual. We
attended one, the &lt;a href=&quot;https://mile-high.video/&quot;&gt;Mile high video&lt;/a&gt; conference, and
participated in the Slack workspace.&lt;/p&gt;
&lt;p&gt;Thank you for reading this report and stay tuned with our work.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Notes on using Emacs (LSP/ccls) for WebKit</title>
		<link href="https://blogs.igalia.com/vjaquez/notes-on-using-emacs-lsp-ccls-for-webkit/"/>
		<updated>2020-11-26T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/notes-on-using-emacs-lsp-ccls-for-webkit/</id>
		<content type="html">&lt;p&gt;I used to regard myself as an austere programmer in terms of tooling: Emacs
—with a plain configuration— and grep. This approach forces you to understand
all the elements involved in a project.Some time ago I have to code in Rust, so I needed to learn the language as fast
as possible. I looked for packages in &lt;a href=&quot;https://melpa.org&quot;&gt;MELPA&lt;/a&gt; that could help
me to be productive quickly. Obviously, I installed
&lt;a href=&quot;https://github.com/rust-lang/rust-mode&quot;&gt;rust-mode&lt;/a&gt;, but I also found
&lt;a href=&quot;https://github.com/racer-rust/emacs-racer&quot;&gt;racer&lt;/a&gt; for auto-completion. I tried
it out. It was messy to setup and unstable, but it helped me to code while
learning. When I felt comfortable with the base code, I uninstalled it.&lt;/p&gt;
&lt;p&gt;This year I returned to work on &lt;a href=&quot;https://webkit.org/&quot;&gt;WebKit&lt;/a&gt;. The last time I
contributed to it was around five years ago, but now in a different area (still
in the multimedia stack). WebKit is huge, and because of C++, I found
&lt;a href=&quot;https://www.gnu.org/software/global&quot;&gt;gtags&lt;/a&gt; rather limited. Out of curiosity I
looked for something similar to racer but for C++. And I spent a while digging
on it.&lt;/p&gt;
&lt;p&gt;The solution consists in the integration of three MELPA packages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/emacs-lsp/lsp-mode&quot;&gt;lsp-mode&lt;/a&gt;: a client for Language
Server Protocol for Emacs.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/company-mode/company-mode&quot;&gt;company-mode&lt;/a&gt;: a text
completion framework.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/MaskRay/ccls&quot;&gt;ccls&lt;/a&gt;: A C/C++ language server. Besides
&lt;a href=&quot;https://github.com/MaskRay/emacs-ccls&quot;&gt;emacs-ccls&lt;/a&gt; adds more functionality to
&lt;em&gt;lsp-mode&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(I known, there’s a &lt;a href=&quot;https://github.com/joaotavora/eglot&quot;&gt;simpler alternative&lt;/a&gt;
to &lt;code&gt;lsp-mode&lt;/code&gt;, but I haven’t tried it yet).&lt;/p&gt;
&lt;p&gt;First we might explain what’s LSP. It stands for &lt;a href=&quot;https://microsoft.github.io/language-server-protocol/&quot;&gt;Language Server
Protocol&lt;/a&gt;, defined with
&lt;a href=&quot;https://en.wikipedia.org/wiki/JSON-RPC&quot;&gt;JSON-RPC&lt;/a&gt; messages, between the editor
and the &lt;em&gt;language server&lt;/em&gt;. It was originally developed by Microsoft for Visual
Studio, which purpose is to support auto-completion, finding symbol’s
definition, to show early error markers, etc., inside the editor. Therefore,
&lt;em&gt;lsp-mode&lt;/em&gt; is an Emacs mode that communicates with different language servers in
&lt;em&gt;LSP&lt;/em&gt; and operates in Emacs accordingly.&lt;/p&gt;
&lt;p&gt;In order to support the auto-completion use-case &lt;em&gt;lsp-mode&lt;/em&gt; uses the
&lt;em&gt;company-mode&lt;/em&gt;. This Emacs mode is capable to create a &lt;a href=&quot;https://en.wikipedia.org/wiki/Context_menu&quot;&gt;floating context
menu&lt;/a&gt; where the editing cursor is
placed.&lt;/p&gt;
&lt;p&gt;The third part of the puzzle is, of course, the &lt;em&gt;language server&lt;/em&gt;. There’s a
&lt;a href=&quot;https://emacs-lsp.github.io/lsp-mode/page/languages/&quot;&gt;language servers for different programming
languages&lt;/a&gt;. For C &amp;amp; C++
there are two servers: &lt;a href=&quot;https://clangd.llvm.org/&quot;&gt;clangd&lt;/a&gt; and
&lt;a href=&quot;https://github.com/MaskRay/ccls&quot;&gt;ccls&lt;/a&gt;. The former uses Clang compiler, the
last can use either Clang, GCC or MSVC. Along this text &lt;em&gt;ccls&lt;/em&gt; will be used for
reasons exposed later. In between,
&lt;a href=&quot;https://github.com/MaskRay/emacs-ccls&quot;&gt;emacs-ccls&lt;/a&gt; leverages and extends the
support of &lt;em&gt;ccls&lt;/em&gt; in &lt;em&gt;lsp-mode&lt;/em&gt;, though it’s not mandatory.&lt;/p&gt;
&lt;p&gt;In short, the basic .emacs configuration, using
&lt;a href=&quot;https://github.com/jwiegley/use-package&quot;&gt;use-package&lt;/a&gt;, would have these lines:&lt;/p&gt;
&lt;pre class=&quot;language-elisp&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-elisp&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;use-package&lt;/span&gt; company&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:diminish&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:config&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;global-company-mode&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;use-package&lt;/span&gt; lsp-mode&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:diminish&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;L&quot;&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:init&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;setq&lt;/span&gt; lsp-keymap-prefix &lt;span class=&quot;token string&quot;&gt;&quot;C-l&quot;&lt;/span&gt;&lt;br&gt;              lsp-enable-file-watchers &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;br&gt;              lsp-enable-on-type-formatting &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;br&gt;              lsp-enable-snippet &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:hook&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c-mode-common&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; lsp-deferred&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:commands&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;lsp&lt;/span&gt; lsp-deferred&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;use-package&lt;/span&gt; ccls&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:init&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;setq&lt;/span&gt; ccls-sem-highlight-method &lt;span class=&quot;token quoted-symbol variable symbol&quot;&gt;&#39;font-lock&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token lisp-property property&quot;&gt;:hook&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c-mode&lt;/span&gt; c++-mode objc-mode&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token lambda&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token arguments&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;token quoted-symbol variable symbol&quot;&gt;&#39;ccls&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;lsp-deferred&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The snippet first configures &lt;em&gt;company-mode&lt;/em&gt;. It is enabled globally because,
normally, it is a nice feature to have, even in non-coding buffers, such as this
very one, for writing a blog post in markdown format. &lt;a href=&quot;https://github.com/emacsmirror/diminish&quot;&gt;Diminish
mode&lt;/a&gt; hides or abbreviates the mode
description in the &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Mode-Line.html&quot;&gt;Emacs’ mode
line&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Later comes &lt;em&gt;lsp-mode&lt;/em&gt;. It’s big and aims to do a lot of things, basically we
have to tell it to disable certain features, such as file watcher, something not
viable in massive projects as WebKit; as I don’t use snippet (generic text
templates), I also disable it; and finally, &lt;em&gt;lsp-mode&lt;/em&gt; tries to format the code
at typing, I don’t know how the code style is figured out, but in my experience,
it’s always detected wrong, so I disabled it too. Finally, &lt;em&gt;lsp-mode&lt;/em&gt; is
launched when a text uses the &lt;code&gt;c-mode-common&lt;/code&gt;, shared by &lt;code&gt;c++-mode&lt;/code&gt; too.
&lt;em&gt;lsp-mode&lt;/em&gt; is launched deferred, meaning it’ll startup until the buffer is
visible; this is important since we might want to delay &lt;em&gt;ccls&lt;/em&gt; session creation
until the buffer’s &lt;code&gt;.dir-locals.el&lt;/code&gt; file is processed, where it is configured
for the specific project.&lt;/p&gt;
&lt;p&gt;And lastly, &lt;em&gt;ccls-mode&lt;/em&gt; configuration, hooked until &lt;code&gt;c-mode&lt;/code&gt; or &lt;code&gt;c++-mode&lt;/code&gt; are
loaded up in a deferred fashion (already explained).&lt;/p&gt;
&lt;p&gt;It’s important to understand how &lt;em&gt;ccls&lt;/em&gt; works in order to integrate it in our
workflow of a specific project, since it might need to be configured using
Emacs’ &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html&quot;&gt;per-directory local
variables&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We are living in a &lt;em&gt;post-Makefile&lt;/em&gt; world (almost), proof of that is &lt;em&gt;ccls&lt;/em&gt;,
which instead of a makefile, it uses a &lt;a href=&quot;https://sarcasm.github.io/notes/dev/compilation-database.html&quot;&gt;compilation
database&lt;/a&gt;, a
record of the compile options used to build the files in a project. It’s
commonly described in &lt;em&gt;JSON&lt;/em&gt; and it’s generated automatically by build systems
such as &lt;em&gt;meson&lt;/em&gt; or &lt;em&gt;cmake&lt;/em&gt;, and later consumed by &lt;em&gt;ninja&lt;/em&gt; or &lt;em&gt;ccls&lt;/em&gt; to execute
the compilation. Bear in mind that &lt;em&gt;ccls&lt;/em&gt; uses a cache, which can eat a couple
gigabytes of disk.&lt;/p&gt;
&lt;p&gt;Now, let’s review the concrete details of using these features with WebKit. Let
me assume that WebKit local repository is cloned in &lt;code&gt;~/WebKit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As you may know, the cool way to &lt;a href=&quot;https://base-art.net/Articles/introducing-the-webkit-flatpak-sdk/&quot;&gt;compile WebKit is with
flatpak&lt;/a&gt;.
Flatpak adds an indirection in the compilation process, since it’s done in an
isolated environment, above the native system. As a consequence, &lt;em&gt;ccls&lt;/em&gt; has to
be the one inside the Flatpak environment. In &lt;code&gt;~/.local/bin/webkit-ccls&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;#!/bin/sh&lt;br&gt;set -eu&lt;br&gt;cd $HOME/WebKit/&lt;br&gt;exec Tools/Scripts/webkit-flatpak -c ccls &quot;$@&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Basically the scripts calls &lt;em&gt;ccls&lt;/em&gt; inside Flatpak, which is available in the
SDK. And this is why &lt;em&gt;ccls&lt;/em&gt; instead of &lt;em&gt;clang&lt;/em&gt;, since &lt;em&gt;clang&lt;/em&gt; is not provided.&lt;/p&gt;
&lt;p&gt;By default &lt;em&gt;ccls&lt;/em&gt; assumes the compilation database is in the project’s root
directory, but in our case, it’s not, thus it is required to configure the
database directory for our WebKit setup. For it, as we already said, a
&lt;code&gt;.dir-locals.el&lt;/code&gt; file is used.&lt;/p&gt;
&lt;pre class=&quot;language-elisp&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-elisp&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c-mode&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;indent-tabs-mode&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c-basic-offset&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c++-mode&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;indent-tabs-mode&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c-basic-offset&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;java-mode&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;indent-tabs-mode&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;c-basic-offset&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;change-log-mode&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;indent-tabs-mode&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token boolean&quot;&gt;nil&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;fill-column&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;ccls-executable&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/home/vjaquez/.local/bin/webkit-ccls&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;ccls-initialization-options&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token lisp-property property&quot;&gt;:compilationDatabaseDirectory&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;/app/webkit/WebKitBuild/Release&quot;&lt;/span&gt;&lt;br&gt;                                  &lt;span class=&quot;token lisp-property property&quot;&gt;:cache&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token lisp-property property&quot;&gt;:directory&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;.ccls-cache&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token car&quot;&gt;compile-command&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;build-webkit --gtk --debug&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can notice, &lt;code&gt;ccls-execute&lt;/code&gt; is defined here, though it’s not a &lt;a href=&quot;https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Local-Variables.html&quot;&gt;safe local
variable&lt;/a&gt;.
Also the &lt;code&gt;ccls-initialization-options&lt;/code&gt;, which is a safe local variable. It is
important to notice that the compilation database directory is a path inside
Flatpak, and &lt;strong&gt;always&lt;/strong&gt; use the &lt;em&gt;Release&lt;/em&gt; path. I don’t understand why, but
&lt;em&gt;Debug&lt;/em&gt; path didn’t work for me. This mean that WebKit should be compiled as
Release frequently, even if we only use Debug type for coding (as you may see in
my &lt;code&gt;compile-command&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Now we can explain why it’s important to configure &lt;em&gt;lsp-mode&lt;/em&gt; as
deferred: to avoid connections to &lt;em&gt;ccls&lt;/em&gt; before processing the &lt;code&gt;.dir-locals.el&lt;/code&gt;
file.&lt;/p&gt;
&lt;p&gt;And that’s all. Now I have early programming errors detection, auto-completion,
and so on. I hope you find these notes helpful.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Sadly, because of Flatpak indirection, symbols’ definition finding
won’t work because the file paths stored in &lt;em&gt;ccls&lt;/em&gt; cache are relative to
Flatpak’s file system. For that I still rely on
&lt;a href=&quot;https://www.gnu.org/software/global/&quot;&gt;global&lt;/a&gt; and its Emacs mode.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Review of Igalia Multimedia activities (2020/H1)</title>
		<link href="https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/"/>
		<updated>2020-09-07T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/</id>
		<content type="html">&lt;p&gt;This blog post is a review of the various activities the &lt;a href=&quot;https://www.igalia.com/technology/multimedia&quot;&gt;Igalia Multimedia
team&lt;/a&gt; was involved in during the
first half of 2020.Our previous reports are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2019/02/11/review-of-igalias-multimedia-activities-2018-h2/&quot;&gt;2018/H2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://base-art.net/Articles/review-of-the-igalia-multimedia-team-activities-2019h1/&quot;&gt;2019/H1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/03/16/review-of-the-igalia-multimedia-team-activities-2019-h2/&quot;&gt;2019/H2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Just before a new virus turned into pandemics we could enjoy our traditional
FOSDEM. There, our colleague Phil &lt;a href=&quot;https://archive.fosdem.org/2020/schedule/event/ema_wpe/&quot;&gt;gave a
talk&lt;/a&gt; about many of the
topics covered in this report.&lt;/p&gt;
&lt;h2 id=&quot;gstwpe&quot; tabindex=&quot;-1&quot;&gt;GstWPE &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#gstwpe&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GstWPE’s &lt;code&gt;wpesrc&lt;/code&gt; element, produces a video texture representing a web page
rendered off-screen by &lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We have worked on a new iteration of the &lt;a href=&quot;https://base-art.net/Articles/web-augmented-graphics-overlay-broadcasting-with-wpe-and-gstreamer/&quot;&gt;GstWPE
demo&lt;/a&gt;,
focusing on one-to-many, web-augmented overlays, broadcasting with WebRTC and
&lt;a href=&quot;https://janus.conf.meetecho.com/&quot;&gt;Janus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=QNZJYOuVGiE&quot;&gt;https://www.youtube.com/watch?v=QNZJYOuVGiE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, since the merge of &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/ext/wpe&quot;&gt;gstwpe
plugin&lt;/a&gt;
in gst-plugins-bad (staging area for new elements) new users have come along
spotting rough areas and improving the element along the way.&lt;/p&gt;
&lt;h2 id=&quot;video-editing&quot; tabindex=&quot;-1&quot;&gt;Video Editing &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#video-editing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;GStreamer Editing Services&lt;/em&gt;
(&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-editing-services&quot;&gt;GES&lt;/a&gt;) is
a library that simplifies the creation of multimedia editing applications. It is
based on the GStreamer multimedia framework and is heavily used by
&lt;a href=&quot;http://www.pitivi.org&quot;&gt;Pitivi&lt;/a&gt; video editor.&lt;/p&gt;
&lt;h3 id=&quot;implemented-frame-accuracy-in-the-gstreamer-editing-services-ges&quot; tabindex=&quot;-1&quot;&gt;Implemented frame accuracy in the GStreamer Editing Services (GES) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#implemented-frame-accuracy-in-the-gstreamer-editing-services-ges&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As required by the industry, it is now possible to reference all time in frame
number, providing a precise mapping between frame number and play time. Many
issues were fixed in GStreamer to reach the precision enough for make this work.
Also intensive regression tests were added.&lt;/p&gt;
&lt;h3 id=&quot;implemented-time-effects-support-in-ges&quot; tabindex=&quot;-1&quot;&gt;Implemented time effects support in GES &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#implemented-time-effects-support-in-ges&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Important refactoring inside GStreamer Editing Services have happened to allow
cleanly and safely change playback speed of individual clips.&lt;/p&gt;
&lt;h3 id=&quot;implemented-reverse-playback-in-ges&quot; tabindex=&quot;-1&quot;&gt;Implemented reverse playback in GES &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#implemented-reverse-playback-in-ges&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Several issues have been fixed inside GStreamer core elements and base classes
in order to support reverse playback. This allows us to implement reliable and
frame accurate reverse playback for individual clips.&lt;/p&gt;
&lt;h3 id=&quot;implemented-imagesequence-support-in-gstreamer-and-ges&quot; tabindex=&quot;-1&quot;&gt;Implemented ImageSequence support in GStreamer and GES &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#implemented-imagesequence-support-in-gstreamer-and-ges&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since &lt;a href=&quot;http://opentimelineio.readthedocs.io/&quot;&gt;OpenTimelineIO&lt;/a&gt; implemented
ImageSequence support, many users in the community had said it was really
required. We reviewed and finished up &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/multifile/imagesequencesrc.html&quot;&gt;&lt;code&gt;imagesequencesrc&lt;/code&gt;
element&lt;/a&gt;,
which had been awaiting review for years.&lt;/p&gt;
&lt;p&gt;This feature is now also
&lt;a href=&quot;https://github.com/PixarAnimationStudios/OpenTimelineIO/pull/792&quot;&gt;supported&lt;/a&gt; in
the OpenTimelineIO GES adapter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Optimized nested timelines
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/additional/design/preroll.html&quot;&gt;preroll&lt;/a&gt;
time by an order of magnitude&lt;/strong&gt;*&lt;/p&gt;
&lt;p&gt;Caps negotiation, done while the pipeline transitions from pause state to
playing state, testing the whole pipeline functionality, was the bottleneck for
nested timelines, so pipelines were reworked to avoid useless negotiations. At
the same time, other members of GStreamer community have improved caps
negotiation performance in general.&lt;/p&gt;
&lt;p&gt;Last but not least, our colleague Thibault gave a talk in &lt;a href=&quot;https://thepipelineconference.com/&quot;&gt;The Pipeline
Conference&lt;/a&gt; about &lt;em&gt;The Motion Picture
Industry and Open Source Software: GStreamer as an Alternative&lt;/em&gt;, explaining how
and why GStreamer could be leveraged in the motion picture industry to allow
faster innovation, and solve issues by reusing all the multi-platform
infrastructure the community has to offer.&lt;/p&gt;
&lt;h2 id=&quot;webkit-multimedia&quot; tabindex=&quot;-1&quot;&gt;WebKit multimedia &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#webkit-multimedia&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There has been a lot of work on &lt;a href=&quot;https://webkit.org/&quot;&gt;WebKit&lt;/a&gt; multimedia,
particularly for &lt;a href=&quot;https://webkitgtk.org/&quot;&gt;WebKitGTK&lt;/a&gt; and
&lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPE&lt;/a&gt; ports which use GStreamer framework as backend.&lt;/p&gt;
&lt;h3 id=&quot;webkit-flatpak-sdk&quot; tabindex=&quot;-1&quot;&gt;WebKit Flatpak SDK &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#webkit-flatpak-sdk&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;But first of all we would like to draw readers attention to the new &lt;a href=&quot;https://base-art.net/Articles/introducing-the-webkit-flatpak-sdk/&quot;&gt;WebKit
Flatpak SDK&lt;/a&gt;.
It was not a contribution only from the multimedia team, but rather a joint
effort among different teams in Igalia.&lt;/p&gt;
&lt;p&gt;Before WebKit Flatpak SDK, &lt;a href=&quot;https://wiki.gnome.org/Projects/Jhbuild&quot;&gt;JHBuild&lt;/a&gt;
was used for setting up a WebKitGTK/WPE environment for testing and development.
Its purpose to is to provide a common set of well defined dependencies instead
of relying on the ones available in the different Linux distributions, which
might bring different outputs. Nonetheless, &lt;a href=&quot;https://flatpak.org/&quot;&gt;Flatpak&lt;/a&gt;
offers a much more coherent environment for testing and develop, isolated from
the rest of the building host, approaching to reproducible outputs.&lt;/p&gt;
&lt;p&gt;Another great advantage of WebKit Flatpak SDK, at least for the multimedia team,
is the possibility of use &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/06/16/webkit-flatpak-sdk-and-gst-build/&quot;&gt;&lt;code&gt;gst-build&lt;/code&gt; to setup a custom
GStreamer&lt;/a&gt;
environment, with latest master, for example.&lt;/p&gt;
&lt;p&gt;Now, for sake of brevity, let us sketch an non-complete list of activities and
achievements related with WebKit multimedia.&lt;/p&gt;
&lt;h3 id=&quot;general-multimedia&quot; tabindex=&quot;-1&quot;&gt;General multimedia &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#general-multimedia&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Upstreamed &lt;a href=&quot;https://trac.webkit.org/changeset/258197&quot;&gt;external-oes support&lt;/a&gt;
for hardware-accelerated video rendering. On some GPUs the presence of native
YUV samplers allows the video sink to optimize rendering.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://trac.webkit.org/changeset/261922&quot;&gt;Allow video assets in &amp;lt;img&amp;gt;&lt;/a&gt;.
This can be used as replacement for GIFs. For example, here is a
&lt;a href=&quot;https://colinbendell.github.io/webperf/img-mp4/&quot;&gt;demo&lt;/a&gt; and a &lt;a href=&quot;https://base-art.net/Articles/webkitgtk-and-wpe-now-supporting-videos-in-the-img-tag/&quot;&gt;blog
post&lt;/a&gt;
to explain it lengthy.&lt;/li&gt;
&lt;li&gt;WhatsApp fixes related with blob URIs
&lt;a href=&quot;https://trac.webkit.org/changeset/261550&quot;&gt;playback&lt;/a&gt; and
&lt;a href=&quot;https://trac.webkit.org/changeset/261680&quot;&gt;buffering&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Added GstGLContext which a &lt;a href=&quot;https://trac.webkit.org/changeset/257463&quot;&gt;singleton
wrapper&lt;/a&gt; of WebKit’s GL shared
context wrapper.&lt;/li&gt;
&lt;li&gt;Progress with &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=204619&quot;&gt;GStreamer support for
WebInspector&lt;/a&gt;. It adds a new
tab in the inspector allowing users to view pipeline graphs.&lt;/li&gt;
&lt;li&gt;Progress with &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=207634&quot;&gt;Internal audio
mixer&lt;/a&gt;. It is related with
reducing the number of PulseAudio clients WebKit creates, by doing mixing
internally and maintain only one connection with PulseAudio.&lt;/li&gt;
&lt;li&gt;Ongoing work on sandboxing GStreamer pipelines in the new WebKit’s GPUProcess.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=197346&quot;&gt;General&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=205801&quot;&gt;WebKit&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=209119&quot;&gt;multimedia&lt;/a&gt; and
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=208803&quot;&gt;layout&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=116957&quot;&gt;tests&lt;/a&gt; &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=183611&quot;&gt;bug
fixing&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;media-source-extensions-mse&quot; tabindex=&quot;-1&quot;&gt;Media Source Extensions (&lt;a href=&quot;https://www.w3.org/TR/media-source&quot;&gt;MSE&lt;/a&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#media-source-extensions-mse&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed delayed audio and seek issues.&lt;/li&gt;
&lt;li&gt;Preparation for the new MSE backend involved a large &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=211623&quot;&gt;playbin3 track
switching&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;encrypted-media-extension-eme&quot; tabindex=&quot;-1&quot;&gt;Encrypted Media Extension (&lt;a href=&quot;https://www.w3.org/TR/encrypted-media&quot;&gt;EME&lt;/a&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#encrypted-media-extension-eme&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One of the major results of this first half, is the upstream of
&lt;a href=&quot;https://trac.webkit.org/changeset/264219&quot;&gt;ThunderCDM&lt;/a&gt;, which is an
implementation of a Content Decryption Module, providing Widevine decryption
support. Recently, our colleague Xabier, published a &lt;a href=&quot;https://blogs.igalia.com/xrcalvar/2020/09/02/serious-encrypted-media-extensions-on-gstreamer-based-webkit-ports/&quot;&gt;blog post on this
regard&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And it has enabled &lt;a href=&quot;https://trac.webkit.org/changeset/254682&quot;&gt;client-side video rendering
support&lt;/a&gt;, which ensures video frames
remain protected in GPU memory so they can’t be reached by third-party. This is
a requirement for DRM/EME.&lt;/p&gt;
&lt;h3 id=&quot;webrtc&quot; tabindex=&quot;-1&quot;&gt;&lt;a href=&quot;https://www.w3.org/TR/webrtc&quot;&gt;WebRTC&lt;/a&gt; &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#webrtc&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Collaborated with the &lt;a href=&quot;https://trac.webkit.org/changeset/259345&quot;&gt;upgrade of LibWebRTC to
M82&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;gstreamer&quot; tabindex=&quot;-1&quot;&gt;GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Though we normally contribute in GStreamer with the activities listed above,
there are other tasks not related with WebKit. Among these we can enumerate the
following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contributed to the new stateless &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/gst-libs/gst/codecs&quot;&gt;GStreamer codecs
library&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2020/07/10/new-va-api-h-264-decoder-in-gst-plugins-bad/&quot;&gt;A new H264 VAAPI video decoder
implementation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Helped with the AV1 parser review, a task that has been followed since we were
Google Summer of Code mentors last year.&lt;/li&gt;
&lt;li&gt;Contributed a new Rust GStreamer plugin for &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/commit/60656c713d405dd93edc7184dd345230ea0eed79&quot;&gt;audio noise removal
support&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;gstreamer-vaapi&quot; tabindex=&quot;-1&quot;&gt;GStreamer VAAPI &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#gstreamer-vaapi&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Reviewed a lot of patches.&lt;/li&gt;
&lt;li&gt;Support for &lt;a href=&quot;https://github.com/intel/media-driver&quot;&gt;media-driver&lt;/a&gt; (iHD), the
new VAAPI driver for Intel, mostly for Gen9 onwards. There are a lot of
features with this driver.&lt;/li&gt;
&lt;li&gt;A new &lt;code&gt;vaapioverlay&lt;/code&gt; element.&lt;/li&gt;
&lt;li&gt;Deep code cleanups. Among these we would like to mention:
&lt;ul&gt;
&lt;li&gt;Added quirk mechanism for different backends.&lt;/li&gt;
&lt;li&gt;Change base classes to &lt;code&gt;GstObject&lt;/code&gt; and &lt;code&gt;GstMiniObject&lt;/code&gt; of most of classes
and buffers types.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Enhanced caps negotiation given current driver’s constraints&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;conclusions&quot; tabindex=&quot;-1&quot;&gt;Conclusions &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalia-multimedia-activities-2020-h1/#conclusions&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The multimedia team in Igalia has keep working, along the first half of this
strange year, in our three main areas: browsers (mainly on WebKitGTK and WPE),
video editing and GStreamer framework.&lt;/p&gt;
&lt;p&gt;We worked adding and enhancing WebKitGTK and WPE multimedia features in order to
offer a solid platform for media providers.&lt;/p&gt;
&lt;p&gt;We have enhanced the Video Editing support in GStreamer.&lt;/p&gt;
&lt;p&gt;And, along these tasks, we have contributed as much in GStreamer framework,
particularly in hardware accelerated decoding and encoding and VA-API.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>New VA-API H.264 decoder in gst-plugins-bad</title>
		<link href="https://blogs.igalia.com/vjaquez/new-va-api-h-264-decoder-in-gst-plugins-bad/"/>
		<updated>2020-07-10T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/new-va-api-h-264-decoder-in-gst-plugins-bad/</id>
		<content type="html">&lt;p&gt;Recently, &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1379&quot;&gt;a new H.264
decoder&lt;/a&gt;,
using VA-API, was merged in gst-plugins-bad.Why another VA-based H.264 decoder if there is already &lt;code&gt;gstreamer-vaapi&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;As usual, an historical perspective may give some clues.&lt;/p&gt;
&lt;p&gt;It started when Seungha Yang implemented the GStreamer decoders for Windows
using &lt;a href=&quot;https://medium.com/@seungha.yang/windows-dxva2-via-direct3d-11-support-in-gstreamer-1-17-1837ecc1691a&quot;&gt;DXVA2 and
D3D11&lt;/a&gt;
APIs.&lt;/p&gt;
&lt;p&gt;Perhaps we need one step back and explain what are &lt;em&gt;stateless decoders&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Video decoders are magic and opaque boxes where we push encoded frames, and
later we’ll pop full decoded frames in raw format. This is how OpenMAX and V4L2
decoders work, for example.&lt;/p&gt;
&lt;p&gt;Internally we can imagine those magic and opaque boxes has two main operations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Codec state handling&lt;/li&gt;
&lt;li&gt;Signal processing like Fourier-related transformations (such as DCT), entropy
coding, etc. (DSP, in general)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;em&gt;codec state handling&lt;/em&gt; basically extracts, from the stream, the frame’s
parameters and its compressed data, so the DSP algorithms can decode the frames.
&lt;em&gt;Codec state handling&lt;/em&gt; can be done with generic CPUs, while DSP algorithms are
massively improved through specific purpose processors.&lt;/p&gt;
&lt;p&gt;These video decoders are known as &lt;em&gt;stateful decoders&lt;/em&gt;, and usually they are
distributed through binary and closed &lt;em&gt;blobs&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Soon, silicon vendors realized they can offload the burden of state handling to
third-party user-space libraries, releasing what it is known as &lt;em&gt;stateless
decoders&lt;/em&gt;. With them, your code not only has to push frames into the opaque box,
but now it shall handle the codec specifics to provide all the parameters and
references for each frame. VAAPI and DXVA2 are examples of those stateless
decoders.&lt;/p&gt;
&lt;p&gt;Returning to Seungha’s implementation, in order to get theirs DXVA2/D3D11
decoders, they also needed a state handler library for each codec. And Seungha
wrote that library!&lt;/p&gt;
&lt;p&gt;Initially they wanted to reuse the state handling in &lt;code&gt;gstreamer-vaapi&lt;/code&gt;, which
works pretty good, but its internal library, from the GStreamer perspective, is
&lt;em&gt;over-engineered&lt;/em&gt;: it is impossible to rip out only the state handling without
importing all its data types. Which is kind of sad.&lt;/p&gt;
&lt;p&gt;Later, Nicolas Dufresne, realized that this library can be re-used by other
GStreamer plugins, because more stateless decoders are now available,
particularly &lt;em&gt;V4L2 stateless&lt;/em&gt;, in which he is interested. Nicolas moved
Seungha’s code into a &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1089&quot;&gt;library in
gst-plugins-bad&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Currently, &lt;code&gt;libgstcodecs&lt;/code&gt; provides state handling of H.264, H.265, VP8 and VP9.&lt;/p&gt;
&lt;p&gt;Let’s return to our original question: Why another VA-based H.264 decoder if
there is already one in &lt;code&gt;gstreamer-vaapi&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;The quick answer is «to pay my &lt;a href=&quot;https://en.wikipedia.org/wiki/Technical_debt&quot;&gt;technical
debt&lt;/a&gt;».&lt;/p&gt;
&lt;p&gt;As we already mentioned, &lt;code&gt;gstreamer-vaapi&lt;/code&gt; is big and over-engineered, though we
have being simplifying the internal libraries, in particular He Junyan, has done
a lot of work replacing the internal base class, &lt;code&gt;GstVaapiObject&lt;/code&gt;,
with&lt;code&gt;GstObject&lt;/code&gt; or &lt;code&gt;GstMiniObject&lt;/code&gt;. Also, this kind of projects, where there’s a
lot of untouched code, it carries a lot of &lt;a href=&quot;https://en.wikipedia.org/wiki/Cargo_cult_programming&quot;&gt;cargo
cult&lt;/a&gt; decisions.&lt;/p&gt;
&lt;p&gt;So I took the &lt;code&gt;libgstcodecs&lt;/code&gt; opportunity to write a simple, thin and lean, H.264
decoder, using VA new API calls (&lt;code&gt;vaExportSurfaceHandle()&lt;/code&gt;, for example) and
learning from other implementations, such as FFmpeg and ChromeOS. This exercise
allowed me to identify where are the dusty spots in &lt;code&gt;gstreamer-vaapi&lt;/code&gt; and how
they should be fixed (and we have been doing it since then!).&lt;/p&gt;
&lt;p&gt;Also, this opportunity lead me to learn a bit more about the &lt;a href=&quot;https://www.itu.int/rec/T-REC-H.264&quot;&gt;H.264
specification&lt;/a&gt; since I implemented the
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1238&quot;&gt;reference picture list
handling&lt;/a&gt;,
and fixed a &lt;a href=&quot;https://chromium-review.googlesource.com/c/chromium/src/+/2166196&quot;&gt;small bug in
Chromium&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now, let me be crystal clear: &lt;strong&gt;GStreamer VA-API is not going anywhere&lt;/strong&gt;. It is,
right now, one of the most feature-complete implementations using VA-API, even
with its integration issues, and we are working on them, particularly, Intel
folks are working hard on a new AV1 decoder, enhancing encoders and adding new
video post-processing features.&lt;/p&gt;
&lt;p&gt;But, this new &lt;code&gt;vah264dec&lt;/code&gt; is an experimental VA-API decoder, which aims towards
a tight integration with GStreamer, oriented to provide a good experience in
most of the common use cases and to enhance the common &lt;code&gt;libgstcodecs&lt;/code&gt; library
shared with other stateless decoders, looking to avoid Intel specific nuances.&lt;/p&gt;
&lt;p&gt;These are the main characteristics and plans of this new decoder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It use, by default, a DRM connection to VA display, avoiding the troubles of
choosing X11 or Wayland.
&lt;ul&gt;
&lt;li&gt;It uses the first found DRM device as VA display&lt;/li&gt;
&lt;li&gt;In the future, users will be able to provide their custom VA display through
the pipeline’s context.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;It requires libva &amp;gt;= 1.6&lt;/li&gt;
&lt;li&gt;No multiview/stereo profiles, neither interlaced streams, because
&lt;code&gt;libgstcodecs&lt;/code&gt; doesn’t handle them yet&lt;/li&gt;
&lt;li&gt;&lt;em&gt;It is incompatible with gstreamer-vaapi&lt;/em&gt;: mixing elements might lead to
problems.&lt;/li&gt;
&lt;li&gt;Even if memory:VAMemory is exposed, it is not handled yet by any other element
yet.
&lt;ul&gt;
&lt;li&gt;Users will get VASurfaces via mapping as GstGL does with textures.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Caps templates are generated dynamically generated by querying VAAPI&lt;/li&gt;
&lt;li&gt;YV12 and I420 are added for system memory caps because they seem to be
supported for all the drivers when downloading frames onto main memory, as
they are used by xvimagesink and others, avoiding color conversion.&lt;/li&gt;
&lt;li&gt;Decoding surfaces aren’t bounded to context, so they can grow beyond the DBP
size, allowing smooth reverse playback.&lt;/li&gt;
&lt;li&gt;There isn’t yet error handling and recovery.&lt;/li&gt;
&lt;li&gt;The element is supposed to spawn if different renderD nodes with VA-API driver
support are found (like gstv4l2), but it hasn’t been tested yet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now you may be asking &lt;em&gt;how do I use vah264dec?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Currently &lt;code&gt;vah264dec&lt;/code&gt; has NONE rank, which means that it will never be
autoplugged, but you can use the trick of the environment variable
&lt;code&gt;GST_PLUGIN_FEATURE_RANK&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;GST_PLUGIN_FEATURE_RANK=vah264dec:259 gst-play-1.0 ~/video.mp4&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And that’s it!&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>WebKit Flatpak SDK and gst-build</title>
		<link href="https://blogs.igalia.com/vjaquez/webkit-flatpak-sdk-and-gst-build/"/>
		<updated>2020-06-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/webkit-flatpak-sdk-and-gst-build/</id>
		<content type="html">&lt;p&gt;This post is an annex of Phil’s &lt;a href=&quot;https://base-art.net/Articles/introducing-the-webkit-flatpak-sdk/&quot;&gt;Introducing the WebKit Flatpak
SDK&lt;/a&gt;. Please
make sure to read it, if you haven’t already.Recapitulating, nowadays WebKitGTK/WPE developers —and their CI infrastructure—
are moving towards to
&lt;a href=&quot;https://docs.flatpak.org/en/latest/basic-concepts.html&quot;&gt;Flatpak&lt;/a&gt;-based
environment for their workflow. This Flatpak-based environment, or Flatpak SDK
for short, can be visualized as a software sandboxed-container, which bundles
all the dependencies required to compile, run and debug WebKitGTK/WPE.&lt;/p&gt;
&lt;p&gt;In a day-by-day work, this approach removes the potential &lt;em&gt;compilation of the
world&lt;/em&gt; in order to obtain &lt;a href=&quot;https://en.wikipedia.org/wiki/Reproducible_builds&quot;&gt;reproducible
builds&lt;/a&gt;, improving the
development and testing work flow.&lt;/p&gt;
&lt;p&gt;But &lt;em&gt;what if&lt;/em&gt; you are also involved in the development of one dependency?&lt;/p&gt;
&lt;p&gt;This is the case of Igalia’s multimedia team where, besides developing the
multimedia features for WebKitGTK and WPE, we also participate in the GStreamer
development, the framework used for multimedia.&lt;/p&gt;
&lt;p&gt;Because of this, in our workflow we usually need to build WebKit with a fix,
hack or new feature in GStreamer. Is it possible to add in Flatpak our custom
GStreamer build without messing its own GStreamer setup? Yes, it’s possible.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html&quot;&gt;gst-build&lt;/a&gt;
is a set of scripts in Python which clone GStreamer repositories, compile them
and setup an uninstalled environment. This uninstalled environment allows a
transient usage of the compiled framework from their build tree, avoiding
installation and further mess up with our system.&lt;/p&gt;
&lt;p&gt;The WebKit scripts that wraps Flatpak operations are also capable to handle the
scripts of &lt;code&gt;gst-build&lt;/code&gt; to build GStreamer inside the container, and, when
running WebKit’s artifacts, the scripts enable the mentioned uninstalled
environment, overloading Flatpak’s GStreamer.&lt;/p&gt;
&lt;p&gt;How do we unveil all this magic?&lt;/p&gt;
&lt;p&gt;First of all, setup a &lt;code&gt;gst-build&lt;/code&gt; installation as it is documented. In this
installation is were the GStreamer plumbing is done.&lt;/p&gt;
&lt;p&gt;Later, &lt;code&gt;gst-build&lt;/code&gt; operations through WebKit compilation scripts are enabled
when the environment variable &lt;code&gt;GST_BUILD_PATH&lt;/code&gt; is exported. This variable should
point to the directory where the &lt;code&gt;gst-build&lt;/code&gt; tree is placed.&lt;/p&gt;
&lt;p&gt;And that’s all!&lt;/p&gt;
&lt;p&gt;But let’s put these words in actual commands. The following workflow assumes
that WebKit repository is cloned in &lt;code&gt;~/WebKit&lt;/code&gt; and the &lt;code&gt;gst-build&lt;/code&gt; tree is in
&lt;code&gt;~/gst-build&lt;/code&gt; (please, excuse my &lt;em&gt;bashisms&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Compiling WebKitGTK with symbols, using LLVM as toolchain (this command will
also compile GStreamer):&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/WebKit&lt;br&gt;CC=clang CXX=clang++ GST_BUILD_PATH=/home/vjaquez/gst-build Tools/Scripts/build-webkit --gtk --debug&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running the generated minibrowser (remind &lt;code&gt;GST_BUILD_PATH&lt;/code&gt; is required again for
a correct linking):&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;GST_BUILD_PATH=/home/vjaquez/gst-build Tools/Scripts/run-minibrowser --gtk --debug&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running media layout tests:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;GST_BUILD_PATH=/home/vjaquez/gst-build ./Tools/Scripts/run-webkit-tests --gtk --debug media&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;But wait! There’s more…&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;What if you I want to parameterize the GStreamer compilation. To say, I would
like to enable a GStreamer module or disable the built of a specific element.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gst-build&lt;/code&gt;, as the rest of GStreamer modules, uses
&lt;a href=&quot;https://mesonbuild.com/&quot;&gt;meson&lt;/a&gt; build system, so it’s possible to pass
arguments to meson through the environment variable &lt;code&gt;GST_BUILD_ARGS&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For example, I would like to enable gstreamer-vaapi 😇&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/WebKit&lt;br&gt;CC=clang CXX=clang++ GST_BUILD_PATH=/home/vjaquez/gst-build GST_BUILD_ARGS=&quot;-Dvaapi=enabled&quot; Tools/Scripts/build-webkit --gtk --debug&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>Review of the Igalia Multimedia team Activities (2019/H2)</title>
		<link href="https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/"/>
		<updated>2020-03-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/</id>
		<content type="html">&lt;p&gt;This blog post is a review of the various activities the &lt;a href=&quot;https://www.igalia.com/technology/multimedia&quot;&gt;Igalia Multimedia
team&lt;/a&gt; was involved along the
second half of 2019.Here are the previous
&lt;a href=&quot;https://blogs.igalia.com/vjaquez/2019/02/11/review-of-igalias-multimedia-activities-2018-h2/&quot;&gt;2018/H2&lt;/a&gt;
and
&lt;a href=&quot;https://base-art.net/Articles/review-of-the-igalia-multimedia-team-activities-2019h1/&quot;&gt;2019/H1&lt;/a&gt;
reports.&lt;/p&gt;
&lt;h2 id=&quot;gstwpe&quot; tabindex=&quot;-1&quot;&gt;GstWPE &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#gstwpe&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Succinctly,
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/wpe/index.html?gi-language=c&quot;&gt;GstWPE&lt;/a&gt;
is a GStreamer plugin which allows to render web-pages as a video stream where
it frames are GL textures.&lt;/p&gt;
&lt;p&gt;Phil, its main author, wrote a blog post explaining at detail &lt;a href=&quot;https://base-art.net/Articles/web-overlay-in-gstreamer-with-wpewebkit/&quot;&gt;what is GstWPE
and its possible
use-cases&lt;/a&gt;.
He wrote a
&lt;a href=&quot;https://base-art.net/Articles/html-overlays-with-gstwpe-the-demo/&quot;&gt;demo&lt;/a&gt; too,
which grabs and previews a live stream from a webcam session and blends it with
an overlay from &lt;code&gt;wpesrc&lt;/code&gt;, which displays HTML content. This composited live
stream can be broadcasted through YouTube or Twitch.&lt;/p&gt;
&lt;p&gt;These concepts are better explained by Phil himself in the following lighting
talk, presented at the last GStreamer Conference in Lyon:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=-lxm4EfpfAc&quot;&gt;https://www.youtube.com/watch?v=-lxm4EfpfAc&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;video-editing&quot; tabindex=&quot;-1&quot;&gt;Video Editing &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#video-editing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After implementing a deep integration of the &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-editing-services/&quot;&gt;GStreamer Editing
Services&lt;/a&gt;
(a.k.a GES) into Pixar’s &lt;a href=&quot;http://opentimelineio.readthedocs.io/&quot;&gt;OpenTimelineIO&lt;/a&gt;
during the first half of 2019, we decided to implement an important missing
feature for the professional video editing industry: &lt;em&gt;nested timelines&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Toward that goal, Thibault worked with the
&lt;a href=&quot;https://summerofcode.withgoogle.com/&quot;&gt;GSoC&lt;/a&gt; student &lt;a href=&quot;https://swaynethoughts.wordpress.com/&quot;&gt;Swayamjeet
Swain&lt;/a&gt; to implement a flexible API to
support nested timelines in GES. This means that users of GES can now decouple
each scene into different projects when editing long videos. This work is going
to be released in the upcoming GStreamer 1.18 version.&lt;/p&gt;
&lt;p&gt;Henry Wilkes also implemented the support for nested timeline in OpenTimelineIO
making GES integration one of the most advanced one as you can see on that
table:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;OTIO&lt;/th&gt;
&lt;th&gt;EDL&lt;/th&gt;
&lt;th&gt;FCP7 XML&lt;/th&gt;
&lt;th&gt;FCP X&lt;/th&gt;
&lt;th&gt;AAF&lt;/th&gt;
&lt;th&gt;RV&lt;/th&gt;
&lt;th&gt;ALE&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;GES&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Single Track of Clips&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;W-O&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiple Video Tracks&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;W-O&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio Tracks &amp;amp; Clips&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;W-O&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gap/Filler&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Markers&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nesting&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;W-O&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transitions&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;W-O&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio/Video Effects&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linear Speed Effects&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;R-O&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fancy Speed Effects&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Color Decision List&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;✖&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Along these lines, Thibault delivered a 15 minutes talk, also in the GStreamer
Conference 2019:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=P6iMcUWPqpA&quot;&gt;https://www.youtube.com/watch?v=P6iMcUWPqpA&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After detecting a few regressions and issues in GStreamer, related to frame
accuracy, we decided to make sure that we can seek in a perfectly frame accurate
way using GStreamer and the GStreamer Editing Services. In order to ensure that,
an extensive integration testsuite has been developed, mostly targeting most
important container formats and codecs (namely &lt;em&gt;mxf&lt;/em&gt;, &lt;em&gt;quicktime&lt;/em&gt;, &lt;em&gt;h264&lt;/em&gt;,
&lt;em&gt;h265&lt;/em&gt;, &lt;em&gt;prores&lt;/em&gt;, &lt;em&gt;jpeg&lt;/em&gt;) and issues have been fixed in different places. On top
of that, new APIs are being added to GES to allow expressing times in frame
number instead of nanoseconds. This work is still ongoing but should be merged
in time for GStreamer 1.18.&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-validate-flow&quot; tabindex=&quot;-1&quot;&gt;GStreamer Validate Flow &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#gstreamer-validate-flow&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-devtools/gst-validate.html?gi-language=c&quot;&gt;GstValidate&lt;/a&gt;
has been turning into one of the most important GStreamer testing tools to check
that elements behave as they are supposed to do in the framework.&lt;/p&gt;
&lt;p&gt;Along with our &lt;a href=&quot;https://w3c.github.io/media-source/&quot;&gt;MSE&lt;/a&gt; work, we found that
other way to specify tests, related with produced buffers and events through
specific pads, was needed. Thus, Alicia developed a new plugin for GstValidate:
&lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/gst-devtools/plugins/validateflow.html?gi-language=c&quot;&gt;Validate
Flow&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Alicia gave an informative 30 minutes talk about GstValidate and the new plugin
in the last GStreamer Conference too:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=_NiHTKax6yg&quot;&gt;https://www.youtube.com/watch?v=_NiHTKax6yg&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-vaapi&quot; tabindex=&quot;-1&quot;&gt;GStreamer VAAPI &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#gstreamer-vaapi&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most of the work along the second half of 2019 were maintenance tasks and code
reviews.&lt;/p&gt;
&lt;p&gt;We worked mainly on memory restrictions per backend driver, and we reviewed a
big refactor: internal encoders now use &lt;code&gt;GstObject&lt;/code&gt;, instead of the custom
&lt;code&gt;GstVaapiObject&lt;/code&gt;. Also we reviewed patches for new features such as video
rotation and cropping in &lt;code&gt;vaapipostproc&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;servo-multimedia&quot; tabindex=&quot;-1&quot;&gt;Servo multimedia &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#servo-multimedia&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Last year we worked integrating media playing in &lt;a href=&quot;https://servo.org/&quot;&gt;Servo&lt;/a&gt;. We
finally delivered hardware accelerated video playback in Linux and Android. We
worked also for Windows and Mac ports but they were not finished. As natural,
most of the work were in &lt;a href=&quot;https://github.com/servo/media&quot;&gt;servo/media&lt;/a&gt; crate,
pushing code and reviewing contributions. The major tasks were to rewrite the
media player example and the internal source element looking to handle the
download &lt;code&gt;playbin&lt;/code&gt;’s flag properly.&lt;/p&gt;
&lt;p&gt;We also added WebGL integration support with &amp;lt;video&amp;gt; elements, thus webpages
can &lt;a href=&quot;https://github.com/servo/servo/pull/24233&quot;&gt;use video frames as WebGL
textures&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally we explored how to isolate the multimedia processing in a dedicated
thread or process, but that task remains pending.&lt;/p&gt;
&lt;h2 id=&quot;webkit-media-source-extension&quot; tabindex=&quot;-1&quot;&gt;WebKit Media Source Extension &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#webkit-media-source-extension&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We did a lot of downstream and upstream bug fixing and patch review, both in
WebKit and GStreamer, for our MSE GStreamer-based backend.&lt;/p&gt;
&lt;p&gt;Along this line we improved
&lt;a href=&quot;https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp&quot;&gt;WebKitMediaSource&lt;/a&gt;
to use &lt;code&gt;playbin3&lt;/code&gt; but also compatibility with older GStreamer versions was
added.&lt;/p&gt;
&lt;h2 id=&quot;webkit-webrtc&quot; tabindex=&quot;-1&quot;&gt;WebKit WebRTC &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#webkit-webrtc&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most of the work in this area were maintenance and fix regressions uncovered by
the layout tests. Besides, the support for the Rasberry Pi was improved by
handling encoded streams from v4l2 video sources, with some explorations with
Minnowboard on top of that.&lt;/p&gt;
&lt;h2 id=&quot;conferences&quot; tabindex=&quot;-1&quot;&gt;Conferences &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#conferences&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;gstreamer-conference&quot; tabindex=&quot;-1&quot;&gt;GStreamer Conference &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#gstreamer-conference&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Igalia was Gold sponsor this last GStreamer Conference held in Lyon, France.&lt;/p&gt;
&lt;p&gt;All team attended and five talks were delivered. Only Thibault presented,
besides the video editing one which we already referred, another two more: One
about &lt;a href=&quot;https://gstreamer.freedesktop.org/documentation/transcoder/gsttranscoder.html?gi-language=c&quot;&gt;GstTranscoder
API&lt;/a&gt;
and the other about the new documentation infrastructure based in
&lt;a href=&quot;https://hotdoc.github.io/index.html&quot;&gt;Hotdoc&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=AEkqLuDV5PI&quot;&gt;https://www.youtube.com/watch?v=AEkqLuDV5PI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=1q7i_w7ggWw&quot;&gt;https://www.youtube.com/watch?v=1q7i_w7ggWw&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We also had a productive hackfest, after the conference, where we worked on AV1
Rust decoder, HLS Rust demuxer, hardware decoder flag in playbin, and other
stuff.&lt;/p&gt;
&lt;h3 id=&quot;linaro-connect&quot; tabindex=&quot;-1&quot;&gt;Linaro Connect &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#linaro-connect&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Phil attended the &lt;a href=&quot;https://connect.linaro.org/&quot;&gt;Linaro Connect&lt;/a&gt; conference in
San Diego, USA. He delivered a talk about WPE/Multimedia which you can enjoy
here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=9vomDBGk8N0&quot;&gt;https://www.youtube.com/watch?v=9vomDBGk8N0&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;demuxed&quot; tabindex=&quot;-1&quot;&gt;Demuxed &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#demuxed&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Charlie attended &lt;a href=&quot;https://demuxed.com/&quot;&gt;Demuxed&lt;/a&gt;, in San Francisco. The
conference is heavily focused on streaming and codec engineering and validation.
Sadly there are not much interest in GStreamer, as the main focus is on FFmpeg.&lt;/p&gt;
&lt;h3 id=&quot;rustfest&quot; tabindex=&quot;-1&quot;&gt;RustFest &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-the-igalia-multimedia-team-activities-2019-h2/#rustfest&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Phil and I attended the last &lt;a href=&quot;https://blog.rustfest.eu/&quot;&gt;RustFest&lt;/a&gt; in Barcelona.
Basically we went to meet with the Rust community and we attended the “WebRTC
with GStreamer-rs” workshop presented by Sebastian Dröge.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer-VAAPI 1.16 and libva 2.6 in Debian</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-16-and-libva-2-6-in-debian/"/>
		<updated>2020-01-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-16-and-libva-2-6-in-debian/</id>
		<content type="html">&lt;p&gt;Debian has &lt;a href=&quot;https://tracker.debian.org/news/1091546/libva-260-1-migrated-to-testing/&quot;&gt;migrated libva 2.6 into
testing&lt;/a&gt;.
This release includes a &lt;a href=&quot;https://github.com/intel/libva/pull/351&quot;&gt;pull request that changes how the drivers are
selected&lt;/a&gt; to be loaded and used. As the
pull request mentions:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;   libva will try to load iHD firstly, if it failed. then it will load i965.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, Debian testing has imported that iHD driver with two flavors:
&lt;a href=&quot;https://tracker.debian.org/pkg/intel-media-driver&quot;&gt;intel-media-driver&lt;/a&gt; and
&lt;a href=&quot;https://tracker.debian.org/pkg/intel-media-driver-non-free&quot;&gt;intel-media-driver-non-free&lt;/a&gt;.
So basically iHD driver is now &lt;em&gt;the main VAAPI driver for Intel platforms&lt;/em&gt;,
though it only supports the new chips, the old ones still require
i965-va-driver.&lt;/p&gt;
&lt;p&gt;Sadly, for current GStreamer-VAAPI stable, the iHD driver is not included in its
driver white list. And this will pose a problem for users that have installed
either of the &lt;code&gt;intel-media-driver&lt;/code&gt; packages, because, by default, such driver is
ignored and the VAAPI GStreamer elements won’t be registered.&lt;/p&gt;
&lt;p&gt;There are three temporal workarounds (mutually excluded) for those users
(&lt;em&gt;updated&lt;/em&gt;):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Uninstall intel-media-driver* and install (or keep) the old
i965-va-driver-shaders/i965-va-driver.&lt;/li&gt;
&lt;li&gt;Export, by default in your session, &lt;code&gt;export LIBVA_DRIVER_NAME=i965&lt;/code&gt;. Normally
this is done adding the variable exportation in &lt;code&gt;$HOME/.profile&lt;/code&gt; file. This
environment variable will force libva to load the i965 driver.&lt;/li&gt;
&lt;li&gt;And finally, export, by default in your sessions, &lt;code&gt;GST_VAAPI_ALL_DRIVERS=1&lt;/code&gt;.
This is not advised since many applications, such as Epiphany, might fail.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We prefer to not include iHD in the stable white list because most of the work
done for that driver has occurred after release 1.16.&lt;/p&gt;
&lt;p&gt;In the case of GStreamer-VAAPI master branch (actively in develop) we have
merged the &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/merge_requests/216&quot;&gt;iHD in the white
list&lt;/a&gt;,
since the Intel team has been working a lot to make it work. Though, it will be
released for GStreamer version 1.18.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Generating a GStreamer-1.14 bundle for TravisCI with Ubuntu/Trusty</title>
		<link href="https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/"/>
		<updated>2019-02-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/</id>
		<content type="html">&lt;p&gt;For having &lt;a href=&quot;https://en.wikipedia.org/wiki/Continuous_integration&quot;&gt;continuous
integration&lt;/a&gt; in your
multimedia project hosted in &lt;a href=&quot;https://github.com/&quot;&gt;GitHub&lt;/a&gt; with
&lt;a href=&quot;https://www.travis-ci.com/&quot;&gt;TravisCI&lt;/a&gt;, you may want to compile and run tests
with a recent version of &lt;a href=&quot;https://gstreamer.freedesktop.org/&quot;&gt;GStreamer&lt;/a&gt;.
Nonetheless, TravisCI mainly offers &lt;a href=&quot;http://releases.ubuntu.com/14.04/&quot;&gt;Ubuntu
Trusty&lt;/a&gt; as one of the possible distributions
to deploy in their CI, and that distribution packages GStreamer 1.2, which might
be a bit old for your project’s requirements.A solution for this problem is to provide to TravisCI your own GStreamer bundle
with the version you want to compile and test on you project, in this case 1.14.
The present blog is recipe I followed to generate that GStreamer bundle with
GstGL support.&lt;/p&gt;
&lt;p&gt;There are three main issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The packaged &lt;a href=&quot;https://packages.ubuntu.com/trusty/libglib2.0-0&quot;&gt;libglib&lt;/a&gt;
version is too old, hoping that we will not find an ABI breakage while
running the CI.&lt;/li&gt;
&lt;li&gt;The packaged &lt;a href=&quot;http://ffmpeg.org&quot;&gt;FFmpeg&lt;/a&gt; version is too old&lt;/li&gt;
&lt;li&gt;As we want to compile GStreamer using gst-build, we need a recent version of
meson, which requires python3.5, not available in Trusty.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;schroot&quot; tabindex=&quot;-1&quot;&gt;schroot &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#schroot&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Old habits die hard, and I have used &lt;a href=&quot;https://wiki.debian.org/Schroot&quot;&gt;schroot&lt;/a&gt;
for handle &lt;a href=&quot;https://en.wikipedia.org/wiki/Chroot&quot;&gt;chroot environments&lt;/a&gt; without
complains, it handles the bind mounting of &lt;code&gt;/proc&lt;/code&gt;, &lt;code&gt;/sys&lt;/code&gt; and all that
repetitive stuff that seals the isolation of the chrooted environment.&lt;/p&gt;
&lt;p&gt;The debootstrap’s variant I use is &lt;code&gt;buildd&lt;/code&gt; because it installs the
build-essential package.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo mkdir /srv/chroot/gst-trusty64&lt;br&gt;sudo debootstrap --arch=amd64 --variant=buildd trusty ./gst-trusty64/ http://archive.ubuntu.com/ubuntu&lt;br&gt;sudo vim /etc/schroot/chroot.d&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is the schroot configuration I will use. Please, adapt it to your need.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;[gst]&lt;br&gt;description=Ubuntu Trusty 64-bit for GStreamer&lt;br&gt;directory=/srv/chroot/gst-trusty64&lt;br&gt;type=directory&lt;br&gt;users=vjaquez&lt;br&gt;root-users=vjaquez&lt;br&gt;profile=default&lt;br&gt;setup.fstab=default/vjaquez-home.fstab&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I am overriding the &lt;code&gt;fstab&lt;/code&gt; default file for a custom one where the home
directory of vjaquez user aims to a clean directory.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;mkdir -p ~/home-chroot/gst&lt;br&gt;sudo vim /etc/schroot/default/vjaquez-home.fstab&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;#&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;fstab: static &lt;span class=&quot;token function&quot;&gt;file&lt;/span&gt; system information &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; chroots.&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;#&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;Note that the &lt;span class=&quot;token function&quot;&gt;mount&lt;/span&gt; point will be prefixed by the &lt;span class=&quot;token function&quot;&gt;chroot&lt;/span&gt; path&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;#&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;CHROOT_PATH&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;#&lt;br&gt;#&lt;br&gt;/proc           /proc           none    rw,bind         0       0&lt;br&gt;/sys            /sys            none    rw,bind         0       0&lt;br&gt;/dev            /dev            none    rw,bind         0       0&lt;br&gt;/dev/pts        /dev/pts        none    rw,bind         0       0&lt;br&gt;/home           /home           none    rw,bind         0       0&lt;br&gt;/home/vjaquez/home-chroot/gst   /home/vjaquez   none    rw,bind 0       0&lt;br&gt;/tmp            /tmp            none    rw,bind         0       0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;configure-chroot-environment&quot; tabindex=&quot;-1&quot;&gt;configure chroot environment &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#configure-chroot-environment&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We will get into the chroot environment as super user in order to add the
required packages. For that purpose we add &lt;em&gt;universe&lt;/em&gt; repository in &lt;code&gt;apt&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;libglib requires: autotools-dev gnome-pkg-tools libtool libffi-dev
libelf-dev libpcre3-dev desktop-file-utils libselinux1-dev libgamin-dev dbus
dbus-x11 shared-mime-info libxml2-utils&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Python requires: libssl-dev libreadline-dev libsqlite3-dev&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GStreamer requires: bison flex yasm python3-pip libasound2-dev libbz2-dev
libcap-dev libdrm-dev libegl1-mesa-dev libfaad-dev libgl1-mesa-dev
libgles2-mesa-dev libgmp-dev libgsl0-dev libjpeg-dev libmms-dev
libmpg123-dev libogg-dev libopus-dev liborc-0.4-dev libpango1.0-dev
libpng-dev libpulse-dev librtmp-dev libtheora-dev libtwolame-dev
libvorbis-dev libvpx-dev libwebp-dev pkg-config unzip zlib1g-dev&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;And for general setup: language-pack-en ccache git curl&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;schroot &lt;span class=&quot;token parameter variable&quot;&gt;--user&lt;/span&gt; root &lt;span class=&quot;token parameter variable&quot;&gt;--chroot&lt;/span&gt; gst&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;(gst)# sed -i &quot;s/main$/main universe/g&quot; /etc/apt/sources.list&lt;br&gt;(gst)# apt update&lt;br&gt;(gst)# apt upgrade&lt;br&gt;(gst)# apt --no-install-recommends --no-install-suggests install &#92;&lt;br&gt;autotools-dev gnome-pkg-tools libtool libffi-dev libelf-dev &#92;&lt;br&gt;libpcre3-dev desktop-file-utils libselinux1-dev libgamin-dev dbus &#92;&lt;br&gt;dbus-x11 shared-mime-info libxml2-utils &#92;&lt;br&gt;libssl-dev libreadline-dev libsqlite3-dev &#92;&lt;br&gt;language-pack-en ccache git curl bison flex yasm python3-pip &#92;&lt;br&gt;libasound2-dev libbz2-dev libcap-dev libdrm-dev libegl1-mesa-dev &#92;&lt;br&gt;libfaad-dev libgl1-mesa-dev libgles2-mesa-dev libgmp-dev libgsl0-dev &#92;&lt;br&gt;libjpeg-dev libmms-dev libmpg123-dev libogg-dev libopus-dev &#92;&lt;br&gt;liborc-0.4-dev libpango1.0-dev libpng-dev libpulse-dev librtmp-dev &#92;&lt;br&gt;libtheora-dev libtwolame-dev libvorbis-dev libvpx-dev libwebp-dev &#92;&lt;br&gt;pkg-config unzip zlib1g-dev&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally we create our installation prefix. In this case &lt;code&gt;/opt/gst&lt;/code&gt; to avoid the
contamination of &lt;code&gt;/usr/local&lt;/code&gt; and logout as root.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)# mkdir -p /opt/gst&lt;br&gt;(gst)# chown vjaquez /opt/gst&lt;br&gt;(gst)# exit&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;compile-ffmpeg-3-2&quot; tabindex=&quot;-1&quot;&gt;compile FFmpeg 3.2 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#compile-ffmpeg-3-2&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now, let’s login again, but as the unprivileged user, to build the bundle,
starting with FFmpeg. Notice that we are using &lt;code&gt;ccache&lt;/code&gt; and building
out-of-source.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;schroot &lt;span class=&quot;token parameter variable&quot;&gt;--chroot&lt;/span&gt; gst&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg&lt;br&gt;(gst)$ cd ffmpeg&lt;br&gt;(gst)$ git checkout -b work n3.2.12&lt;br&gt;(gst)$ mkdir build&lt;br&gt;(gst)$ cd build&lt;br&gt;(gst)$ ../configure --disable-static --enable-shared &#92;&lt;br&gt;--disable-programs --enable-pic --disable-doc --prefix=/opt/gst&lt;br&gt;(gst)$ PATH=/usr/lib/ccache/:${PATH} make -j8 install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;compile-glib-2-48&quot; tabindex=&quot;-1&quot;&gt;compile glib 2.48 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#compile-glib-2-48&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ cd ~&lt;br&gt;(gst)$ git clone https://gitlab.gnome.org/GNOME/glib.git&lt;br&gt;(gst)$ cd glib&lt;br&gt;(gst)$ git checkout -b work origin/glib-2-48&lt;br&gt;(gst)$ mkdir mybuild&lt;br&gt;(gst)$ cd mybuild&lt;br&gt;(gst)$ ../autogen.sh --prefix=/opt/gst&lt;br&gt;(gst)$ PATH=/usr/lib/ccache/:${PATH} make -j8 install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;install-python-3-5&quot; tabindex=&quot;-1&quot;&gt;install Python 3.5 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#install-python-3-5&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/pyenv/pyenv&quot;&gt;Pyenv&lt;/a&gt; is a project that allows the automation
of installing and executing, in the user home directory, multiple versions of
Python.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash&lt;br&gt;(gst)$ ~/.pyenv/bin/pyenv install 3.5.0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;install-meson-0-50&quot; tabindex=&quot;-1&quot;&gt;Install meson 0.50 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#install-meson-0-50&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We will install the last available version of &lt;a href=&quot;http://mesonbuild.com/&quot;&gt;meson&lt;/a&gt; in
the user home directory, that is why &lt;code&gt;PATH&lt;/code&gt; is extended and exported.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ cd ~&lt;br&gt;(gst)$ ~/.pyenv/verion/3.5.0/pip3 install --user meson&lt;br&gt;(gst)$ export PATH=${HOME}/.local/bin:${PATH}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;build-gstreamer-1-14&quot; tabindex=&quot;-1&quot;&gt;build GStreamer 1.14 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#build-gstreamer-1-14&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;PKG_CONFIG_PATH&lt;/code&gt; is exported to expose the compiled versions of FFmpeg and
glib. Notice that the libraries are installed in &lt;code&gt;/opt/lib&lt;/code&gt; in order to avoid
the dispersion of pkg-config files.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ cd ~/&lt;br&gt;(gst)$ export PKG_CONFIG_PATH=/opt/gst/lib/pkgconfig/&lt;br&gt;(gst)$ git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git&lt;br&gt;(gst)$ cd gst-build&lt;br&gt;(gst)$ git checkout -b work origin/1.14&lt;br&gt;(gst)$ meson -Denable_python=false &#92;&lt;br&gt;-Ddisable_gst_libav=false -Ddisable_gst_plugins_ugly=true &#92;&lt;br&gt;-Ddisable_gst_plugins_bad=false -Ddisable_gst_devtools=true &#92;&lt;br&gt;-Ddisable_gst_editing_services=true -Ddisable_rtsp_server=true &#92;&lt;br&gt;-Ddisable_gst_omx=true -Ddisable_gstreamer_vaapi=true &#92;&lt;br&gt;-Ddisable_gstreamer_sharp=true -Ddisable_introspection=true &#92;&lt;br&gt;--prefix=/opt/gst build --libdir=lib&lt;br&gt;(gst)$ ninja -C build install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;testing&quot; tabindex=&quot;-1&quot;&gt;testing &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#testing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ cd ~/&lt;br&gt;(gst)$ LD_LIBRARY_PATH=/opt/gst/lib &#92;&lt;br&gt;GST_PLUGIN_SYSTEM_PATH=/opt/gst/lib/gstreamer-1.0/ &#92;&lt;br&gt;/opt/gst/bin/gst-inspect-1.0&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the list of available elements shall be shown.&lt;/p&gt;
&lt;h2 id=&quot;archive-the-bundle&quot; tabindex=&quot;-1&quot;&gt;archive the bundle &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#archive-the-bundle&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;(gst)$ cd ~/&lt;br&gt;(gst)$ tar zpcvf gstreamer-1.14-x86_64-linux-gnu.tar.gz -C /opt ./gst&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;update-your-travis-yml&quot; tabindex=&quot;-1&quot;&gt;update your .travis.yml &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/generating-a-gstreamer-1-14-bundle-for-travisci-with-ubuntu-trusty/#update-your-travis-yml&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;These are the packages you shall add to run this generated GStreamer bundle:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;libasound2-plugins&lt;/li&gt;
&lt;li&gt;libfaad2&lt;/li&gt;
&lt;li&gt;libfftw3-single3&lt;/li&gt;
&lt;li&gt;libjack-jackd2-0&lt;/li&gt;
&lt;li&gt;libmms0&lt;/li&gt;
&lt;li&gt;libmpg123-0&lt;/li&gt;
&lt;li&gt;libopus0&lt;/li&gt;
&lt;li&gt;liborc-0.4-0&lt;/li&gt;
&lt;li&gt;libpulsedsp&lt;/li&gt;
&lt;li&gt;libsamplerate0&lt;/li&gt;
&lt;li&gt;libspeexdsp1&lt;/li&gt;
&lt;li&gt;libtdb1&lt;/li&gt;
&lt;li&gt;libtheora0&lt;/li&gt;
&lt;li&gt;libtwolame0&lt;/li&gt;
&lt;li&gt;libwayland-egl1-mesa&lt;/li&gt;
&lt;li&gt;libwebp5&lt;/li&gt;
&lt;li&gt;libwebrtc-audio-processing-0&lt;/li&gt;
&lt;li&gt;liborc-0.4-dev&lt;/li&gt;
&lt;li&gt;pulseaudio&lt;/li&gt;
&lt;li&gt;pulseaudio-utils&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And this is the &lt;code&gt;before_install&lt;/code&gt; and &lt;code&gt;before_script&lt;/code&gt; targets:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;     before_install:&lt;br&gt;       - curl -L http://server.example/gstreamer-1.14-x86_64-linux-gnu.tar.gz | tar xz&lt;br&gt;       - sed -i &quot;s;prefix=/opt/gst;prefix=$PWD/gst;g&quot; $PWD/gst/lib/pkgconfig/*.pc&lt;br&gt;       - export PKG_CONFIG_PATH=$PWD/gst/lib/pkgconfig&lt;br&gt;       - export GST_PLUGIN_SYSTEM_PATH=$PWD/gst/lib/gstreamer-1.0&lt;br&gt;       - export GST_PLUGIN_SCANNER=$PWD/gst/libexec/gstreamer-1.0/gst-plugin-scanner&lt;br&gt;       - export PATH=$PATH:$PWD/gst/bin&lt;br&gt;       - export LD_LIBRARY_PATH=$PWD/gst/lib:$LD_LIBRARY_PATH&lt;br&gt;&lt;br&gt;     before_script:&lt;br&gt;       - pulseaudio --start&lt;br&gt;       - gst-inspect-1.0 | grep Total&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>Review of Igalia&#39;s Multimedia Activities (2018/H2)</title>
		<link href="https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/"/>
		<updated>2019-02-11T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/</id>
		<content type="html">&lt;p&gt;This is the first semiyearly report about Igalia’s activities around multimedia,
covering the second half of 2018.Great length of this report was exposed in &lt;a href=&quot;https://www.youtube.com/watch?v=jGaW_UofoYA&quot;&gt;Phil’s
talk&lt;/a&gt; surveying multimedia
development in &lt;a href=&quot;https://webkitgtk.org/&quot;&gt;WebKitGTK&lt;/a&gt; and
&lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPE&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=jGaW_UofoYA&quot;&gt;https://www.youtube.com/watch?v=jGaW_UofoYA&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;webkit-media-source-extensions-mse&quot; tabindex=&quot;-1&quot;&gt;WebKit Media Source Extensions (MSE) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#webkit-media-source-extensions-mse&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.w3.org/TR/media-source/&quot;&gt;MSE is a specification&lt;/a&gt; that allows JS to
generate media streams for playback for Web browsers that support HTML 5 video
and audio.&lt;/p&gt;
&lt;p&gt;Last semester we upstreamed the support to &lt;a href=&quot;https://www.webmproject.org/docs/container/&quot;&gt;WebM
format&lt;/a&gt; in WebKitGTK with the
related patches in GStreamer, particularly in &lt;code&gt;qtdemux&lt;/code&gt;, &lt;code&gt;matroskademux&lt;/code&gt;
elements.&lt;/p&gt;
&lt;h2 id=&quot;webkit-encrypted-media-extensions-eme&quot; tabindex=&quot;-1&quot;&gt;WebKit Encrypted Media Extensions (EME) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#webkit-encrypted-media-extensions-eme&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.w3.org/TR/2017/REC-encrypted-media-20170918/&quot;&gt;EME is a
specification&lt;/a&gt; for
enabling playback of encrypted content in Web browsers that support HTML 5
video.&lt;/p&gt;
&lt;p&gt;In a downstream project for &lt;a href=&quot;https://wpewebkit.org/&quot;&gt;WPE WebKit&lt;/a&gt; we managed to
have almost full test coverage in the YoutubeTV 2018 test suite.&lt;/p&gt;
&lt;p&gt;We merged our contributions in upstream, WebKit and GStreamer, most of what is
legal to publish, for example, making demuxers aware of encrypted content and
make them to send protection events with the initialization data and the
encrypted caps, in order to select later the decryption key.&lt;/p&gt;
&lt;p&gt;We started to coordinate the upstreaming process of a new implementation of CDM
(Content Decryption Module) abstraction and there will be even changes in that
abstraction.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ZenVmiiVfGw&quot;&gt;Lighting talk about EME implementation in
WPE/WebKitGTK&lt;/a&gt; in GStreamer
Conference 2018.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ZenVmiiVfGw&quot;&gt;https://www.youtube.com/watch?v=ZenVmiiVfGw&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;webkit-webrtc&quot; tabindex=&quot;-1&quot;&gt;WebKit WebRTC &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#webkit-webrtc&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.w3.org/TR/webrtc/&quot;&gt;WebRTC&lt;/a&gt; consists of several interrelated APIs
and real time protocols to enable Web applications and sites to captures audio,
or A/V streams, and exchange them between browsers without requiring an
intermediary.&lt;/p&gt;
&lt;p&gt;We added GStreamer interfaces to &lt;a href=&quot;https://webrtc.org/&quot;&gt;LibWebRTC&lt;/a&gt;, to use it for
the network part, while using GStreamer for the media capture and processing.
All that was upstreamed in 2018 H2.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blogs.gnome.org/tsaunier/2018/07/31/webkitgtk-and-wpe-gains-webrtc-support-back/&quot;&gt;Thibault described
thoroughly&lt;/a&gt;
the tasks done for this achievement.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=LHSVMWOYViw&quot;&gt;Talk about WebRTC implementation in
WPE/WebKitGTK&lt;/a&gt; in WebEngines
hackfest 2018.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=LHSVMWOYViw&quot;&gt;https://www.youtube.com/watch?v=LHSVMWOYViw&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;servo-media&quot; tabindex=&quot;-1&quot;&gt;Servo/media &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#servo-media&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://servo.org/&quot;&gt;Servo&lt;/a&gt; is a browser engine written in
&lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt; designed for high parallelization and high
GPU usage.&lt;/p&gt;
&lt;p&gt;We added basic support for &lt;code&gt;&amp;lt;video&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;audio&amp;gt;&lt;/code&gt; media elements in Servo.
Later on, we added the GStreamerGL bindings for Rust in
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-rs&quot;&gt;gstreamer-rs&lt;/a&gt; to render
GL textures from the GStreamer pipeline in Servo.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=yLyZuIBSU4g&quot;&gt;Lighting talk&lt;/a&gt; in the GStreamer
Conference 2018.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=yLyZuIBSU4g&quot;&gt;https://www.youtube.com/watch?v=yLyZuIBSU4g&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;gstwpe&quot; tabindex=&quot;-1&quot;&gt;GstWPE &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#gstwpe&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Taking an idea from the GStreamer Conference, we developed a GStreamer source
element that wraps WPE. With this source element, it is possible to blend a web
page and video in a single video stream; that is, the output of a Web browser
(to say, a rendered web page) is used as a video source of a GStreamer pipeline:
&lt;a href=&quot;https://base-art.net/Articles/web-overlay-in-gstreamer-with-wpewebkit/&quot;&gt;GstWPE&lt;/a&gt;.
The element is already merged in the
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/&quot;&gt;gst-plugins-bad&lt;/a&gt;
repository.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=no7rvUk8GqM&quot;&gt;Talk about GstWPE&lt;/a&gt; in FOSDEM 2019&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=no7rvUk8GqM&quot;&gt;https://www.youtube.com/watch?v=no7rvUk8GqM&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=1JUa3Ldb3vE&quot;&gt;Demo #1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=1JUa3Ldb3vE&quot;&gt;https://www.youtube.com/watch?v=1JUa3Ldb3vE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=J2eb-KRk9gw&quot;&gt;Demo #2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=J2eb-KRk9gw&quot;&gt;https://www.youtube.com/watch?v=J2eb-KRk9gw&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-va-api-and-gst-msdk&quot; tabindex=&quot;-1&quot;&gt;GStreamer VA-API and gst-MSDK &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#gstreamer-va-api-and-gst-msdk&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At last, but not the least, we continued helping with the maintenance of
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi&quot;&gt;GStreamer-VAAPI&lt;/a&gt; and
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/tree/master/sys/msdk&quot;&gt;gst-msdk&lt;/a&gt;,
with code reviewing and on-going migration of the internal library to GObject.&lt;/p&gt;
&lt;h2 id=&quot;other-activities&quot; tabindex=&quot;-1&quot;&gt;Other activities &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/review-of-igalias-multimedia-activities-2018-h2/#other-activities&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The second half of 2018 was also intense in terms of conferences and hackfest
for the team:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gstreamer.freedesktop.org/conference/2018/&quot;&gt;GStreamer conference&lt;/a&gt; in
Edinburgh.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://webengineshackfest.org/2018/&quot;&gt;Web Engines Hackfest&lt;/a&gt; in Coruña.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://webkit.org/meeting/&quot;&gt;WebKit meeting&lt;/a&gt; in Silicon Valley&lt;/li&gt;
&lt;li&gt;Finally, we participated as mentors in the last &lt;a href=&quot;https://summerofcode.withgoogle.com/&quot;&gt;Google Summer of
Code&lt;/a&gt;. Georg Ottinger, among other
completed tasks, sketched an &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/728&quot;&gt;AV1 parser for
GStreamer&lt;/a&gt;,
though it needs a couple more iterations to get it merged.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;Thanks to bear with us along all this blog post and to keeping under your radar
our work.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Rust bindings for GStreamerGL: Memoirs</title>
		<link href="https://blogs.igalia.com/vjaquez/rust-bindings-for-gstreamergl-memoirs/"/>
		<updated>2019-01-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/rust-bindings-for-gstreamergl-memoirs/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://www.rust-lang.org/&quot;&gt;Rust&lt;/a&gt; is a great programming language but the
community around it’s just amazing. Those are the ingredients for the craft of
useful software tools, just like &lt;a href=&quot;https://servo.org/&quot;&gt;Servo&lt;/a&gt;, an experimental
browser engine designed for tasks isolation and high parallelization.Both projects, Rust and Servo, are funded by &lt;a href=&quot;https://www.mozilla.org&quot;&gt;Mozilla&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks to Mozilla and &lt;a href=&quot;https://www.igalia.com&quot;&gt;Igalia&lt;/a&gt; I have the opportunity to
work on Servo, adding it HTML5 multimedia features.&lt;/p&gt;
&lt;p&gt;First, with the help of &lt;a href=&quot;https://twitter.com/f_jimenez&quot;&gt;Fernando Jiménez&lt;/a&gt;, we
finished what my colleague &lt;a href=&quot;https://twitter.com/_philn_&quot;&gt;Philippe Normand&lt;/a&gt; and
&lt;a href=&quot;https://twitter.com/sdroege_&quot;&gt;Sebastian Dröge&lt;/a&gt; (one of my programming heroes)
started: a media player in Rust designed to be integrated in Servo. This media
player lives in its own crate: &lt;a href=&quot;https://github.com/servo/media&quot;&gt;servo/media&lt;/a&gt;
along with the WebAudio engine. A &lt;em&gt;crate&lt;/em&gt;, in Rust jargon, is like a library.
This crate is (very &lt;em&gt;ad-hocly&lt;/em&gt;) designed to be multimedia framework agnostic,
but the only backend right now is for
&lt;a href=&quot;https://gstreamer.freedesktop.org/&quot;&gt;GStreamer&lt;/a&gt;. Later we &lt;a href=&quot;https://blog.servo.org/2018/10/15/twis-115/&quot;&gt;integrated it into
Servo&lt;/a&gt; adding an initial support
for &lt;code&gt;audio&lt;/code&gt; and &lt;code&gt;video&lt;/code&gt; tags.&lt;/p&gt;
&lt;p&gt;Currently, &lt;code&gt;servo/media&lt;/code&gt; passes, through a IPC channel, the array with the whole
frame to render in Servo. This implies, at least, one copy of the frame in
memory, and we would like to avoid it.&lt;/p&gt;
&lt;p&gt;For &lt;a href=&quot;https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-fps-how-webrender-gets-rid-of-jank/&quot;&gt;painting and
compositing&lt;/a&gt;
the web content, Servo uses &lt;a href=&quot;https://github.com/servo/webrender&quot;&gt;WebRender&lt;/a&gt;, a
crate designed to use the GPU intensively. Thus, if instead of raw frame data we
pass OpenGL textures to WebRender the performance could be enhanced notoriously.&lt;/p&gt;
&lt;p&gt;Luckily, GStreamer already supports the uploading, downloading, painting and
composition of video frames as OpenGL textures with the &lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-plugin-opengl.html&quot;&gt;OpenGL
plugin&lt;/a&gt;
and its &lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gl.html&quot;&gt;OpenGL Integration
library&lt;/a&gt;.
Even more, with plugins such as
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-vaapi-plugins/html/&quot;&gt;GStreamer-VAAPI&lt;/a&gt;,
&lt;a href=&quot;https://gstreamer.freedesktop.org/releases/gst-omx/1.0.0.html&quot;&gt;Gst-OMX&lt;/a&gt;
(OpenMAX), and others, it’s possible to process video without using the main CPU
or its mapped memory in different platforms.&lt;/p&gt;
&lt;p&gt;But from what’s available in GStreamer to what it’s available in Rust there’s a
distance. Nonetheless, Sebastian has putting a lot of effort in the Rust
bindings for GStreamer, either for
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-rs&quot;&gt;applications&lt;/a&gt; and
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs&quot;&gt;plugins&lt;/a&gt;, sadly,
GStreamer’s OpenGL Integration library (GstGL for short) wasn’t available at
that time. So I rolled up my sleeves and got to work on the bindings.&lt;/p&gt;
&lt;p&gt;These are the stories of that work.&lt;/p&gt;
&lt;p&gt;As GStreamer shares with GTK+ the
&lt;a href=&quot;https://developer.gnome.org/gobject/stable/chapter-intro.html&quot;&gt;GObject&lt;/a&gt;
framework and its &lt;a href=&quot;https://gi.readthedocs.io/en/latest/&quot;&gt;introspection&lt;/a&gt;
mechanism, both projects have collaborated on the required infrastructure to
support Rust bindings. Thanks to all the GNOME folks who are working on the
intercommunication between Rust and GObject. The quest has been long and
complex, since Rust doesn’t map all the object oriented concepts, and GObject,
being a set of practices and software helpers to do object oriented programming
with &lt;code&gt;C&lt;/code&gt;, its usage is not homogeneous.&lt;/p&gt;
&lt;p&gt;The Rubicon that ease the generation of Rust bindings for GObject-based projects
is &lt;a href=&quot;https://github.com/gtk-rs/gir/&quot;&gt;GIR&lt;/a&gt;, a tool, written in Rust, that reads
&lt;code&gt;gir&lt;/code&gt; files, along with metadata in &lt;code&gt;toml&lt;/code&gt;, and outputs two types of bindings:
&lt;em&gt;sys&lt;/em&gt; and &lt;em&gt;api&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Rust can call external functions through
&lt;a href=&quot;https://doc.rust-lang.org/1.5.0/book/ffi.html&quot;&gt;FFI&lt;/a&gt; (foreign function
interface), which is just a declaration of a &lt;code&gt;C&lt;/code&gt; function with Rust types. But
these functions are considered &lt;em&gt;unsafe&lt;/em&gt;. The &lt;em&gt;sys&lt;/em&gt; bindings, are just the
exporting of the C function for the library organized by the library’s
namespace.&lt;/p&gt;
&lt;p&gt;The next step is to create a safe and rustified API. This is the &lt;em&gt;api&lt;/em&gt; bindings.&lt;/p&gt;
&lt;p&gt;As we said, GObject libraries are quite homogeneous, and even following the
introspection annotations, there will be cases where GIR won’t be able to
generate the correct bindings. For that reason GIR is constantly evolving,
looking for a common way to solve the corner cases that exist in every GObject
project. For example, these are &lt;a href=&quot;https://github.com/gtk-rs/gir/commits?author=ceyusa&quot;&gt;my
patches&lt;/a&gt; in order to
generate the GstGL bindings.&lt;/p&gt;
&lt;p&gt;The done tasks were:&lt;/p&gt;
&lt;p&gt;For this document we assume that the reader has a functional Rust setup and they
know the basic concepts.&lt;/p&gt;
&lt;p&gt;Clone and build &lt;code&gt;gir&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/ws&lt;br&gt;git clone https://github.com/gtk-rs/gir.git&lt;br&gt;cd gir&lt;br&gt;cargo build --release&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the reason to build &lt;code&gt;gir&lt;/code&gt; in release mode is because, otherwise would be very
slow.&lt;/p&gt;
&lt;p&gt;For &lt;strong&gt;sys&lt;/strong&gt; bindings.&lt;/p&gt;
&lt;p&gt;These kind of bindings are normally straight forward (and unsafe) since they
only map the &lt;code&gt;C&lt;/code&gt; API to Rust via FFI mechanism.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/ws&lt;br&gt;git clone https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys.git&lt;br&gt;cd gstreamer-rs-sys&lt;br&gt;cp /usr/share/gir-1.0/GstGL-1.0.gir gir-files/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Verify if the gir file is more o less correct&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If there something strange, we should fix the code that generated it.&lt;/li&gt;
&lt;li&gt;If that is not possible, the last resource is to fix the gir file directly,
which is just XML, not manually but through a script using
&lt;a href=&quot;http://xmlstar.sourceforge.net/&quot;&gt;xmlstartlet&lt;/a&gt;. See
&lt;a href=&quot;https://github.com/gtk-rs/gir-files/blob/62f3bf007943b3464400678cfeea572cc556273a/fix.sh&quot;&gt;fix.sh&lt;/a&gt;
in &lt;code&gt;gtk-rs&lt;/code&gt; as example.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the toml file with the metadata required to create the bindings. In
other words, this file contains the exceptions, rules and options used by the
tool to generated the bindings. See
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys/blob/master/Gir_GstGL.toml&quot;&gt;Gir_GstGL.toml&lt;/a&gt;
in &lt;code&gt;gstreamer-rs-sys&lt;/code&gt; as example. The documentation of the toml file is in
the &lt;a href=&quot;https://github.com/gtk-rs/gir/blob/master/README.md&quot;&gt;gir’s README.md&lt;/a&gt;
file.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;~/ws/gir/target/release/gir -c Gir_GstGL.toml&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This command will generate, as specified in the toml file (&lt;code&gt;target_path&lt;/code&gt;), a
crate in the directory named &lt;code&gt;gstreamer-gl-sys&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Api&lt;/strong&gt; bindings.&lt;/p&gt;
&lt;p&gt;These type of bindings may require more manual work since their purpose is to
offer a &lt;em&gt;rustified&lt;/em&gt; API of the library, with all its syntactic sugar, semantics,
and so on. But in general terms, the process is similar:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/ws&lt;br&gt;git clone https://gitlab.freedesktop.org/gstreamer/gstreamer-sys.git&lt;br&gt;cd gstreamer-sys&lt;br&gt;cp /usr/share/gir-1.0/GstGL-1.0.gir gir-files/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Again, it would be possible to end up applying fixes to the gir file through a
&lt;code&gt;fix.sh&lt;/code&gt; script using &lt;code&gt;xmlstartlet&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And again, the confection of the toml file might take a lot of time, by trial
and error, by cleaning and tidying up the API. See
&lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/blob/master/Gir_GstGL.toml&quot;&gt;Gir_GstGL.toml&lt;/a&gt;
in &lt;code&gt;gstreamer-rs&lt;/code&gt; as example.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;~/ws/gir/target/release/gir -c Gir_GstGL.toml&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A good way to test your bindings is by crafting a test application, which shows
how to use the API. Personally I devoted a ton of time in &lt;a href=&quot;https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/blob/master/examples/src/bin/glupload.rs&quot;&gt;the test application
for
GstGL&lt;/a&gt;,
but worth it. It made me aware of a missing part in the crate used for GL
applications in Rust, named &lt;a href=&quot;https://github.com/tomaka/glutin/&quot;&gt;Glutin&lt;/a&gt;, which
was a way to get the used &lt;code&gt;EGLDisplay&lt;/code&gt;. So also worked on that and sent a &lt;a href=&quot;https://github.com/tomaka/glutin/pull/1082&quot;&gt;pull
request&lt;/a&gt; that was recently merged.
The sweets of the free software development.&lt;/p&gt;
&lt;p&gt;Nowadays I’m integrating GstGL API in &lt;code&gt;servo/media&lt;/code&gt; and later, Servo!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Building gst-msdk with MediaSDK opensource</title>
		<link href="https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/"/>
		<updated>2018-11-23T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/</id>
		<content type="html">&lt;p&gt;I tried, several months ago, the open source version of Intel MediaSDK and it
was a complete mess. In order to review some patches for gst-msdk I tried it
again. I am surprised how the situation has improved since then.## Install dependencies&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo apt get install libva-dev vainfo cmake ccache&lt;br&gt;sudo apt build-dep gstreamer1.0 gst-plugins-{base,good,bad}1.0&lt;br&gt;sudo apt remove libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;setting-up-the-workplace&quot; tabindex=&quot;-1&quot;&gt;Setting up the workplace &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#setting-up-the-workplace&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo mkdir /opt/intel&lt;br&gt;sudo chown usuario:usuario /opt/intel&lt;br&gt;mkdir ~/msdk&lt;br&gt;cd ~/msdk&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;build-mediasdk&quot; tabindex=&quot;-1&quot;&gt;Build MediaSDK &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#build-mediasdk&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It will be built in its source directory: &lt;code&gt;~/msdk/MediaSDK/build&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It will be installed in &lt;code&gt;/opt/intel&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;git clone https://github.com/Intel-Media-SDK/MediaSDK.git&lt;br&gt;cd MediaSDK&lt;br&gt;mkdir build&lt;br&gt;cd build&lt;br&gt;cmake ..&lt;br&gt;make&lt;br&gt;make install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;build-media-driver&quot; tabindex=&quot;-1&quot;&gt;Build media-driver &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#build-media-driver&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/msdk&lt;br&gt;git clone https://github.com/intel/media-driver.git&lt;br&gt;git clone https://github.com/intel/gmmlib.git&lt;br&gt;mkdir build&lt;br&gt;cd build&lt;br&gt;cmake ../media-driver&lt;br&gt;make&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let’s install media-driver in &lt;code&gt;/opt/intel&lt;/code&gt; too&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/msdk/build&lt;br&gt;cp ./media_driver/iHD_drv_video.so /opt/intel&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;But&lt;/em&gt; don’t remove, rename or move the directory &lt;code&gt;~/msdk/build&lt;/code&gt; because
&lt;code&gt;iHD_drv_video.so&lt;/code&gt; links against &lt;code&gt;libigdgmm.so.5&lt;/code&gt; which is there. Thus either
you keep the directory or you install that library in a path searchable by the
linker, or set the environment variable &lt;code&gt;LD_LIBRARY_PATH&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;test-environment&quot; tabindex=&quot;-1&quot;&gt;Test environment &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#test-environment&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;LIBVA_DRIVERS_PATH&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;/opt/intel &lt;span class=&quot;token assign-left variable&quot;&gt;LIBVA_DRIVER_NAME&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;iHD vainfo&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;  libva info: VA-API version 1.3.0&lt;br&gt;  libva info: va_getDriverName() returns -1&lt;br&gt;  libva info: User requested driver &#39;iHD&#39;&lt;br&gt;  libva info: Trying to open /opt/intel/iHD_drv_video.so&lt;br&gt;  libva info: Found init function __vaDriverInit_1_3&lt;br&gt;  libva info: va_openDriver() returns 0&lt;br&gt; vainfo: VA-API version: 1.3 (libva 2.2.0)&lt;br&gt; vainfo: Driver version: Intel iHD driver - 1.0.0&lt;br&gt; vainfo: Supported profile and entrypoints&lt;br&gt;   VAProfileNone                   : VAEntrypointVideoProc&lt;br&gt;   VAProfileNone                   : VAEntrypointStats&lt;br&gt;   VAProfileMPEG2Simple            : VAEntrypointVLD&lt;br&gt;   VAProfileMPEG2Simple            : VAEntrypointEncSlice&lt;br&gt;   VAProfileMPEG2Main              : VAEntrypointVLD&lt;br&gt;   VAProfileMPEG2Main              : VAEntrypointEncSlice&lt;br&gt;   VAProfileH264Main               : VAEntrypointVLD&lt;br&gt;   VAProfileH264Main               : VAEntrypointEncSlice&lt;br&gt;   VAProfileH264Main               : VAEntrypointFEI&lt;br&gt;   VAProfileH264Main               : VAEntrypointEncSliceLP&lt;br&gt;   VAProfileH264High               : VAEntrypointVLD&lt;br&gt;   VAProfileH264High               : VAEntrypointEncSlice&lt;br&gt;   VAProfileH264High               : VAEntrypointFEI&lt;br&gt;   VAProfileH264High               : VAEntrypointEncSliceLP&lt;br&gt;   VAProfileVC1Simple              : VAEntrypointVLD&lt;br&gt;   VAProfileVC1Main                : VAEntrypointVLD&lt;br&gt;   VAProfileVC1Advanced            : VAEntrypointVLD&lt;br&gt;   VAProfileJPEGBaseline           : VAEntrypointVLD&lt;br&gt;   VAProfileJPEGBaseline           : VAEntrypointEncPicture&lt;br&gt;   VAProfileH264ConstrainedBaseline: VAEntrypointVLD&lt;br&gt;   VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice&lt;br&gt;   VAProfileH264ConstrainedBaseline: VAEntrypointFEI&lt;br&gt;   VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP&lt;br&gt;   VAProfileVP8Version0_3          : VAEntrypointVLD&lt;br&gt;   VAProfileHEVCMain               : VAEntrypointVLD&lt;br&gt;   VAProfileHEVCMain               : VAEntrypointEncSlice&lt;br&gt;   VAProfileHEVCMain               : VAEntrypointFEI&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;setup-gst-build&quot; tabindex=&quot;-1&quot;&gt;Setup gst-build &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#setup-gst-build&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It will be build in its source directory: &lt;code&gt;~/msdk/gst-build/build&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/msdk&lt;br&gt;git clone https://gitlab.freedesktop.org/gstreamer/gst-build.git&lt;br&gt;cd gst-build&lt;br&gt;export INTELMEDIASDKROOT=/opt/intel/mediasdk&lt;br&gt;meson build -Dpython=disabled -Dgst-plugins-bad:msdk=enabled&lt;br&gt;ninja -C build&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;check-for-build-elements&quot; tabindex=&quot;-1&quot;&gt;Check for build elements &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#check-for-build-elements&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;ninja &lt;span class=&quot;token parameter variable&quot;&gt;-C&lt;/span&gt; ~/msdk/gst-build/build  uninstalled&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;[gst-master] $ GST_VAAPI_ALL_DRIVERS=1 &#92;&lt;br&gt;               LIBVA_DRIVERS_PATH=/opt/intel &#92;&lt;br&gt;               LIBVA_DRIVER_NAME=iHD &#92;&lt;br&gt;               gst-inspect-1.0 | egrep &quot;vaapi|msdk&quot;&lt;br&gt;vaapi:  vaapijpegdec: VA-API JPEG decoder&lt;br&gt;vaapi:  vaapimpeg2dec: VA-API MPEG2 decoder&lt;br&gt;vaapi:  vaapih264dec: VA-API H264 decoder&lt;br&gt;vaapi:  vaapivc1dec: VA-API VC1 decoder&lt;br&gt;vaapi:  vaapivp8dec: VA-API VP8 decoder&lt;br&gt;vaapi:  vaapih265dec: VA-API H265 decoder&lt;br&gt;vaapi:  vaapipostproc: VA-API video postprocessing&lt;br&gt;vaapi:  vaapidecodebin: VA-API Decode Bin&lt;br&gt;vaapi:  vaapisink: VA-API sink&lt;br&gt;vaapi:  vaapimpeg2enc: VA-API MPEG-2 encoder&lt;br&gt;vaapi:  vaapih265enc: VA-API H265 encoder&lt;br&gt;vaapi:  vaapijpegenc: VA-API JPEG encoder&lt;br&gt;vaapi:  vaapih264enc: VA-API H264 encoder&lt;br&gt;msdk:  msdkvpp: MSDK Video Postprocessor&lt;br&gt;msdk:  msdkvc1dec: Intel MSDK VC1 decoder&lt;br&gt;msdk:  msdkvp8enc: Intel MSDK VP8 encoder&lt;br&gt;msdk:  msdkvp8dec: Intel MSDK VP8 decoder&lt;br&gt;msdk:  msdkmpeg2enc: Intel MSDK MPEG2 encoder&lt;br&gt;msdk:  msdkmpeg2dec: Intel MSDK MPEG2 decoder&lt;br&gt;msdk:  msdkmjpegenc: Intel MSDK MJPEG encoder&lt;br&gt;msdk:  msdkmjpegdec: Intel MSDK MJPEG decoder&lt;br&gt;msdk:  msdkh265enc: Intel MSDK H265 encoder&lt;br&gt;msdk:  msdkh265dec: Intel MSDK H265 decoder&lt;br&gt;msdk:  msdkh264enc: Intel MSDK H264 encoder&lt;br&gt;msdk:  msdkh264dec: Intel MSDK H264 decoder&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;remember&quot; tabindex=&quot;-1&quot;&gt;Remember &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/building-gst-msdk-with-mediasdk-opensource/#remember&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Remember to export these environment variables (perhaps you what to create a
script file to set them):&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;export GST_VAAPI_ALL_DRIVERS=1&lt;br&gt;export LIBVA_DRIVERS_PATH=/opt/intel&lt;br&gt;export LIBVA_DRIVER_NAME=iHD&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>How to setup a gst-build environment with Intel&#39;s VA-API stack</title>
		<link href="https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/"/>
		<updated>2018-04-17T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/</id>
		<content type="html">&lt;p&gt;&lt;code&gt;gst-build&lt;/code&gt; is far superior than &lt;code&gt;gst-uninstalled&lt;/code&gt; scripts for developing
&lt;a href=&quot;https://gstreamer.freedesktop.org/&quot;&gt;GStreamer&lt;/a&gt;, mainly because its
&lt;a href=&quot;http://mesonbuild.com/&quot;&gt;meson&lt;/a&gt; and &lt;a href=&quot;https://ninja-build.org/&quot;&gt;ninja&lt;/a&gt; usage.
Nonetheless, to integrate external dependencies it is not as easy as in
&lt;code&gt;gst-uninstalled&lt;/code&gt;.This guide aims to show how to integrate GStreamer-VAAPI dependencies, in this
case with the &lt;a href=&quot;https://github.com/intel/intel-vaapi-driver&quot;&gt;Intel VA-API
driver&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;dependencies&quot; tabindex=&quot;-1&quot;&gt;Dependencies &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#dependencies&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For now we will need meson master, since it &lt;a href=&quot;https://github.com/mesonbuild/meson/pull/3269&quot;&gt;this
patch&lt;/a&gt; is required. The pull
request is already merged but it is unreleased yet.&lt;/p&gt;
&lt;h2 id=&quot;installation&quot; tabindex=&quot;-1&quot;&gt;Installation &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#installation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;clone-gst-build-repository&quot; tabindex=&quot;-1&quot;&gt;clone gst-build repository &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#clone-gst-build-repository&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;git clone git://anongit.freedesktop.org/gstreamer/gst-build&lt;br&gt;cd gst-build&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;apply-custom-patch-for-gst-build&quot; tabindex=&quot;-1&quot;&gt;apply custom patch for gst-build &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#apply-custom-patch-for-gst-build&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The patch will add the repositories for &lt;code&gt;libva&lt;/code&gt; and &lt;code&gt;intel-vaapi-driver&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;wget https://people.igalia.com/vjaquez/gst-build-vaapi/0001-add-libva-and-intel-vaapi-driver-as-subprojects.patch&lt;br&gt;git am 0001-add-libva-and-intel-vaapi-driver-as-subprojects.patch&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://people.igalia.com/vjaquez/gst-build-vaapi/0001-add-libva-and-intel-vaapi-driver-as-subprojects.patch&quot;&gt;0001-add-libva-and-intel-vaapi-driver-as-subprojects.patch&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;configure&quot; tabindex=&quot;-1&quot;&gt;configure &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#configure&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Running this command, all dependency repositories will be cloned, symbolic links
created, and the &lt;code&gt;build&lt;/code&gt; directory configured.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;meson bulid&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;apply-custom-patches-for-libva-intel-vaapi-driver-and-gstreamer-vaapi&quot; tabindex=&quot;-1&quot;&gt;apply custom patches for libva, intel-vaapi-driver and gstreamer-vaapi &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#apply-custom-patches-for-libva-intel-vaapi-driver-and-gstreamer-vaapi&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;libva&quot; tabindex=&quot;-1&quot;&gt;libva &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#libva&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This patch is required since the headers files uninstalled paths doesn’t match
with the ones in the “include” directives.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd libva&lt;br&gt;wget https://people.igalia.com/vjaquez/gst-build-vaapi/0001-build-add-headers-for-uninstalled-setup.patch&lt;br&gt;git am 0001-build-add-headers-for-uninstalled-setup.patch&lt;br&gt;cd -&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://people.igalia.com/vjaquez/gst-build-vaapi/0001-build-add-headers-for-uninstalled-setup.patch&quot;&gt;0001-build-add-headers-for-uninstalled-setup.patch&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;intel-vaapi-driver&quot; tabindex=&quot;-1&quot;&gt;intel-vaapi-driver &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#intel-vaapi-driver&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The patch handles &lt;code&gt;libva&lt;/code&gt; dependency as a subproject.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd intel-vaapi-driver&lt;br&gt;wget https://people.igalia.com/vjaquez/gst-build-vaapi/0001-meson-support-libva-as-subproject.patch&lt;br&gt;git am 0001-meson-support-libva-as-subproject.patch&lt;br&gt;cd -&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://people.igalia.com/vjaquez/gst-build-vaapi/0001-meson-support-libva-as-subproject.patch&quot;&gt;0001-meson-support-libva-as-subproject.patch&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;gstreamer-vaapi&quot; tabindex=&quot;-1&quot;&gt;gstreamer-vaapi &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#gstreamer-vaapi&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Note to myself: this patch must be split and merged in upstream.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd gstreamer-vaapi&lt;br&gt;wget https://people.igalia.com/vjaquez/gst-build-vaapi/0001-build-meson-libva-gst-uninstall-friendly.patch&lt;br&gt;git am 0001-build-meson-libva-gst-uninstall-friendly.patch&lt;br&gt;cd -&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://people.igalia.com/vjaquez/gst-build-vaapi/0001-build-meson-libva-gst-uninstall-friendly.patch&quot;&gt;0001-build-meson-libva-gst-uninstall-friendly.patch&lt;/a&gt;
&lt;em&gt;updated: 2018/04/24&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;build&quot; tabindex=&quot;-1&quot;&gt;build &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#build&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;ninja -C build&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And wait a couple minutes.&lt;/p&gt;
&lt;h3 id=&quot;run-uninstalled-environment-for-testing&quot; tabindex=&quot;-1&quot;&gt;run uninstalled environment for testing &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/how-to-setup-a-gst-build-environment-with-intels-va-api-stack/#run-uninstalled-environment-for-testing&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;ninja &lt;span class=&quot;token parameter variable&quot;&gt;-C&lt;/span&gt; build uninstalled&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;[gst-master] $ gst-inspect-1.0 vaapi&lt;br&gt;Plugin Details:&lt;br&gt; Name                     vaapi&lt;br&gt; Description              VA-API based elements&lt;br&gt; Filename                 /opt/gst/gst-build/build/subprojects/gstreamer-vaapi/gst/vaapi/libgstvaapi.so&lt;br&gt; Version                  1.15.0.1&lt;br&gt; License                  LGPL&lt;br&gt; Source module            gstreamer-vaapi&lt;br&gt; Binary package           gstreamer-vaapi&lt;br&gt; Origin URL               http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&lt;br&gt;&lt;br&gt; vaapih264enc: VA-API H264 encoder&lt;br&gt; vaapimpeg2enc: VA-API MPEG-2 encoder&lt;br&gt; vaapisink: VA-API sink&lt;br&gt; vaapidecodebin: VA-API Decode Bin&lt;br&gt; vaapipostproc: VA-API video postprocessing&lt;br&gt; vaapivc1dec: VA-API VC1 decoder&lt;br&gt; vaapih264dec: VA-API H264 decoder&lt;br&gt; vaapimpeg2dec: VA-API MPEG2 decoder&lt;br&gt; vaapijpegdec: VA-API JPEG decoder&lt;br&gt;&lt;br&gt; 9 features:&lt;br&gt; +-- 9 elements&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer VA-API Troubleshooting</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/"/>
		<updated>2018-03-28T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/</id>
		<content type="html">&lt;p&gt;GStreamer VA-API is not a trivial piece of software. Even though, in my opinion
it is a bit over-engineered, the complexity relies on its layered architecture:
the user must troubleshoot in which layer is the &lt;a href=&quot;http://failure.So&quot;&gt;failure.So&lt;/a&gt;, bear in mind this architecture:&lt;/p&gt;
&lt;p&gt;GStreamer VA-API is not a trivial piece of software. Even though, in my opinion
it is a bit over-engineered, the complexity relies on its layered architecture:
the user must troubleshoot in which layer is the failure.&lt;/p&gt;
&lt;p&gt;So, bear in mind this architecture:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/va-580x804.png&quot; alt=&quot;libva architecture&quot;&gt;&lt;figcaption&gt;libva architecture&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;And the point of failure could be anywhere.&lt;/p&gt;
&lt;h2 id=&quot;drivers&quot; tabindex=&quot;-1&quot;&gt;Drivers &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/#drivers&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/intel/libva&quot;&gt;libva&lt;/a&gt; is a library designed to load another
library called driver or back-end. This driver is responsible to &lt;em&gt;talk&lt;/em&gt; with the
kernel, windowing platform, memory handling library, or any other piece of
software or hardware that actually will do the video processing.&lt;/p&gt;
&lt;p&gt;There are many drivers in the wild. As it is an API aiming to stateless video
processing, and the industry is moving towards that way to process video, it is
expected more drivers would appear in the future.&lt;/p&gt;
&lt;p&gt;Nonetheless, not all the drivers have the same level of maturity, and some of
them are abandon-ware. For this reason we decided in GStreamer VA-API, some time
ago, to add a white list of &lt;em&gt;functional drivers&lt;/em&gt;, basically, those developed by
&lt;a href=&quot;https://mesa3d.org/&quot;&gt;Mesa3D&lt;/a&gt; and &lt;a href=&quot;https://github.com/intel/intel-vaapi-driver&quot;&gt;this
one&lt;/a&gt; from Intel™. If you wish to
disable that white-list, you can do it by setting an environment variable:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;export GST_VAAPI_ALL_DRIVERS=1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Remember&lt;/strong&gt;, if you set it, you are on your own, since we do not trust on the
maturity of that driver yet.&lt;/p&gt;
&lt;h3 id=&quot;internal-libva-driver-version&quot; tabindex=&quot;-1&quot;&gt;Internal libva↔driver version &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/#internal-libva-driver-version&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Thus, there is an internal API between &lt;code&gt;libva&lt;/code&gt; and the driver and it is
versioned, meaning that the internal API version of the installed &lt;code&gt;libva&lt;/code&gt;
library must match with the internal API exposed by the driver. One of the
causes that &lt;code&gt;libva&lt;/code&gt; could not initialize a driver could be because the internal
API version does not match.&lt;/p&gt;
&lt;h3 id=&quot;drivers-path-and-driver-name&quot; tabindex=&quot;-1&quot;&gt;Drivers path and driver name &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/#drivers-path-and-driver-name&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;By default there is a path where &lt;code&gt;libva&lt;/code&gt; looks for drivers to load. That path is
defined at compilation time. Following Debian’s file-system hierarchy standard
(&lt;a href=&quot;https://wiki.linuxfoundation.org/lsb/fhs&quot;&gt;FHS&lt;/a&gt;) it should be set by
distributions in &lt;code&gt;/usr/lib/x86_64-linux-gnu/dri/&lt;/code&gt;. But the user can control this
path with an environment variable:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;export LIBVA_DRIVERS_PATH=${HOME}/src/intel-vaapi-driver/src/.libs&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The driver path, as a directory, might contain several drivers. &lt;code&gt;libva&lt;/code&gt; will try
to guess the &lt;em&gt;correct&lt;/em&gt; one by querying the instantiated VA display (which could
be either KMS/DRM, Wayland, Android or X11). If the user instantiates a VA
display different of his running environment, the guess will be erroneous, the
library loading will fail.&lt;/p&gt;
&lt;p&gt;Although, there is a way for the user to set the driver’s name too. Again, by
setting an environment variable:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;export LIBVA_DRIVER_NAME=iHD&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With this setting, &lt;code&gt;libva&lt;/code&gt; will try to load &lt;code&gt;iHD_drv_video.so&lt;/code&gt; (a new and
experimental open source driver from Intel™, targeted for
&lt;a href=&quot;https://github.com/Intel-Media-SDK/MediaSDK&quot;&gt;MediaSDK&lt;/a&gt; —do not use it yet with
GStreamer VAAPI—).&lt;/p&gt;
&lt;h2 id=&quot;vainfo&quot; tabindex=&quot;-1&quot;&gt;vainfo &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/#vainfo&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;vainfo&lt;/code&gt; is &lt;em&gt;the diagnostic tool for VA-API&lt;/em&gt;. In a couple words, it will iterate
on a list of VA displays, in try-and-error strategy, and try to initialize VA.
In case of success, &lt;code&gt;vainfo&lt;/code&gt; will report the driver signature, and it will query
the driver for the available profiles and entry-points.&lt;/p&gt;
&lt;p&gt;For example, my skylake board for development will report&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;vainfo&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;error: can&#39;t connect to X server!&lt;br&gt;libva info: VA-API version 1.1.0&lt;br&gt;libva info: va_getDriverName() returns 0&lt;br&gt;libva info: Trying to open /home/vjaquez/gst/master/intel-vaapi-driver/src/.libs/i965_drv_video.so&lt;br&gt;libva info: Found init function __vaDriverInit_1_1&lt;br&gt;libva info: va_openDriver() returns 0&lt;br&gt;vainfo: VA-API version: 1.1 (libva 2.1.1.pre1)&lt;br&gt;vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.1.1.pre1 (2.1.0-41-g99c3748)&lt;br&gt;vainfo: Supported profile and entrypoints&lt;br&gt;     VAProfileMPEG2Simple            : VAEntrypointVLD&lt;br&gt;     VAProfileMPEG2Simple            : VAEntrypointEncSlice&lt;br&gt;     VAProfileMPEG2Main              : VAEntrypointVLD&lt;br&gt;     VAProfileMPEG2Main              : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointVLD&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointFEI&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointStats&lt;br&gt;     VAProfileH264Main               : VAEntrypointVLD&lt;br&gt;     VAProfileH264Main               : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264Main               : VAEntrypointEncSliceLP&lt;br&gt;     VAProfileH264Main               : VAEntrypointFEI&lt;br&gt;     VAProfileH264Main               : VAEntrypointStats&lt;br&gt;     VAProfileH264High               : VAEntrypointVLD&lt;br&gt;     VAProfileH264High               : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264High               : VAEntrypointEncSliceLP&lt;br&gt;     VAProfileH264High               : VAEntrypointFEI&lt;br&gt;     VAProfileH264High               : VAEntrypointStats&lt;br&gt;     VAProfileH264MultiviewHigh      : VAEntrypointVLD&lt;br&gt;     VAProfileH264MultiviewHigh      : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264StereoHigh         : VAEntrypointVLD&lt;br&gt;     VAProfileH264StereoHigh         : VAEntrypointEncSlice&lt;br&gt;     VAProfileVC1Simple              : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Main                : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Advanced            : VAEntrypointVLD&lt;br&gt;     VAProfileNone                   : VAEntrypointVideoProc&lt;br&gt;     VAProfileJPEGBaseline           : VAEntrypointVLD&lt;br&gt;     VAProfileJPEGBaseline           : VAEntrypointEncPicture&lt;br&gt;     VAProfileVP8Version0_3          : VAEntrypointVLD&lt;br&gt;     VAProfileVP8Version0_3          : VAEntrypointEncSlice&lt;br&gt;     VAProfileHEVCMain               : VAEntrypointVLD&lt;br&gt;     VAProfileHEVCMain               : VAEntrypointEncSlice&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And my AMD board with stable packages replies:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;vainfo&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;libva info: VA-API version 0.40.0&lt;br&gt;libva info: va_getDriverName() returns 0&lt;br&gt;libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so&lt;br&gt;libva info: Found init function __vaDriverInit_0_40&lt;br&gt;libva info: va_openDriver() returns 0&lt;br&gt;vainfo: VA-API version: 0.40 (libva )&lt;br&gt;vainfo: Driver version: mesa gallium vaapi&lt;br&gt;vainfo: Supported profile and entrypoints&lt;br&gt;     VAProfileMPEG2Simple            : VAEntrypointVLD&lt;br&gt;     VAProfileMPEG2Main              : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Simple              : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Main                : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Advanced            : VAEntrypointVLD&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointVLD&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice&lt;br&gt;     VAProfileH264Main               : VAEntrypointVLD&lt;br&gt;     VAProfileH264Main               : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264High               : VAEntrypointVLD&lt;br&gt;     VAProfileH264High               : VAEntrypointEncSlice&lt;br&gt;     VAProfileNone                   : VAEntrypointVideoProc&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Does this mean that VA-API processes video? No. It means that there is an usable
VA display which could open a driver correctly and &lt;code&gt;libva&lt;/code&gt; can extract symbols
from it.&lt;/p&gt;
&lt;p&gt;I would like to mention another tool, not official, but I like it a lot, since
it extracts almost of the VA information available in the driver:
&lt;a href=&quot;http://ixia.jkqxz.net/~mrt/vadumpcaps.c&quot;&gt;vadumpcaps.c&lt;/a&gt;, written by Mark
Thompson.&lt;/p&gt;
&lt;h2 id=&quot;gstreamer-va-api-registration&quot; tabindex=&quot;-1&quot;&gt;GStreamer VA-API registration &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/#gstreamer-va-api-registration&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When GStreamer is launched, normally it will register all the available plugins
and plugin features (elements, device providers, etc.). All that data is cache
and keep until the cache file is deleted or the cache invalidated by some event.&lt;/p&gt;
&lt;p&gt;At registration time, GStreamer VA-API will instantiate a DRM-based VA display,
which works with no need of a real display (in other words, headless), and will
query the driver for the profiles and entry-points tuples, in order to register
only the available elements (encoders, decoders. sink, post-processor). If the
DRM VA display fails, a list of VA displays will be tried.&lt;/p&gt;
&lt;p&gt;In the case that &lt;code&gt;libva&lt;/code&gt; could not load any driver, or the driver is not in the
white-list, GStreamer VA-API will not register any element. Otherwise
&lt;code&gt;gst-inspect-1.0&lt;/code&gt; will show the registered elements:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;gst-inspect-1.0 vaapi&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Plugin Details:&lt;br&gt; Name                     vaapi&lt;br&gt; Description              VA-API based elements&lt;br&gt; Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so&lt;br&gt; Version                  1.12.4&lt;br&gt; License                  LGPL&lt;br&gt; Source module            gstreamer-vaapi&lt;br&gt; Source release date      2017-12-07&lt;br&gt; Binary package           gstreamer-vaapi&lt;br&gt; Origin URL               http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&lt;br&gt;&lt;br&gt; vaapijpegdec: VA-API JPEG decoder&lt;br&gt; vaapimpeg2dec: VA-API MPEG2 decoder&lt;br&gt; vaapih264dec: VA-API H264 decoder&lt;br&gt; vaapivc1dec: VA-API VC1 decoder&lt;br&gt; vaapivp8dec: VA-API VP8 decoder&lt;br&gt; vaapih265dec: VA-API H265 decoder&lt;br&gt; vaapipostproc: VA-API video postprocessing&lt;br&gt; vaapidecodebin: VA-API Decode Bin&lt;br&gt; vaapisink: VA-API sink&lt;br&gt; vaapimpeg2enc: VA-API MPEG-2 encoder&lt;br&gt; vaapih265enc: VA-API H265 encoder&lt;br&gt; vaapijpegenc: VA-API JPEG encoder&lt;br&gt; vaapih264enc: VA-API H264 encoder&lt;br&gt;&lt;br&gt; 13 features:&lt;br&gt; +-- 13 elements&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Beside the normal behavior, GStreamer VA-API will also invalidate GStreamer’s
cache at every boot, or when any of the mentioned environment variables change.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot; tabindex=&quot;-1&quot;&gt;Conclusion &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-troubleshooting/#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A simple task list to review when GStreamer VA-API is not working at all is
this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check your &lt;code&gt;LIBVA_*&lt;/code&gt; environment variables&lt;/li&gt;
&lt;li&gt;Verify that &lt;code&gt;vainfo&lt;/code&gt; returns sensible information&lt;/li&gt;
&lt;li&gt;Invalidate GStreamer’s cache (or just delete the file)&lt;/li&gt;
&lt;li&gt;Check the output of &lt;code&gt;gst-inspect-1.0 vaapi&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And, if you decide to file a bug in bugzilla, please do not forget to attach the
output of &lt;code&gt;vainfo&lt;/code&gt; and the logs if the developer asks for them.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer VA-API 1.14: what&#39;s new?</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/"/>
		<updated>2018-03-27T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/</id>
		<content type="html">&lt;p&gt;As you may already know, there is a new release of GStreamer, 1.14. In this blog
post we will talk about the new features and improvements of GStreamer VA-API
module, though you have a more comprehensive list of changes in the &lt;a href=&quot;https://gstreamer.freedesktop.org/releases/1.14/&quot;&gt;release
notes&lt;/a&gt;.Most of the topics explained along this blog post are already mentioned in the
release notes, but a bit more detailed.&lt;/p&gt;
&lt;h2 id=&quot;dmabuf-usage&quot; tabindex=&quot;-1&quot;&gt;DMABuf usage &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#dmabuf-usage&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We have improved DMABuf usage, mostly at downstream.&lt;/p&gt;
&lt;p&gt;In the case of upstream, we just got rid a nasty hack which detected when to
instantiate and use a buffer pool in sink pad with a dma-buf based allocator.
This functionality has been already broken for a while, and that code was the
wrong way to enabled it. The sharing of a dma-buf based buffer pool to upstream
is going to be re-enabled after &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=792034&quot;&gt;bug
792034&lt;/a&gt; is merged.&lt;/p&gt;
&lt;p&gt;For downstream, we have added the handling of &lt;code&gt;memory:DMABuf&lt;/code&gt; caps feature. The
purpose of this caps feature is to negotiate a media when the buffers &lt;strong&gt;are
not&lt;/strong&gt; map-able onto user space, because of digital rights or platform
restrictions.&lt;/p&gt;
&lt;p&gt;For example, currently
&lt;a href=&quot;https://github.com/intel/intel-vaapi-driver&quot;&gt;intel-vaapi-driver&lt;/a&gt; doesn’t allow
the mapping of its produced dma-buf descriptors. But, as we cannot know if a
back-end produces or not map-able dma-buf descriptors, &lt;code&gt;gstreamer-vaapi&lt;/code&gt;, when
the allocator is instantiated, creates a dummy buffer and tries to map it, if it
fails, &lt;code&gt;memory:DMABuf&lt;/code&gt; caps feature is negotiated, otherwise, normal video caps
are used.&lt;/p&gt;
&lt;h2 id=&quot;va-api-usage&quot; tabindex=&quot;-1&quot;&gt;VA-API usage &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#va-api-usage&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First of all, GStreamer VA-API has support now for libva-2.0, this means VA-API
1.10. We had to guard some deprecated symbols and the new ones. Nowadays most of
distributions have upgraded to libva-2.0.&lt;/p&gt;
&lt;p&gt;We have improved the initialization of the VA display internal structure
(&lt;code&gt;GstVaapiDisplay&lt;/code&gt;). Previously, if a X based display was instantiated,
immediately it tried to grab the screen resolution. Obviously, this broke the
usage of headless systems. We just delay the screen resolution check to when the
VA display truly requires that information.&lt;/p&gt;
&lt;p&gt;New API were added into VA, particularly for log handling. Now it is possible to
redirect the log messages into a callback. Thus, we use it to redirect VA-API
message into the GStreamer log mechanisms, uncluttering the console’s output.&lt;/p&gt;
&lt;p&gt;Also, we have blacklisted, in autoconf and meson, libva version 0.99.0, because
that version is used internally by the closed-source version of &lt;a href=&quot;http://mediasdk.intel.com/&quot;&gt;Intel
MediaSDK&lt;/a&gt;, which is incompatible with official
libva. By the way, there is a new open-source version of
&lt;a href=&quot;https://github.com/Intel-Media-SDK/MediaSDK/&quot;&gt;MediaSDK&lt;/a&gt;, but we will talk about
it in a future blog post.&lt;/p&gt;
&lt;h2 id=&quot;application-va-display-sharing&quot; tabindex=&quot;-1&quot;&gt;Application VA Display sharing &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#application-va-display-sharing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Normally, the object &lt;code&gt;GstVaapiDisplay&lt;/code&gt; is shared among the pipeline through the
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstContext.html&quot;&gt;GstContext&lt;/a&gt;
mechanism. But this class is defined internally and it is not exposed to users
since release 1.6. This posed a problem when an application wanted to create its
own VA Display and share it with an embedded pipeline. The solution is a new
context application message: &lt;code&gt;gst.vaapi.app.Display&lt;/code&gt;, defined as a
&lt;code&gt;GstStructure&lt;/code&gt; with two fields: &lt;code&gt;va-display&lt;/code&gt; with the application’s &lt;code&gt;vaDisplay&lt;/code&gt;,
and &lt;code&gt;x11-display&lt;/code&gt; with the application’s &lt;a href=&quot;https://tronche.com/gui/x/xlib/display/opening.html&quot;&gt;X11 native
display&lt;/a&gt;. In the future, a
Wayland’s native handler will be processed too. Please note that this context
message is only processed by &lt;code&gt;vaapisink&lt;/code&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/vaapicontext-580x326.png&quot; alt=&quot;vaapisink&quot;&gt;&lt;figcaption&gt;vaapisink&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;One precondition for this solution was the removal of the VA display cache
mechanism, a lingered request from users, which, of course, we did.&lt;/p&gt;
&lt;h2 id=&quot;interoperability-with-appsink-and-similar&quot; tabindex=&quot;-1&quot;&gt;Interoperability with appsink and similar &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#interoperability-with-appsink-and-similar&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A hardware accelerated driver, as the Intel one, may have custom offsets and
strides for specific memory regions. We use the &lt;code&gt;GstVideoMeta&lt;/code&gt; to set this
custom values. The problem comes when downstream does not handle this meta, for
example, &lt;code&gt;appsink&lt;/code&gt;. Then, the user expect the “normal” values for those
variable, but in the case of GStreamer VA-API with a hardware based driver, when
the user displays the frame, it is shown corrupted.&lt;/p&gt;
&lt;p&gt;In order to fix this, we have to make a memory copy, from our custom VA-API
images to an allocated system memory. Of course there is a big CPU penalty, but
it is better than delivering wrong video frames. If the user wants a better
performance, then they should seek for a different approach.&lt;/p&gt;
&lt;h2 id=&quot;resurrection-of-gstgltextureuploadmeta-for-egl-renders&quot; tabindex=&quot;-1&quot;&gt;Resurrection of GstGLTextureUploadMeta for EGL renders &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#resurrection-of-gstgltextureuploadmeta-for-egl-renders&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I know,
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUploadMeta&quot;&gt;GstGLTextureUploadMeta&lt;/a&gt;
must die, right? I am convinced of it. But, Clutter video sink uses it, an it
has a vast number of users, so we still have to support it.&lt;/p&gt;
&lt;p&gt;Last release we had remove the support for EGL/Wayland in the last minute
because we found a terrible bug just before the release. GLX support has always
been there.&lt;/p&gt;
&lt;p&gt;With Daniel van Vugt efforts, we resurrected the support for that meta in EGL.
Though I expect the replacement of Clutter sink with &lt;code&gt;glimagesink&lt;/code&gt; someday,
soon.&lt;/p&gt;
&lt;h2 id=&quot;vaapisink-demoted-in-wayland&quot; tabindex=&quot;-1&quot;&gt;vaapisink demoted in Wayland &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#vaapisink-demoted-in-wayland&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;vaapisink&lt;/code&gt; was demoted to marginal rank on Wayland because COGL cannot display
YUV surfaces.&lt;/p&gt;
&lt;p&gt;This means, by default, &lt;code&gt;vaapisink&lt;/code&gt; won’t be auto-plugged when playing in
Wayland.&lt;/p&gt;
&lt;p&gt;The reason is because Mutter (aka GNOME) cannot display the frames processed by
&lt;code&gt;vaapisink&lt;/code&gt; in Wayland. Nonetheless, please note that in Weston, it works just
fine.&lt;/p&gt;
&lt;h2 id=&quot;decoders&quot; tabindex=&quot;-1&quot;&gt;Decoders &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#decoders&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We have improved a little bit upstream renegotiation: if the new stream is
compatible with the previous one, there is no need to reset the internal parser,
with the exception of changes in codec-data.&lt;/p&gt;
&lt;h3 id=&quot;low-latency-property-in-h-264&quot; tabindex=&quot;-1&quot;&gt;low-latency property in H.264 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#low-latency-property-in-h-264&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A new property has added only to H.264 decoder: &lt;code&gt;low-latency&lt;/code&gt;. Its purpose is
for live streams that do not conform the H.264 specification (sadly there are
many in the wild) and they need to twitch the spec implementation. This property
force to push the frames in the &lt;em&gt;decoded picture buffer&lt;/em&gt; as soon as possible.&lt;/p&gt;
&lt;h3 id=&quot;base-only-property-in-h-264&quot; tabindex=&quot;-1&quot;&gt;base-only property in H.264 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#base-only-property-in-h-264&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This is the result of the Google Summer of Code 2017, by Orestis Floros. When
this property is enabled, all the MVC (Multiview Video Coding) or SVC (Scalable
Video Coding) frames are dropped. This is useful if you want to reduce the
processing time or if your VA-API driver does not support those kind of streams.&lt;/p&gt;
&lt;h2 id=&quot;encoders&quot; tabindex=&quot;-1&quot;&gt;Encoders &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#encoders&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In this release we have put a lot of effort in encoders.&lt;/p&gt;
&lt;h3 id=&quot;processing-regions-of-interest&quot; tabindex=&quot;-1&quot;&gt;Processing Regions of Interest &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#processing-regions-of-interest&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;It is possible, for certain back-ends and profiles (for example, H.264 and H.265
encoders with Intel driver), to specify a set of &lt;em&gt;regions of interest&lt;/em&gt; per
frame, with a &lt;code&gt;delta-qp&lt;/code&gt; per region. This mean that we would ask more quality in
those regions.&lt;/p&gt;
&lt;p&gt;In order to process regions of interest, upstream must add to the video frame, a
list of
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoRegionOfInterestMeta&quot;&gt;GstVideoRegionOfInterestMeta&lt;/a&gt;.
This list then is traversed by the encoder and it requests them if the VA-API
profile, in the driver, supports it.&lt;/p&gt;
&lt;p&gt;The common use-case for this feature is if you want to higher definition in
regions with faces or text messages in the picture, for example.&lt;/p&gt;
&lt;h3 id=&quot;new-encoding-properties&quot; tabindex=&quot;-1&quot;&gt;New encoding properties &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#new-encoding-properties&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;quality-level&lt;/code&gt;: For all the available encoders. This is number between 1 to
8, where a lower number means higher quality (and slower processing).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;aud&lt;/code&gt;: This is for H.264 encoder only and it is available for certain
drivers and platforms. When it is enabled, an AU delimiter is inserted for
each encoded frame. This is useful for network streaming, and more
particularly for Apple clients.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;mbbrc&lt;/code&gt;: For H.264 only. Controls (auto/on/off) the macro-block bit-rate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;temporal-levels&lt;/code&gt;: For H.264 only. It specifies the number of temporal
levels to include a the hierarchical frame prediction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;prediction-type&lt;/code&gt;: For H.264 only. It selects the reference picture
selection mode.&lt;/p&gt;
&lt;p&gt;The frames are encoded as different layers. A frame in a particular layer
will use pictures in lower or same layer as references. This means decoder
can drop frames in upper layer but still decode lower layer frames.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;hierarchical-p: P frames, except in top layer, are reference frames. Base
layer frames are I or B.&lt;/li&gt;
&lt;li&gt;hierarchical-b: B frames , except in top most layer, are reference
frames. All the base layer frames are I or P.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;refs&lt;/code&gt;: Added for H.265 (it was already supported for H.264). It specifies the
number of reference pictures.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;qp-ip&lt;/code&gt; and &lt;code&gt;qp-ib&lt;/code&gt;: For H.264 and H.265 encoders. They handle the QP (quality
parameters) difference between the I and P frames, the the I and B frames
respectively.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;set-media-profile-via-downstream-caps&quot; tabindex=&quot;-1&quot;&gt;Set media profile via downstream caps &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#set-media-profile-via-downstream-caps&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;H.264 and H.265 encoders now can configure the desired media profile through the
downstream caps.&lt;/p&gt;
&lt;h2 id=&quot;contributors&quot; tabindex=&quot;-1&quot;&gt;Contributors &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-va-api-1-14-whats-new/#contributors&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Many thanks to all the contributors and bug reporters.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;         1  Daniel van Vugt&lt;br&gt;        46  Hyunjun Ko&lt;br&gt;         1  Jan Schmidt&lt;br&gt;         3  Julien Isorce&lt;br&gt;         1  Matt Staples&lt;br&gt;         2  Matteo Valdina&lt;br&gt;         2  Matthew Waters&lt;br&gt;         1  Michael Tretter&lt;br&gt;         4  Nicolas Dufresne&lt;br&gt;         9  Orestis Floros&lt;br&gt;         1  Philippe Normand&lt;br&gt;         4  Sebastian Dröge&lt;br&gt;        24  Sreerenj Balachandran&lt;br&gt;         1  Thibault Saunier&lt;br&gt;        13  Tim-Philipp Müller&lt;br&gt;         1  Tomas Rataj&lt;br&gt;         2  U. Artie Eoff&lt;br&gt;         1  VaL Doroshchuk&lt;br&gt;       172  Víctor Manuel Jáquez Leal&lt;br&gt;         3  XuGuangxin&lt;br&gt;         2  Yi A Wang&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>Enabling HuC for SKL/KBL in Debian/testing</title>
		<link href="https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/"/>
		<updated>2017-12-07T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/</id>
		<content type="html">&lt;p&gt;Recently, our friend Florent complained that it was &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=789472&quot;&gt;impossible to set a
constant bitrate when encoding H.264 using low-power
profile&lt;/a&gt; with
&lt;code&gt;gstreamer-vaapi&lt;/code&gt; .Low-power (LP) profiles are VA-API entry points, &lt;strong&gt;available in Intel
SkyLake-based processor and successors&lt;/strong&gt;, which provide video encoding with low
power consumption.&lt;/p&gt;
&lt;p&gt;Later on, Ullysses and Sree, pointed out that CBR in LP &lt;a href=&quot;https://github.com/01org/intel-vaapi-driver/issues/312#issuecomment-349726243&quot;&gt;is ony possible if HuC
is
enabled&lt;/a&gt;
in the kernel.&lt;/p&gt;
&lt;p&gt;HuC is a firmware, loaded by i915 kernel module, designed to offload some of the
media functions from the CPU to GPU. One of these functions is bitrate control
when encoding. HuC saves unnecessary CPU-GPU synchronization.&lt;/p&gt;
&lt;p&gt;In order to load HuC, it is required first to load GuC, another Intel’s firmware
designed to perform graphics workload scheduling on the various graphics
parallel engines.&lt;/p&gt;
&lt;p&gt;How we can install and configure these firmwares to enable CBR in low-power
profile, among other things, in Debian/testing?&lt;/p&gt;
&lt;h2 id=&quot;check-i915-parameters&quot; tabindex=&quot;-1&quot;&gt;Check i915 parameters &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#check-i915-parameters&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First we shall confirm that our kernel and our i915 kernel module is capable to
handle this functionality:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; modinfo i915 &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;egrep&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;guc|huc|dmc&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;firmware:       i915/bxt_dmc_ver1_07.bin&lt;br&gt;firmware:       i915/skl_dmc_ver1_26.bin&lt;br&gt;firmware:       i915/kbl_dmc_ver1_01.bin&lt;br&gt;firmware:       i915/kbl_guc_ver9_14.bin&lt;br&gt;firmware:       i915/bxt_guc_ver8_7.bin&lt;br&gt;firmware:       i915/skl_guc_ver6_1.bin&lt;br&gt;firmware:       i915/kbl_huc_ver02_00_1810.bin&lt;br&gt;firmware:       i915/bxt_huc_ver01_07_1398.bin&lt;br&gt;firmware:       i915/skl_huc_ver01_07_1398.bin&lt;br&gt;parm:           enable_guc_loading:Enable GuC firmware loading (-1=auto, 0=never [default], 1=if available, 2=required) (int)&lt;br&gt;parm:           enable_guc_submission:Enable GuC submission (-1=auto, 0=never [default], 1=if available, 2=required) (int)&lt;br&gt;parm:           guc_log_level:GuC firmware logging level (-1:disabled (default), 0-3:enabled) (int)&lt;br&gt;parm:           guc_firmware_path:GuC firmware path to use instead of the default one (charp)&lt;br&gt;parm:           huc_firmware_path:HuC firmware path to use instead of the default one (charp)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;install-firmware&quot; tabindex=&quot;-1&quot;&gt;Install firmware &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#install-firmware&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo apt install firmware-misc-nonfree&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;UPDATE: In order to install this Debian package, you should have enabled the
&lt;code&gt;non-free&lt;/code&gt; apt repository in your sources list.&lt;/p&gt;
&lt;p&gt;Verify the firmware are installed:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-1&lt;/span&gt; /lib/firmware/i915/&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;bxt_dmc_ver1_07.bin&lt;br&gt;bxt_dmc_ver1.bin&lt;br&gt;bxt_guc_ver8_7.bin&lt;br&gt;bxt_huc_ver01_07_1398.bin&lt;br&gt;kbl_dmc_ver1_01.bin&lt;br&gt;kbl_dmc_ver1.bin&lt;br&gt;kbl_guc_ver9_14.bin&lt;br&gt;kbl_huc_ver02_00_1810.bin&lt;br&gt;skl_dmc_ver1_23.bin&lt;br&gt;skl_dmc_ver1_26.bin&lt;br&gt;skl_dmc_ver1.bin&lt;br&gt;skl_guc_ver1.bin&lt;br&gt;skl_guc_ver4.bin&lt;br&gt;skl_guc_ver6_1.bin&lt;br&gt;skl_guc_ver6.bin&lt;br&gt;skl_huc_ver01_07_1398.bin&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;update-modprobe-configuration&quot; tabindex=&quot;-1&quot;&gt;Update modprobe configuration &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#update-modprobe-configuration&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Edit or create the configuration file &lt;code&gt;/etc/modprobe.d/i915.con&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;vim&lt;/span&gt; /etc/modprobe.d/i915.conf&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;....&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;cat&lt;/span&gt; /etc/modprobe.d/i915.conf&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;options i915 enable_guc_loading=1 enable_guc_submission=1&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;reboot&quot; tabindex=&quot;-1&quot;&gt;Reboot &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#reboot&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo systemctl reboot&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;verification&quot; tabindex=&quot;-1&quot;&gt;Verification &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#verification&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now it is possible to verify that the i915 module kernel loaded the firmware
correctly by looking at the kernel logs:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;journalctl &lt;span class=&quot;token parameter variable&quot;&gt;-b&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-o&lt;/span&gt; short-monotonic &lt;span class=&quot;token parameter variable&quot;&gt;-k&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;egrep&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;i915|dmr|dmc|guc|huc&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;[   10.303849] miau kernel: Setting dangerous option enable_guc_loading - tainting kernel&lt;br&gt;[   10.303852] miau kernel: Setting dangerous option enable_guc_submission - tainting kernel&lt;br&gt;[   10.336318] miau kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem&lt;br&gt;[   10.338664] miau kernel: i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_dmc_ver1_01.bin&lt;br&gt;[   10.339635] miau kernel: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_01.bin (v1.1)&lt;br&gt;[   10.361811] miau kernel: i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_huc_ver02_00_1810.bin&lt;br&gt;[   10.362422] miau kernel: i915 0000:00:02.0: firmware: direct-loading firmware i915/kbl_guc_ver9_14.bin&lt;br&gt;[   10.393117] miau kernel: [drm] GuC submission enabled (firmware i915/kbl_guc_ver9_14.bin [version 9.14])&lt;br&gt;[   10.410008] miau kernel: [drm] Initialized i915 1.6.0 20170619 for 0000:00:02.0 on minor 0&lt;br&gt;[   10.559614] miau kernel: snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])&lt;br&gt;[   11.937413] miau kernel: i915 0000:00:02.0: fb0: inteldrmfb frame buffer device&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means that HuC and GuC firmwares were loaded successfully.&lt;/p&gt;
&lt;p&gt;Now we can check the status of the modules using &lt;code&gt;sysfs&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;cat&lt;/span&gt; /sys/kernel/debug/dri/0/i915_guc_load_status&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;GuC firmware status:&lt;br&gt;       path: i915/kbl_guc_ver9_14.bin&lt;br&gt;       fetch: SUCCESS&lt;br&gt;       load: SUCCESS&lt;br&gt;       version wanted: 9.14&lt;br&gt;       version found: 9.14&lt;br&gt;       header: offset is 0; size = 128&lt;br&gt;       uCode: offset is 128; size = 142272&lt;br&gt;       RSA: offset is 142400; size = 256&lt;br&gt;&lt;br&gt;GuC status 0x800330ed:&lt;br&gt;       Bootrom status = 0x76&lt;br&gt;       uKernel status = 0x30&lt;br&gt;       MIA Core status = 0x3&lt;br&gt;&lt;br&gt;Scratch registers:&lt;br&gt;        0:     0xf0000000&lt;br&gt;        1:     0x0&lt;br&gt;        2:     0x0&lt;br&gt;        3:     0x5f5e100&lt;br&gt;        4:     0x600&lt;br&gt;        5:     0xd5fd3&lt;br&gt;        6:     0x0&lt;br&gt;        7:     0x8&lt;br&gt;        8:     0x3&lt;br&gt;        9:     0x74240&lt;br&gt;       10:     0x0&lt;br&gt;       11:     0x0&lt;br&gt;       12:     0x0&lt;br&gt;       13:     0x0&lt;br&gt;       14:     0x0&lt;br&gt;       15:     0x0&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;cat&lt;/span&gt; /sys/kernel/debug/dri/0/i915_huc_load_status&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;HuC firmware status:&lt;br&gt;       path: i915/kbl_huc_ver02_00_1810.bin&lt;br&gt;       fetch: SUCCESS&lt;br&gt;       load: SUCCESS&lt;br&gt;       version wanted: 2.0&lt;br&gt;       version found: 2.0&lt;br&gt;       header: offset is 0; size = 128&lt;br&gt;       uCode: offset is 128; size = 218304&lt;br&gt;       RSA: offset is 218432; size = 256&lt;br&gt;&lt;br&gt;HuC status 0x00006080:&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;test-gstreamer&quot; tabindex=&quot;-1&quot;&gt;Test GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#test-gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;gst-launch-1.0 videotestsrc num-buffers&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1000&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; video/x-raw, &lt;span class=&quot;token assign-left variable&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;NV12, &lt;span class=&quot;token assign-left variable&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1920&lt;/span&gt;, &lt;span class=&quot;token assign-left variable&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1080&lt;/span&gt;, &lt;span class=&quot;token assign-left variable&quot;&gt;framerate&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&#92;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;fraction&lt;span class=&quot;token punctuation&quot;&gt;&#92;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;30&lt;/span&gt;/1 &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; vaapih264enc &lt;span class=&quot;token assign-left variable&quot;&gt;bitrate&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;8000&lt;/span&gt; keyframe-period&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;tune&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;low-power rate-control&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;cbr &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; mp4mux &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; filesink &lt;span class=&quot;token assign-left variable&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;test.mp4&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Setting pipeline to PAUSED ...&lt;br&gt;Pipeline is PREROLLING ...&lt;br&gt;Got context from element &#39;vaapiencodeh264-0&#39;: gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)&quot;&#92;(GstVaapiDisplayGLX&#92;)&#92; vaapidisplayglx0&quot;;&lt;br&gt;Pipeline is PREROLLED ...&lt;br&gt;Setting pipeline to PLAYING ...&lt;br&gt;New clock: GstSystemClock&lt;br&gt;Got EOS from element &quot;pipeline0&quot;.&lt;br&gt;Execution ended after 0:00:11.620036001&lt;br&gt;Setting pipeline to PAUSED ...&lt;br&gt;Setting pipeline to READY ...&lt;br&gt;Setting pipeline to NULL ...&lt;br&gt;Freeing pipeline ...&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;gst-discoverer-1.0 test.mp4&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Analyzing file:///home/vjaquez/gst/master/intel-vaapi-driver/test.mp4&lt;br&gt;Done discovering file:///home/vjaquez/test.mp4&lt;br&gt;&lt;br&gt;Topology:&lt;br&gt; container: Quicktime&lt;br&gt;   video: H.264 (High Profile)&lt;br&gt;&lt;br&gt;Properties:&lt;br&gt; Duration: 0:00:33.333333333&lt;br&gt; Seekable: yes&lt;br&gt; Live: no&lt;br&gt; Tags:&lt;br&gt;     video codec: H.264 / AVC&lt;br&gt;     bitrate: 8084005&lt;br&gt;     encoder: VA-API H264 encoder&lt;br&gt;     datetime: 2017-12-07T14:29:23Z&lt;br&gt;     container format: ISO MP4/M4A&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mission accomplished!&lt;/p&gt;
&lt;h2 id=&quot;references&quot; tabindex=&quot;-1&quot;&gt;References &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/enabling-huc-for-skl-kbl-in-debian-testing/#references&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/Brainiarc7/aa43570f512906e882ad6cdd835efe57&quot;&gt;Tuning Intel Skylake and beyond for optimal performance and feature level
support on
Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://01.org/linuxgraphics/downloads/firmware&quot;&gt;Intel Linux Graphics
Firmware&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
	</entry>
	
	<entry>
		<title>Intel MediaSDK on Debian (testing)</title>
		<link href="https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/"/>
		<updated>2017-11-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/</id>
		<content type="html">&lt;p&gt;Everybody knows it: install Intel MediaSDK in GNU/Linux is a &lt;em&gt;PITA&lt;/em&gt;. With CentOS
or Yocto is less cumbersome, if you trust blindly on scripts ran as root.I don’t like CentOS, I feel it like if I were living in the past. I like Debian
(testing, of course) and I also wanted to understand a little more about
MediaSDK. And this is what I did to have Intel MediaSDK working in
Debian/testing.&lt;/p&gt;
&lt;p&gt;First, I did a pristine installation of Debian testing with a &lt;a href=&quot;https://www.debian.org/devel/debian-installer/&quot;&gt;netinst
image&lt;/a&gt; in my &lt;a href=&quot;https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc6i5syk.html&quot;&gt;NUC
6i5SYK&lt;/a&gt;,
with a normal desktop user setup (Gnome3).&lt;/p&gt;
&lt;p&gt;The madness comes later.&lt;/p&gt;
&lt;p&gt;Intel’s identifies two types of MediaSDK installation: &lt;em&gt;Gold&lt;/em&gt; and &lt;em&gt;Generic&lt;/em&gt;.
Gold is for CentOS, and Generic for the rest of distributions. Obviously,
Generic means &lt;strong&gt;you’re on your own&lt;/strong&gt;. For the purpose of this exercise I used as
reference &lt;a href=&quot;https://software.intel.com/en-us/articles/how-to-setup-media-server-studio-on-secondary-os-of-linux&quot;&gt;Generic Linux* Intel® Media Server Studio
Installation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let’s begin by grabbing the &lt;a href=&quot;https://software.intel.com/en-us/media-sdk&quot;&gt;Intel® Media Server Studio – Community
Edition&lt;/a&gt;. You will need to register
yourself and accept the user agreement, because this is proprietary software.&lt;/p&gt;
&lt;p&gt;At the end, you should have a tarball named
&lt;code&gt;MediaServerStudioEssentials2017R3.tar.gz&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;extract-the-files-for-generic-installation&quot; tabindex=&quot;-1&quot;&gt;Extract the files for Generic installation &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#extract-the-files-for-generic-installation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~&lt;br&gt;tar xvf MediaServerStudioEssentials2017R3.tar.gz&lt;br&gt;cd MediaServerStudioEssentials2017R3&lt;br&gt;tar xvf SDK2017Production16.5.2.tar.gz&lt;br&gt;cd SDK2017Production16.5.2/Generic&lt;br&gt;mkdir tmp&lt;br&gt;tar -xvC tmp -f intel-linux-media_generic_16.5.2-64009_64bit.tar.gz&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;kernel&quot; tabindex=&quot;-1&quot;&gt;Kernel &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#kernel&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bad news: in order to get MediaSDK working you need to patch the mainlined
kernel.&lt;/p&gt;
&lt;p&gt;Worse news: the available patches are only for the version 4.4 the kernel.&lt;/p&gt;
&lt;p&gt;Still, &lt;code&gt;systemd&lt;/code&gt; works on 4.4, as far as I know, so it would not be a big
problem.&lt;/p&gt;
&lt;h3 id=&quot;grab-building-dependencies&quot; tabindex=&quot;-1&quot;&gt;Grab building dependencies &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#grab-building-dependencies&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo apt install build-essential devscripts libncurses5-dev&lt;br&gt;sudo apt build-dep linux&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;grab-kernel-source&quot; tabindex=&quot;-1&quot;&gt;Grab kernel source &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#grab-kernel-source&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I like to use the sources from the git repository, since it would be possible to
do some rebasing and blaming in the future.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~&lt;br&gt;git clone https://github.com/torvalds/linux.git&lt;br&gt;git pull -v --tags&lt;br&gt;git checkout -b 4.4 v4.4&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;extract-mediasdk-patches&quot; tabindex=&quot;-1&quot;&gt;Extract MediaSDK patches &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#extract-mediasdk-patches&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/MediaServerStudioEssentials2017R3/SDK2017Production16.5.2/Generic/tmp/opt/intel/mediasdk/opensource/patches/kmd/4.4&lt;br&gt;tar xvf intel-kernel-patches.tar.bz2&lt;br&gt;cd intel-kernel-patches&lt;br&gt;PATCHDIR=$(pwd)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;patch-the-kernel&quot; tabindex=&quot;-1&quot;&gt;Patch the kernel &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#patch-the-kernel&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/linux&lt;br&gt;git am $PATCHDIR/*.patch&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The patches should apply with some warnings but no fatal errors (don’t worry, be
happy).&lt;/p&gt;
&lt;p&gt;Still, there’s a problem with this old kernel: &lt;a href=&quot;https://askubuntu.com/questions/851433/kernel-doesnt-support-pic-mode-for-compiling&quot;&gt;our recent compiler doesn’t
build it as it
is&lt;/a&gt;.
Another patch is required:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8-rc2/0002-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch&lt;br&gt;git am 0002-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;TODO: Shall I need to modify the EXTRAVERSION string in kernel’s Makefile?&lt;/p&gt;
&lt;h3 id=&quot;build-and-install-the-kernel&quot; tabindex=&quot;-1&quot;&gt;Build and install the kernel &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#build-and-install-the-kernel&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Notice that we are using our current kernel configuration. That is error prone.
I guess that is why I had to select NVM manually.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cp /boot/config-4.12.0-1-amd64 ./.config&lt;br&gt;make olddefconfig&lt;br&gt;make nconfig # -- select NVM&lt;br&gt;scripts/config --disable DEBUG_INFO&lt;br&gt;make deb-pkg&lt;br&gt;sudo dpkg -i linux-image-4.4.0+_4.4.0+-2_amd64.deb linux-headers-4.4.0+_4.4.0+-2_amd64.deb linux-firmware-image-4.4.0+_4.4.0+-2_amd64.deb&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;configure-grub2-to-boot-linux-4-4-by-default&quot; tabindex=&quot;-1&quot;&gt;Configure GRUB2 to boot Linux 4.4. by default &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#configure-grub2-to-boot-linux-4-4-by-default&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This part was absolutely tricky for me. It took me a long time to figure out how
to specify the kernel ID in the &lt;code&gt;grubenv&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo vi /etc/default/grub&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And change the line &lt;code&gt;GRUB_DEFAULT=saved&lt;/code&gt;. By default it is set to &lt;code&gt;0&lt;/code&gt;. And
update GRUB.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo update-grub&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now look for the ID of the installed kernel image in &lt;code&gt;/etc/grub/grub.cfg&lt;/code&gt; and
use it:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo grub-set-default &quot;gnulinux-4.4.0+-advanced-2c246bc6-65bb-48ea-9517-4081b016facc&gt;gnulinux-4.4.0+-advanced-2c246bc6-65bb-48ea-9517-4081b016facc&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please note it is twice and separated by a &lt;em&gt;&amp;gt;&lt;/em&gt;. Don’t ask me why.&lt;/p&gt;
&lt;h3 id=&quot;copy-mediasdk-firmware-and-libraries-too&quot; tabindex=&quot;-1&quot;&gt;Copy MediaSDK firmware (and libraries too) &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#copy-mediasdk-firmware-and-libraries-too&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I like to use &lt;code&gt;rsync&lt;/code&gt; rather normal &lt;code&gt;cp&lt;/code&gt; because there are the options like
&lt;code&gt;--dry-run&lt;/code&gt; and &lt;code&gt;--itemize-changes&lt;/code&gt; to verify what I am doing.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/MediaServerStudioEssentials2017R3/SDK2017Production16.5.2/Generic/tmp&lt;br&gt;sudo rsync -av --itemize-changes ./lib /&lt;br&gt;sudo rsync -av --itemize-changes ./opt/intel/common /opt/intel&lt;br&gt;sudo rsync -av --itemize-changes ./opt/intel/mediasdk/{include,lib64,plugins} /opt/intel/mediasdk&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All these directories contain blobs that do the MediaSDK magic. They are
&lt;em&gt;dlopened&lt;/em&gt; by hard coded paths by &lt;code&gt;mfx_dispatch&lt;/code&gt;, which will be explain later.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;/lib&lt;/code&gt; lives the firmware (kernel blob).&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;/opt/intel/common&lt;/code&gt;… I have no idea what are those shared objects.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;/opt/intel/mediasdk/include&lt;/code&gt; live header files for programming an
compilation.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;/opt/intel/mediasdk/lib64&lt;/code&gt; live the driver for the modified &lt;code&gt;libva&lt;/code&gt; (iHD)
and other libraries.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;/opt/intel/mediasdk/plugins&lt;/code&gt; live, well, plugins…&lt;/p&gt;
&lt;p&gt;In conclusion, all these bytes are darkness and mystery.&lt;/p&gt;
&lt;h3 id=&quot;reboot&quot; tabindex=&quot;-1&quot;&gt;Reboot &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#reboot&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo systemctl reboot&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The system should boot, automatically, in GNU/Linux 4.4.&lt;/p&gt;
&lt;p&gt;Please, log with Xorg, not in Wayland, since it is not supported, as far as I
know.&lt;/p&gt;
&lt;h2 id=&quot;gstreamer&quot; tabindex=&quot;-1&quot;&gt;GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For compiling GStreamer I will use &lt;code&gt;gst-uninstalled&lt;/code&gt;. Someone may say that I
should use &lt;code&gt;gst-build&lt;/code&gt; because is newer and faster, but I feel more comfortable
doing the following kind of hacks with the old&amp;amp;good autotools.&lt;/p&gt;
&lt;p&gt;Basically this is a reproduction of &lt;a href=&quot;https://arunraghavan.net/2014/07/quick-start-guide-to-gst-uninstalled-1-x/&quot;&gt;Quick-start guide to gst-uninstalled for
GStreamer
1.x&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo apt build-dep gst-plugins-{base,good,bad}1.0&lt;br&gt;wget https://cgit.freedesktop.org/gstreamer/gstreamer/plain/scripts/create-uninstalled-setup.sh -q -O - | sh&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I will modify the &lt;code&gt;gst-uninstalled&lt;/code&gt; script, and keep it outside of the
repository. For that I will use the &lt;a href=&quot;https://www.freedesktop.org/software/systemd/man/file-hierarchy.html&quot;&gt;systemd file-hierarchy
spec&lt;/a&gt; for
user’s executables.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst&lt;br&gt;mkdir -p ~/.local/bin&lt;br&gt;mv master/gstreamer/scripts/gst-uninstalled ~/.local/bin&lt;br&gt;ln -sf ~/.local/bin/gst-uninstalled ./gst-master&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do not forget to edit your &lt;code&gt;~/.profile&lt;/code&gt; to add &lt;code&gt;~/.local/bin&lt;/code&gt; in the environment
variable &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;patch-local-bin-gst-uninstalled&quot; tabindex=&quot;-1&quot;&gt;Patch ~/.local/bin/gst-uninstalled &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#patch-local-bin-gst-uninstalled&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The modifications are to handle the three dependencies libraries that are
required by MediaSDK: &lt;code&gt;libdrm&lt;/code&gt;, &lt;code&gt;libva&lt;/code&gt; and &lt;code&gt;mfx_dispatch&lt;/code&gt;.&lt;/p&gt;
&lt;pre class=&quot;language-diff&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-diff&quot;&gt;diff --git a/scripts/gst-uninstalled b/scripts/gst-uninstalled&lt;br&gt;index 81f83b6c4..d79f19abd 100755&lt;br&gt;&lt;span class=&quot;token coord&quot;&gt;--- a/scripts/gst-uninstalled&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token coord&quot;&gt;+++ b/scripts/gst-uninstalled&lt;/span&gt;&lt;br&gt;@@ -122,7 +122,7 @@ GI_TYPELIB_PATH=$GST/gstreamer/gst:$GI_TYPELIB_PATH&lt;br&gt;&lt;span class=&quot;token unchanged&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export LD_LIBRARY_PATH&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export DYLD_LIBRARY_PATH&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export GI_TYPELIB_PATH&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token deleted-sign deleted&quot;&gt;&lt;span class=&quot;token prefix deleted&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export PKG_CONFIG_PATH=&quot;&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;$GST_PREFIX/lib/pkgconfig&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/gstreamer/pkgconfig&#92;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;@@ -140,6 +140,9 @@ $GST_PREFIX/lib/pkgconfig&#92;&lt;br&gt;&lt;span class=&quot;token unchanged&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/orc&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/farsight2&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/libnice/nice&#92;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token inserted-sign inserted&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/drm&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/libva/pkgconfig&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/mfx_dispatch&#92;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token unchanged&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}&quot;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token unchanged&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export GST_PLUGIN_PATH=&quot;&#92;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;@@ -227,6 +230,16 @@ export GST_VALIDATE_APPS_DIR=$GST_VALIDATE_APPS_DIR:$GST/gst-editing-services/te&lt;br&gt;&lt;span class=&quot;token unchanged&quot;&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export GST_VALIDATE_PLUGIN_PATH=$GST_VALIDATE_PLUGIN_PATH:$GST/gst-devtools/validate/plugins/&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix unchanged&quot;&gt; &lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export GIO_EXTRA_MODULES=$GST/prefix/lib/gio/modules:$GIO_EXTRA_MODULES&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token inserted-sign inserted&quot;&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;# MediaSDK&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export LIBVA_DRIVER_NAME=iHD&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;export LD_LIBRARY_PATH=&quot;&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;/opt/intel/common/mdf/lib64&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/drm/.libs&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/drm/intel/.libs&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$GST/libva/va/.libs&#92;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;:$LD_LIBRARY_PATH&quot;&lt;br&gt;&lt;/span&gt;&lt;span class=&quot;token prefix inserted&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token line&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, initialize the gst-uninstalled environment:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst&lt;br&gt;./gst-master&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;libdrm&quot; tabindex=&quot;-1&quot;&gt;libdrm &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#libdrm&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Grab libdrm from its repository and switch to the branch with the supported
version by MediaSDK.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/master&lt;br&gt;git clone git://anongit.freedesktop.org/mesa/drm&lt;br&gt;cd drm&lt;br&gt;git checkout -b intel libdrm-2.4.67&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Extract the distributed tarball in the cloned repository.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;tar -xv --strip-components=1 -C . -f ~/MediaServerStudioEssentials2017R3/SDK2017Production16.5.2/Generic/tmp/opt/intel/mediasdk/opensource/libdrm/2.4.67-64009/libdrm-2.4.67.tar.bz2&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then we could check the &lt;em&gt;big&lt;/em&gt; delta between upstream and the changes done by
Intel for MediaSDK.&lt;/p&gt;
&lt;p&gt;Let’s put it in a commit for later rebases.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;git add -u&lt;br&gt;git add .&lt;br&gt;git commit -m &quot;mediasdk changes&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Get build dependencies and compile.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo apt build-dep libdrm&lt;br&gt;./configure&lt;br&gt;make -j8&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since the pkgconfig files (*.pc) of libdrm are generated to work installed, it
is needed to modify them in order to work uninstalled.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;prefix=${HOME}/gst/master/drm&lt;br&gt;sed -i -e &quot;s#^libdir=.*#libdir=${prefix}/.libs#&quot; ${prefix}/*.pc&lt;br&gt;sed -i -e &quot;s#^includedir=.*#includedir=${prefix}#&quot; ${prefix}/*.pc&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In order to C preprocessor could find the uninstalled libdrm header files we
need to make them available in the expected path according to the pkgconfig file
and right now they are not there. To fix that it is possible to create proper
symbolic links.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/master/drm&lt;br&gt;ln -s include/drm/ libdrm&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;libva&quot; tabindex=&quot;-1&quot;&gt;libva &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#libva&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This modified a version of libva. These modifications messed a bit with the
opensource version of libva, because Intel decided not to prefix the library, or
some other strategy. In &lt;code&gt;gstreamer-vaapi&lt;/code&gt; we had to blacklist VA-API version
0.99, because it is the version number, arbitrary set, of this modified version
of libva for MediaSDK.&lt;/p&gt;
&lt;p&gt;Again, grab the original libva from repo and change the branch aiming to the
divert point. It was difficult to find the divert commit id since even the libva
version number was changed. Doing some archaeology I guessed the branch point
was in version 1.0.15, but I’m not sure.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/master&lt;br&gt;git clone https://github.com/01org/libva.git&lt;br&gt;cd libva&lt;br&gt;git checkout -b intel libva-1.0.15&lt;br&gt;tar -xv --strip-components=1 -C . -f ~/MediaServerStudioEssentials2017R3/SDK2017Production16.5.2/Generic/tmp/opt/intel/mediasdk/opensource/libva/1.67.0.pre1-64009/libva-1.67.0.pre1.tar.bz2&lt;br&gt;git add -u&lt;br&gt;git add .&lt;br&gt;git commit -m &quot;mediasdk&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Before compile, verify that Makefile is going to link against the uninstalled
libdrm. You can do that by grepping for LIBDRM in Makefile.&lt;/p&gt;
&lt;p&gt;Get compilation dependencies and build.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;sudo apt build-dep libva&lt;br&gt;./configure&lt;br&gt;make -j8&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Modify the pkgconfig files for uninstalled&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;prefix=${HOME}/gst/master/libva&lt;br&gt;sed -i -e &quot;s#^libdir=.*#libdir=${prefix}/va/.libs#&quot; ${prefix}/pkgconfig/*.pc&lt;br&gt;sed -i -e &quot;s#^includedir=.*#includedir=${prefix}#&quot; ${prefix}/pkgconfig/*.pc&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Fix header path with symbolic links&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/master/libva/va&lt;br&gt;ln -sf drm/va_drm.h&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;mfx-dispatch&quot; tabindex=&quot;-1&quot;&gt;mfx_dispatch &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#mfx-dispatch&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This static library which must be linked with MediaSDK applications. In our
case, to the GStreamer plugin.&lt;/p&gt;
&lt;p&gt;According to its documentation (included in the tarball):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;the dispatcher is a layer that lies between application and the SDK
implementations. Upon initialization, the dispatcher locates the appropriate
platform-specific SDK implementation. If there is none, it will select the
software SDK implementation. The dispatcher will redirect subsequent function
calls to the same functions in the selected SDK implementation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the tarball there is the source of the mfx_dispatcher, but it only compiles
with &lt;code&gt;cmake&lt;/code&gt;. I have not worked with &lt;code&gt;cmake&lt;/code&gt; on uninstalled setups, but we are
lucky, there is a repository with autotools support:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/master&lt;br&gt;git clone https://github.com/lu-zero/mfx_dispatch.git&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And compile. After running &lt;code&gt;./configure&lt;/code&gt; it is better to confirm, grepping the
generated Makefie, that the uninstalled versions of libdrm and libva are going
to be used.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;autoreconf  --install&lt;br&gt;./configure&lt;br&gt;make -j8&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally, just as the other libraries, it is required to fix the pkgconfig
files:d&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;prefix=${HOME}/gst/master/mfx_dispatch&lt;br&gt;sed -i -e &quot;s#^libdir=.*#libdir=${prefix}/.libs#&quot; ${prefix}/*.pc&lt;br&gt;sed -i -e &quot;s#^includedir=.*#includedir=${prefix}#&quot; ${prefix}/*.pc&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;test-it&quot; tabindex=&quot;-1&quot;&gt;Test it &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#test-it&quot;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;At last we are in a position where it is possible to test if everything works as
expected. For it we are going to run the pre-compiled version of &lt;code&gt;vainfo&lt;/code&gt;
bundled in the tarball.&lt;/p&gt;
&lt;p&gt;We will copy it to our uninstalled setup, thus we would running without
specifying the path.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;sync&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-av&lt;/span&gt; /home/vjaquez/MediaServerStudioEssentials2017R3/SDK2017Production16.5.2/Generic/tmp/usr/bin/vainfo ./prefix/bin/&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;vainfo&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;libva info: VA-API version 0.99.0&lt;br&gt;libva info: va_getDriverName() returns 0&lt;br&gt;libva info: User requested driver &#39;iHD&#39;&lt;br&gt;libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so&lt;br&gt;libva info: Found init function __vaDriverInit_0_32&lt;br&gt;libva info: va_openDriver() returns 0&lt;br&gt;vainfo: VA-API version: 0.99 (libva 1.67.0.pre1)&lt;br&gt;vainfo: Driver version: 16.5.2.64009-ubit&lt;br&gt;vainfo: Supported profile and entrypoints&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointVLD&lt;br&gt;     VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice&lt;br&gt;     VAProfileH264ConstrainedBaseline: &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileH264ConstrainedBaseline: &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileH264Main               : VAEntrypointVLD&lt;br&gt;     VAProfileH264Main               : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264Main               : &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileH264Main               : &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileH264High               : VAEntrypointVLD&lt;br&gt;     VAProfileH264High               : VAEntrypointEncSlice&lt;br&gt;     VAProfileH264High               : &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileH264High               : &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileMPEG2Simple            : VAEntrypointEncSlice&lt;br&gt;     VAProfileMPEG2Simple            : VAEntrypointVLD&lt;br&gt;     VAProfileMPEG2Main              : VAEntrypointEncSlice&lt;br&gt;     VAProfileMPEG2Main              : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Advanced            : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Main                : VAEntrypointVLD&lt;br&gt;     VAProfileVC1Simple              : VAEntrypointVLD&lt;br&gt;     VAProfileJPEGBaseline           : VAEntrypointVLD&lt;br&gt;     VAProfileJPEGBaseline           : VAEntrypointEncPicture&lt;br&gt;     VAProfileVP8Version0_3          : VAEntrypointEncSlice&lt;br&gt;     VAProfileVP8Version0_3          : VAEntrypointVLD&lt;br&gt;     VAProfileVP8Version0_3          : &amp;lt;unknown entrypoint&gt;&lt;br&gt;     VAProfileHEVCMain               : VAEntrypointVLD&lt;br&gt;     VAProfileHEVCMain               : VAEntrypointEncSlice&lt;br&gt;     VAProfileVP9Profile0            : &amp;lt;unknown entrypoint&gt;&lt;br&gt;     &amp;lt;unknown profile&gt;               : VAEntrypointVideoProc&lt;br&gt;     VAProfileNone                   : VAEntrypointVideoProc&lt;br&gt;     VAProfileNone                   : &amp;lt;unknown entrypoint&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It works!&lt;/p&gt;
&lt;h4 id=&quot;compile-gstreamer&quot; tabindex=&quot;-1&quot;&gt;Compile GStreamer &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/intel-mediasdk-on-debian-testing/#compile-gstreamer&quot;&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;I normally make a copy of &lt;code&gt;~/gst/master/gstreamer/script/git-update.sh&lt;/code&gt; in
&lt;code&gt;~/.local/bin&lt;/code&gt; in order to modify it, like adding support for &lt;code&gt;ccache&lt;/code&gt;,
disabling gtkdoc and gobject-introspection, increase the parallel tasks, etc.
But that is out of the scope of this document.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;cd ~/gst/master/&lt;br&gt;./gstreamer/scripts/git-update.sh&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Everything should be built without issues and, at the end, we could test if the
gst-msdk elements are available:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;gst-inspect-1.0 msdk&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Plugin Details:&lt;br&gt; Name                     msdk&lt;br&gt; Description              Intel Media SDK encoders&lt;br&gt; Filename                 /home/vjaquez/gst/master/gst-plugins-bad/sys/msdk/.libs/libgstmsdk.so&lt;br&gt; Version                  1.13.0.1&lt;br&gt; License                  BSD&lt;br&gt; Source module            gst-plugins-bad&lt;br&gt; Source release date      2017-11-23 16:39 (UTC)&lt;br&gt; Binary package           GStreamer Bad Plug-ins git&lt;br&gt; Origin URL               Unknown package origin&lt;br&gt;&lt;br&gt; msdkh264dec: Intel MSDK H264 decoder&lt;br&gt; msdkh264enc: Intel MSDK H264 encoder&lt;br&gt; msdkh265dec: Intel MSDK H265 decoder&lt;br&gt; msdkh265enc: Intel MSDK H265 encoder&lt;br&gt; msdkmjpegdec: Intel MSDK MJPEG decoder&lt;br&gt; msdkmjpegenc: Intel MSDK MJPEG encoder&lt;br&gt; msdkmpeg2enc: Intel MSDK MPEG2 encoder&lt;br&gt; msdkvp8dec: Intel MSDK VP8 decoder&lt;br&gt; msdkvp8enc: Intel MSDK VP8 encoder&lt;br&gt;&lt;br&gt; 9 features:&lt;br&gt; +-- 9 elements&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Great!&lt;/p&gt;
&lt;p&gt;Now, let’s run a simple pipeline. Please note that gst-msdk elements have rank
zero, then they will not be autoplugged, it is necessary to craft the pipeline
manually:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;gst-launch-1.0 filesrc &lt;span class=&quot;token assign-left variable&quot;&gt;location&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; ~/test.264 &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; h264parse &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; msdkh264dec &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; videoconvert &lt;span class=&quot;token operator&quot;&gt;!&lt;/span&gt; xvimagesink&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Setting pipeline to PAUSED ...&lt;br&gt;Pipeline is PREROLLING ...&lt;br&gt;libva info: VA-API version 0.99.0&lt;br&gt;libva info: va_getDriverName() returns 0&lt;br&gt;libva info: User requested driver &#39;iHD&#39;&lt;br&gt;libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so&lt;br&gt;libva info: Found init function __vaDriverInit_0_32&lt;br&gt;libva info: va_openDriver() returns 0&lt;br&gt;Redistribute latency...&lt;br&gt;Pipeline is PREROLLED ...&lt;br&gt;Setting pipeline to PLAYING ...&lt;br&gt;New clock: GstSystemClock&lt;br&gt;Got EOS from element &quot;pipeline0&quot;.&lt;br&gt;Execution ended after 0:00:02.502411331&lt;br&gt;Setting pipeline to PAUSED ...&lt;br&gt;Setting pipeline to READY ...&lt;br&gt;Setting pipeline to NULL ...&lt;br&gt;Freeing pipeline ...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&#92;o/&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Conference 2017</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-conference-2017/"/>
		<updated>2017-10-30T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-conference-2017/</id>
		<content type="html">&lt;p&gt;This year, the &lt;a href=&quot;https://gstreamer.freedesktop.org/conference/2017/&quot;&gt;GStreamer
Conference&lt;/a&gt; happened in
Prague, along with the traditional autumn Hackfest.Prague is a beautiful city, though this year I couldn’t visit it as much as I
wanted, since the Embedded Linux Conference Europe and the Open Source Summit
also took place there, and &lt;a href=&quot;https://www.igalia.com&quot;&gt;Igalia&lt;/a&gt;, being a Linux
Foundation sponsor, had a booth in the venue, where I talked about our work with
WebKit, Snabb, and obviously, GStreamer.&lt;/p&gt;
&lt;p&gt;But, let’s back to the GStreamer Hackfest and Conference.&lt;/p&gt;
&lt;p&gt;One of the features that I like the most of the GStreamer project is its
community, the people involved in it, by writing code, sharing their work with
many others. They might appear a bit tough at beginning (or at least that looked
to me) but in real they are all kind and talented persons. And I’m proud of
consider myself part of this community. Nonetheless it has a diversity problem,
as many other Open Source communities.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/gstconf2017-580x326.jpg&quot; alt=&quot;GStreamer Conference 2017&quot;&gt;&lt;/figure&gt;
&lt;p&gt;During the Hackfest, Hyunjun and I, met with Sree and talked about the plans for
GStreamer-VAAPI, the new features in VA-API and libva and how we could map them
to the GStreamer’s design. Also we talked about the future developments in the
&lt;em&gt;msdk&lt;/em&gt; elements, merged one year ago in &lt;code&gt;gst-plugins-bad&lt;/code&gt;. Also, I talked a bit
with Nicolas Dufresne regarding &lt;code&gt;kmssink&lt;/code&gt; and &lt;code&gt;DMABuf&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In the Conference, which happened in the same venue as the hackfest, I talked
wit the authors of
&lt;a href=&quot;https://github.com/intel/gstreamer-media-SDK&quot;&gt;gstreamer-media-SDK&lt;/a&gt;. They are
really energetic.&lt;/p&gt;
&lt;p&gt;I delivered my usual talk about &lt;code&gt;GStreamer-VAAPI&lt;/code&gt;. You can find the &lt;a href=&quot;https://people.igalia.com/vjaquez/talks/gstvaapi-201710&quot;&gt;slides, as
a web presentation,
here&lt;/a&gt;. Also, as every
year, our friends of &lt;a href=&quot;https://www.ubicast.eu&quot;&gt;Ubicast&lt;/a&gt;, recorded the talks, and
&lt;a href=&quot;https://gstconf.ubicast.tv/channels/#gstreamer-conference-2017&quot;&gt;made them available for
streaming&lt;/a&gt;
almost instantaneously:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=tg_sErLpaG0&quot;&gt;https://www.youtube.com/watch?v=tg_sErLpaG0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My colleague Enrique talked in the Conference about the &lt;a href=&quot;https://gstconf.ubicast.tv/videos/media-source-extension-on-webkit&quot;&gt;Media Source Extensions
(MSE) on
WebKit&lt;/a&gt;, and
Hyunjun shared his experience with &lt;a href=&quot;https://gstconf.ubicast.tv/videos/va-api-rust-binding/&quot;&gt;VA-API on
Rust&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Also, in the conference venue, we showed a couple demos. One of them was a
MinnowBoard running &lt;a href=&quot;https://www.igalia.com/wpe/&quot;&gt;WPE&lt;/a&gt;, rendering videos from
YouTube using &lt;code&gt;gstreamer-vaapi&lt;/code&gt; to decode video.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GstSpringHackfest2017: a quick report</title>
		<link href="https://blogs.igalia.com/vjaquez/gstspringhackfest2017-a-quick-report/"/>
		<updated>2017-05-30T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstspringhackfest2017-a-quick-report/</id>
		<content type="html">&lt;p&gt;Two weeks ago was the GStreamer Spring Hackfest 2017 and I am very happy about
how it went. I have the feeling that most of the attendees had a good time, and
made some progress in their projects. I want to thank all the people that
participated, in some way or another.Along that weekend when the hackfest happened, besides my duties as organizer
(with a lot of help from my colleagues at Igalia), I managed to hack a bit on
GstPlayer, proposing the missing API for setting the subtitles font description
(&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=782858&quot;&gt;782858&lt;/a&gt;). Also I helped
Nicolas a bit with the upstreaming of the v4l2 video encoder
(&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=728438&quot;&gt;728438&lt;/a&gt;). Julien Isorce
and I talked about the missing parts of DMABuf support in &lt;code&gt;gstreamer-vaapi&lt;/code&gt;, in
particular the action path when the new libva API, for importing and exporting
DMABuf, got merged
(&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=779146&quot;&gt;779146&lt;/a&gt;). With Thibault we
played with the idea of a Jenkins server doing CI for &lt;code&gt;gstreamer-vaapi&lt;/code&gt;. Also I
did some kernel debugging, and found out why kmssink failed in
&lt;a href=&quot;https://github.com/96boards/documentation/wiki/Dragonboard-410c-Installation-Guide-for-Linux-and-Android&quot;&gt;db410c&lt;/a&gt;
when the caps changed from RGB to YUV, thus Rob Clark cooked a
&lt;a href=&quot;https://cgit.freedesktop.org/~robclark/linux/commit/?h=msm-fixes-4.12-rc4&amp;amp;id=adcbae310f9ed84ef139e3fa6d7a7743d96c44c8&quot;&gt;patch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, I worked on a time-lapse video of the hackfest’s main room, only using
GStreamer with &lt;code&gt;gstreamer-vaapi&lt;/code&gt; in an Atom-based NUC. You can &lt;a href=&quot;https://github.com/ceyusa/timelapse/blob/master/timelapse_and_delay.c&quot;&gt;glance the
code&lt;/a&gt; of
the video grabber. Thanks to Luis de Bethencourt for the original idea and code.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Spring Hackfest 2017 &amp; GStreamer 1.12</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-spring-hackfest-2017-and-gstreamer-1-12/"/>
		<updated>2017-05-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-spring-hackfest-2017-and-gstreamer-1-12/</id>
		<content type="html">&lt;p&gt;Greetings earthlings!Two things:&lt;/p&gt;
&lt;h2 id=&quot;one&quot; tabindex=&quot;-1&quot;&gt;One &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-spring-hackfest-2017-and-gstreamer-1-12/#one&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;GStreamer &lt;a href=&quot;http://https://gstreamer.freedesktop.org/releases/1.12/&quot;&gt;1.12 is
out&lt;/a&gt;! And with it,
&lt;code&gt;gstreamer-vaapi&lt;/code&gt;. Among other new features and improvements we have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GstVaapiDisplay now inherits from GstObject, thus the VA display logging
messages are better and tracing the context sharing is more readable.&lt;/li&gt;
&lt;li&gt;When uploading raw images into a VA surfaces now VADeriveImages are tried
first, improving the upload performance, if it is possible.&lt;/li&gt;
&lt;li&gt;The decoders and the post-processor now can push dmabuf-based buffers to
downstream under certain conditions. For example: &lt;code&gt;GST_GL_PLATFORM=egl gst-play-1.0 video-sample.mkv --videosink=glimagesink&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Refactored the wrapping of VA surface into gstreamer memory, adding lock when
mapping and unmapping, and many other fixes.&lt;/li&gt;
&lt;li&gt;Now &lt;code&gt;vaapidecodebin&lt;/code&gt; loads &lt;code&gt;vaapipostproc&lt;/code&gt; dynamically. It is possible to
avoid it usage with the environment variable &lt;code&gt;GST_VAAPI_DISABLE_VPP=1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Regarding encoders: they have primary rank again, since they can discover, in
run-time, the color formats they can use for upstream raw buffers and caps
renegotiation is now possible. Also the encoders push encoding info downstream
via tags.&lt;/li&gt;
&lt;li&gt;About specific encoders: added constant bit-rate encoding mode for VP8 and
H265 encoder handles P010_10LE color format.&lt;/li&gt;
&lt;li&gt;Regarding decoders, flush operation has been improved, now the internal VA
encoder is not recreated at each flush. Also there are several improvements in
the handling of H264 and H265 streams.&lt;/li&gt;
&lt;li&gt;VAAPI plugins try to create their own GstGL context (when available) if they
cannot find it in the pipeline, to figure out what type of VA Display they
should create.&lt;/li&gt;
&lt;li&gt;Regarding &lt;code&gt;vaapisink&lt;/code&gt; for X11, if the backend reports that it is unable to
render correctly the current color format, an internal VA post-processor, is
instantiated (if available) and converts the color format.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And&lt;/p&gt;
&lt;h2 id=&quot;two&quot; tabindex=&quot;-1&quot;&gt;Two &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-spring-hackfest-2017-and-gstreamer-1-12/#two&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://wiki.gnome.org/Hackfests/GstSpringHackfest2017&quot;&gt;GStreamer Spring Hackfest
2017&lt;/a&gt; is in less than
two weeks!&lt;/p&gt;
&lt;p&gt;It is going to be held at &lt;a href=&quot;https://www.igalia.com&quot;&gt;Igalia&lt;/a&gt; premises in A Coruña.
Keep an eye on it ;)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer VAAPI 1.11.x (development branch)</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-11-x-development-branch/"/>
		<updated>2017-03-17T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-11-x-development-branch/</id>
		<content type="html">&lt;p&gt;Greetings GstFolks!Last month the unstable release 1.11.2 of GStreamer hit the streets, and I would
like to share with you all a quick heads-up of what we are working on in
gstreamer-vaapi, since there are a lot of new stuff:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;GstVaapiDisplay inherits from
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html&quot;&gt;GstObject&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;GstVaapiDisplay is a wrapper for VADisplay. Before it was a custom C
structure shared among the pipeline through the GstContext mechanism. Now it
is a GObject based object, which can be queried, introspected and, perhaps
later on, exposed in a separated library.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Direct rendering and upload&lt;/p&gt;
&lt;p&gt;Direct rendering and upload are mechanisms based on using
&lt;a href=&quot;https://01org.github.io/libva/group__api__core.html#gaaddbbd4c6ea5bcfe928adc991cc5faab%3E&quot;&gt;vaDeriveImage&lt;/a&gt;
to upload an raw image into a VASurface, or to download a VASurface into a
raw image, which is faster rather than exporting the VASurface to a VAImage.&lt;/p&gt;
&lt;p&gt;Nonetheless we have found some issues with the direct rendering in new Intel
hardware (Skylake and above), and we are still assessing if we keep it as
default.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Improve the
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-validate/html/gst-validate.html&quot;&gt;GstValidate&lt;/a&gt;
pass rate&lt;/p&gt;
&lt;p&gt;GstValidate provides a battery of tests for the whole GStreamer object,
sadly, using gstreamer-vaapi, the battery didn’t output the same pass rate as
without it. Though we still have some issues with the &lt;code&gt;vaapsink&lt;/code&gt; that might
need to be tackled in VA API, the pass rate has increased a lot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Refactor the GstVaapiVideoMemory&lt;/p&gt;
&lt;p&gt;We had refactor completely the internals of the VAAPI video memory (related
with the work done for the direct download and upload). Also we have added
locks when mapping and unmapping, to avoid race conditions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support dmabuf sharing with downstream&lt;/p&gt;
&lt;p&gt;gstreamer-vaapi already had support to share dmabuf-based buffers with
upstream (e.g. cameras) but now it is also capable to share dmabuf-based
buffers with downstream with sinks capable of importing them (e.g.
&lt;code&gt;glimagesink&lt;/code&gt; under supported EGL).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Support compilation with meson&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/mesonbuild/meson/wiki&quot;&gt;Meson&lt;/a&gt; is a new compilation
machinery in GStreamer, along with autotools, and now it is supported also
by gstreamer-vaapi.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Headless rendering improvements&lt;/p&gt;
&lt;p&gt;There has been a couple of improvements in the DRM backend for &lt;code&gt;vaapisink&lt;/code&gt;,
for headless environments.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Wayland backend improvements&lt;/p&gt;
&lt;p&gt;Also there has been improvements for the Wayland backend for &lt;code&gt;vaapisink&lt;/code&gt; and
GstVaapiDisplay.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dynamically reports the supported raw caps&lt;/p&gt;
&lt;p&gt;Now the elements query in run-time the VA backend to know which color formats
does it support, so either the source or sink caps are negotiated correctly,
avoiding possible error conditions (like negotiating a unsupported color
space). This has been done for encoders, decoders and the post-processor.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Encoders enhancements&lt;/p&gt;
&lt;p&gt;We have improve encoders a lot, adding new features such as constant bit rate
support for VP8, the handling of stream metadata through
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstTagList.html&quot;&gt;tags&lt;/a&gt;,
etc.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And many, many more changes, improvements and fixes. But there is still a long
road to the stable release (1.12) with many &lt;a href=&quot;https://bugzilla.gnome.org/buglist.cgi?bug_status=UNCONFIRMED&amp;amp;bug_status=NEW&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;component=gstreamer-vaapi&amp;amp;product=GStreamer&quot;&gt;pending tasks and
bugs&lt;/a&gt;
to tackle.&lt;/p&gt;
&lt;p&gt;Thanks a bunch to Hyunjun Ko, Julien Isorce, Scott D Phillips, Stirling Westrup,
etc. for all their work.&lt;/p&gt;
&lt;p&gt;Also, &lt;em&gt;Intel Media and Audio For Linux&lt;/em&gt; was accepted in the &lt;a href=&quot;https://01.org/linuxmedia/blogs/2017/you-are-welcome-collaborate-us&quot;&gt;Google Summer Of
Code&lt;/a&gt; this
year! If your are willing to face this challenge, you can browse the &lt;a href=&quot;https://01.org/documentation/gsoc-2017-ideas&quot;&gt;list of
ideas&lt;/a&gt; to work on, not only in
gstreamer-vaapi, but in the driver, or other projects surrounding VAAPI.&lt;/p&gt;
&lt;p&gt;Finally, &lt;strong&gt;do not forget these dates: 20th and 21h of May @ A Coruña (Spain)&lt;/strong&gt;,
where the &lt;a href=&quot;https://wiki.gnome.org/Hackfests/GstSpringHackfest2017&quot;&gt;GStreamer Spring
Hackfest&lt;/a&gt; is going to
take place. Sign up!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer-VAAPI 1.10 (now 1.10.1)</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-10-now-1-10-1/"/>
		<updated>2016-11-19T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-10-now-1-10-1/</id>
		<content type="html">&lt;p&gt;A lot of things have happened last month and I have neglected this report. Let
me try to fix it.First, the autumn GStreamer Hackfest and the GStreamer Conference 2016 in
Berlin.&lt;/p&gt;
&lt;p&gt;The hackfest’s venue was the famous
&lt;a href=&quot;https://en.wikipedia.org/wiki/C-base&quot;&gt;C-Base&lt;/a&gt;, where we talked with friends and
colleagues. Most of the discussions were leaned towards the release 1.10. Still,
Julien Isorce and I talked about our approaches for DMABuf sharing with
downstream; we agreed on to explore how to implement an allocator based on
GstDmaBufAllocator. We talked with Josep Torra about the performance he was
getting with gstreamer-vaapi encoders (and we already did good progress on
this). Also we talked with Nicolas Dufresne about v4l2 and kmssink. And many
other informal chats along with beer and pizza.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/cbase-hackfest-580x435.jpg&quot; alt=&quot;GStreamer Hackfest a the C-Base (from @calvaris
tweet)&quot;&gt;&lt;figcaption&gt;GStreamer Hackfest a the C-Base (from
@calvaris &lt;a href=&quot;https://twitter.com/calvaris/status/784692220343488512&quot;&gt;tweet&lt;/a&gt;)&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Afterwards, in the GStreamer Conference, I talked a bit about the current status
of GStreamer-VAAPI and what we can expect from release 1.10. Here’s the video
that the folks from &lt;a href=&quot;https://www.ubicast.eu/&quot;&gt;Ubicast&lt;/a&gt; recorded. You can see
&lt;a href=&quot;http://people.igalia.com/vjaquez/talks/gstvaapi-201609/&quot;&gt;the slides here&lt;/a&gt; too.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=KP2NnLp0ESo&quot;&gt;https://www.youtube.com/watch?v=KP2NnLp0ESo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I spent most of the conference with Scott, Sree and Josep tracing the
bottlenecks in the frame uploading to VA Intel driver, and trying to answer the
questions of the folks who gently approached me. I hope my answers were any
helpful.&lt;/p&gt;
&lt;p&gt;And finally, the first of November, the &lt;a href=&quot;https://gstreamer.freedesktop.org/news/#2016-11-01T16:30:00Z&quot;&gt;release 1.10 hit the
streets&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;As it is already mentioned in the release notes, these are the main new features
you can find in GStreamer-VAAPI 1.10&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All decoders have been split, one plugin feature per codec. So far, the
available ones, depending on the driver, are: vaapimpeg2dec, vaapih264dec,
vaapih265dec, vaapivc1dec, vaapivp8dec, vaapivp9dec and vaapijpegdec (which
already was split).&lt;/li&gt;
&lt;li&gt;Improvements when mapping VA surfaces into memory, differentiating from
negotiation caps and allocations caps, since the allocation memory for
surfaces may be bigger than one that is going to be mapped.&lt;/li&gt;
&lt;li&gt;vaapih265enc got support to constant bitrate mode (CBR).&lt;/li&gt;
&lt;li&gt;Since several VA drivers are unmaintained, we decide to keep a white list with
the va drivers we actually test, which is mostly the i915 and, in some degree,
gallium from mesa project. Exporting the environment variable
GST_VAAPI_ALL_DRIVERS disable the white list.&lt;/li&gt;
&lt;li&gt;The plugin features are registered, in run-time, according to its support by
the loaded VA driver. So only the decoders and encoder supported by the system
are registered. Since the driver can change, some dependencies are tracked to
invalidate the GStreamer registry and reload the plugin.&lt;/li&gt;
&lt;li&gt;DMA-Buf importation from upstream has been improved, gaining performance.&lt;/li&gt;
&lt;li&gt;vaapipostproc now can negotiate through caps the buffer transformations.&lt;/li&gt;
&lt;li&gt;Decoders now can do reverse playback! But they only shows I frames, because
the surface pool is smaller than the required by the GOP to show all the
frames.&lt;/li&gt;
&lt;li&gt;The upload of frames onto native GL textures has been optimized too, keeping a
cache of the internal structures for the offered textures by the sink,
improving a lot the performance with glimagesink.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the short log summary since branch 1.8:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;1 Allen Zhang&lt;br&gt;19 Hyunjun Ko&lt;br&gt;1 Jagyum Koo&lt;br&gt;2 Jan Schmidt&lt;br&gt;7 Julien Isorce&lt;br&gt;1 Matthew Waters&lt;br&gt;1 Michael Olbrich&lt;br&gt;1 Nicolas Dufresne&lt;br&gt;13 Scott D Phillips&lt;br&gt;9 Sebastian Dröge&lt;br&gt;30 Sreerenj Balachandran&lt;br&gt;1 Stefan Sauer&lt;br&gt;1 Stephen&lt;br&gt;1 Thiago Santos&lt;br&gt;1 Tim-Philipp Müller&lt;br&gt;1 Vineeth TM&lt;br&gt;154 Víctor Manuel Jáquez Leal&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks to &lt;a href=&quot;https://www.igalia.com&quot;&gt;Igalia&lt;/a&gt;, &lt;a href=&quot;http://people.igalia.com/vjaquez/talks/gstvaapi-201609/&quot;&gt;Intel Open Source Technology
Center&lt;/a&gt; and many others
for making GStreamer-VAAPI possible.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>VA-API and DRM/KMS in MinnowBoard</title>
		<link href="https://blogs.igalia.com/vjaquez/va-api-and-drm-kms-in-minnowboard/"/>
		<updated>2016-07-01T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/va-api-and-drm-kms-in-minnowboard/</id>
		<content type="html">&lt;p&gt;In 2012 I started to work on a video renderer for GStreamer which uses directly
the &lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_Rendering_Manager&quot;&gt;DRM/KMS kernel
subsystem&lt;/a&gt; to display
images. I even &lt;a href=&quot;https://blogs.igalia.com/vjaquez/2012/06/20/a-gstreamer-video-sink-using-kms/&quot;&gt;blogged about
it&lt;/a&gt;,
but I didn’t finished it.Nonetheless, in December last year, a customer asked us to finish the element,
but this time focusing on i.MX6, rather than OMAP4. Consequently, early this
year, kmssink got &lt;a href=&quot;https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/kms&quot;&gt;merged into
upstream&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The video sink has some nice features, such as
&lt;a href=&quot;https://www.kernel.org/doc/Documentation/dma-buf-sharing.txt&quot;&gt;DMA-buf&lt;/a&gt;
importing through the PRIME kernel interface. This feature makes possible a
zero-copy path when the video decoder delivers &lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-dmabuf.html&quot;&gt;dmabuf based
frames&lt;/a&gt;.
For this particular project, the kernel we used supports the &lt;a href=&quot;https://www.kernel.org/doc/Documentation/devicetree/bindings/media/coda.txt&quot;&gt;CODA media
subsystem&lt;/a&gt;,
and through the GStreamer element v4l2videodec we could link pipelines
negotiating dmabuf sharing, and thus we played videos very efficiently.&lt;/p&gt;
&lt;p&gt;During the last GStreamer Hackfest, Nicolas Dufresne got working the &lt;a href=&quot;https://www.kernel.org/doc/Documentation/devicetree/bindings/media/s5p-mfc.txt&quot;&gt;MFC media
subsystem&lt;/a&gt;,
for Exynos, with v4l2videodec and kmssink, but I don’t remember if he also got
the dmabuf sharing working.&lt;/p&gt;
&lt;p&gt;All in all, kmssink had only been tested in a couple of ARM devices, so I
wonder, as a &lt;em&gt;gstreamer-vaapi&lt;/em&gt; co-maintainer, if it also works in x86 devices.&lt;/p&gt;
&lt;p&gt;Some colleagues at Igalia, use a &lt;a href=&quot;http://www.minnowboard.org&quot;&gt;Minnowboard&lt;/a&gt; to
test &lt;a href=&quot;https://www.igalia.com/webkitforwayland/&quot;&gt;WebKit4Wayland&lt;/a&gt;, so I borrowed
it, installed a minimal Fedora 23 in it, and, surprisingly, I found out that it
has a nice VA-API support:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;vainfo&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;error: can&#39;t connect to X server!&lt;br&gt;libva info: VA-API version 0.38.1&lt;br&gt;libva info: va&#92;_getDriverName() returns 0&lt;br&gt;libva info: Trying to open /usr/lib64/dri/i965&#92;_drv&#92;_video.so&lt;br&gt;libva info: Found init function &#92;_&#92;_vaDriverInit&#92;_0&#92;_38&lt;br&gt;libva info: va&#92;_openDriver() returns 0&lt;br&gt;vainfo: VA-API version: 0.38 (libva 1.6.2)&lt;br&gt;vainfo: Driver version: Intel i965 driver for Intel(R) Bay Trail - 1.6.2&lt;br&gt;vainfo: Supported profile and entrypoints&lt;br&gt;      VAProfileMPEG2Simple            : VAEntrypointVLD&lt;br&gt;      VAProfileMPEG2Simple            : VAEntrypointEncSlice&lt;br&gt;      VAProfileMPEG2Main              : VAEntrypointVLD&lt;br&gt;      VAProfileMPEG2Main              : VAEntrypointEncSlice&lt;br&gt;      VAProfileH264ConstrainedBaseline: VAEntrypointVLD&lt;br&gt;      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice&lt;br&gt;      VAProfileH264Main               : VAEntrypointVLD&lt;br&gt;      VAProfileH264Main               : VAEntrypointEncSlice&lt;br&gt;      VAProfileH264High               : VAEntrypointVLD&lt;br&gt;      VAProfileH264High               : VAEntrypointEncSlice&lt;br&gt;      VAProfileH264StereoHigh         : VAEntrypointVLD&lt;br&gt;      VAProfileVC1Simple              : VAEntrypointVLD&lt;br&gt;      VAProfileVC1Main                : VAEntrypointVLD&lt;br&gt;      VAProfileVC1Advanced            : VAEntrypointVLD&lt;br&gt;      VAProfileNone                   : VAEntrypointVideoProc&lt;br&gt;      VAProfileJPEGBaseline           : VAEntrypointVLD&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Afterwards, I compiled GStreamer using
&lt;a href=&quot;https://arunraghavan.net/2014/07/quick-start-guide-to-gst-uninstalled-1-x/&quot;&gt;gst-uninstalled&lt;/a&gt;
in order to have kmssink and the master branch of &lt;em&gt;gstreamer-vaapi&lt;/em&gt;. And got it!
I had hardware accelerated decoding with VA-API, and video rendering using
KMS/DRM. But, sadly, no zero copy, since, in order to have dmabuf sharing, we
have to finish and to merge &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=755072&quot;&gt;bug
755072&lt;/a&gt; in &lt;em&gt;gstreamer-vaapi&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Running the typical Big Bunny video (1080p, H.264) the playback consumes less
than the 50% of the CPU usage, compared with the 100% of CPU usage with software
decoders (and a lot of frames dropped).&lt;/p&gt;
&lt;p&gt;I recorded a small video with the experiment as a proof.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Javer Martinez &lt;a href=&quot;https://twitter.com/martinezjavier/status/748976595600306177&quot;&gt;told me in
twitter&lt;/a&gt;, that MFC
can do dma-buf export since uses vb2 and Exynos DRM can import, but he couldn’t
get zero copy to work due missing format support.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Hackfest 2016</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2016/"/>
		<updated>2016-05-20T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2016/</id>
		<content type="html">&lt;p&gt;Yes, it happened again: the &lt;a href=&quot;https://wiki.gnome.org/Hackfests/GstSpringHackfest2016&quot;&gt;GStreamer Spring Hackfest
2016&lt;/a&gt;. This time in the
beautiful city of &lt;a href=&quot;https://en.wikipedia.org/wiki/Thessaloniki&quot;&gt;Thessaloniki&lt;/a&gt;.
Thanks a lot, Vivia and Sebastian, for making it happen.
&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/IMG_20160514_195225-580x435.jpg&quot; alt=&quot;Promenade&quot; title=&quot;Thessaloniki&#39;s promenade&quot;&gt;&lt;/p&gt;
&lt;p&gt;My objective this time was to work with
&lt;a href=&quot;https://www.kernel.org/doc/Documentation/dma-buf-sharing.txt&quot;&gt;dma-buf&lt;/a&gt; support
in gstreamer-vaapi. Though it is supported already, it needs a major clean up,
and to extend its usage for downstream buffers (bugs
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=755072&quot;&gt;755072&lt;/a&gt; and
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=765435&quot;&gt;765435&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;In the way I learned that we need to update our internal API (called
&lt;code&gt;libgstvaapi&lt;/code&gt;), when handling dma-buf, to support mult-plane formats.&lt;/p&gt;
&lt;p&gt;On the other hand, &lt;a href=&quot;http://ndufresne.ca&quot;&gt;Nicolas Dufresne&lt;/a&gt; and I talked a bit
about kmssink, libdrm and dma-buf. He managed to hack his Odroid U (Exynos3) to
enable its V4L2 mem2mem video decoder and share buffers with kmssink. It was
amazing. By the way, he promised me to write a blog post with the instructions
to replicate his deed.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/CibuUx3W0AABjPw-580x327.jpg&quot; alt=&quot;GStreamer Hackfest&quot;&gt;&lt;figcaption&gt;Photo by Luis de
Bethencourt&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Finally, we had a preview of &lt;a href=&quot;https://blogs.gnome.org/edwardrv&quot;&gt;Edward Hervey&lt;/a&gt;’s
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/events/gstreamer-conference/2015/Edward%20Hervey%20-%20decodebin3.pdf&quot;&gt;decodebin3&lt;/a&gt;.
It is fun his test of switching the different audio streams in a media container
(the different available languages) in every second or less. It was truly a
multi-language audio!&lt;/p&gt;
&lt;p&gt;In the meantime, we shared beers and meals, learning and laughing.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>gstreamer-vaapi 1.8: the codec split</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-8-the-codec-split/"/>
		<updated>2016-04-06T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-vaapi-1-8-the-codec-split/</id>
		<content type="html">&lt;p&gt;On march 23th &lt;a href=&quot;https://gstreamer.freedesktop.org/releases/1.8/&quot;&gt;GStreamer 1.8&lt;/a&gt;
was released, along with all its bundled modules, and, of course, one of those
modules is gstreamer-vaapi.Let us talk about this gstreamer-vaapi release, since there are several sweets!&lt;/p&gt;
&lt;p&gt;First thing to notice is that the encoders have been renamed. Before they
followed the pattern vaapiencode_{codec}, now they follow the pattern
vaapi{codec}enc. The purpose of this change is twofold: to fix the plugins
gtk-docs and to keep the usual element names in GStreamer. The conversion table
is this:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Old&lt;/th&gt;
&lt;th&gt;New&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;vaapiencode_h264&lt;/td&gt;
&lt;td&gt;vaapih264enc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vaapiencode_h265&lt;/td&gt;
&lt;td&gt;vaapih265enc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vaapiencode_mpeg2&lt;/td&gt;
&lt;td&gt;vaapimpeg2enc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vaapiencode_jpeg&lt;/td&gt;
&lt;td&gt;vaapijpegenc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vaapiencode_vp8&lt;/td&gt;
&lt;td&gt;vaapivp8enc&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;But those were not the only name changes, we also have split the vaapidecode.
Now we have a vaapijpegdec, which only decodes JPEG images, while keeping the
old vaapidecode for video decoding. Also, vaapijpegdec was demoted to a marginal
rank, because there are &lt;a href=&quot;https://bugs.freedesktop.org/show_bug.cgi?id=67150&quot;&gt;some problems in the Intel VA
driver&lt;/a&gt; (which is the only
one which supports JPEG decoding right now).&lt;/p&gt;
&lt;p&gt;Note that in future releases, &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=734093&quot;&gt;all the decoders will be split by
codec&lt;/a&gt;, just as we did the
JPEG decoder now; but first, we need to modify vaapidecodebin to choose a
decoder in run-time based on the negotiated caps.&lt;/p&gt;
&lt;p&gt;Please, update your scripts and code accordingly.&lt;/p&gt;
&lt;p&gt;There are a ton of enhancements and optimizations too. Let me enumerate some of
them: Vineeth TM fixed several memory leaks, and some compilations issues; Tim
enabled vaapisink to send unhandled keyboard or mouse events to the application,
making the usage of apps like gst-play-1.0 or apps based on
&lt;a href=&quot;https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-libs/html/player.html&quot;&gt;GstPlayer&lt;/a&gt;
be more natural; Thiago fixed the h264/h265 parsers, meanwhile Sree fixed the
vp9 and the h265 ones too; Scott also fixed the h265 parser; &lt;em&gt;et cetera&lt;/em&gt;. As may
you see, H265/HEVC parser has been very active lately, it is the new thing!&lt;/p&gt;
&lt;p&gt;I have to thank Sebastian Dröge, he did all the release work and also fixed a
couple compilation issues.&lt;/p&gt;
&lt;p&gt;This is the short log summary since 1.6:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;2 Lim Siew Hoon&lt;br&gt;1 Scott D Phillips&lt;br&gt;8 Sebastian Dröge&lt;br&gt;3 Sreerenj Balachandran&lt;br&gt;5 Thiago Santos&lt;br&gt;1 Tim-Philipp Müller&lt;br&gt;8 Vineeth TM&lt;br&gt;16 Víctor Manuel Jáquez Leal&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer VA-API under the umbrella of GStreamer</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-va-api-under-the-umbrella-of-gstreamer/"/>
		<updated>2016-02-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-va-api-under-the-umbrella-of-gstreamer/</id>
		<content type="html">&lt;p&gt;We have a new GStreamer VA-API release: &lt;strong&gt;1.6.0&lt;/strong&gt;!&lt;em&gt;Wait a minute&lt;/em&gt;, you might say, &lt;em&gt;weren’t the last release
&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2015/12/08/gstreamer-va-api-0-7-0/&quot;&gt;0.7&lt;/a&gt;?&lt;/em&gt;, and
you will be correct; but something &lt;strong&gt;big&lt;/strong&gt; has happened: GStreamer VA-API is now
part of the official GStreamer project!&lt;/p&gt;
&lt;p&gt;And this means a couple changes.&lt;/p&gt;
&lt;p&gt;First of all, the official repository of the project has been moved, now it’s
co-hosted along with the rest of the GStreamer components, in &lt;a href=&quot;http://freedesktop.org&quot;&gt;freedesktop.org&lt;/a&gt;
(fdo):&lt;/p&gt;
&lt;p&gt;Anonymous Git repository:
git://anongit.freedesktop.org/gstreamer/gstreamer-vaapi&lt;/p&gt;
&lt;p&gt;Developer Git repository:
ssh://&lt;a href=&quot;mailto:username@git.freedesktop.org&quot;&gt;username@git.freedesktop.org&lt;/a&gt;/git/gstreamer/gstreamer-vaapi&lt;/p&gt;
&lt;p&gt;Web Git gateway: &lt;a href=&quot;https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi&quot;&gt;https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Second, the bug tracking has also moved, since now GStreamer VA-API is now a
component of GStreamer, the new bugs must be filled here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&amp;amp;component=gstreamer-vaapi&quot;&gt;https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&amp;amp;component=gstreamer-vaapi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the bug list is here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://bugzilla.gnome.org/buglist.cgi?component=gstreamer-vaapi&amp;amp;product=GStreamer&quot;&gt;https://bugzilla.gnome.org/buglist.cgi?component=gstreamer-vaapi&amp;amp;product=GStreamer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;What will happen with the old bugs?&lt;/em&gt; you will ask. Well, we will move them as
soon as we have reviewed all them.&lt;/p&gt;
&lt;p&gt;The third change, as you already noticed, is the version scheme. Now we are
following the GStreamer version numbering to avoid confusion and to simplify our
development. Hence, this release, 1.6.0, supports the current GStreamer stable
version (1.6.3), and our current development branch is the 1.7.x. The future
releases will follow the GStreamer version schemes and dependencies.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Sweet! but, what’s new in this release?&lt;/em&gt;. The answer is, not much. Really. Most
of the changes are related with the coupling with the upstream processes
(autoconf setup, documentation, etc.). Perhaps the most remarkable thing is the
removal of the support libraries (libgstvaapi-*.so) used by the vaapi plugin:
now they are compiled as one static library and linked to the GStreamer’s
plugin. Also, the custom parsers were removed, and the plugin and elements
documentation got better shape.&lt;/p&gt;
&lt;p&gt;At code level, we had to push a huge indentation commit, in order to align with
the GStreamer code style. This commit artificially kills the blame history, but
it was our better option.&lt;/p&gt;
&lt;p&gt;I ought to say that those were not the only changes at code level, Michael
Olbrich fixed a missing frame release in the Wayland backend. And Sree, as
usual, fixed a bunch of hardcore stuff. But specially I want to thank
Tim-Philipp Müller, for helping us along the upstreaming process. And obviously
to the &lt;a href=&quot;https://01.org/&quot;&gt;Intel Open Source Technology Center&lt;/a&gt;, for let this
happen.&lt;/p&gt;
&lt;p&gt;Here’s the git’s short log summary since the last 0.7.0 release:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;1 Joel Holdsworth&lt;br&gt;1 Michael Olbrich&lt;br&gt;9 Sreerenj Balachandran&lt;br&gt;4 Tim-Philipp Müller&lt;br&gt;42 Víctor Manuel Jáquez Leal&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By the way, &lt;a href=&quot;http://www.igalia.com/nc/igalia-247/news/item/join-us-we-are-hiring/&quot;&gt;Igalia is
hiring!&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer VA-API 0.7.0</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-va-api-0-7-0/"/>
		<updated>2015-12-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-va-api-0-7-0/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://lists.freedesktop.org/archives/gstreamer-devel/2015-December/055673.html&quot;&gt;GStreamer VA-API 0.7.0 is
here!&lt;/a&gt;
As is usually said, “grab it while it is fresh”, specially the &lt;a href=&quot;http://distributions.In&quot;&gt;distributions.In&lt;/a&gt; a &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2015/07/16/gstreamer-va-api-a-new-release/&quot;&gt;previous blog
post&lt;/a&gt;
we explained in detail what is GStreamer VA-API. Also, last October, we talked
about it in the GStreamer Conference 2015; you can &lt;a href=&quot;http://people.igalia.com/vjaquez/talks/gstvaapi-201509/&quot;&gt;glance the slides
here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This release includes three major changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added support for VP9 decoding.&lt;/li&gt;
&lt;li&gt;Improved a lot the HEVC decoder.&lt;/li&gt;
&lt;li&gt;Some fixes in the integration with OpenGL platforms.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please note that VP9 decoding is only supported from
&lt;a href=&quot;https://en.wikipedia.org/wiki/Braswell_(SOC)&quot;&gt;Braswell&lt;/a&gt; and
&lt;a href=&quot;https://en.wikipedia.org/wiki/Skylake_(microarchitecture)&quot;&gt;Skylake&lt;/a&gt; onwards,
using the Intel’s &lt;a href=&quot;https://github.com/01org/intel-hybrid-driver&quot;&gt;hybrid driver for
libva&lt;/a&gt;, which is a subset of a
VA-API backend, and it can be plugged to &lt;a href=&quot;http://cgit.freedesktop.org/vaapi/intel-driver/&quot;&gt;Intel’s VA-API
backend&lt;/a&gt; (adding the
–hybrid-codec parameter to the intel-driver’s configure script).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding&quot;&gt;HEVC&lt;/a&gt; (a.k.a. H265)
decoding is more stable and has a better performance. And, remember, it is only
available in Skylake and Cherry View chipsets).&lt;/p&gt;
&lt;p&gt;Now, OpenGL3 is handled correctly through
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUpload&quot;&gt;GstGLTextureUploadMeta&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But there are a lot of fixes more, improvements and enhancements, such as better
handling of H264 corrupted streams, better
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstContext.html&quot;&gt;GstContext&lt;/a&gt;
handling, the enabling of vaapidecodebin (finally!), etc.&lt;/p&gt;
&lt;p&gt;Here’s the git’s short log summary since the last 0.6.0 release.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;5 Gwenole Beauchesne&lt;br&gt;1 Jan Schmidt&lt;br&gt;2 Lim Siew Hoon&lt;br&gt;1 Mark Nauwelaerts&lt;br&gt;1 Olivier Crete&lt;br&gt;61 Sreerenj Balachandran&lt;br&gt;72 Víctor Manuel Jáquez Leal&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Conference 2015</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-conference-2015/"/>
		<updated>2015-10-23T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-conference-2015/</id>
		<content type="html">&lt;p&gt;Last October 8th and 9th, the &lt;a href=&quot;http://gstreamer.freedesktop.org/conference/2015/&quot;&gt;GStreamer Conference
2015&lt;/a&gt; had happened in Dublin.
It was plenty of interesting talks and colleagues. I really enjoyed it.I participated with our latest work in
&lt;a href=&quot;https://github.com/01org/gstreamer-vaapi&quot;&gt;gstreamer-vaapi&lt;/a&gt;. You can glance the
&lt;strong&gt;&lt;a href=&quot;http://people.igalia.com/vjaquez/talks/gstvaapi-201509/&quot;&gt;slides of my
talk&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/gstvaapi-talk-580x435.jpg&quot; alt=&quot;GStreamer VA-API talk&quot;&gt;&lt;/figure&gt;
&lt;p&gt;By the way, if you are in Dublin, let me recommend you to visit the &lt;a href=&quot;http://www.cbl.ie/&quot;&gt;Chester
Beatty Library&lt;/a&gt;. There are a lot of antique, beautiful and
rare books&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer VA-API: A new release!</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-va-api-a-new-release/"/>
		<updated>2015-07-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-va-api-a-new-release/</id>
		<content type="html">&lt;p&gt;A &lt;a href=&quot;http://lists.freedesktop.org/archives/gstreamer-devel/2015-July/053579.html&quot;&gt;new release of gstreamer-vaapi is now
available&lt;/a&gt;!!
Since &lt;a href=&quot;http://www.igalia.com&quot;&gt;we&lt;/a&gt; have been working on it for the last months, I
would like talk you about it.gstreamer-vaapi is a set of &lt;a href=&quot;http://gstreamer.freedesktop.org/&quot;&gt;GStreamer&lt;/a&gt;
plugins and libraries for hardware accelerated video processing using
&lt;a href=&quot;http://www.freedesktop.org/wiki/Software/vaapi/&quot;&gt;VA-API&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;VA-API stands for “Video Acceleration - Application Programming Interface”, and
is, simultaneously, a specification of an application programming interface, and
its library implementation under the Open Source &lt;a href=&quot;https://en.wikipedia.org/wiki/MIT_License&quot;&gt;MIT
license&lt;/a&gt;, whose purpose is to offer
applications access to the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Graphics_processing_unit&quot;&gt;GPU&lt;/a&gt; accelerated video
processing capabilities, offloading those tasks from the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Central_processing_unit&quot;&gt;CPU&lt;/a&gt;. Accelerated
processing includes video decoding, sub-picture blending and rendering.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://cgit.freedesktop.org/vaapi/libva/&quot;&gt;library implementation&lt;/a&gt; (libva)
is designed to be a front-end for many different back-ends. I am aware only of
these back-ends:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://cgit.freedesktop.org/vaapi/intel-driver/&quot;&gt;Intel driver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cgit.freedesktop.org/vaapi/vdpau-driver/&quot;&gt;VDPAU platforms driver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cgit.freedesktop.org/vaapi/xvba-driver/&quot;&gt;XvBA platforms driver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cgit.freedesktop.org/vaapi/pvr-driver/&quot;&gt;PowerVR platforms driver&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can notice, only the Intel driver is well maintained, meanwhile the
others haven’t been updated since several years ago. And of course, this issue
has impacted on the bugs handled in gstreamer-vaapi (for example, &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=749554&quot;&gt;bug
#749554&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;VA-API is designed to use various entry-points of the hardware accelerated
processing in the GPU driver, such as
&lt;a href=&quot;https://en.wikipedia.org/wiki/Variable-length_code&quot;&gt;VLD&lt;/a&gt; (also known as &lt;em&gt;slice
level acceleration&lt;/em&gt;),
&lt;a href=&quot;https://en.wikipedia.org/wiki/Inverse_discrete_cosine_transform&quot;&gt;iDCT&lt;/a&gt;, among
others.&lt;/p&gt;
&lt;p&gt;The fact that VA-API uses &lt;em&gt;slice level decode&lt;/em&gt; is important, since it is
different from the software-based video decoders, were the decoding is at frame
level. As consequence, more information is required from the current video
parsers (&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=691712&quot;&gt;bug #691712&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;But let us back on track. VA-API, as we already said, is a set of GStreamer
elements (vaapidecode, vaapipostroc, vaapisink, and several encoders) and a
GObject-friendly library named libgstvaapi. This library wraps libva under a
GObject/GStreamer semantics. I might talk about this library in another
opportunity.&lt;/p&gt;
&lt;p&gt;vaapisink is video sink with support for multiple display server protocols:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/X_Window_System&quot;&gt;X11&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/GLX&quot;&gt;GLX&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/EGL_(API)&quot;&gt;EGL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)&quot;&gt;Wayland&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_Rendering_Manager&quot;&gt;Direct Rendering Manager
(DRM)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;UPDATE (2015/07/20): As Sree commented, vaapisink does not use GLX/EGL for
rendering, it uses VA-API, but rather vaapidecode/vaapipostproc can deal with
GLX/EGL contexts so they can share buffers with other OpenGL-based elements.&lt;/p&gt;
&lt;p&gt;This element is the most efficient way to render the video processed by other
VA-API elements such as decoders and post-processors, since no media
transformations are required. If we want to render the stream in other video
sinks, some &lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideometa.html#GstVideoGLTextureUpload&quot;&gt;extra
operations&lt;/a&gt;
might be necessary. The worst case scenario is where we need to download the
whole image from the GPU memory onto the CPU one, and the overall performance of
the pipeline might be impacted.&lt;/p&gt;
&lt;p&gt;vaapidecode is single decoding element that handles several codecs, depending on
the back-end and the hardware available. The comprehensive list of possible
enabled codecs is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MPEG-2 (simple and main profiles)&lt;/li&gt;
&lt;li&gt;MPEG-4 (simple, main and advance-simple profiles) / DivX / Xvid&lt;/li&gt;
&lt;li&gt;H263 (baseline profiles)&lt;/li&gt;
&lt;li&gt;H264 (baseline, constrained-baseline, main, high, multiview-high and
stereo-high profiles)&lt;/li&gt;
&lt;li&gt;H265 (main and main10)&lt;/li&gt;
&lt;li&gt;WMV3 (simple and main profiles) / VC1&lt;/li&gt;
&lt;li&gt;VP8 (version 0.3)&lt;/li&gt;
&lt;li&gt;JPEG (baseline profile)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the particular case of Intel chip-sets, the next table shows the codec
support per each generation:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CHIPSET&lt;/th&gt;
&lt;th&gt;MPEG2&lt;/th&gt;
&lt;th&gt;H264&lt;/th&gt;
&lt;th&gt;H265&lt;/th&gt;
&lt;th&gt;VC1&lt;/th&gt;
&lt;th&gt;VP8&lt;/th&gt;
&lt;th&gt;JPEG&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Skylake&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cherry View&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Broadwell&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Haswell&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ivybridge&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sandybridge&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ironlake&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G4x&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In the case of H264, there are multiple profiles, and every chip-set offers
different profile sets. But for now, I will not dig in more on it.&lt;/p&gt;
&lt;p&gt;In other back-ends the support shall be different. For example, I have a box
with an GPU NVidia GeForce GT which supports MPEG2, MPEG4, H264 and VC1.&lt;/p&gt;
&lt;p&gt;There is &lt;a href=&quot;http://cgit.freedesktop.org/vaapi/intel-driver/log/?h=g45-h264&quot;&gt;a branch for
G45&lt;/a&gt; GPU, where
H264 decoding support is added. Nevertheless, is not official, it doesn’t merge
with current master anymore, and the supported output color space is NV12 only
(&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=745660&quot;&gt;bug #745660&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;An interesting thing to know is because of the slice level decoding,
gstreamer-vaapi does its own parsing inside the decoder, even if a video parser
was plugged before.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;vaapipostproc&lt;/code&gt; is a video transform element which can do color space
conversions, &lt;a href=&quot;https://en.wikipedia.org/wiki/Deinterlacing&quot;&gt;de-interlacing&lt;/a&gt;,
sharpening and many other types of video filtering, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Color conversion&lt;/li&gt;
&lt;li&gt;Resize / Scale&lt;/li&gt;
&lt;li&gt;Noise reduction&lt;/li&gt;
&lt;li&gt;De-interlacing&lt;/li&gt;
&lt;li&gt;Sharpening&lt;/li&gt;
&lt;li&gt;Color Balance&lt;/li&gt;
&lt;li&gt;Skin tone enhancement&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, the availability of this elements and its filters, depends on the back-end
and the hardware. For example, the VDPAU back-end doesn’t provide any
post-processing capability.&lt;/p&gt;
&lt;p&gt;In the case of Intel’s chip-sets these are the provided post-processing
capabilities:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CHIPSET&lt;/th&gt;
&lt;th&gt;Format&lt;/th&gt;
&lt;th&gt;Noise&lt;/th&gt;
&lt;th&gt;Deinterlace&lt;/th&gt;
&lt;th&gt;Sharp&lt;/th&gt;
&lt;th&gt;C.B.&lt;/th&gt;
&lt;th&gt;STE&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Skylake&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cherry View&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Broadwell&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Haswell&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ivybridge&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sandybridge&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ironlake&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G4x&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In the case of the video encoders, they are split in different elements. Those
implemented in gstreamer-vaapi are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;vaapiencode_mpeg2&lt;/li&gt;
&lt;li&gt;vaapiencode_h264&lt;/li&gt;
&lt;li&gt;vaapiencode_h265&lt;/li&gt;
&lt;li&gt;vaapiencode_vp8&lt;/li&gt;
&lt;li&gt;vaapiencode_jpeg&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As far as I know, the only VA-API back-end that provides encoder is the Intel
one, and this is the table of the encoders per chip-set:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CHIPSET&lt;/th&gt;
&lt;th&gt;MPEG2&lt;/th&gt;
&lt;th&gt;H264&lt;/th&gt;
&lt;th&gt;H265&lt;/th&gt;
&lt;th&gt;VP8&lt;/th&gt;
&lt;th&gt;JPEG&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Skylake&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cherry View&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Broadwell&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Haswell&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ivybridge&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sandybridge&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Y&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ironlake&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;G4x&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;vaapidecodebin&lt;/code&gt; is a new bin composed by &lt;code&gt;vaapidecode&lt;/code&gt;, a &lt;code&gt;queue&lt;/code&gt; and
&lt;code&gt;vaapipostproc&lt;/code&gt;. Its purpose is bundle a complete decoding solution, with
de-interlacing support. The purpose of the queue is to set the decoder to its
full speed. The problem is, that since each back-end and chip-set might or might
not support vaapipostproc we have to check for it in run-time (&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=749554&quot;&gt;bug
#749554&lt;/a&gt;).&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;    (-------------------------------------------------------)&lt;br&gt;    |                     vaapidecodebin                    |&lt;br&gt;    |   (-------------)    (-------)    (---------------)   |&lt;br&gt;    |--&gt;| vaapidecode |---&gt;| queue |---&gt;| vaapipostproc |--&gt;|&lt;br&gt;    |   (-------------)    (-------)    (---------------)   |&lt;br&gt;    |                                                       |&lt;br&gt;    (-------------------------------------------------------)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In my opinion, this should be just a temporal workaround meanwhile we have
auto-plugging support of de-interlacers (&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=687182&quot;&gt;bug
#687182&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;So far we have explained what is GStreamer VA-API. Let us now talk about what is
new and hot in this release.&lt;/p&gt;
&lt;p&gt;This is the short log summary since the last release, 0.5.10:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;1 Adrian Cox&lt;br&gt;2 Alban Browaeys&lt;br&gt;30 Gwenole Beauchesne&lt;br&gt;1 Jacobo Aragunde Pérez&lt;br&gt;2 Jan Schmidt&lt;br&gt;1 Julien Isorce&lt;br&gt;1 Lim Siew Hoon&lt;br&gt;1 Martin Sherburn&lt;br&gt;4 Michael Olbrich&lt;br&gt;12 Olivier Crete&lt;br&gt;3 Simon Farnsworth&lt;br&gt;74 Sreerenj Balachandran&lt;br&gt;75 Víctor Manuel Jáquez Leal&lt;br&gt;1 Wind Yuan&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The major changes in this release includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HEVC (H265) decoding and encoding support (available only in Skylake and
Cherry View chip-sets)&lt;/li&gt;
&lt;li&gt;VP8 encoder (Skylake)&lt;/li&gt;
&lt;li&gt;JPEG encoder (Skylake and Cherry View)&lt;/li&gt;
&lt;li&gt;vaapidecodebin element, which we have talked about above.&lt;/li&gt;
&lt;li&gt;Support for EGL either in vaapidecode, vaapipostproc and vaapisink.&lt;/li&gt;
&lt;li&gt;Skin tone enhancement support in vaapipostproc&lt;/li&gt;
&lt;li&gt;Support for H.264 Multiview High profile encoding with more than 2 views,
which encompasses Jan Schmidt’s efforts for stereoscopic / multi-view support
in GStreamer (&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=611157&quot;&gt;bug
#611157&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;A lot of improvements and round rough corners all over the place. Only to
mention that we closed more than 70 bug reports along this cycle&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, please test this new release, enjoy it, and if you find something ugly,
&lt;a href=&quot;https://bugzilla.gnome.org/enter_bug.cgi?product=gstreamer-vaapi&quot;&gt;let us
known&lt;/a&gt;!!!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Hackfest 2015</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2015/"/>
		<updated>2015-03-18T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2015/</id>
		<content type="html">&lt;p&gt;Last weekend was the &lt;a href=&quot;https://wiki.gnome.org/Hackfests/GstHackfest2015&quot;&gt;GStreamer
Hackfest&lt;/a&gt; in Staines, UK, in
the Samsung’s premises, who also sponsored the dinners and the lunches. Special
thanks to Luis de Bethencourt, the almighty organizer!My main purpose was to sip one or two pints with the GStreamer folks and,
secondarily, to talk about gstreamer-vaapi, WebKitGTK+ and the new OpenGL/ES
support in gst-plugins-bad.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/15030008-580x326.jpg&quot; alt=&quot;GStreamer Hackfest in Staines&quot;&gt;&lt;figcaption&gt;GStreamer
Hackfest in Staines&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;About gstreamer-vaapi, there were a couple questions about some problems shown
in downstream (stable releases in distributions) which I was happy to announce
that they are mostly fixed in upstream. On the other hand, Sebastian Dröge was
worried about the existing support of GStreamer 0.10 and I answered him that its
removal is &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=745728&quot;&gt;already in the
pipeline&lt;/a&gt;. He looked pleased.&lt;/p&gt;
&lt;p&gt;Related with gstreamer-vaapi and the new GstGL, we tested and merged a &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=745902&quot;&gt;patch
for GLES2/EGL&lt;/a&gt;, so now it is
possible to render VA-API decoded video through glimagesink with (nearly)
zero-copy. Sadly, this is &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=745233&quot;&gt;not currently possible using
GLX&lt;/a&gt;. Along the way I found a
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=746248&quot;&gt;silly bug&lt;/a&gt; that came from a
previous patch of mine and fixed it; also, we fixed &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=746173&quot;&gt;other small bug in the
gluploader&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;In the WebKitGTK+ realm, I worked on a new functionality: to &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=142693&quot;&gt;share the OpenGL
context&lt;/a&gt; and the display of the
browser with the GStreamer pipeline. With it, we could add gl filters into the
pipeline. But honour to whom honour is due: this patch is a split of a &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=138562&quot;&gt;previous
patch&lt;/a&gt; done by Philippe Normand.
The ultimate goal is to ditch the custom video sink in WebKit and reuse the
glimagesink, with it’s new &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=739681&quot;&gt;off-screen
rendering&lt;/a&gt; feature.&lt;/p&gt;
&lt;p&gt;Finally, on Sunday’s afternoon, I walked around Richmond and it is beautiful.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/15030009-580x326.jpg&quot; alt=&quot;Richmond&quot;&gt;&lt;figcaption&gt;Richmond&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Thanks to &lt;a href=&quot;http://igalia.com&quot;&gt;Igalia&lt;/a&gt;, Intel and all the sponsors that make
possible the hackfest and my attendance.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=74vZ3ODUo00&quot;&gt;https://www.youtube.com/watch?v=74vZ3ODUo00&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GUADEC 2014</title>
		<link href="https://blogs.igalia.com/vjaquez/guadec-2014/"/>
		<updated>2014-08-05T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/guadec-2014/</id>
		<content type="html">&lt;p&gt;The last Friday 25 of July, &lt;a href=&quot;https://en.wikipedia.org/wiki/D%C3%ADa_Nacional_de_Galicia&quot;&gt;National Day of
Galicia&lt;/a&gt;, started
very early because I had to travel to
&lt;a href=&quot;https://en.wikipedia.org/wiki/Strasbourg&quot;&gt;Strasbourg&lt;/a&gt;, official seat of the
European Parliament, not for any political duty, but for the GNOME Users and
Developers European Conference, the &lt;a href=&quot;https://www.guadec.org/2014&quot;&gt;GUADEC&lt;/a&gt;!My last GUADEC was in The Hague, in 2010, though in 2012, when it was hosted in
Coruña, I attended a couple talks. Nonetheless, it had been a long time since I
met the community, and it was a pleasure to me meet them again.&lt;/p&gt;
&lt;p&gt;My biggest impression was the number of attendees. I remember the times in
Turkey or in Gran Canaria where hundreds packed the auditoriums and halls.
Nowadays the audience was smaller, but that is a good thing, since now you get
in touch with the core of developers who drive and move the project easily.&lt;/p&gt;
&lt;p&gt;We, &lt;a href=&quot;http://www.igalia.com&quot;&gt;Igalia&lt;/a&gt;, as sponsors, had a banner in the main room
and a table in a corridor. Here is a picture of
&lt;a href=&quot;http://blogs.igalia.com/jasuarez/&quot;&gt;Juan&lt;/a&gt; to prove it:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/14070027-300x200.jpg&quot; alt=&quot;Juan at the Igalia&#39;s both.&quot;&gt;&lt;figcaption&gt;Juan at the Igalia’s
booth.&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Also I ran across with &lt;a href=&quot;http://www.bassi.io/&quot;&gt;Emmanuele Bassi&lt;/a&gt;, setting up a
booth to show up the &lt;a href=&quot;https://endlessm.com/&quot;&gt;Endless Mobile&lt;/a&gt; OS, based on GNOME
3. The people at GUADEC welcomed with enthusiasm the user experience provided by
it and the purpose of the project. Personally, I love it. If you don’t know the
project, you should visit their web site.&lt;/p&gt;
&lt;p&gt;The first talk I attended what the classic GStreamer update by Sebastian Dröge
and Tim Müller. They talked about the new features in GStreamer 1.4. Neat stuff
in there. I like the new pace of GStreamer, rather of the old stagnated
evolution of 0.10 version.&lt;/p&gt;
&lt;p&gt;Afterwards, &lt;a href=&quot;http://www.gnome.org/news/2014/07/interview-with-jim-hall-guadec-keynote-speaker/&quot;&gt;Jim
Hall&lt;/a&gt;
gave us a keynote about Usability in GNOME. I really enjoyed that talk. He
studied the usability of several GNOME applications such as Nautilus (aka
Files), GEdit, &lt;a href=&quot;https://wiki.gnome.org/Apps/Web/&quot;&gt;Epiphany&lt;/a&gt; (aka Web), etc., as
part of his Masters’ research. It was a pleasure to hear that Epiphany is
regarded as having a good usability.&lt;/p&gt;
&lt;p&gt;After lunch I was in the main room hearing Sylvain Le Bon about sustainable
business models for free software. He talked about crowd funding, community
management and related stuff.&lt;/p&gt;
&lt;p&gt;The next talk was Christian Hergert about his project
&lt;a href=&quot;https://wiki.gnome.org/Projects/Gom&quot;&gt;GOM&lt;/a&gt;, an object mapper from GObjects to
SQLite, which is used in &lt;a href=&quot;https://wiki.gnome.org/Projects/Grilo&quot;&gt;Grilo&lt;/a&gt; to
prevent SQL injection by some plugins that use SQLite.&lt;/p&gt;
&lt;p&gt;Later on, &lt;a href=&quot;http://blogs.gnome.org/marina/&quot;&gt;Marina Zhurakhinskaya&lt;/a&gt; gave us one of
the best talks of the GUADEC: &lt;a href=&quot;https://wiki.gnome.org/OutreachProgramForWomen/SpreadTheWord?action=AttachFile&amp;amp;do=view&amp;amp;target=Ally_in_Tech_pdf.pdf&quot;&gt;How to be an ally to women in
tech&lt;/a&gt;.
I encourage you to download the slides and read them. There I learned about the
&lt;a href=&quot;http://adainitiative.org/2014/03/breaking-the-unicorn-law-stop-asking-women-in-open-techculture-about-women-in-open-techculture/&quot;&gt;unicorn
law&lt;/a&gt;
and the &lt;a href=&quot;https://www.usenix.org/blog/impostor-syndrome-proof-yourself-and-your-community&quot;&gt;impostor
syndrome&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The day closed with the GNOME Foundation’s teams reports.&lt;/p&gt;
&lt;p&gt;Sunday came and I arrived to the venue for the second keynote: &lt;em&gt;Should We Teach
The Robot To Kill&lt;/em&gt; by Nathan Willis. In his particular style, Nathan, presented
a general survey of GNU/Linux in the Automotive Industry.&lt;/p&gt;
&lt;p&gt;Next, one of main talks from Igalia: &lt;em&gt;Web 3.12: a browser to make us proud&lt;/em&gt;,
presented by &lt;a href=&quot;http://blogs.igalia.com/elima/&quot;&gt;Edu&lt;/a&gt;. It was fairly good. Edu
showed us the latest development in WebKitGTK+ and Epiphany (aka Web). There
were quite a few questions at the end of the talk. Epiphany nowadays is actively
used by a lot of people in the community.&lt;/p&gt;
&lt;p&gt;After, Zeeshan presented his GNOME &lt;a href=&quot;https://wiki.gnome.org/Apps/Boxes&quot;&gt;boxes&lt;/a&gt;,
an user interface for running virtual machines. Later on Alberto Ruiz showed us
Fleet Commander, a web application to handle large desktop deployments.&lt;/p&gt;
&lt;p&gt;And we took our classic group photo:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/guadec2014-300x200.jpg&quot; alt=&quot;Group photo&quot;&gt;&lt;figcaption&gt;Group photo&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;That Sunday closed with the intern’s lighting talks. Cool stuff is being cooked
by them.&lt;/p&gt;
&lt;p&gt;On Monday I was in the venue when Emmanuele Bassi talked us about
&lt;a href=&quot;http://www.bassi.io/articles/2014/07/29/guadec-2014-gsk/&quot;&gt;GSK&lt;/a&gt;, the GTK+ Scene
Graph Kit, his new project, using as a starting point the lessons learned in
Clutter. Its objective is to have a &lt;a href=&quot;https://en.wikipedia.org/wiki/Scene_graph&quot;&gt;scene
graph&lt;/a&gt; library fully integrated in
GTK+.&lt;/p&gt;
&lt;p&gt;After the lunch and the second part of the Foundation’s Annual General Meeting,
Benjamin Otte gave an amusing talk about the CSS implementation in GTK+. Later,
Jasper St. Pierre talked about the Wayland support in GNOME.&lt;/p&gt;
&lt;p&gt;When the coffee break ended, the almighty Žan Doberšek gave the other talk from
Igalia: &lt;em&gt;Wayland support in WebKit2GTK+&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In the last day of the GUADEC, I attended Bastien Nocera’s talk: &lt;em&gt;Hardware
integration, the GNOME way&lt;/em&gt;, where he reviewed the history of his contributions
to GNOME related with hardware integration and the goal of nicely support most
of the hardware in GNOME, like compasses, gyroscopes, et cetera.&lt;/p&gt;
&lt;p&gt;Afterwards, Owen Taylor talked us about the GNOME’s continuous integration
performance testing, in order to know exactly why one release of GNOME is faster
or slower than the last.&lt;/p&gt;
&lt;p&gt;And the third keynote came: Matthew Garrett talked us about his experiences with
the GNOME community and his vision about where it should go: to enhance the
privacy and security of the users, something that many GNOMErs are excited
about, such as Federico Mena.&lt;/p&gt;
&lt;p&gt;Later on, David King talked about his plans for Cheese, the webcam application,
turning it into a DBus service, using the current development of
&lt;a href=&quot;https://code.google.com/p/d-bus/&quot;&gt;kdbus&lt;/a&gt; to sandbox the interaction with the
hardware.&lt;/p&gt;
&lt;p&gt;Afterwards Christian Hergert talked us about his plans for &lt;em&gt;Builder&lt;/em&gt;, a new IDE
for GNOME. Promising stuff, but we will see how it goes. Christian said that he
is going to take a full year working on this project.&lt;/p&gt;
&lt;p&gt;The GUADEC ended with the lighting talks, where I enjoyed one about the problems
around the current encryption and security tools.&lt;/p&gt;
&lt;p&gt;Finally, the next GUADEC host was unveiled: the Sweden Conspiracy: Gothenburg!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>See you at GUADEC!</title>
		<link href="https://blogs.igalia.com/vjaquez/see-you-at-guadec/"/>
		<updated>2014-07-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/see-you-at-guadec/</id>
		<content type="html">&lt;p&gt;Woah! Has been long time since I attended a GUADEC, besides the one in Coruña,
of course. And I am very excited about it!My plan is to chill with other GNOME developers and talk about the future of
GNOME OS.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/guadec-2014-badge-large-150x150.png&quot; alt=&quot;I&#39;m going to GUADEC 2014&quot;&gt;&lt;figcaption&gt;I’m
going to GUADEC 2014&lt;/figcaption&gt;&lt;/figure&gt;
</content>
	</entry>
	
	<entry>
		<title>Munich</title>
		<link href="https://blogs.igalia.com/vjaquez/munich/"/>
		<updated>2014-03-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/munich/</id>
		<content type="html">&lt;p&gt;I spent a week in Munich. I went there for two reasons: to attend the &lt;a href=&quot;http://www.w3.org/2013/10/tv-workshop/&quot;&gt;Web &amp;amp; TV
workshop&lt;/a&gt; organized by the W3C and to
hack along with the gst-gang in the &lt;a href=&quot;https://wiki.gnome.org/Hackfests/GStreamerMuc2014&quot;&gt;GStreamer Hackfest
2014&lt;/a&gt;. All these sponsored by
&lt;a href=&quot;http://www.igalia.com&quot;&gt;Igalia&lt;/a&gt;, my company.I arrived to Munich on Tuesday evening, and when I reached the Marienplatz metro
station, I ran across with a crowd of Bayern Munich fans, chanting songs about
the glory of their team, huddling and dancing. And a lot of police officers
surrounding the tracks.&lt;/p&gt;
&lt;p&gt;The workshop was organized by the &lt;a href=&quot;https://www.w3.org/2011/webtv/&quot;&gt;W3C Web and TV Interest
Group&lt;/a&gt;, and intended to spark discussions around
how to integrate and standardize TV technologies and the Web.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/14030011-300x200.jpg&quot; alt=&quot;The first slide of the workshop&quot;&gt;&lt;figcaption&gt;The first slide
of the workshop&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;On Wednesday morning, the workshop began. People from Espial and Samsung talked
about &lt;a href=&quot;http://en.wikipedia.org/wiki/Hybrid_Broadcast_Broadband_TV&quot;&gt;HbbTV&lt;/a&gt;, and
japanese broadcasters talked about their
&lt;a href=&quot;http://www.nhk.or.jp/strl/english/aboutstrl1/r2-1-1.htm&quot;&gt;Hybridcast&lt;/a&gt;. Both
technologies seek to enhance the television experience, using the Internet
Protocols, the first for Europe, and the former for Japan. Also, broadcasters
from Chine showed their approach using ad-hoc technologies. I have to say that
Hybridcast awed me.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=ThrOv2NqI00&quot;&gt;http://www.youtube.com/watch?v=ThrOv2NqI00&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Afterwards, most of the workshop was around the problem of the &lt;a href=&quot;http://www.w3.org/community/webscreens&quot;&gt;companion
device&lt;/a&gt;. People showed their solutions
and proposals, in particular about device discovering, and data sharing and
control. All the solutions relied on
&lt;a href=&quot;http://en.wikipedia.org/wiki/WebSocket&quot;&gt;WebSockets&lt;/a&gt; and
&lt;a href=&quot;http://en.wikipedia.org/wiki/Webrtc&quot;&gt;WebRTC&lt;/a&gt; for the data sharing between
devices.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=0xraXLZY2gc&quot;&gt;http://www.youtube.com/watch?v=0xraXLZY2gc&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;During the panels, I enjoyed a lot the participation of &lt;a href=&quot;http://old.dvbworld.org/profiles/profile_JonPiesing.htm&quot;&gt;Jon
Piesing&lt;/a&gt;, in particular
his slide summarizing the specifications used by the HbbTV V2. It’s like
juggling specs!&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/Jon_Piesing-300x225.png&quot; alt=&quot;Specifications used by HbbTV V2&quot;&gt;&lt;figcaption&gt;Specifications used by HbbTV V2&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Broadcaster are very interested in &lt;a href=&quot;https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html&quot;&gt;Encrypted Media
Extension&lt;/a&gt;
and &lt;a href=&quot;https://www.w3.org/2011/webtv/wiki/Media_APIs&quot;&gt;Media APIs&lt;/a&gt;, for example the
specification for a Tuner API. Also there’s a lot of expectation about meta-data
handling and defining common &lt;a href=&quot;http://www.bbc.co.uk/ontologies/programmes/2009-09-07&quot;&gt;TV
ontologies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, there were a couple talks about miscellaneous technologies surrounding
the IPTV broadcasting.&lt;/p&gt;
&lt;p&gt;The second stage of my visit to Bavaria’s Capital, was the &lt;strong&gt;GStreamer
Hackfest&lt;/strong&gt;. It was in the Google Offices, near to the Marienplatz.&lt;/p&gt;
&lt;p&gt;Christan Schaller has made &lt;a href=&quot;http://blogs.gnome.org/uraeus/2014/03/20/update-from-gstreamer-hackfest-at-google-office-in-munich/&quot;&gt;a very good
summary&lt;/a&gt;
of what happened along the hackfest. From my side, I worked with Nicolas
Dufresne with the v4l2 video converter for the Exynos4, which is a piece
required for the hardware acceleration decoding for that platform using v4l2
video decoder.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Boosting WebKitGTK+ compilation for armhf with icecream</title>
		<link href="https://blogs.igalia.com/vjaquez/boosting-webkitgtk-compilation-for-armhf-with-icecream/"/>
		<updated>2013-12-31T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/boosting-webkitgtk-compilation-for-armhf-with-icecream/</id>
		<content type="html">&lt;p&gt;Some time ago I needed to jump into the fix-compile-test loop for
&lt;a href=&quot;http://www.webkitgtk.org/&quot;&gt;WebKitGTK+&lt;/a&gt;, but in the &lt;em&gt;armhf&lt;/em&gt; architecture,
speaking in terms of Debian/Ubuntu.To whom don’t know, WebKitGTK+ is huge, it is humongous, and it takes a lot of
resources to compile. For me, at first glance, was impossible to even try to
compile it natively in my hardware, which, by the way, is an
&lt;a href=&quot;http://archlinuxarm.org/platforms/armv7/samsung/odroid-x2&quot;&gt;Odroid-X2&lt;/a&gt;. So I
setup a cross-compilation environment.&lt;/p&gt;
&lt;p&gt;And I failed. I could not cross-compile the master branch of WebKitGTK+ using as
root file system, a bootstrapped Debian. It is supposed to be the opposite, but
all the &lt;a href=&quot;https://wiki.debian.org/Multiarch&quot;&gt;multiarch&lt;/a&gt; thing made my old and
good cross-compilation setup (based on
&lt;a href=&quot;https://maemo.gitorious.org/scratchbox2&quot;&gt;scratchbox2&lt;/a&gt;) a bloody hell. Long
story short, I gave up and I took more seriously the idea of native builds.
Besides, Ubuntu and Debian does full native builds of their distributions for
&lt;em&gt;armhf&lt;/em&gt;, not to say that the Odroid-X2 has enough power for give it a try.&lt;/p&gt;
&lt;p&gt;It is worth to mention that I could not use Yocto/OE or Buildroot, though I
would love to use them, because the target was a distribution based on Debian
Sid/Ubuntu, and I would not afford a chroot environment only for WebKitGTK+.&lt;/p&gt;
&lt;p&gt;With a lot of patience I was able to compile, in the Odroid, a minimalist
configuration of WebKitGTK+ without symbols. As expected, it took ages (less
than 3 hours, if I remember correctly)&lt;/p&gt;
&lt;p&gt;Quickly an idea popped out in the office: to use &lt;a href=&quot;http://distcc.org/&quot;&gt;distcc&lt;/a&gt;. I
grabbed as many board based on ARMv7 I could find: another Odroid-X2, a couple
Pandaboards, an Arndaleboard, and an IFC6410, installed in them a distcc
compilation setup.&lt;/p&gt;
&lt;p&gt;And yes, the compilation time went down, but not that much, though I don’t
remember how much.&lt;/p&gt;
&lt;p&gt;Many of the colleagues at the office migrated from distcc to
&lt;a href=&quot;https://github.com/icecc/icecream&quot;&gt;icecream&lt;/a&gt;. Particularly, &lt;a href=&quot;http://blogs.igalia.com/jasuarez/&quot;&gt;Juan A.
Suárez&lt;/a&gt; told me about his experiments with
icecc and his Raspberry pi. I decided to give it a shoot.&lt;/p&gt;
&lt;p&gt;Icecream permits to do cross-compilation because the scheduler can deliver, into
the compilation host, the required tool-chain by the requester.&lt;/p&gt;
&lt;p&gt;First, you should have one or several cross tool-chains, one for each
compilation tuple. In this case we will have only one: to compile in &lt;em&gt;X86_64&lt;/em&gt;,
generating code for &lt;em&gt;armfh&lt;/em&gt;. Luckily,
&lt;a href=&quot;http://www.emdebian.org/debian/&quot;&gt;embdebian&lt;/a&gt; provides it, out of the box.
Nevertheless you could use any other mean to obtain it, such as
&lt;a href=&quot;http://crosstool-ng.org/&quot;&gt;crosstool&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Second, you need the icecc-create-env script to create the tarball that the
scheduler will distribute to the compilation host.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;  $ /usr/lib/icecc/icecc-create-env &#92;&#92;&lt;br&gt;          --gcc /usr/bin/arm-linux-gnueabihf-gcc-4.7 &#92;&#92;&lt;br&gt;                /usr/bin/arm-linux-gnueabihf-g++-4.7&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output of this script is an archive file containing all the files necessary
to setup the compiler environment. The file will have a random unique name like
“ddaea39ca1a7c88522b185eca04da2d8.tar.bz2” per default. You will need to rename
it to something more expressive.&lt;/p&gt;
&lt;p&gt;Third, copy the generated archive file to board where your code will be compiled
and linked, in this case WebKitGTK+.&lt;/p&gt;
&lt;p&gt;For the purpose of this text, I assume that the board has already installed and
configured the icecc daemon. Beside, I use &lt;a href=&quot;https://ccache.samba.org/&quot;&gt;ccache&lt;/a&gt;
too. Hence my environment variables are more or less like these:&lt;/p&gt;
&lt;p&gt;CCACHE_PREFIX=icecc CCACHE_DIR=/mnt/hd/.ccache # /mnt/hd is a mounted hard disk
through USB. PATH=/usr/lib/ccache:… # where Debian sets the compiler’s
symbolic links&lt;/p&gt;
&lt;p&gt;Finally, the last pour of magic is the environment variable ICECC_VERSION. This
variable needs to have this pattern&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;native_archive_file&amp;gt;(,&amp;lt;platform&amp;gt;:&amp;lt;cross_archive_file&amp;gt;=&amp;lt;target&amp;gt;)*.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Where &amp;lt;native_archive_file&amp;gt; is the archive file with the native tool-chain.
&amp;lt;platform&amp;gt; is the host hardware architecture. &amp;lt;cross_archive_file&amp;gt; is the
archive file with the cross tool-chain. &amp;lt;target&amp;gt; is the target architecture of
the cross tool-chain.&lt;/p&gt;
&lt;p&gt;In my case, the target is not needed because I’m doing native compilation in
&lt;em&gt;armhf&lt;/em&gt;. Hence, my ICECC_VERSION environment variable looks like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ICECC_VERSION=/mnt/hd/tc/native-compiler.tar.gz,x86_64:/mnt/hd/tc/arm-x86-compiler.tar.gz&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And that’s it! Now I’m using the big iron available in the office, reducing the
time of a clean compilation in less than an hour.&lt;/p&gt;
&lt;p&gt;As a final word, I expect that this compilation time will be reduced a bit more
using the new &lt;a href=&quot;http://www.cmake.org/&quot;&gt;cmake&lt;/a&gt; &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=115966&quot;&gt;build infrastructure in
WebKitGTK+&lt;/a&gt;.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Composited video support in WebKitGTK+</title>
		<link href="https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/"/>
		<updated>2013-07-26T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/</id>
		<content type="html">&lt;p&gt;A couple months ago we started to work on adding &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=86410&quot;&gt;support for composited video
in WebKitGTK+&lt;/a&gt;. The objective is
to play video in &lt;a href=&quot;http://www.webkitgtk.org/&quot;&gt;WebKitGTK+&lt;/a&gt; using the hardware
accelerated path, so we could play videos at high definition resolutions
(1080p).&lt;/p&gt;
&lt;h2 id=&quot;how-does-webkit-paint&quot; tabindex=&quot;-1&quot;&gt;How does WebKit paint? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#how-does-webkit-paint&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Basically we can perceive a &lt;a href=&quot;https://en.wikipedia.org/wiki/Web_browser&quot;&gt;browser&lt;/a&gt;
as an application for retrieving, presenting and traversing information on the
Web.&lt;/p&gt;
&lt;p&gt;For the composited video support, we are interested in the presentation task of
the browser. More particularly, in the graphical presentation.&lt;/p&gt;
&lt;p&gt;In WebKit, each HTML element on a web page is stored as a tree of &lt;em&gt;Node&lt;/em&gt; objects
called the &lt;strong&gt;DOM tree&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Then, each &lt;em&gt;Node&lt;/em&gt; that produces visual output has a corresponding
&lt;em&gt;RenderObject&lt;/em&gt;, and they are stored in another tree, called the &lt;strong&gt;Render Tree&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Finally, each &lt;em&gt;RenderObject&lt;/em&gt; is associated with a &lt;em&gt;RenderLayer&lt;/em&gt;. These
&lt;em&gt;RenderLayers&lt;/em&gt; exist so that the elements of the page are composited in the
correct order to properly display overlapping content, semi-transparent
elements, etc.&lt;/p&gt;
&lt;p&gt;It is worth to mention that there is not a one-to-one correspondence between
&lt;em&gt;RenderObjects&lt;/em&gt; and &lt;em&gt;RenderLayers&lt;/em&gt;, and that there is a &lt;strong&gt;RenderLayer tree&lt;/strong&gt; as
well.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/RenderTrees.png&quot; alt=&quot;Render Trees in WebKit&quot;&gt;&lt;figcaption&gt;Render Trees in WebKit (from
&lt;a href=&quot;http://www.chromium.org/developers/design-documents/gpu-accelerated-compositing-in-chrome/&quot;&gt;GPU Accelerated Compositing in
Chrome&lt;/a&gt;).&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;WebKit fundamentally renders a web page by traversing the &lt;strong&gt;RenderLayer tree&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;what-is-the-accelerated-compositing&quot; tabindex=&quot;-1&quot;&gt;What is the accelerated compositing? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#what-is-the-accelerated-compositing&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;WebKit has two paths for rendering the contents of a web page: the &lt;em&gt;software
path&lt;/em&gt; and &lt;em&gt;hardware accelerated path&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;software path&lt;/em&gt; is the traditional model, where all the work is done in the
main CPU. In this mode, &lt;em&gt;RenderObjects&lt;/em&gt; paint themselves into the final bitmap,
compositing a final layer which is presented to the user.&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;hardware accelerated path&lt;/em&gt;, some of the &lt;em&gt;RenderLayers&lt;/em&gt; get their own
backing surface into which they paint. Then, all the backing surfaces are
composited onto the destination bitmap, and this task is responsibility of the
compositor.&lt;/p&gt;
&lt;p&gt;With the introduction of compositing an additional conceptual tree is added: the
&lt;strong&gt;GraphicsLayer tree&lt;/strong&gt;, where each &lt;em&gt;RenderLayer&lt;/em&gt; may have its own
&lt;em&gt;GraphicsLayer&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;hardware accelerated path&lt;/em&gt;, it is used the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Graphics_processing_unit&quot;&gt;GPU&lt;/a&gt; for compositing
some of the &lt;em&gt;RenderLayer&lt;/em&gt; contents.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/AcceleratedCompositing.png&quot; alt=&quot;Accelerated Compositing in WebKit&quot;&gt;&lt;figcaption&gt;Accelerated Compositing in WebKit (from &lt;a href=&quot;http://www.slideshare.net/joone/hardware-acceleration-in-webkit&quot;&gt;Hardware Acceleration in
WebKit&lt;/a&gt;).&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;As &lt;a href=&quot;http://blogs.igalia.com/itoral/2013/06/06/on-webkit-layers-and-accelerated-compositing/&quot;&gt;Iago
said&lt;/a&gt;,
the accelerated compositing, involves offloading the compositing of the
&lt;em&gt;GraphicsLayer&lt;/em&gt; onto the GPU, since it does the compositing very fast, releasing
that burden to the CPU for delivering a better and more responsive user
experience.&lt;/p&gt;
&lt;p&gt;Although there are other options, typically,
&lt;a href=&quot;https://en.wikipedia.org/wiki/OpenGL&quot;&gt;OpenGL&lt;/a&gt; is used to render computing
graphics, interacting with the GPU to achieve hardware acceleration. And WebKit
provides cross-platform implementation to render with OpenGL.&lt;/p&gt;
&lt;h2 id=&quot;how-does-webkit-paint-using-opengl&quot; tabindex=&quot;-1&quot;&gt;How does WebKit paint using OpenGL? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#how-does-webkit-paint-using-opengl&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ideally, we could go from the &lt;strong&gt;GraphicsLayer tree&lt;/strong&gt; directly to OpenGL,
traversing it and drawing the texture-backed layers with a common WebKit
implementation.&lt;/p&gt;
&lt;p&gt;But an abstraction layer was needed because different GPUs may behave
differently, they may offer different extensions, and we still want to use the
&lt;em&gt;software path&lt;/em&gt; if hardware acceleration is not available.&lt;/p&gt;
&lt;p&gt;This abstraction layer is known as the &lt;em&gt;Texture Mapper&lt;/em&gt;, which is a light-weight
&lt;a href=&quot;https://en.wikipedia.org/wiki/Scene_graph&quot;&gt;scene-graph&lt;/a&gt; implementation, which
is specially attuned for an efficient usage of the GPU.&lt;/p&gt;
&lt;p&gt;It is a combination of a specialized accelerated drawing context
(&lt;em&gt;TextureMapper&lt;/em&gt;) and a scene-graph (&lt;em&gt;TextureMapperLayer&lt;/em&gt;):&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;TextureMapper&lt;/em&gt; is an abstract class that provides the necessary drawing
primitives for the scene-graph. Its purpose is to abstract different
implementations of the drawing primitives from the scene-graph.&lt;/p&gt;
&lt;p&gt;One of the implementations is the &lt;em&gt;TextureMapperGL&lt;/em&gt;, which provides a
GPU-accelerated implementation of the drawing primitives, using
&lt;a href=&quot;https://en.wikipedia.org/wiki/Shader&quot;&gt;shaders&lt;/a&gt; compatible with GL/ES 2.0.&lt;/p&gt;
&lt;p&gt;There is a &lt;em&gt;TextureMapperLayer&lt;/em&gt; which may represent a &lt;em&gt;GraphicsLayer&lt;/em&gt; node in
the GPU-renderable layer tree. The &lt;strong&gt;TextureMapperLayer tree&lt;/strong&gt; is equivalent to
the &lt;strong&gt;GraphicsLayer tree&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;how-does-webkitgtk-play-a-video&quot; tabindex=&quot;-1&quot;&gt;How does WebKitGTK+ play a video? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#how-does-webkitgtk-play-a-video&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As we stated earlier, in WebKit each HTML element, on a web page, is stored as a
&lt;em&gt;Node&lt;/em&gt; in the &lt;strong&gt;DOM tree&lt;/strong&gt;. And WebKit provides a &lt;em&gt;Node&lt;/em&gt; class hierarchy for all
the HTML elements. In the case of the video tag there is a parent class called
&lt;em&gt;HTMLMediaElement&lt;/em&gt;, which aggregates a common, cross platform, media player. The
&lt;em&gt;MediaPlayer&lt;/em&gt; is a decorator for a platform-specific media player known as
&lt;em&gt;MediaPlayerPrivate&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;All previously said is shown in the next diagram.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/VideoWebKit.png&quot; alt=&quot;Video in WebKit&quot;&gt;&lt;figcaption&gt;Video in WebKit. Three layers from
top to bottom&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In the GTK+ port the audio and video decoding is done with
&lt;a href=&quot;http://gstreamer.freedesktop.org/&quot;&gt;GStreamer&lt;/a&gt;. In the case of video, a special
GStreamer video sink injects the decoded buffers into the WebKit process. You
can think about it as a special kind of
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html&quot;&gt;GstAppSink&lt;/a&gt;,
and it is part of the WebKitGTK+ code-base.&lt;/p&gt;
&lt;p&gt;And we come back to the two paths for content rendering in WebKit:&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;software path&lt;/em&gt; the decoded video buffers are copied into a
&lt;a href=&quot;http://www.cairographics.org/&quot;&gt;Cairo&lt;/a&gt; surface.&lt;/p&gt;
&lt;p&gt;But in the &lt;em&gt;hardware accelerated path&lt;/em&gt;, the decoded video buffers shall be
uploaded into a &lt;a href=&quot;https://www.opengl.org/wiki/Texture&quot;&gt;OpenGL texture&lt;/a&gt;. When a
new video buffer is available to be shown, a message is sent to the
&lt;em&gt;GraphicsLayer&lt;/em&gt; asking for redraw.&lt;/p&gt;
&lt;h2 id=&quot;uploading-video-buffers-into-gl-textures&quot; tabindex=&quot;-1&quot;&gt;Uploading video buffers into GL textures &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#uploading-video-buffers-into-gl-textures&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When we are dealing with big enough buffers, such as the high definition video
buffers, copying buffers is a performance killer. That is why
&lt;a href=&quot;https://en.wikipedia.org/wiki/Zero-copy&quot;&gt;zero-copy&lt;/a&gt; techniques are mandatory.&lt;/p&gt;
&lt;p&gt;Even more, when we are working on a multi-processor environment, such as those
where we have a CPU and a GPU, switching buffers among processor’s contexts, is
also very expensive.&lt;/p&gt;
&lt;p&gt;It is because of these reasons, that the video decoding and the OpenGL texture
handling, should happen only in the GPU, without context switching and without
copying memory chunks.&lt;/p&gt;
&lt;p&gt;The simplest approach could be that decoder deliver an
&lt;a href=&quot;https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_image_base.txt&quot;&gt;EGLImage&lt;/a&gt;,
so we could blend the handle into the texture. As far as I know, the
&lt;a href=&quot;http://gstreamer.freedesktop.org/releases/gst-omx/1.0.0.html&quot;&gt;gst-omx&lt;/a&gt; video
decoder in the Raspberry Pi, works in this way.&lt;/p&gt;
&lt;p&gt;GStreamer added a &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2013/04/08/gstreamer-hackfest-2013-milan/&quot;&gt;new
API&lt;/a&gt;,
that will be available in the version 1.2, to upload video buffers into a
texture efficiently: &lt;code&gt;GstVideoGLTextureUploadMeta&lt;/code&gt;. This API is exposed through
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMeta.html&quot;&gt;buffer’s
metadata&lt;/a&gt;,
and ought be implemented by any downstream element that deals with the decoded
video frames, most commonly the video decoder.&lt;/p&gt;
&lt;p&gt;For example, in &lt;a href=&quot;https://gitorious.org/vaapi/gstreamer-vaapi&quot;&gt;gstreamer-vaapi&lt;/a&gt;
there are a &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=703236&quot;&gt;couple patches&lt;/a&gt;
(which still are a work-in-progress) in bugzilla, enabling this API. In the low
level, calling &lt;code&gt;gst_video_gl_texture_upload_meta_upload()&lt;/code&gt; will call
&lt;a href=&quot;http://lists.freedesktop.org/archives/libva/2009-August/000033.html&quot;&gt;vaCopySurfaceGLX()&lt;/a&gt;,
which will do an efficient copy of the VA-API surface into a texture using a
&lt;a href=&quot;https://en.wikipedia.org/wiki/GLX&quot;&gt;GLX&lt;/a&gt; extension.&lt;/p&gt;
&lt;h2 id=&quot;demo&quot; tabindex=&quot;-1&quot;&gt;Demo &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#demo&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is an old demo, when all the pieces started to fit, but no the current
performance. Still, it shows what has been achieved:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ekt3oj5oApo&quot;&gt;https://www.youtube.com/watch?v=ekt3oj5oApo&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;future-work&quot; tabindex=&quot;-1&quot;&gt;Future work &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/composited-video-support-in-webkitgtk/#future-work&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So far, all these bits are already integrated in WebKitGTK+ and GStreamer.
Nevertheless there are some open issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;gstreamer-vaapi et all: GStreamer 1.2 is not released yet, and its new API
might change. Also, the &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=698054&quot;&gt;port of gstreamer-vaapi to GStreamer
1.2&lt;/a&gt; is still a work in
progress, where the available patches may have rough areas.Also, there are
many other projects that need to be updated with this new API, such as
&lt;a href=&quot;https://developer.gnome.org/clutter-gst/stable/&quot;&gt;clutter-gst&lt;/a&gt; and provide
more feedback to the community. Another important thing is to have more
GStreamer elements implementing these new API, such as the texture upload and
the caps features&lt;/li&gt;
&lt;li&gt;Tearing: The composited video task unveiled a major problem in WebKitGTK+: it
does not handle the &lt;a href=&quot;https://en.wikipedia.org/wiki/Vertical_blanking_interval&quot;&gt;vertical blank
interval&lt;/a&gt; at all,
causing &lt;a href=&quot;https://en.wikipedia.org/wiki/Screen_tearing&quot;&gt;tearing artifacts&lt;/a&gt;,
clearly observable in high resolutions videos with high motion.WebKitGTK+
composites the scene off-screen, using &lt;a href=&quot;http://freedesktop.org/wiki/Software/CompositeExt/&quot;&gt;X
Composite&lt;/a&gt; redirected
window, and then display it at a &lt;a href=&quot;http://www.freedesktop.org/wiki/Software/XDamage/&quot;&gt;X
Damage&lt;/a&gt; callback, but
currently, GTK+ does not take care of the vertical blank interval, causing
this tearing artifact in heavy compositions. At
&lt;a href=&quot;http://www.igalia.com/&quot;&gt;Igalia&lt;/a&gt;, we are currently researching for a way to
fix this issue.&lt;/li&gt;
&lt;li&gt;Performance: There is always room for performance improvement. And we are
always aiming in that direction, improving the frame rate, the CPU, GPU and
memory usage, et cetera. So, keep tuned, or even better, come and help us.&lt;/li&gt;
&lt;/ul&gt;
</content>
	</entry>
	
	<entry>
		<title>GPhone v0.2</title>
		<link href="https://blogs.igalia.com/vjaquez/gphone-v0-2/"/>
		<updated>2013-05-05T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gphone-v0-2/</id>
		<content type="html">&lt;p&gt;It is almost 5 months since I published the &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2013/01/28/announcing-gphone-v0-10/&quot; title=&quot;Announcing GPhone v0.10&quot;&gt;first release of
GPhone&lt;/a&gt;. Though I haven’t abandoned it, I swork on it slowly
but steadily. And to prove it, I’m releasing a new version, the v0.2.What does it include? Mainly bug fixes. The new features are still a work in
progress. You can browse the &lt;em&gt;next&lt;/em&gt; branch in git to glance it.&lt;/p&gt;
&lt;p&gt;Change Log:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Able to use GSimpleAsyncResult for glib &amp;lt;= 2.35&lt;/li&gt;
&lt;li&gt;Added Vala (0.16) back compatibility, including a gstreamer-1.0.vapi&lt;/li&gt;
&lt;li&gt;Added a script for build and update a jhbuild environment: update-jhbuild-env.
It handles the gphone’s dependencies.&lt;/li&gt;
&lt;li&gt;Notify to the user if his NAT type is not compatible with a VoIP session.&lt;/li&gt;
&lt;li&gt;Renamed accounts to registrars.&lt;/li&gt;
&lt;li&gt;Handle networking signaling&lt;/li&gt;
&lt;li&gt;Create a global header file&lt;/li&gt;
&lt;li&gt;Many bug fixes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/ceyusa/gphone/tags&quot;&gt;https://github.com/ceyusa/gphone/tags&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Hackfest 2013 - Milan</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/"/>
		<updated>2013-04-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/</id>
		<content type="html">&lt;p&gt;Last week, from 28th to 31th of March, some of us &lt;a href=&quot;http://gstreamer.freedesktop.org/wiki/GStreamerHackfest2013&quot;&gt;gathered at
Milan&lt;/a&gt; to hack some
bits of the GStreamer internals. For me was a great experience interact with
great hackers such as Sebastian Dröge, Wim Taymans, Edward Hervey, Alessandro
Decina and many more. We talked about GStreamer and, more particularly, we
agreed on new features which I would like to discuss here.&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/13030006_2.jpg&quot; alt=&quot;GStreamer Hackers at Milan&quot;&gt;&lt;/p&gt;
&lt;p&gt;For sake of completeness, let me say that I have been interested in hardware
accelerated multimedia for a while, and just lately I started to wet my feet in
&lt;a href=&quot;http://www.freedesktop.org/wiki/Software/vaapi&quot;&gt;VAAPI&lt;/a&gt; and
&lt;a href=&quot;http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/&quot;&gt;VDPAU&lt;/a&gt;, and their
support in our beloved GStreamer.&lt;/p&gt;
&lt;h2 id=&quot;gstcontext&quot; tabindex=&quot;-1&quot;&gt;GstContext &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/#gstcontext&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The first feature that reached upstream is the GstContext. Historically, in
2011, Nicolas Dufresne added GstVideoContext as an interface to a share video
context (such as display name, X11 display, VA-API display, etc.) among the
pipeline elements and the applications. But now, Sebastian, generalized the
interface to a container to stores and shares any kind of contexts between
multiple elements and the application.&lt;/p&gt;
&lt;p&gt;The first approach, that is still living in gst-plugins-bad, was merely a
wrapper to a custom
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-query.txt&quot;&gt;query&lt;/a&gt;
to set or request a video context. But now, the context sharing is &lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=b90906103104216aad85ea262a97340280e70369&quot;&gt;part of the
pipeline
setup&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An element that needs a shared context must follow these actions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check if the element already has a context&lt;/li&gt;
&lt;li&gt;Query downstream for the context&lt;/li&gt;
&lt;li&gt;Post a
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-messages.txt&quot;&gt;message&lt;/a&gt;
in the bus to see if the application has one to share.&lt;/li&gt;
&lt;li&gt;Create the context if there is none, post a message and send an event letting
know that the element has the context.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can see the &lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=ce9b6e5afb52eb04802aa690a8868cac4eb475ab&quot;&gt;example of the
eglglessink&lt;/a&gt;
to know how to use this feature.&lt;/p&gt;
&lt;h2 id=&quot;gstvideogltextureuploadmeta&quot; tabindex=&quot;-1&quot;&gt;GstVideoGLTextureUploadMeta &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/#gstvideogltextureuploadmeta&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Also in 2011, Nicolas Dufresne, added a helper class to upload a buffer into a
surface (OpenGL texture, VA API surface, Wayland surface, etc.). This is quite
important since the new video players are scene based, using framework such as
Clutter or OpenGL directly, where the video display is composed by various
actors, such as the multimedia controls widgets.&lt;/p&gt;
&lt;p&gt;But still, this interface didn’t fit well for GStreamer 1.0, until now, where it
was introduced in the figure of a buffer’s
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-meta.txt&quot;&gt;meta&lt;/a&gt;,
though this meta is only specific for OpenGL textures. If the buffer provides
this new
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=5f79a8cb933e1b2a1fad54d854ff89495e621333&quot;&gt;GstVideoGLTextureUploadMeta&lt;/a&gt;
meta, a new function gst_video_gl_texture_upload_meta_upload() is available to
upload that buffer into an OpenGL texture specified by its numeric identifier.&lt;/p&gt;
&lt;p&gt;Obviously, in order to use this meta, it should be proposed for allocation by
the sink. Again, you can see the &lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=3233c6163ac22b4228bf4231a4a370710da34de7&quot;&gt;case of
eglglessink&lt;/a&gt;
as example.&lt;/p&gt;
&lt;h2 id=&quot;caps-features&quot; tabindex=&quot;-1&quot;&gt;Caps Features &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/#caps-features&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=7477b25df517a0a5f499a61bb621731c2025815e&quot;&gt;caps
features&lt;/a&gt;
are a new data type for specify a specific extension or requirement for the
handled media.&lt;/p&gt;
&lt;p&gt;From the practical point of view, we can say that caps structures with the same
name but with a non-equal set of caps features are not compatible, and, if a pad
supports multiple sets of features it has to add multiple equal structures with
different feature sets to the caps.&lt;/p&gt;
&lt;p&gt;Empty GstCapsFeatures are equivalent with the GstCapsFeatures handled by the
common system memory. Other examples would be a specific
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-memory.txt&quot;&gt;memory&lt;/a&gt;
types or the requirement of having a specific meta on the buffer.&lt;/p&gt;
&lt;p&gt;Again, we can see the example of the &lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=1acde42b6e38dcd2c75a2205eeb4867ac07ef16b&quot;&gt;capsfeatures in
eglglessink&lt;/a&gt;,
because now the gst-inspect also shows the caps feature of the pads:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;    Pad Templates:&lt;br&gt;      SINK template: &#39;sink&#39;&lt;br&gt;        Availability: Always&lt;br&gt;        Capabilities:&lt;br&gt;          video/x-raw(memory:EGLImage)&lt;br&gt;                     format: { RGBA, BGRA, ARGB, ABGR, RGBx,&lt;br&gt;                               BGRx, xRGB, xBGR, AYUV, Y444,&lt;br&gt;                               I420, YV12, NV12, NV21, Y42B,&lt;br&gt;                               Y41B, RGB, BGR, RGB16 }&lt;br&gt;                      width: [ 1, 2147483647 ]&lt;br&gt;                     height: [ 1, 2147483647 ]&lt;br&gt;                  framerate: [ 0/1, 2147483647/1 ]&lt;br&gt;          video/x-raw(meta:GstVideoGLTextureUploadMeta)&lt;br&gt;                     format: { RGBA, BGRA, ARGB, ABGR, RGBx,&lt;br&gt;                               BGRx, xRGB, xBGR, AYUV, Y444,&lt;br&gt;                               I420, YV12, NV12, NV21, Y42B,&lt;br&gt;                               Y41B, RGB, BGR, RGB16 }&lt;br&gt;                      width: [ 1, 2147483647 ]&lt;br&gt;                     height: [ 1, 2147483647 ]&lt;br&gt;                  framerate: [ 0/1, 2147483647/1 ]&lt;br&gt;          video/x-raw&lt;br&gt;                     format: { RGBA, BGRA, ARGB, ABGR, RGBx,&lt;br&gt;                               BGRx, xRGB, xBGR, AYUV, Y444,&lt;br&gt;                               I420, YV12, NV12, NV21, Y42B,&lt;br&gt;                               Y41B, RGB, BGR, RGB16 }&lt;br&gt;                      width: [ 1, 2147483647 ]&lt;br&gt;                     height: [ 1, 2147483647 ]&lt;br&gt;                  framerate: [ 0/1, 2147483647/1 ]&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;parsers-meta&quot; tabindex=&quot;-1&quot;&gt;Parsers meta &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/#parsers-meta&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a feature which has been pulled by Edward Hervey. The idea is that the
video codec parsers (H264, MPEG, VC1) attach a meta into the buffer with a
defined structure that carries that new information provided by the codified
stream.&lt;/p&gt;
&lt;p&gt;This is particularly useful by the decoders, which will not have to parse again
the buffer in order to extract the information they need to decode the current
buffer and the following.&lt;/p&gt;
&lt;p&gt;For example, here is the &lt;a href=&quot;http://cgit.freedesktop.org/~bilboed/gst-plugins-bad/tree/gst-libs/gst/codecparsers/gsth264meta.h?h=vdpau&quot;&gt;H264 parser
meta&lt;/a&gt;
definition.&lt;/p&gt;
&lt;h2 id=&quot;vdpau&quot; tabindex=&quot;-1&quot;&gt;VDPAU &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013-milan/#vdpau&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Another task pulled by Edward Hervey, for which I feel excited, is the port of
VDPAU decoding elements to GStreamer 1.0.&lt;/p&gt;
&lt;p&gt;Right now only the MPEG decoder is upstreamed, but MPEG4 and H264 are coming.&lt;/p&gt;
&lt;p&gt;As a final note, I want to thank &lt;a href=&quot;http://collabora.com/&quot;&gt;Collabora&lt;/a&gt; and
&lt;a href=&quot;http://fluendo.com/&quot;&gt;Fluendo&lt;/a&gt; for sponsoring dinners. A special thank you, as
well, for &lt;a href=&quot;http://igalia.com/&quot;&gt;Igalia&lt;/a&gt; which covered my travel expenses and
attendance to the hackfest.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer Hackfest 2013</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013/"/>
		<updated>2013-03-26T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-hackfest-2013/</id>
		<content type="html">&lt;p&gt;Next Thursday I’ll be flying to Milan to attend the &lt;a href=&quot;http://gstreamer.freedesktop.org/wiki/GStreamerHackfest2013&quot;&gt;2013 edition of the
GStreamer
Hackfest&lt;/a&gt;. My main
interests are hardware codecs and GL integration, particularly VA API integrated
with GL-based sinks.Thanks &lt;a href=&quot;http://www.igalia.com/&quot; title=&quot;Igalia&quot;&gt;Igalia&lt;/a&gt; for sponsoring my trip!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Igalia (three) week in WebKit: Media controls, Notifications, and Clang build</title>
		<link href="https://blogs.igalia.com/vjaquez/igalia-three-week-in-webkit-media-controls-notifications-and-clang-build/"/>
		<updated>2013-03-04T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/igalia-three-week-in-webkit-media-controls-notifications-and-clang-build/</id>
		<content type="html">&lt;p&gt;Hi all,Three weeks have passed since I wrote the last WebKit report, and they did so
quick that it scares me. Many great things have happened since then.&lt;/p&gt;
&lt;p&gt;Let’s start with my favorite area: multimedia. Phil landed a patch that &lt;a href=&quot;http://wkb.ug/109362&quot;&gt;avoids
muting&lt;/a&gt; the sound if the audio pitch is preserved. And
Calvaris finally landed his great new &lt;a href=&quot;http://wkb.ug/83869&quot;&gt;media controls&lt;/a&gt;. Now
watching videos in WebKitGTK+ is a pleasure.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://bug-83869-attachments.webkit.org/attachment.cgi?id=183575&quot; alt=&quot;Video
controls&quot;&gt;&lt;figcaption&gt;Video controls&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Rego keeps his work on adding &lt;a href=&quot;http://wkb.ug/108976&quot;&gt;more tests&lt;/a&gt; to WebKitGTK+,
also he also wrote a fine document on &lt;a href=&quot;https://live.gnome.org/Epiphany/Development#Getting_the_code_and_building&quot;&gt;how to build
Epiphany&lt;/a&gt;
with WK2 from git/svn.&lt;/p&gt;
&lt;p&gt;Claudio, besides his work in the &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2013/01/24/weekly-igalias-report-on-webkit-2/&quot;&gt;snapshots
API&lt;/a&gt;
that we already commented, retook the implementation of the &lt;a href=&quot;http://wkb.ug/61140&quot;&gt;notifications
API&lt;/a&gt; for WebKitGTK+. And, while implementing it, he fixed
some crashers in WK2’s implementation. He has also given us an early screencast
with the status of the notifications implementation: &lt;a href=&quot;http://people.gnome.org/~csaavedra/2013-02-08-notifications.webm&quot;&gt;Check it
out!&lt;/a&gt; (video).&lt;/p&gt;
&lt;p&gt;Carlos García Campos, besides working hard on the stable and development
releases of WebKitGTK+ library, has also &lt;a href=&quot;http://wkb.ug/104676&quot;&gt;landed&lt;/a&gt; a
&lt;a href=&quot;http://wkb.ug/110125&quot;&gt;couple&lt;/a&gt; of &lt;a href=&quot;http://wkb.ug/110190&quot;&gt;fixes&lt;/a&gt;. Meanwhile, Dape
removed &lt;a href=&quot;http://wkb.ug/85299&quot;&gt;some dependencies&lt;/a&gt;, making the code base more
clean.&lt;/p&gt;
&lt;p&gt;Žan, untiredly, has been poking all around the WebKit project, keeping the GTK
port kicking and healthy: He &lt;a href=&quot;http://wkb.ug/108955&quot;&gt;fixed&lt;/a&gt;
&lt;a href=&quot;http://wkb.ug/109040&quot;&gt;code&lt;/a&gt;; cleaned up &lt;a href=&quot;http://wkb.ug/99272&quot;&gt;scripts&lt;/a&gt;,
&lt;a href=&quot;http://wkb.ug/110582&quot;&gt;autogenerated&lt;/a&gt; code and enhanced &lt;a href=&quot;http://wkb.ug/107528&quot;&gt;utility
scripts&lt;/a&gt;; he also &lt;a href=&quot;http://wkb.ug/109471&quot;&gt;enabled&lt;/a&gt;
&lt;a href=&quot;http://wkb.ug/109475&quot;&gt;more&lt;/a&gt; &lt;a href=&quot;http://wkb.ug/109474&quot;&gt;tests&lt;/a&gt; in the development
builds. But his most impressive work in progress is enabling the &lt;a href=&quot;http://wkb.ug/109314&quot;&gt;Clang build of
the GTK port&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But there’s more! Žan setup a web page were you can visualize the status of
WebKit2 on several ports: &lt;a href=&quot;http://www.iswk2buildbrokenyet.com/&quot;&gt;http://www.iswk2buildbrokenyet.com/&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Igalia week in WebKit: Fixes, gardening, resources API and MathML</title>
		<link href="https://blogs.igalia.com/vjaquez/igalia-week-in-webkit-fixes-gardening-resources-api-and-mathml/"/>
		<updated>2013-02-01T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/igalia-week-in-webkit-fixes-gardening-resources-api-and-mathml/</id>
		<content type="html">&lt;p&gt;It is time for another weekly report on what is going on WebKit and Igalia.Sergio &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107261&quot;&gt;reported&lt;/a&gt; and
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107240&quot;&gt;helped&lt;/a&gt; to
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106903&quot;&gt;debug&lt;/a&gt; different crashes in
WebKit accessibility. He improved the robustness of
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106769&quot;&gt;build-webkit&lt;/a&gt;. Also, he fixed a
bug in the defined &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107646&quot;&gt;network buffer
size&lt;/a&gt;, simplified a bit the code
that close the network connections, and fixed a &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=692310&quot;&gt;bug in
libsoup&lt;/a&gt; within a &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107439&quot;&gt;crash in
webkit&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And this week we have a new face too, at least in these reports: Adrián. He
enabled the &lt;a href=&quot;http://opus-codec.org/&quot;&gt;opus codec&lt;/a&gt; in the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=98759&quot;&gt;MIME type
list&lt;/a&gt;. After that, he decided to
give a try to a &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=108083&quot;&gt;native compilation in
armv5tel&lt;/a&gt; board. Crazy? A bit,
but fun too.&lt;/p&gt;
&lt;p&gt;Rego continues his hard work on enabling tests for WebKitGTK+, like testing the
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107131&quot;&gt;text direction setting&lt;/a&gt;, or
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107660&quot;&gt;unflag blocked tests&lt;/a&gt; that
already pass, and many other that are still work in progress. Also, he got
landed his patch for the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106908&quot;&gt;bug found in the
GtkLauncher&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Claudio, whilst he waits for the review of his API to retrieve a snapshot, he
retook the Notifications API work for WebKitGTK+, particularly for WebKit2.
Also, and just for sake of landing something, he fixed a couple of minor
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107934&quot;&gt;compilation&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107945&quot;&gt;glitches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Philippe still kicking the
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106760&quot;&gt;fullscreen&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107398&quot;&gt;support&lt;/a&gt; in WebKit using
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=108005&quot;&gt;GStreamer&lt;/a&gt;. And for relaxing
purposes, he updated this patch for
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=78883&quot;&gt;AudioSourceProvider&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Žan works tirelessly keeping the bots working as good as possible: &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107435&quot;&gt;disabling
the build of wk2 on EWSs&lt;/a&gt;,
meanwhile the wk2 storm appeases; &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107537&quot;&gt;cleaned building configuration
options&lt;/a&gt;, &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=102252&quot;&gt;removed deprecated
methods for unit tests&lt;/a&gt;,
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107528&quot;&gt;enhanced the webkit-patch
script&lt;/a&gt; and much more. Besides
this needed work, he also started to hack on completing the WTFURL
implementation for the WebCore’s KURL interface. WTFURL is pretty much what
WebKit (as a project) would like to use in the future. WTFURL is based on the
GoogleURL code (which is what the Chromium port is at the moment using as the
backend of KURL).&lt;/p&gt;
&lt;p&gt;The great WebKit hacker, Martin Robinson is exploring uncharted territory in the
project: He’s trying to get away from port-specific things, by scratching in the
core stuff, but the serendipity showed up, so he found some pretty serious
port-specific bugs that have relatively straight-forward fixes.&lt;/p&gt;
&lt;p&gt;Martin started to work on MathML and noticed that WebKit MathML support for the
&lt;a href=&quot;http://www.w3.org/TR/MathML2/chapter3.html#presm.symbolchars&quot;&gt;mathvariant
attribute&lt;/a&gt; is
unfinished. And this issue led him done to set of patches to overcome this
situation, like fixing the &lt;a href=&quot;https://bugs.webkit.org/vjaquez/show_bug.cgi?id=107733&quot;&gt;freetype&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=108102&quot;&gt;usage&lt;/a&gt;, or adding the logic to
&lt;a href=&quot;https://bugs.webkit.org/vjaquez/show_bug.cgi?id=107505&quot;&gt;append UChar32 onto StringBuilder&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In addition to all this work, Martin is working on a patch for mathvariant
itself. The mathvariant attribute allows easily using the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols&quot;&gt;Mathematical
Alphanumeric
Symbols&lt;/a&gt; in
MathML without having to type out XML entities. For instance this:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;mi&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;mathvariant&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;fraktur&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;HI GUYZ!&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;mi&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;will be rendered like this:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/mathvariant.png&quot; alt=&quot;Output&quot;&gt;&lt;figcaption&gt;output&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Carlos García Campos cooked a patch for fixing the WebKit2 GTK+ API by
implementing the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107457&quot;&gt;resources
API&lt;/a&gt;, removed recently, using
injected bundle. This is another effort to bring back WebKit2 into WebKitGTK+.&lt;/p&gt;
&lt;p&gt;Dape is still pushing the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=105034&quot;&gt;Qt/WebKit2 spellcheck
support&lt;/a&gt; with a new iteration of
the patch. He also worked on the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=85299&quot;&gt;removal of the GDK
dependency&lt;/a&gt; from ImageDiff.&lt;/p&gt;
&lt;p&gt;Finally, I finished a first iteration of my patch for &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=31155&quot;&gt;pitch
preservation&lt;/a&gt;, and also it got
landed!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Announcing GPhone v0.10</title>
		<link href="https://blogs.igalia.com/vjaquez/announcing-gphone-v0-10/"/>
		<updated>2013-01-28T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/announcing-gphone-v0-10/</id>
		<content type="html">&lt;p&gt;Hi folks!As many of you may know, lately I have been working on
&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2012/09/25/the-thrilling-story-about-the-h-239-support-in-ekiga/&quot; title=&quot;The thrilling story about the H.239 support in Ekiga&quot;&gt;Ekiga&lt;/a&gt; and
&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2013/01/21/two-video-streams-simultaneously-in-ekiga/&quot; title=&quot;Two video streams simultaneously in Ekiga&quot;&gt;Opal&lt;/a&gt;. And, as usually happens to me, I
started to wonder how I would re-write that piece of software. My main ideas
growth clearly: craft a GObject library, ala WebKitGTK+, wrapping Opal’s
classes, paying attention to the gobject-introspection, also, redirecting the
Opal’s multimedia rendering to a GStreamer player, and, finally, write the
application with Vala.&lt;/p&gt;
&lt;p&gt;The curiosity itched me hard, so I started to hack, from time to time, these
ideas. In mid-November, last year, I had &lt;a href=&quot;https://mail.gnome.org/archives/ekiga-list/2012-November/msg00038.html&quot;&gt;a functional
prototype&lt;/a&gt;,
which only could make phone calls in a disgraceful user interface. But I got my
proof of concept. Nonetheless, as I usually do, I didn’t dropped the pet
project, continuing the development of more features.&lt;/p&gt;
&lt;p&gt;And today, I am pleased to present you, the &lt;a href=&quot;https://github.com/ceyusa/gphone&quot;&gt;release v0.1 of
GPhone&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Well, I guess a screencast is mandatory nowadays:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=uLXuF1a3V5I&quot;&gt;http://www.youtube.com/watch?v=uLXuF1a3V5I&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Igalia WebKit week: welcome Žan and Rego!</title>
		<link href="https://blogs.igalia.com/vjaquez/igalia-webkit-week-welcome-zan-and-rego/"/>
		<updated>2013-01-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/igalia-webkit-week-welcome-zan-and-rego/</id>
		<content type="html">&lt;p&gt;This a new weekly WebKit Igalia’s report. And the last week has been a shaky
one.Let’s start with a warm welcome to Žan Doberšek as collaborator student, who is
working hard in a lot of cool matters: gardening the bots, cleaning up the
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107036&quot;&gt;Coverity run&lt;/a&gt; output, modifying
the WebCoreTestSupport to decrease the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=97655&quot;&gt;dependency WebKit2
API&lt;/a&gt;, digging in a &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=104684&quot;&gt;stack size
problem in JSC&lt;/a&gt;, and much more
fun stuff.&lt;/p&gt;
&lt;p&gt;Meanwhile Joanie, after a lot of restless hacking hours, could fix a &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107261&quot;&gt;crash in
tables accessibility&lt;/a&gt;, and
saving us from &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106922&quot;&gt;many other accessibility
crashes&lt;/a&gt;. She is working to make
the world safer for table users everywhere!&lt;/p&gt;
&lt;p&gt;But we have more new faces around: Our dear colleague, Rego, is getting his feet
wet, and he started &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106908&quot;&gt;finding and fixing new
bugs&lt;/a&gt; and he is
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107131&quot;&gt;enabling&lt;/a&gt;
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=107275&quot;&gt;more&lt;/a&gt; tests in the Gtk+ port.&lt;/p&gt;
&lt;p&gt;Calvaris is following his efforts for enhancing the user experience with the
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=83869&quot;&gt;media controls for HTML5&lt;/a&gt;. Here
is a recent screenshot of these controls:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://bug-83869-attachments.webkit.org/attachment.cgi?id=183575&quot; alt=&quot;Video
controls&quot;&gt;&lt;figcaption&gt;Video controls&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;Claudio is pushing the accelerator pedal for the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=98270&quot;&gt;snapshot API in
WebKit2&lt;/a&gt;. With this API the
applications would retrieve a snapshot from a webview as in the &lt;em&gt;Overview mode&lt;/em&gt;
in Epiphany.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/2012-09-03-overview.png&quot; alt=&quot;Epiphany&#39;s overview mode&quot;&gt;&lt;/figure&gt;
&lt;p&gt;Philippe is working on the fullscreen video &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=106760&quot;&gt;porting the GStreamerGWorld module
to GStreamer 1.0&lt;/a&gt;, while he is
still hacking on the
&lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=78883&quot;&gt;AudioSourceProvider&lt;/a&gt; for
WebAudio.&lt;/p&gt;
&lt;p&gt;And the last but not the least, Dape is working real hard on the &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=105034&quot;&gt;Qt spell-check
support&lt;/a&gt;, and he also proposed
solutions for &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=96171&quot;&gt;Qt WebNotification
support&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And that is all for now. See you!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Two video streams simultaneously in Ekiga</title>
		<link href="https://blogs.igalia.com/vjaquez/two-video-streams-simultaneously-in-ekiga/"/>
		<updated>2013-01-21T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/two-video-streams-simultaneously-in-ekiga/</id>
		<content type="html">&lt;p&gt;As we &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2012/09/25/the-thrilling-story-about-the-h-239-support-in-ekiga/&quot;&gt;talked
earlier&lt;/a&gt;,
we added support for H.239 in Ekiga, and we were able to show the main role
video and the slides role video, one stream at the time.But now we did a step forward: we wanted to view both videos simultaneously. So,
we hacked again Ekiga and we added that feature, when a second video stream
arrives, another window is showed with the secondary role stream.&lt;/p&gt;
&lt;p&gt;Here is the mandatory screencast:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=Bj_k0jZ2_aQ&quot;&gt;http://www.youtube.com/watch?v=Bj_k0jZ2_aQ&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Weekly Igalia&#39;s report on WebKit</title>
		<link href="https://blogs.igalia.com/vjaquez/weekly-igalias-report-on-webkit/"/>
		<updated>2013-01-17T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/weekly-igalias-report-on-webkit/</id>
		<content type="html">&lt;p&gt;Hi webkitters,This weekly report project was supposed to start after the last WebKit hackfest,
but my holidays got in between and now I’m recovering of them ;)&lt;/p&gt;
&lt;p&gt;Here we go:&lt;/p&gt;
&lt;p&gt;In summary, in these last three weeks we have had 15 commits and done 23
reviews.&lt;/p&gt;
&lt;p&gt;Martin and Carlos have been working on the authentication mechanisms. Now they
can be hooked ,through the web view API, by the applications, which could take
control of the dialogues and credentials handling.&lt;/p&gt;
&lt;p&gt;Martin has also been dealing with text rendering with complex layouts (such as
Arabic). This effort leaded, finally, to the removal of Pango in favor of
Harfbuzz.&lt;/p&gt;
&lt;p&gt;Now let’s talk about Carlos’ baby monster: the injected bundle patch. As you
know, in WebKit2, the engine has been split in two isolated processes the UI and
Web processes. The first is in charge of the user interface, and the former
deals with HTML, CSS and JavaScript handling. Meanwhile this approach adds more
robustness and responsiveness, also imposes more complexity because it is
required an IPC mechanism to interact with the Web process. This is particularly
hard for accessing to the DOM bindings.&lt;/p&gt;
&lt;p&gt;Carlos, since the last year, has been working on his injected bundle patch,
which offers a mean to &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=105631&quot;&gt;support loading plugins in the web process using
injected bundle&lt;/a&gt;. Hence, through
DBus, an application could load a plugin to communicate, indirectly, with the
Web process. This approach is supposed to be the milestone for the DOM bindings
in WK2GTK, and also provides a mean to pre-fetch DNS registries. This patch has
been happily pushed just recently, in the second week of January.&lt;/p&gt;
&lt;p&gt;If this was not enough, Carlos also released the development version of
&lt;a href=&quot;http://www.webkitgtk.org/?page=download&quot;&gt;WebKitGTK+ v1.11.4&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now let us go to the multimedia realm, my favorite land.&lt;/p&gt;
&lt;p&gt;Philippe finished the port of his patch for
&lt;a href=&quot;http://www.html5rocks.com/en/tutorials/webaudio/intro/&quot;&gt;WebAudio&lt;/a&gt; support to
GStreamer 1.0 as backend. And now he is porting the full-screen support in Gst
0.10 to Gst 1.0 in order to reuse ans share the same base code. Aligned with
WebAudio, Philippe is developing a &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=78883&quot;&gt;new audio source
provider&lt;/a&gt; that gathers raw audio
data from the MediaPlayer and pipe them into the AudioBus if it is required.&lt;/p&gt;
&lt;p&gt;Xabier has been working to deliver a nice and neat &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=83869&quot;&gt;HTML5 media
controls&lt;/a&gt;, using stylable GTK+
controls. And myself, I’m still playing with the audio pitch preservation.&lt;/p&gt;
&lt;p&gt;Another great landmark for us is a11y, and here Joanie has been working hard to
bring back the accessibility tests on GTK to a sane state. And also keeps her
efforts to enable an access to WebKit for Orca.&lt;/p&gt;
&lt;p&gt;In other sort of things, Berto has been fighting against a bug on GtkLaunch,
which was shown in Epiphany too when displaying only images. Meanwhile, Dape,
lurked on spell checking support for Qt WebKit2. And Sergio enabled, by default,
the WebP image handling.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>The thrilling story about the H.239 support in Ekiga</title>
		<link href="https://blogs.igalia.com/vjaquez/the-thrilling-story-about-the-h-239-support-in-ekiga/"/>
		<updated>2012-09-25T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/the-thrilling-story-about-the-h-239-support-in-ekiga/</id>
		<content type="html">&lt;p&gt;The development of &lt;a href=&quot;http://blog.ekiga.net/?p=158&quot;&gt;Ekiga 4.0&lt;/a&gt; has begun, and
three months ago I started a project aimed to support H.239 in
&lt;a href=&quot;http://wiki.ekiga.org/index.php/Main_Page&quot;&gt;Ekiga&lt;/a&gt;.&lt;a href=&quot;http://www.itu.int/rec/T-REC-H.239&quot;&gt;H.239 is an ITU recommendation&lt;/a&gt; and it is
titled &lt;em&gt;“Role management and additional media channels for H.300-series
terminals”&lt;/em&gt;. Its purpose is the definition of procedures for use more than one
video channel, and for labelling those channels with a &lt;em&gt;role&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;A traditional video-conference has an audio channel, a video channel and an
optional data channel. The video channel typically carries the camera image of
the participants. The H.239 recommendation defines rules and messages for
establishing an additional video channel, often to transmit presentation slides,
while still transmitting the video of the presenter.&lt;/p&gt;
&lt;p&gt;For presentations in multi-point conferencing, H.239 defines token procedures to
guarantee that only one endpoint in the conference sends the additional video
channel which is then distributed to all conference participants.&lt;/p&gt;
&lt;p&gt;Ekiga depends on &lt;a href=&quot;http://www.opalvoip.org/&quot;&gt;Opal&lt;/a&gt;, a library that implements,
among other things, the protocols used to send voice over IP networks (VoIP).
And, according to the documentation, Opal had already support for H.239 since a
while, for what we assumed that enable it in Ekiga would be straight forward.&lt;/p&gt;
&lt;p&gt;After submitting &lt;a href=&quot;http://sourceforge.net/tracker/?func=browse&amp;amp;group_id=204472&amp;amp;atid=989750&amp;amp;submitter=ceyusa&quot;&gt;a few
patches&lt;/a&gt;
to Opal and its base library, PTlib, then I setup a jhbuild environment to
automate the building of Ekiga and &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=678958&quot;&gt;its
dependencies&lt;/a&gt;. Soon, I
realized that the task was not going to be as simple as we initially assumed:
the support for &lt;a href=&quot;https://en.wikipedia.org/wiki/H.323&quot;&gt;H.323&lt;/a&gt;, in Ekiga, &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=678839&quot;&gt;is
not&lt;/a&gt; &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=682044&quot;&gt;as
mature&lt;/a&gt; as the SIP support.&lt;/p&gt;
&lt;p&gt;I have to mention that along the development process, in order to test my
scratched code, I used this &lt;a href=&quot;http://www.rsdevs.com/h239.shtml#compat&quot;&gt;H.239 application
sample&lt;/a&gt;, a small MS Windows program
which streams two video channels (the main role and the slides role). The good
news is that it works fine in Wine.&lt;/p&gt;
&lt;p&gt;Well, the true is that the &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=681310&quot;&gt;activation of the client support for H.239 in Ekiga
was easy&lt;/a&gt;. The real problem
began with the video output mechanism. Ekiga has a highly complex design for
drawing video frames. Too complex in my opinion. One of the first thing I did to
understand the video frames display, was to sketch a sequence diagram from when
a decoded frame is delivered by Opal to when the frame is displayed in the
screen. And here is the result:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/sequence-show-frame-300x134.png&quot; alt=&quot;Sequence frame&quot;&gt;&lt;figcaption&gt;Sequence frame&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;As I said, it is too complex for me, but the second stream had to be displayed.
Fearfully, I started to
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=682358&quot;&gt;refactor&lt;/a&gt;
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=682358&quot;&gt;some&lt;/a&gt;
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=682489&quot;&gt;code&lt;/a&gt; inside Ekiga and
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=682387&quot;&gt;adding more parameters&lt;/a&gt; to
handle another video stream. But finally, I just stepped forward, and &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=683456&quot;&gt;submitted
a bunch of patches&lt;/a&gt; that
finally displays a second stream.&lt;/p&gt;
&lt;p&gt;The current outcome is shown in the next screen cast: &lt;a href=&quot;http://people.igalia.com/vjaquez/videos/ekiga-h239.ogv&quot;&gt;Screencast Ekiga
H.239&lt;/a&gt; (OGV / 7.8M)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>A GStreamer Video Sink using KMS</title>
		<link href="https://blogs.igalia.com/vjaquez/a-gstreamer-video-sink-using-kms/"/>
		<updated>2012-06-20T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/a-gstreamer-video-sink-using-kms/</id>
		<content type="html">&lt;p&gt;The purpose of this blog post is to show the concepts related to the
&lt;a href=&quot;https://gitorious.org/vjaquez-gstreamer/gst-plugins-bad/trees/kmssink/sys/kms&quot;&gt;GstKMSSink&lt;/a&gt;,
a new video sink for GStreamer 1.0, co-developed by &lt;a href=&quot;https://twitter.com/alessandrod&quot;&gt;Alessandro
Decina&lt;/a&gt; and myself, done during my hack-fest
time in the &lt;a href=&quot;http://www.igalia.com/nc/work/project/item/multimedia&quot;&gt;Igalia’s multimedia
team&lt;/a&gt;.One interesting thing to notice is that this element shows it is possible to
write
&lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure_%28DRI%29&quot;&gt;DRI&lt;/a&gt;
clients without the burden of X Window.&lt;/p&gt;
&lt;h2 id=&quot;brief-introduction-to-graphics-in-linux&quot; tabindex=&quot;-1&quot;&gt;Brief introduction to graphics in Linux &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/a-gstreamer-video-sink-using-kms/#brief-introduction-to-graphics-in-linux&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you want to dump images onto your screen, you can simply use the &lt;a href=&quot;https://en.wikipedia.org/wiki/Fbdev&quot;&gt;frame
buffer device&lt;/a&gt;. It provides an abstraction
for the graphics hardware and represents the &lt;a href=&quot;https://en.wikipedia.org/wiki/Framebuffer&quot;&gt;frame buffer of the video
hardware&lt;/a&gt;. This kernel device allows
user application to access the graphics hardware without knowing the low-level
details [1].&lt;/p&gt;
&lt;p&gt;In GStreamer, we have two options for displaying images using the frame buffer
device; or three, if we use OMAP3:
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-dfbvideosink.html&quot;&gt;fbvideosink&lt;/a&gt;,
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-plugin-fbdevsink.html&quot;&gt;fbdevsink&lt;/a&gt;
and &lt;a href=&quot;https://github.com/felipec/gst-omapfb&quot;&gt;gst-omapfb&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Nevertheless, since the appearance of the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Graphics_processing_unit&quot;&gt;GPUs&lt;/a&gt;, the frame buffer
device interface has not been sufficient to fulfill all their capabilities. A
new kernel interface ought to emerge. And that was the Direct Rendering Manager
(&lt;a href=&quot;http://dri.freedesktop.org/wiki/DRM&quot;&gt;DRM&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id=&quot;what-in-the-hell-is-drm&quot; tabindex=&quot;-1&quot;&gt;What in the hell is DRM? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/a-gstreamer-video-sink-using-kms/#what-in-the-hell-is-drm&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The DRM layer is intended to support the needs of complex graphics devices,
usually containing programmable pipelines well suited to 3D graphics
acceleration [2]. It deals with [3]:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A &lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_memory_access%22%22&quot;&gt;DMA&lt;/a&gt; queue for
graphic buffers transfers [4].&lt;/li&gt;
&lt;li&gt;It provides locks for graphics hardware, treating it as shared resource for
simultaneous 3D applications [5].&lt;/li&gt;
&lt;li&gt;And it provides secure hardware access, preventing clients from escalating
privileges [6].&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The DRM layer consists of two in-kernel drivers: a generic DRM driver, and
another which has specific support for the video hardware [7]. This is
possible because the DRM engine is extensible, enabling the device-specific
driver to hook out those functionalities that are required by the hardware. For
example, in the case of the Intel cards, the Linux kernel driver i915 supports
this card and couples its capabilities to the DRM driver.&lt;/p&gt;
&lt;p&gt;The device-specific driver, in particular, should cover two main kernel
interfaces: the Kernel Mode Settings
(&lt;a href=&quot;https://en.wikipedia.org/wiki/Kernel_mode-setting&quot;&gt;KMS&lt;/a&gt;) and the Graphics
Execution Manager
(&lt;a href=&quot;https://en.wikipedia.org/wiki/Graphics_Execution_Manager&quot;&gt;GEM&lt;/a&gt;). Both elements
are also exposed to the user-space through the DRM.&lt;/p&gt;
&lt;p&gt;With KMS, the user can ask the kernel to enable native resolution in the frame
buffer, setting certain display resolution and colour depth mode. One of the
benefits of doing it in kernel is that, since the kernel is in complete control
of the hardware, it can switch back in the case of failure [8].&lt;/p&gt;
&lt;p&gt;In order to allocate command buffers, cursor memory, scanout buffers, etc., the
device-specific driver should support a memory manager, and GEM is the manager
with more acceptance these days, because of its simplicity [9].&lt;/p&gt;
&lt;p&gt;Beside to the graphics memory management, GEM ensures conflict-free sharing of
data between applications by managing the memory synchronization. This is
important because modern graphics hardware are essentially
&lt;a href=&quot;https://en.wikipedia.org/wiki/Non-Uniform_Memory_Access&quot;&gt;NUMA&lt;/a&gt; environments.&lt;/p&gt;
&lt;p&gt;The following diagram shows the components view of the DRM layer:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/drm1.png&quot; alt=&quot;Direct Rendering Infrastructure&quot;&gt;&lt;/figure&gt;
&lt;h2 id=&quot;what-is-the-deal-with-kms&quot; tabindex=&quot;-1&quot;&gt;What is the deal with KMS? &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/a-gstreamer-video-sink-using-kms/#what-is-the-deal-with-kms&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;KMS is important because on it relies GEM and DRM to allocate frame buffers and
to configure the display. And it is important to us because almost all of the
ioctls called by the GStreamer element are part of the KMS subset.&lt;/p&gt;
&lt;p&gt;Even more, there are some voices saying that KMS is the future replacement for
the frame buffer device [10].&lt;/p&gt;
&lt;p&gt;To carry out its duties, the KMS identifies five main concepts [11,12]:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Frame buffer:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The frame buffer is just a buffer, in the video memory, that has an image
encoded in it as an array of pixels. As KMS configures the ring buffer in this
video memory, it holds a the information of this configuration, such as width,
height, color depth, bits per pixel, pixel format, and so on.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;CRTC:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Stands for Cathode Ray Tube Controller. It reads the data out of the frame
buffer and generates the video mode timing. The CRTC also determines what part
of the frame buffer is read; e.g., when multi-head is enabled, each CRTC scans
out of a different part of the video memory; in clone mode, each CRTC scans out
of the same part of the memory.Hence, from the KMS perspective, the CRTC
abstraction contains the display mode information, including, resolution, depth,
polarity, porch, refresh rate, etc. Also, it has the information of the buffer
region to display and when to change to the next frame buffer.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Overlay planes:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Overlays are treated a little like CRTCs, but without associated modes our
encoder trees hanging off of them: they can be enabled with a specific frame
buffer attached at a specific location, but they don’t have to worry about mode
setting, though they do need to have an associated CRTC to actually pump their
pixels out [13].&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Encoder:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The encoder takes the digital bitstream from the CRTC and converts it to the
appropriate format across the connector to the monitor.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Connector:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The connector provides the appropriate physical plug for the monitor to connect
to, such as HDMI, DVI-D, VGA, S-Video, etc…&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And what about this KMSSink?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;KMSSink is a first approach towards a video sink as a DRI client. For now it
only works in the &lt;a href=&quot;http://pandaboard.org/&quot;&gt;panda-board&lt;/a&gt; with a recent kernel (I
guess, 3.3 would make it).&lt;/p&gt;
&lt;p&gt;For now it only uses the custom non-tiled buffers and use an overlay plane to
display them. So, it is in the to-do, add support for more hardware.&lt;/p&gt;
&lt;h2 id=&quot;bibliography&quot; tabindex=&quot;-1&quot;&gt;Bibliography &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/a-gstreamer-video-sink-using-kms/#bibliography&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://free-electrons.com/kerneldoc/latest/fb/framebuffer.txt&quot;&gt;http://free-electrons.com/kerneldoc/latest/fb/framebuffer.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://free-electrons.com/kerneldoc/latest/DocBook/drm/drmIntroduction.html&quot;&gt;http://free-electrons.com/kerneldoc/latest/DocBook/drm/drmIntroduction.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.kernel.org/doc/readme/drivers-gpu-drm-README.drm&quot;&gt;https://www.kernel.org/doc/readme/drivers-gpu-drm-README.drm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dri.sourceforge.net/doc/drm_low_level.html&quot;&gt;http://dri.sourceforge.net/doc/drm_low_level.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dri.sourceforge.net/doc/hardware_locking_low_level.html&quot;&gt;http://dri.sourceforge.net/doc/hardware_locking_low_level.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dri.sourceforge.net/doc/security_low_level.html&quot;&gt;http://dri.sourceforge.net/doc/security_low_level.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Direct_Rendering_Manager&quot;&gt;https://en.wikipedia.org/wiki/Direct_Rendering_Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bitwiz.org.uk/s/how-dri-and-drm-work.html&quot;&gt;http://www.bitwiz.org.uk/s/how-dri-and-drm-work.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://lwn.net/Articles/283798/&quot;&gt;https://lwn.net/Articles/283798/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://phoronix.com/forums/showthread.php?23756-KMS-as-anext-gen-Framebuffer&quot;&gt;http://phoronix.com/forums/showthread.php?23756-KMS-as-anext-gen-Framebuffer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://elinux.org/images/7/71/Elce11_dae.pdf&quot;&gt;http://elinux.org/images/7/71/Elce11_dae.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.botchco.com/agd5f/?p=51&quot;&gt;http://www.botchco.com/agd5f/?p=51&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://lwn.net/Articles/440192/&quot;&gt;https://lwn.net/Articles/440192/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content>
	</entry>
	
	<entry>
		<title>Aura</title>
		<link href="https://blogs.igalia.com/vjaquez/aura/"/>
		<updated>2012-04-10T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/aura/</id>
		<content type="html">&lt;p&gt;In the last weeks &lt;a href=&quot;http://blogs.igalia.com/magomez/&quot;&gt;Miguel&lt;/a&gt;,
&lt;a href=&quot;http://blogs.igalia.com/xrcalvar/&quot;&gt;Calvaris&lt;/a&gt; and myself, developed an
application for the N9/N950 mobile phone and we called it
&lt;a href=&quot;http://igalia.github.com/aura/&quot;&gt;Aura&lt;/a&gt;.Basically it uses the device’s camera (either the main one or the frontal one)
for video recording, as a normal camera application, but also it exposes a set
of effects that can be applied, in real time, to the video stream.&lt;/p&gt;
&lt;p&gt;For example, here is a video using the &lt;em&gt;historical&lt;/em&gt; effect:&lt;/p&gt;
&lt;p&gt;Aura is inspired in the Gnome application,
&lt;a href=&quot;http://projects.gnome.org/cheese/&quot;&gt;Cheese&lt;/a&gt;, and it uses many of the effects
available in &lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects&quot;&gt;Gnome Video Effects&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The list of effects that were possible to port to the N9/N950 are:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=dicetv.jpg&quot;&gt;dice&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=edgetv.jpg&quot;&gt;edge&lt;/a&gt;,
flip,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=historical.jpg&quot;&gt;historical&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=hulk.jpg&quot;&gt;hulk&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=mauve.jpg&quot;&gt;mauve&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=noir.jpg&quot;&gt;noir/blanc&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=optv.jpg&quot;&gt;optical
illusion&lt;/a&gt;,
&lt;a href=&quot;http://effectv.sourceforge.net/quark.html&quot;&gt;quark&lt;/a&gt;,
&lt;a href=&quot;http://effectv.sourceforge.net/radio.html&quot;&gt;radioactive&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=revtv.jpg&quot;&gt;waveform&lt;/a&gt;,
&lt;a href=&quot;http://effectv.sourceforge.net/ripple.html&quot;&gt;ripple&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=saturation.jpg&quot;&gt;saturation&lt;/a&gt;,
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=saturation.jpg&quot;&gt;shagadelic&lt;/a&gt;,
&lt;a href=&quot;http://effectv.sourceforge.net/streak.html&quot;&gt;kung-fu&lt;/a&gt;,
&lt;a href=&quot;http://effectv.sourceforge.net/vertigo.html&quot;&gt;vertigo&lt;/a&gt; and
&lt;a href=&quot;https://live.gnome.org/GnomeVideoEffects/Effects?action=AttachFile&amp;amp;do=get&amp;amp;target=warptv.jpg&quot;&gt;warp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Besides of these software effects, it is possible to add, simultaneously,
another set of effects that the hardware is capable, such as sepia colors. These
hardware capabilities do not impose extra processing as the software effects do.&lt;/p&gt;
&lt;p&gt;Because of this processing cost, imposed by the non-hardware video effects, Aura
has a fixed video resolution. Otherwise the performance would make the
application unusable. Also, we had a missing feature: the still image capture.
But, hey! there is good news: Aura is fully open source, you can &lt;a href=&quot;https://github.com/Igalia/aura&quot;&gt;checkout the
code at github&lt;/a&gt; and we happily accept patches.&lt;/p&gt;
&lt;p&gt;Honoring Cheese, the name of Aura is taken from a kind of &lt;a href=&quot;https://en.wikipedia.org/wiki/Aura_%28cheese%29&quot;&gt;Finnish blue
cheese&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We hope you enjoy this application as we enjoyed developing it.&lt;/p&gt;
&lt;figure&gt;&lt;a href=&quot;http://store.ovi.com/content/266783&quot;&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/nokia-n9-2.jpg&quot; alt=&quot;Screenshot&quot;&gt;&lt;/a&gt;&lt;/figure&gt;
</content>
	</entry>
	
	<entry>
		<title>Debian&#39;s mutt with notmuch support</title>
		<link href="https://blogs.igalia.com/vjaquez/debians-mutt-with-notmuch-support/"/>
		<updated>2012-02-26T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/debians-mutt-with-notmuch-support/</id>
		<content type="html">&lt;p&gt;One of my weekend tasks was to reorganize my email environment. For reading
email I use &lt;a href=&quot;http://www.mutt.org/&quot;&gt;mutt&lt;/a&gt;, configured to grab the email from an
IMAP server. For sending email, I have a minimal &lt;a href=&quot;http://www.exim.org/&quot;&gt;exim&lt;/a&gt;
setup securely relaying to a smart host.Mutt is a great email browser, but it is very bad at handling IMAP. Besides, I
started to need searching through all my email. The solution for the first
problem is &lt;a href=&quot;http://offlineimap.org/&quot;&gt;offlineimap&lt;/a&gt;, a program wrote in Python,
that “synchronizes emails between two repositories”. It downloads my email from
the IMAP server into my laptop, so I work in my email locally, and if I delete
an email locally, offlineimap will delete it in the next sync operation.&lt;/p&gt;
&lt;p&gt;The solution for the second problem, the search, is
&lt;a href=&quot;http://notmuchmail.org/&quot;&gt;notmuch&lt;/a&gt;, which is a email indexer, enabling fast
searches among a vast mail collection. So, once new mail arrive (or is deleted)
with offlineimap, notmuch (de)indexes it.&lt;/p&gt;
&lt;p&gt;But another problem appear: how to query to notmuch in an integrated way with my
mail reader? One solution is provided by
&lt;a href=&quot;https://github.com/karelzak/mutt-kz&quot;&gt;mutt-kz&lt;/a&gt;, a fork of mutt with notmuch
support tightly integrated.&lt;/p&gt;
&lt;p&gt;But I use Debian, and I like its package management. So I needed to craft a
Debian package for mutt-kz.&lt;/p&gt;
&lt;p&gt;I grabbed the &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=pkg-mutt/mutt.git;a=summary&quot;&gt;Debian’s repository for
mutt&lt;/a&gt; and
re-based, one by one, the patches from mutt-kz.&lt;/p&gt;
&lt;p&gt;The result is stored in &lt;a href=&quot;https://gitorious.org/vjaquez-misc/mutt&quot;&gt;this
repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And now, I can query notmuch in mutt and immediately browse the result set.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GStreamer video decoder for SysLink</title>
		<link href="https://blogs.igalia.com/vjaquez/gstreamer-video-decoder-for-syslink/"/>
		<updated>2012-01-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstreamer-video-decoder-for-syslink/</id>
		<content type="html">&lt;p&gt;This blog post is another one of our series about SysLink
(&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2011/06/08/syslink-chronology/&quot;&gt;1&lt;/a&gt;,
&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2011/07/13/diving-into-syslink-v2/&quot;&gt;2&lt;/a&gt;):
finally I came with a &lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/&quot;&gt;usable GStreamer element for video
decoding&lt;/a&gt;, which talks directly
with the SysLink framework in the OMAP4’s &lt;a href=&quot;http://kernel.As&quot;&gt;kernel.As&lt;/a&gt; we stated before, SysLink is a set of kernel modules that enables the
initialization of remote processors, in a multi-core system (which might be
heterogeneous), that run their own operating systems in their own memory space,
and also, SysLink, enables the communication between the host processor with the
remotes ones. This software and hardware setup could be viewed as an Asymmetric
Multi-Processing model.&lt;/p&gt;
&lt;p&gt;TI provides a user-space library to access the SysLink services, but I find its
implementation a bit clumsy, so I took the challenge of rewrite a part of it, in
a simple and straightforward fashion, as gst-dsp does for DSP/Bridge. The result
is the interface
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/syslink.h&quot;&gt;syslink.h&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Simultaneously, I wrote the utility to load and monitor the operating system
into the Cortex-M3 processors for the PandaBoard. This board, such as all the
OMAP4-based SoCs, has two ARM Core-M3 as remote processors. Hence, this so
called
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/daemon.c&quot;&gt;daemon.c&lt;/a&gt;,
is in charge of loading the firmware images, setting the processor in its
running state, allocating the interchange memory areas, and monitoring for any
error message.&lt;/p&gt;
&lt;p&gt;In order to load the images files into the processors memory areas, it is
required to parse the ELF header of the files, and that is the reason of why I
decided to depend on libelf, rather than write another ELF parser. Yes, one sad
dependency for the daemon. The use of libelf is isolated in
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/elf.h&quot;&gt;elf.h&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When I was developing the daemon, for debugging purposes, I needed to trace the
messages generated by the images in the remote processors. For that reason I
wrote
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/tracer.c&quot;&gt;tracer.c&lt;/a&gt;,
whose only responsibility is to read and to parse the ring buffer used by the
images, in the remote processors, for logging.&lt;/p&gt;
&lt;p&gt;Now, in OMAP4, the subsystem comprised by the two Cortex-M3 processors is called
&lt;a href=&quot;http://omappedia.org/wiki/Ducati_For_Dummies&quot;&gt;Ducati&lt;/a&gt;. The first processor is
used only for the exchange of notification messages among the host processor and
the second M3 processor, where all the multimedia processing is done.&lt;/p&gt;
&lt;p&gt;There are at least two images for the second Cortex-M3 processor: DOMX, which is
closed source and focused, as far as I know, on the OMX IL interface; and, in
the other hand, &lt;a href=&quot;http://omappedia.org/wiki/DistributedCodecEngine&quot;&gt;DCE&lt;/a&gt;, which
is open source, it’s developed by Rob Clark, and it provides a simple interface
of buffers interchange.&lt;/p&gt;
&lt;p&gt;My work use DCE, obviously.&lt;/p&gt;
&lt;p&gt;But, please, let me go back one step in this component description: in order to
send and receive commands between the host processor and one remote processor,
SysLink uses a packet based protocol, called Remote Command Messaging, or just
RCM for the friends. There are two types of interfaces of RCM, the client and
the server. The client interface is used by the applications running in the host
processor, and they request services to the server interface, exposed by the
systems running in the remote processors, it is accepting the requests and it
returns results.&lt;/p&gt;
&lt;p&gt;The RCM client interface is in
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/rcm.h&quot;&gt;rcm.h&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Above the RCM client, sits my dce.h interface, which is in charge of control the
state of the video decoders and it is also in charge of handling the buffers.&lt;/p&gt;
&lt;p&gt;But these buffers are tricky. They are not memory areas allocated by a simple
malloc, instead they are buffers allocated by a mechanism in the kernel called
&lt;a href=&quot;https://lwn.net/Articles/418891/&quot;&gt;tiler&lt;/a&gt;. The purpose of this mechanism is to
provide buffers with capacity of 2D operations by hardware (in other words,
cheap and quick in computations). These buffers are shared along all the
processing pipeline, so the copies of memory areas are not needed. Of course, in
order to achieve this paradise, the video renderer must handle this type of
buffers too.&lt;/p&gt;
&lt;p&gt;In my code, the interface to the tiler mechanism is in
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/tiler.h&quot;&gt;tiler.h&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;And finally, the all mighty GStreamer element for video decoding:
&lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/blobs/master/gstsyslinkvdec.c&quot;&gt;gstsyslinkvdec.c&lt;/a&gt;!
Following the spirit of gst-dsp, this element is intended to deal with all the
available video decoders in the DCE image, although for now, the H264 decoding
is the only one handled.&lt;/p&gt;
&lt;p&gt;For now, I have only tested the decoder with fakesink, because the element
pushes tiled buffers onto the source pad, and, in order to have an efficient
video player, it is required a video renderer that handles this type of tiled
buffers. TI is developing one,
&lt;a href=&quot;https://gitorious.org/gstreamer-omap/gst-plugins-bad/trees/v0.10.22+ti/sys/pvr2d&quot;&gt;pvrvideosink&lt;/a&gt;,
but it depends on EGL, and I would like to avoid X whenever is possible.&lt;/p&gt;
&lt;p&gt;I have not measured either the performance of this work compared with the TI’s
combo (syslink user-space library / memmgr / libdce / gst-ducati), but I suspect
that my approach would be little more efficient, faster, and, at least, simpler
;)&lt;/p&gt;
&lt;p&gt;The sad news, as in every hard paced development, all these kernel mechanisms
are already deprecated: SysLink and DMM-Tiler will never be mainlined into the
kernel, but their successors,
&lt;a href=&quot;http://omappedia.org/wiki/Category:RPMsg&quot;&gt;rproc/rpmsg&lt;/a&gt; and
&lt;a href=&quot;https://lwn.net/Articles/458137/&quot;&gt;omapdrm&lt;/a&gt;, have a good chance. And both have a
very different approach since their predecessors. Nevertheless, SysLink is
already here and it is being used widely, so this effort has an opportunity for
being worthy.&lt;/p&gt;
&lt;p&gt;My current task is to decide if I should drop the 2D buffers in the video
decoders or if I should develop a video renderer for them.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>devhelp and jhbuild v2</title>
		<link href="https://blogs.igalia.com/vjaquez/devhelp-and-jhbuild-v2/"/>
		<updated>2011-12-16T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/devhelp-and-jhbuild-v2/</id>
		<content type="html">&lt;p&gt;A couple years ago I wrote a &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2008/07/24/devhelp-and-jhbuild/&quot;&gt;small
tip&lt;/a&gt; about how
to integrate the &lt;a href=&quot;https://live.gnome.org/devhelp&quot;&gt;devhelp&lt;/a&gt; installed by your
distribution with the documentation generated through
&lt;a href=&quot;https://live.gnome.org/Jhbuild&quot;&gt;jhbuild&lt;/a&gt;.Well, that way is plain wrong. I noticed it when I upgraded to GNOME 3:
modifying the environment variable &lt;code&gt;XDG_DATA_DIRS&lt;/code&gt;, the gnome-session goes
crazy.&lt;/p&gt;
&lt;p&gt;So, I found a less intrusive way to make your distro-based devhelp reads the
jhbuild-generated documentation:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;ln -s /opt/jhbuild/share/gtk-doc/ &#92;~/.local/share/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And that is it!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>OpenMAX: a rant</title>
		<link href="https://blogs.igalia.com/vjaquez/openmax-a-rant/"/>
		<updated>2011-11-29T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/openmax-a-rant/</id>
		<content type="html">&lt;p&gt;I used to work with OpenMAX a while ago. I was exploring an approach to wrap
OpenMAX components with GStreamer elements. The result was
&lt;a href=&quot;https://github.com/mrchapp/gst-goo&quot;&gt;gst-goo&lt;/a&gt;. Its purpose was to test the
OpenMAX components in complex scenarios and it was only focused for the &lt;a href=&quot;https://gforge.ti.com/gf/project/openmax/frs/&quot;&gt;Texas
Instruments’ OpenMAX implementation for the OMAP3
processor&lt;/a&gt;.Some time after we started gst-goo, Felipe Contreras released
&lt;a href=&quot;http://www.freedesktop.org/wiki/GstOpenMAX&quot;&gt;gst-openmax&lt;/a&gt;, which had a more open
development, but with a hard set of performance objectives like zero-copy. And
also only two implementations were supported at that moment:
&lt;a href=&quot;http://omxil.sourceforge.net/&quot;&gt;Bellagio&lt;/a&gt; and the TI’s one mentioned before.&lt;/p&gt;
&lt;p&gt;Recently, Sebastian Dröge has been working on a redesign of gst-openmax, called
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-omx&quot;&gt;gst-omx&lt;/a&gt;. He explained the
rational behind this new design in &lt;a href=&quot;http://gstconf.ubicast.tv/videos/a-new-openmax-il-integration-layer-for-gstreamer/&quot;&gt;his talk in the GStreamer Conference
2011&lt;/a&gt;.
If you are looking for a good summary of the problems faced when wrapping
OpenMAX with GStreamer, because of their semantic impedance mismatch, you should
watch his talk.&lt;/p&gt;
&lt;p&gt;In my opinion, the key purpose of OpenMAX is to provide a common application
interface to a set of different and heterogeneous multimedia components: You
could take different implementations, that could offer hardware-accelerated
codecs or either any other specialized ones, and build up portable multimedia
applications. But this objective has failed utterly: every vendor delivers a
incompatible implementation with the others available. One of the causes, as
Dröge explained, is because of &lt;a href=&quot;http://www.khronos.org/openmax/&quot;&gt;the
specification&lt;/a&gt;, it is too ambiguous and open to
interpretations.&lt;/p&gt;
&lt;p&gt;From my perspective, the problem arises from the need of a library like OpenMAX.
It is needed because the implementer wants to hide (or to abstract if you
prefer) the control and buffer management of his codification entities. By
hiding this, the implementer has the freedom to develop his own stack closely,
without any kind of external review.&lt;/p&gt;
&lt;p&gt;In order to explain the problem brought by the debauchery in the hind of
OpenMAX, let me narrow the scope of the problem: I will not fall on the trap of
portability among different operative systems, specially in those of non-Unix.
Even more, I will only focus on the ARM architecture of the Linux kernel. Thus,
I will not consider the software-based codecs, only the hardware-accelerated
ones. The reason upholding these constrains is that, beside the &lt;a href=&quot;https://github.com/android/platform_external_opencore&quot;&gt;PacketVideo’s
OpenCORE&lt;/a&gt;, I am not aware
of any other successful set of non-Unix / software-based multimedia codecs,
interfaced with OpenMAX.&lt;/p&gt;
&lt;p&gt;As new and more complex hardware appears, with its own processing units, capable
of off-loading the main processor, silicon vendors must deliver also the kernel
drivers to operate them. This problem is very recurrent among the ARM vendors,
where the seek of added value gives the competitive advantage, and the Linux
kernel has the virtues required for a fast time to market.&lt;/p&gt;
&lt;p&gt;But these virtues have turned into a ballast: &lt;a href=&quot;https://lwn.net/Articles/437162/&quot;&gt;It has been observed excessive
churn in the ARM architecture, duplicated code, board-specific data encoded in
source files, and conflicts at kernel’s code
integration&lt;/a&gt;. In other words, every vendor has
built up their own software stack without taking care of developing common
interfaces among all of them. And this has been particularly true for the
hardware-accelerated multimedia components, where OpenMAX promised to the
user-space developers what the kernel developers could not achieve.&lt;/p&gt;
&lt;p&gt;First we need a clear and unified kernel interface for hardware accelerated
multimedia codecs, so the user-space implementations could be straight, lean and
clean. Those implementations could be OpenMAX, GStreamer, libav, or whatever we
possibly want and need.&lt;/p&gt;
&lt;p&gt;But there is hope. Recently there has happened a lot of effort &lt;a href=&quot;https://lwn.net/Articles/440221/&quot;&gt;bringing new
abstractions and common interfaces for the ARM
architecture&lt;/a&gt;, so in the future we could
expect integrated interfaces for all these new hardware, independently of the
vendor.&lt;/p&gt;
&lt;p&gt;Though, from my perspective, if we reach this point (&lt;a href=&quot;https://lwn.net/Articles/464391/&quot;&gt;and we
will&lt;/a&gt;), we will have less motivation for a
library like OpenMAX, because a high level library, such as GStreamer, it would
cover a lot of hardware within a single element. Hence, it is a bit pointless to
invest too much in OpenMAX or its wrappers nowadays.&lt;/p&gt;
&lt;p&gt;Of course, if you think that I made a mistake along these reasons, I would love
to read your comments.&lt;/p&gt;
&lt;p&gt;And last but not least, &lt;a href=&quot;http://www.igalia.com/igalia-247/news/item/igalia-celebrates-its-10th-anniversary/&quot;&gt;Igalia celebrates its 10th
anniversary!&lt;/a&gt;
Happy igalian is happy :)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>How I installed the Linaro&#39;s toolchain</title>
		<link href="https://blogs.igalia.com/vjaquez/how-i-installed-the-linaros-toolchain/"/>
		<updated>2011-08-03T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/how-i-installed-the-linaros-toolchain/</id>
		<content type="html">&lt;p&gt;Last week, because of a distraction, I dd’ed my external hard disk, where I used
to store my cross compilation setup. And yes, I lost everything: my OpenEmbedded
working directory, my installation of the CodeSourcery toolchain, and a lot
more.But, as the people say, &lt;em&gt;when the going gets rough, the rough get going&lt;/em&gt;. So I
considered this mistake as a sane &lt;em&gt;tabula rasa&lt;/em&gt; to start all over again,
learning a few new tricks along the process.&lt;/p&gt;
&lt;p&gt;My objective was to substitute the CodeSourcery toolchains for the &lt;a href=&quot;https://wiki.linaro.org/WorkingGroups/ToolChain&quot;&gt;Linaro’s
one&lt;/a&gt;, because my main
development boards are a beagle-board and a panda-board.&lt;/p&gt;
&lt;p&gt;But I use Debian, not Ubuntu, where the Linaro’s toolchain can be deployed
out-of-the-box. I had to compile it. For that I came aware of
&lt;a href=&quot;http://crosstool-ng.org/&quot;&gt;crosstool-ng&lt;/a&gt;, a nice utility, based on
&lt;a href=&quot;http://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt&quot;&gt;kconfig&lt;/a&gt;,
to build toolchains, and also &lt;a href=&quot;https://wiki.linaro.org/WorkingGroups/ToolChain/Using/CrosstoolNg&quot;&gt;it supports
Linaro&lt;/a&gt; in
its last release.&lt;/p&gt;
&lt;p&gt;To have only a toolchain is not enough. For example, my syslink wrapper depends
upon libelf. A cross-compiled sysroot is also required. And for that I chose
&lt;a href=&quot;http://buildroot.uclibc.org/&quot;&gt;Buildroot&lt;/a&gt;, which is another kconfig based
utility to build complete embedded systems. And it integrates with crosstool-ng
too!&lt;/p&gt;
&lt;p&gt;Sadly, the version of crosstool-ng handled currently by Buildroot is a bit older
and do not include the Linaro’s toolchain. Nevertheless it was pretty much easy
to modify in order to use the latest release of crosstool-ng
(&lt;a href=&quot;http://people.igalia.com/vjaquez/patches/0001-bump-crosstoo-ng-1.11.4.patch&quot;&gt;patch&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Now I will try to work with this environment, which, at first sight, looks
comfortable and neat.&lt;/p&gt;
&lt;p&gt;I have to add that &lt;a href=&quot;http://openembedded.org&quot;&gt;OE&lt;/a&gt; is quite complete and it also
includes the Linaro’s toolchain. Just I wanted to explore other options this
time.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Diving into SysLink v2</title>
		<link href="https://blogs.igalia.com/vjaquez/diving-into-syslink-v2/"/>
		<updated>2011-07-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/diving-into-syslink-v2/</id>
		<content type="html">&lt;p&gt;Following with our &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2011/06/08/syslink-chronology/&quot;&gt;SysLink
saga&lt;/a&gt;, now we
will dive into its &lt;a href=&quot;http://internals.As&quot;&gt;internals.As&lt;/a&gt; we stated before, SysLink is a software stack which implements an
Inter-Processors Communication (IPC), whose the purpose is enabling the
Asymmetric Multi-Processing (AMP).&lt;/p&gt;
&lt;p&gt;Most of the readers are more familiar with the concept of the Symmetric
Multi-Processing (SMP), which is the most common approach to handle multiple
processors in a computer, where a single operating system controls and spreads
the processing load among the available processors. Typically these processors
are identical.&lt;/p&gt;
&lt;p&gt;On the contrary, AMP is designed to deal with different kind of processors, each
one running different instances of operative systems, with different
architectures and interfaces. The typical approach is to have a master processor
with one or more slave units, all of them sharing the same memory area, hence
the operating system running in the master processor expose the other processors
as other devices available in the system (figure 1).&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/ams-1-300x94.png&quot; alt=&quot;Asymmetric Multi-Processing (AMS)&quot;&gt;&lt;figcaption&gt;Figure 1&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The main advantage of AMP, as we mention in the previous post, is that we can
integrate specialized processors and delegate them tasks that are rather
expensive to execute in our general purpose processor, such as multimedia,
cryptography, real-time processing, etc.&lt;/p&gt;
&lt;p&gt;All the operating systems, executed in an AMP system, must share, at least, one
key component: a mechanism of Inter-Processors Communication, because with it,
they will be able to interchange data and synchronize tasks among each other.&lt;/p&gt;
&lt;p&gt;Basically there are two types of IPC: shared memory and message passing. With
the shared memory we avoid copying the data to process in other unit, but also
we will demand complicated semaphoring protocols, in order to avoid overlapping,
what lead to the data corruption. On the other hand, message passing is oriented
to the transfer of small chunks of data, called messages, sent by one processor
and received by another, and are used to notify, to control and synchronize.&lt;/p&gt;
&lt;p&gt;Therefore, SysLink version 2.0, provides a set of components for IPC, for both
shared memory and message passing (figure 2):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;MultiProc&lt;/em&gt;: identifies and names each available processor in the
configuration.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;SharedRegion&lt;/em&gt;: handles memory areas which will be shared across the
different processors.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Gate&lt;/em&gt;: provides local and remote context protection, preventing preemption
by another thread locally and protects memory regions from remote
processors.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Message&lt;/em&gt;: supports the variable length message passing across processors.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Notify&lt;/em&gt;: registers callback what will be executed when a remote event is
triggered.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;HeapBuf&lt;/em&gt;: manages fixed size buffers that can be used by multiple
processors within the shared memory.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;HeapMem&lt;/em&gt;: manages variable size buffers that can be used by multiple
processors within the shared memory.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;List&lt;/em&gt;: provides a way to create, access and manipulate double linked list
in a the shared memory.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;NameServer&lt;/em&gt;: a dictionary table within the shared memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/syslink-v2-300x140.png&quot; alt=&quot;SysLink v2&quot;&gt;&lt;figcaption&gt;Figure 2&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;All these operations are done through ioctl operations to the /dev/syslink_ipc
device.&lt;/p&gt;
&lt;p&gt;Nonetheless, SysLink v2.0, being a master/slave configuration, it must provide a
way to control the slave processors, operations like starting and stopping, to
load an operative system into them, and so on. In that regard, there is a module
called the Processor Manager, which is operated also through ioctl calls to the
&lt;code&gt;/dev/syslink-procmgr&lt;/code&gt; device, and also to the specific processors, what are
also mapped to the device file-system as &lt;code&gt;/dev/omap-rproc[0-9]&lt;/code&gt;, in the case of
the OMAP processors.&lt;/p&gt;
&lt;p&gt;Now, on top of all these IPC facilities, there must be a façade for all the
remote operation that we could execute, and that façade is called Remote Command
Messaging (RCM). Our application, which is running in the master processor, will
act as client RCM and will request remote commands on the RCM server, which is
running in a slave processor. DCE (&lt;a href=&quot;http://omappedia.org/wiki/DistributedCodecEngine&quot;&gt;Distributed Codec
Engine&lt;/a&gt;) is an open source
RCM, developed by Rob Clark, to expose distributed multimedia processing in the
OMAP4.&lt;/p&gt;
&lt;p&gt;And I continue developing a &lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/&quot;&gt;thin API for SysLink
2.0&lt;/a&gt; :)&lt;/p&gt;
&lt;p&gt;References&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://rtcmagazine.com/articles/view/100404&quot;&gt;Who’s Afraid of Asymmetric
Multiprocessingh?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ohlandl.ipv7.net/CPU/ASMP_SMP.html&quot;&gt;ASMP vs SMP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://webdocs.cs.ualberta.ca/~tony/C379/Notes/PDF/04.4.pdf&quot;&gt;Interprocess communication Introduction
Terminology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://omappedia.org/wiki/Syslink_Project&quot;&gt;SysLink Project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
	</entry>
	
	<entry>
		<title>SysLink chronology</title>
		<link href="https://blogs.igalia.com/vjaquez/syslink-chronology/"/>
		<updated>2011-06-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/syslink-chronology/</id>
		<content type="html">&lt;h2 id=&quot;introductionsince-a-while-the-processor-market-has-observed-a-moore-s-law-decline-the&quot; tabindex=&quot;-1&quot;&gt;IntroductionSince a while the processor market has observed a Moore’s law decline: the &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/syslink-chronology/#introductionsince-a-while-the-processor-market-has-observed-a-moore-s-law-decline-the&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;processing velocity cannot be duplicated each year anymore. That is why, the old
and almost forgotten discipline of parallel processing have had a kind of
resurrection. GPUs, DSPs, multi-cores, are names that are kicking the market
recently, offering to the consumers more horse power, more multi-tasking, but
not more giga-hertz per core, as it used to be.&lt;/p&gt;
&lt;p&gt;Also an ecologist spirit has hit the chips manufacturers, embracing the
green-computing concept. It fits perfectly with the Moore’s law decay: more
velocity, more power consumption and more injected heat into the environment.
Not good. A better solution, they say, is to have a set of specialized
processors which are activated when their specific task is requested by the
user: do you need extensive graphics processing? No problem, the GPU will deal
with it. Do you need decode or encode high resolution multimedia? We have a DSP
for you. Are you only typing in an editor? We will turn off all the other
processors thus saving energy.&lt;/p&gt;
&lt;p&gt;Even though this scenario seems quite idyllic, the hardware manufacturers have
placed a lot of responsibility upon the software. The hardware is there, it is
already wired into the main memory, but now all the heuristics and logic to
control the data flow among them is a huge and still open problem, yet with
multiple partial solutions currently available.&lt;/p&gt;
&lt;p&gt;And that is the case of Texas Instrument, who, since his first generation of
OMAP, has delivered to the embedded and mobile market a multicore chip, with a
DSP and a high end ARM processor. But deliver a chip is not enough, so TI had
had to provide the system software capable to squeeze those heterogeneous
processors.&lt;/p&gt;
&lt;p&gt;At the beginning, TI only delivered to its clients a mere proof of concept, with
which the client could take it as a reference for his own implementation. That
was the case of dsp-gateway[1], developed by Nokia as an open source project.&lt;/p&gt;
&lt;p&gt;But as the OMAP processor capacities were increasing, TI was under more pressure
from his customers to deliver a general mechanism to communicate with the
embedded processors.&lt;/p&gt;
&lt;p&gt;For that reason TI started to develop a mechanism of Inter-Processors
Communication (IPC), whose approach is based on the concept that the general
purpose processor (GPP**, the host processor in charge of the user interactions,
can control and interact with the other processors as if they were just another
devices in the system. Those devices are called slave processors.&lt;/p&gt;
&lt;p&gt;Thus, this designed IPC mechanism runs in the host processor’s kernel space and
it fulfills the following responsibilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It allows the exchange of messages between the host processor with the slaves.&lt;/li&gt;
&lt;li&gt;It can map files from the host’s file system into the memory space of the
slave processor.&lt;/li&gt;
&lt;li&gt;It permits the dynamic loading of basic operating systems and programs into
the slave processors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, TI has developed a programming library that provides an API with which the
developers could build applications that use the processing power of the slave
processors.&lt;/p&gt;
&lt;p&gt;Sadly, whilst the development in the host processor, typically Linux
environments, is open and mostly free, the development for the slave cores (DSP
in general) is still close and controlled by TI’s licences. Nevertheless, TI has
provided, gratis but closed, binary objects which can be loaded into the slaves
cores and they do multimedia processing.&lt;/p&gt;
&lt;p&gt;Well, actually there have been some efforts to develop a GCC backend[2] for
the C64x DSP, and also a LLVM backend[3], with which, least theoretically, we
could write programs to be loaded and executed through these IPC mechanisms. But
they are not mature enough to use them seriously.&lt;/p&gt;
&lt;h2 id=&quot;dsplink-and-dspbridge&quot; tabindex=&quot;-1&quot;&gt;DSPLink and DSPBridge &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/syslink-chronology/#dsplink-and-dspbridge&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In order to develop an general purpose IPC for his OMAP processors family, TI
has designed the DSPBridge[4]. Oriented to multi-slave systems, agnostic to
operating system, handle power management demands and other industrial weight
buzzwords.&lt;/p&gt;
&lt;p&gt;But the DSPBridge was not ready for production until the OMAP3 came out to the
market. That is why, another group inside TI, narrowed the scope of the
DSPBridge’s design and slimmed its implementation, bringing out DSPLink[5],
capable to run in OMAP2, OMAP3 and also in the DaVinci family.&lt;/p&gt;
&lt;p&gt;DSPLink is distributed as an isolated kernel module and a programming library,
along with the closed binaries that run in the DSP side. Nevertheless, the
kernel module does not meet the requirements to be mainlined into the kernel
tree. Also, it lacks of power management features and a dynamic MMU support.&lt;/p&gt;
&lt;p&gt;On the other hand, DSPBridge has been brewed to be mainlined into the kernel,
though it has stuck in the Greg’s staging tree for a long time. It seems that
all the resources within TI are devoted to SysLink, the next generation of IPC.
Nonetheless, many recent OMAP3 based devices uses this IPC mechanism for their
multimedia applications.&lt;/p&gt;
&lt;p&gt;Initially, TI offered an OpenMAX layer on top of the DSPBridge user-space API to
process multimedia in the C64x DSP, but that solution was too bloated for some
developers, and the project gst-dsp[6] appeared, which reuse the codecs for
the DSP available in the TI’s OpenMAX implementation, along with the DSPBridge
kernel module, to provide a thin and lean interface through GStreamer framework.&lt;/p&gt;
&lt;h2 id=&quot;syslink-and-omap4&quot; tabindex=&quot;-1&quot;&gt;SysLink and OMAP4 &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/syslink-chronology/#syslink-and-omap4&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Then OMAP4 came to existence. It is not only anymore a DSP and a high end ARM
processor. It has a DSP, a dual ARM Cortex-M3, and, as host processor, a dual
ARM Cortex-A9. Five processing units in a single silicon! How in hell we will
share information among all of them? DSPBridge was not designed for this
scenario in mind.&lt;/p&gt;
&lt;p&gt;The ARM Cortex-M3 has the purpose to process video and images, and for that
reason a tiler-based memory allocation is proposed, where the memory buffers are
already perceived as 2D, where fast operations of mirroring and rotation are
available.&lt;/p&gt;
&lt;p&gt;Regretfully, in the case of the Pandaboard (OMAP4330), the available DSP has
lower capacities than the one in the Beagleboards OMAP3, so the published
codecs, for the OMAP3 DSP, can not be reused in the pandaboard. But video codecs
for the M3 cores are currently available, and they are capable to process high
definition resolutions.&lt;/p&gt;
&lt;p&gt;The answer is SysLink. Where, besides the three operation developed for
DSPBridge, two more core responsibilities were added:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Zero-copy shared memory: ability to &amp;quot;pass** data buffers to other processors
by simply providing its location in shared memory&lt;/li&gt;
&lt;li&gt;TILER-based memory allocation: allocate 2D-buffers with mirroring and rotation
options.&lt;/li&gt;
&lt;li&gt;Remote function calls: one processor can invoke functions on a remote
processor&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The stack offered is similar than the OMAP3: in the user space we start with the
SysLink API, then an OpenMAX layer, called now as DOMX, and finally the
gst-openmax elements for the GStreamer framework. And again, a bloated,
buzzworded, stack for multimedia.&lt;/p&gt;
&lt;p&gt;In his spare time, Rob Clark developed a proof of concept to remove the
DOMX/gst-openmax layers and provide a set of GStreamer elements that talk
directly with the SysLink API: libdce[7]/gst-ducati[8].&lt;/p&gt;
&lt;p&gt;Either way, I feel more comfortable with the approach proposed by Felipe
Contreras in gst-dsp: a slim and simple API to SysLink and plain GStreamer
elements using that API. And because of that reason, I started to code a
minimalist API, copying the spirit of the dsp_bridge[9], for the SysLink
interface: &lt;a href=&quot;https://gitorious.org/vj-pandaboard/syslink/&quot;&gt;https://gitorious.org/vj-pandaboard/syslink/&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://sourceforge.net/projects/dspgateway/&quot;&gt;http://sourceforge.net/projects/dspgateway/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.qucosa.de/fileadmin/data/qucosa/documents/4857/data/thesis.pdf&quot;&gt;http://www.qucosa.de/fileadmin/data/qucosa/documents/4857/data/thesis.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.studentrobotics.org/trac/wiki/Beagleboard_DSP&quot;&gt;https://www.studentrobotics.org/trac/wiki/Beagleboard_DSP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.omappedia.org/wiki/DSPBridge_Project&quot;&gt;http://www.omappedia.org/wiki/DSPBridge_Project&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://processors.wiki.ti.com/index.php/Category:DSPLink&quot;&gt;http://processors.wiki.ti.com/index.php/Category:DSPLink&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/gst-dsp/&quot;&gt;https://code.google.com/p/gst-dsp/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/robclark/libdce&quot;&gt;https://github.com/robclark/libdce&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/robclark/gst-ducati&quot;&gt;https://github.com/robclark/gst-ducati&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/felipec/gst-dsp/blob/HEAD/dsp_bridge.h&quot;&gt;https://github.com/felipec/gst-dsp/blob/HEAD/dsp_bridge.h&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content>
	</entry>
	
	<entry>
		<title>Software architects and API designers</title>
		<link href="https://blogs.igalia.com/vjaquez/software-architects-and-api-designers/"/>
		<updated>2011-05-26T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/software-architects-and-api-designers/</id>
		<content type="html">&lt;p&gt;Don’t you hate API designers when they obfuscate all the data type system?&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/api_desginer.jpg&quot; alt=&quot;API design&quot; title=&quot;API design&quot;&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Custom Ubuntu&#39;s root file-system for the panda-board</title>
		<link href="https://blogs.igalia.com/vjaquez/custom-ubuntus-root-file-system-for-the-panda-board/"/>
		<updated>2011-02-07T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/custom-ubuntus-root-file-system-for-the-panda-board/</id>
		<content type="html">&lt;p&gt;Since I started to work with the beagle-board, one of my main concerns has been
generate a custom image with the minimal setup required for the task: In my
opinion it is important to have installed only the necessary and do not bloat
the SD with a full featured distribution. In this way, we will control the
dependencies, and we will remove possible points of failure which only will
drowse our cycle of development/testing.In the case of a OMAP3 base board or any other board with inferior capabilities,
the solutions were in builder systems with cross-compilation support, such as
&lt;a href=&quot;http://openembedded.org&quot;&gt;OpenEmbedded&lt;/a&gt;,
&lt;a href=&quot;http://buildroot.uclibc.org/&quot;&gt;Buildroot&lt;/a&gt;, etc… Those builders use the
cross-compilation technique to generate custom images for the target hardware.&lt;/p&gt;
&lt;p&gt;But in OMAP4 we are in the border line between an embedded system and a PC, and
because of this, I needed a kind of a mixed approach: a native compiling
environment within a custom image, in order to set it up as a
&lt;a href=&quot;http://buildbot.net&quot;&gt;builbot&lt;/a&gt; slave.&lt;/p&gt;
&lt;p&gt;As I attained certain experience with OpenEmbedded I started to craft a custom
native-sdk image, with rather thwarted results: after several days of patches
and bug fixes, I was not able to compile, in the panda-board, the software I was
willing to test.&lt;/p&gt;
&lt;p&gt;Dodging the OE’s approach, I decided to uproot it and I started to explore new
paths. Soon I stumbled with &lt;a href=&quot;https://wiki.ubuntu.com/ARM/RootStock/&quot;&gt;rootstock&lt;/a&gt;:
a shell script which generates custom images of the Ubuntu distribution for the
ARM architecture.&lt;/p&gt;
&lt;p&gt;Nonetheless I tried it under Debian, since I don’t have any machine with Ubuntu.
The script is difficult to trace and its logs are not useful on many occasions,
mainly when the processing occurs in the qemu virtual machine. Anyway, I found
that the qemu distributed by Squeeze was not functional in this particular case,
so I grabbed the latest code from its repository, I compiled it and it worked
like a charm.&lt;/p&gt;
&lt;p&gt;NOTE: use the latest code of the RootStock hosted in the
&lt;a href=&quot;https://launchpad.net/project-rootstock&quot;&gt;Launchpad&lt;/a&gt; bazaar repository.&lt;/p&gt;
&lt;p&gt;At the end I came with a script where I set the parameters for my particular use
case:&lt;/p&gt;
&lt;pre class=&quot;language-shell&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shell&quot;&gt;&lt;span class=&quot;token shebang important&quot;&gt;#!/bin/sh&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;TMPDIR&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;)&lt;/span&gt;&lt;/span&gt;/tmp &lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;&lt;span class=&quot;token environment constant&quot;&gt;PATH&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token environment constant&quot;&gt;$PATH&lt;/span&gt;:/usr/sbin/:/sbin:/opt/qemu/bin&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$TMPDIR&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$TMPDIR&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;BASE&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;ubuntu-minimal,build-essential,openssh-server,python-twisted-core,nfs-common,portmap&quot;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;V8_DEPS&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;scons,libreadline-dev&quot;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;JSC_DEPS&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;autoconf,libtool,bison,flex,gperf,libicu-dev,libxml2-dev,libglib2.0-dev,libsoup2.4-dev&quot;&lt;/span&gt;&lt;br&gt;&lt;br&gt;./rootstock &lt;span class=&quot;token parameter variable&quot;&gt;--fqdn&lt;/span&gt; panda1.local.igalia.com &lt;span class=&quot;token parameter variable&quot;&gt;--login&lt;/span&gt; user &lt;span class=&quot;token parameter variable&quot;&gt;--password&lt;/span&gt; 000&lt;br&gt;  &lt;span class=&quot;token parameter variable&quot;&gt;--imagesize&lt;/span&gt; 512M &lt;span class=&quot;token parameter variable&quot;&gt;--dist&lt;/span&gt; maverick &lt;span class=&quot;token parameter variable&quot;&gt;--serial&lt;/span&gt; ttyO2 &lt;span class=&quot;token parameter variable&quot;&gt;--seed&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$BASE&lt;/span&gt;,&lt;span class=&quot;token variable&quot;&gt;$V8_DEPS&lt;/span&gt;,&lt;span class=&quot;token variable&quot;&gt;$JSC_DEPS&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this way I can generate a minimal image, in a tarball, for my panda
build-slave.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>AAC decoder for gst-dsp</title>
		<link href="https://blogs.igalia.com/vjaquez/aac-decoder-for-gst-dsp/"/>
		<updated>2010-12-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/aac-decoder-for-gst-dsp/</id>
		<content type="html">&lt;p&gt;One of my purposes for this year was collaborate with the
&lt;a href=&quot;http://code.google.com/p/gst-dsp/&quot;&gt;gst-dsp&lt;/a&gt; project. But the JPEG decoder was
not enough, as there are other &lt;a href=&quot;https://gforge.ti.com/gf/project/openmax/frs/&quot;&gt;released socketnodes by
TI&lt;/a&gt; which are not yet wrapped in
gst-dsp, such as, in this case, the AAC decoder.gst-dsp is a project with only video decoding use case in mind, and audio
streams might not be optimally handled by it. The biggest concern was about the
memory mapping of small buffers, which could consume more CPU rather than the
direct decoding. Nevertheless I decided give it a try.&lt;/p&gt;
&lt;p&gt;These last two weeks I devoted them to pull out the dspadec element and it seems
to perform quite good without any significant modification in the gst-dsp core.
You can find the &lt;a href=&quot;http://groups.google.com/group/gst-dsp/browse_thread/thread/85698f3e1754e4a5&quot;&gt;submitted
patches&lt;/a&gt;
in the gst-dsp mailing list.&lt;/p&gt;
&lt;p&gt;These patches are still in review process and perhaps they will not land on the
repository, nevertheless, I also updated the marmita’s recipes in order to
provide an installable image for the Beagleboard, so anybody could test this new
element.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://people.igalia.com/vjaquez/beagle/Angstrom-marmita-image-glibc-ipk-2010.7-test-20101213-beagleboard.rootfs.tar.bz2&quot;&gt;Root
FS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://people.igalia.com/vjaquez/beagle/uImage-2.6.37-r91+gitrea3398a1ae54cd3403f3cc0f6aa498c7452c681a-beagleboard.bin&quot;&gt;uImage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Among other candies, this marmita snapshot brings libsoup and the souphttpsrc
GStreamer element, besides all the alsa stuff for the audio rendering. Also gdb
hit into the tarball.&lt;/p&gt;
&lt;p&gt;Enjoy it!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;These bytes were brought to you thanks to &lt;a href=&quot;http://www.igalia.com&quot;&gt;Igalia&lt;/a&gt;, who
sponsored this development.&lt;/em&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>btw II</title>
		<link href="https://blogs.igalia.com/vjaquez/btw-ii/"/>
		<updated>2010-11-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/btw-ii/</id>
		<content type="html">&lt;p&gt;By the way, a group of igalians, including myself, will be tomorrow in Dublin
for the &lt;a href=&quot;http://conference2010.meego.com/&quot;&gt;Meego Conference 2010&lt;/a&gt;. I’ll be at
the Igalia’s exhibition stand with a demo of the Pandaboard running Meego and
-hopefully- rendering on-line multimedia through Grilo.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Meego in the Pandaboard</title>
		<link href="https://blogs.igalia.com/vjaquez/meego-in-the-pandaboard/"/>
		<updated>2010-11-07T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/meego-in-the-pandaboard/</id>
		<content type="html">&lt;p&gt;The objective was rather simple: run Meego on the Pandaboard.I found that there is a &lt;a href=&quot;http://wiki.meego.com/ARM/OMAP4_Panda&quot;&gt;wiki page for this
topic&lt;/a&gt;, which provides a kick-start file
for generating the file system, which is more than enough as a starting point.&lt;/p&gt;
&lt;p&gt;Note: &lt;em&gt;With the purpose to keep track of the Meegos’ kick-start files available
for OMAP, &lt;a href=&quot;http://gitorious.org/~vjaquez/meego-os-base/vjaquez-image-configurations&quot;&gt;I setup a repository in
gitorious&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Nevertheless, the kernel did not work for me. Neither the boot.src provides the
correct kernel parameters for the video subsystem. Hence, I borrowed what
currently works: the x-loader, u-boot and kernel of the &lt;a href=&quot;http://cdimage.ubuntu.com/ubuntu-netbook/ports/daily-preinstalled/current/&quot;&gt;Ubuntu Maverick Meerkat
for the
Panda&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the x-loader and the u-boot I just copied the binaries from the Ubuntu SD.
In the boot.src I got rid of the initrd fanciness. And for the kernel, I grabbed
the latest Ubuntu’s kernel from &lt;a href=&quot;http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-maverick.git;a=shortlog;h=refs/heads/ti-omap4&quot;&gt;its git
repository&lt;/a&gt;
and using the config file also from the SD.&lt;/p&gt;
&lt;p&gt;My first approach was to have GLX/EGL through the SGX kernel module, which also
comes in the Ubuntu image. You can find the kernel module and the proprietary
libraries in the &lt;a href=&quot;https://launchpad.net/~tiomap-dev/+archive/release&quot;&gt;OMAP4
PPA&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This approach failed though: The Meego’s compositor
(&lt;a href=&quot;http://meego.gitorious.org/~madam/meegotouch/mcompositor&quot;&gt;mcompositor&lt;/a&gt;) could
not render correctly in both monitors where I tested the result.&lt;/p&gt;
&lt;p&gt;So, my alternative approach was get rid of the compositor and launch directly
the &lt;a href=&quot;http://meego.gitorious.org/meegotouch/meegotouch-home&quot;&gt;duihome&lt;/a&gt;, the window
manager. In order to do that, you must change the file
&lt;code&gt;/etc/sysconfig/uxlaunch&lt;/code&gt;, with&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;-session=/usr/bin/mcompositor +session= /usr/bin/duihome -software -show-cursor&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The -software parameter request to use software rendering, not accelerated. The
-show-cursor requests for a mouse pointer. Those options are consumed by
meegotouch library. Nevertheless, each application must be launched explicitly
with them.&lt;/p&gt;
&lt;p&gt;In order to circumvent this issue, there is already an environment variable for
the &lt;code&gt;-software: M_USE_SOFTWARE_RENDERING=1&lt;/code&gt;. But for the &lt;code&gt;-show-cursor&lt;/code&gt; there is
none. Although it is not difficult to implement
(&lt;a href=&quot;http://people.igalia.com/vjaquez/patches/meegotouch.patch&quot;&gt;patch&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Et voilà, we have a singing &amp;amp; dancing Meego environment. But still, the UI
transitions are really missed.&lt;/p&gt;
&lt;p&gt;Next step: Syslink, DOMX and GStreamer.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>btw</title>
		<link href="https://blogs.igalia.com/vjaquez/btw/"/>
		<updated>2010-10-19T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/btw/</id>
		<content type="html">&lt;p&gt;By the way, I will be at Cambridge, UK, the next Monday, I will attend the
&lt;a href=&quot;http://gstreamer.freedesktop.org/conference/&quot;&gt;GStreamer Conference&lt;/a&gt; and
afterwards the &lt;a href=&quot;http://www.embeddedlinuxconference.com/elc_europe10/&quot;&gt;ELC-E
2010&lt;/a&gt;. I hope will see you
there!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Pandaboard - Chapter One</title>
		<link href="https://blogs.igalia.com/vjaquez/pandaboard-chapter-one/"/>
		<updated>2010-10-18T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/pandaboard-chapter-one/</id>
		<content type="html">&lt;p&gt;Finally, the last Friday the Pandaboard arrived to the office. Thanks to all the
guy in TI who generously decided to give me one, specially to &lt;a href=&quot;http://www.jayabharath.com&quot;&gt;Jayabharath
Goluguri&lt;/a&gt; and &lt;a href=&quot;http://bloggingthemonkey.blogspot.com/&quot;&gt;Rob
Clark&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/20101015_001-300x225.jpg&quot; alt=&quot;Pandaboard 1&quot;&gt;&lt;figcaption&gt;Pandaboard 1&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/20101015_002-300x225.jpg&quot; alt=&quot;Pandaboard 2&quot;&gt;&lt;figcaption&gt;Pandaboard 2&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/20101015_003-300x225.jpg&quot; alt=&quot;Pandaboard 3&quot;&gt;&lt;figcaption&gt;Pandaboard 3&lt;/figcaption&gt;&lt;/figure&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/20101015_004-300x225.jpg&quot; alt=&quot;Pandaboard 4&quot;&gt;&lt;figcaption&gt;Pandaboard 4&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;The next Saturday, &lt;a href=&quot;http://blogs.gnome.org/desrt/&quot;&gt;Ryan Lortie&lt;/a&gt; and I came to
the office to fool around with the new toy. Just one word: Impressive.&lt;/p&gt;
&lt;p&gt;Ryan set up the &lt;a href=&quot;http://omappedia.org/wiki/OMAP_Ubuntu_Main&quot;&gt;Ubuntu Maverick
Meerkat&lt;/a&gt; image for the Pandaboard.
At the beginning we ran with a couple problems, but with the help of
&lt;a href=&quot;http://ograblog.wordpress.com/&quot;&gt;Ogra&lt;/a&gt; we solved them. First lesson learnt:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The SD for Maverick must be, at least, a 4Gb card, not less.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Second lesson learnt:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The USB is unable the power the Pandaboard. Thou shall power the board with a
normal 5V power supply.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Also we found that my monitor, a LG Flatron W2261VP, is not well handled by the
PVR X driver, but still it’s usable under 640x480. Ryan filed a bug about this
issue.&lt;/p&gt;
&lt;p&gt;It was great start up experience. The next stage is play with syslink and DOMX.
Anyway, I won’t use Ubuntu for it, my plan is go with the minimal-fs stuff.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>grilo network library</title>
		<link href="https://blogs.igalia.com/vjaquez/grilo-network-library/"/>
		<updated>2010-10-14T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/grilo-network-library/</id>
		<content type="html">&lt;p&gt;Well, after almost a month of sketching out and playing with the grilo network
library, finally I pushed it into the official repository.The story is this: almost all the grilo plugins fetch their media metadata from
the Web. Their initial implementation used Gvfs, but this approach implied some
issues: Gvfs is not well supported in non-Gnome environments, no cache handling
and it doesn’t provide a throttling mechanism.&lt;/p&gt;
&lt;p&gt;As we desire to be nice guys with the Web services providing the metadata, and
also we want to play well with other players besides Gnome, so We though it
could be a good idea provide an utility class for grilo plugins which can be
used as a libsoup wrapper, which also would provide that functionality still
doesn’t provided by libsoup yet (cache and throttling).&lt;/p&gt;
&lt;p&gt;Nevertheless this web client functionality, semantically speaking, is not part
of grilo, the plugins could depend on other HTTP client, so we set it up as a
different library distributed by grilo’s core: grl-net. So whether your plugin
want to used, you just have to link the library against it.&lt;/p&gt;
&lt;p&gt;The web client uses the GAsync interface of GIO, so it is intuitive and easy to
port to GI and Vala, which are already supported in upstream too (more tests are
needed).&lt;/p&gt;
&lt;p&gt;As a final note, the web client is not finished yet, the memory cache and the
sync methods are work in progress, but it is already used by all the plugins
provided by grilo.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GUADEC 2010</title>
		<link href="https://blogs.igalia.com/vjaquez/guadec-2010/"/>
		<updated>2010-08-03T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/guadec-2010/</id>
		<content type="html">&lt;p&gt;Thanks to my employer, Igalia, this GUADEC was my third attendance to the
conference in a row. You can see my previous impressions about the first one in
&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2008/07/21/guadec-2008/&quot;&gt;Istanbul&lt;/a&gt; and the next
in &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2009/07/13/gcds-ramblings/&quot;&gt;Canarias&lt;/a&gt;. This
year the conference took place in Den Haag, Netherlands.About the GUADEC, I must state this: in my perception, Gnome is going through a
crisis. A middle age crisis if you want. In 2008 Gnome was on a peak, attracting
the attention of everyone, especially from the mobile industry. Everybody seemed
to be a happy Gnome hacker. But then came 2009 and Nokia said farewell to GTK
placing all its chips on Qt. The community seemed disenchanted and disappointed.
In the air was floating a sense of disbandment.&lt;/p&gt;
&lt;p&gt;And now that the project had lost much of the media’s attention, the community
is questioning to herself where to go, which is… great! It means that the
community has retaken the direction of the project, and the responsibility of
its success, away from the huge corporations and the PR propaganda.&lt;/p&gt;
&lt;p&gt;And that was the spirit of this GUADEC: hard work, serious proposals, and
freedom. Yes, that sense of new freedom which can also be perceived and exposed
as fear, uncertainty and doubts ;) And those feelings were more remarked because
of the absence of several of the old and renown hackers of the Gnome scene, such
as Miguel, Federico or Behdad.&lt;/p&gt;
&lt;p&gt;The main trend shown almost in each talk was the importance of the World Wide
Web integrated to the Gnome user experience. That was what Luis Villa talked on
his keynote, and was repeated in many other presentations. Xan López and Gustavo
Noronha echoed this idea making emphasis on the usage of WebKitGTK+ to achieve
it. WebKitGTK+ is a reusable library, with a stable API, in difference with
Mozilla, for example, which only focus on Firefox.&lt;/p&gt;
&lt;p&gt;On the other hand, and complementary to the idea of a Web Desktop, the use of
Javascript was stressed by John Palmieri: Coding for the Desktop must be just as
coding for the Web. And the Gnome Shell project is the flag ship of this
concept, and it continues steadily as the window manager for Gnome 3.0&lt;/p&gt;
&lt;p&gt;Here we can observe a shift of perspective since Istanbul: in those days people
were trying to bring the Web information into the Desktop (do you remember the
&lt;a href=&quot;http://live.gnome.org/OnlineDesktop&quot;&gt;Online Desktop&lt;/a&gt;?); nowadays the objective
is to turn the Desktop development into the same mind frame as Web development,
thus the information integration would be more seamless.&lt;/p&gt;
&lt;p&gt;An essential ingredient for this coupling is the introspection. And good
achievements were seen along this past year. Must of the Gnome core libraries
are making an effort to annotate their APIs, and Python, Vala and the GJS
implementation are merging their introspection work.&lt;/p&gt;
&lt;p&gt;But what everybody is asking “What’s going on with GTK+?”. Its development seems
to be at a very slow pace, with no real innovation to show. In 2008 Mark
Shuttleworth suggested to integrate Qt into Gnome, replacing GTK+, and this year
another voice repeated the same suggestion at the General Meeting.&lt;/p&gt;
&lt;p&gt;In a more technical issue, Benjamin Otte exploded against the so called “Walled
Gardens”. Benjamin have been trying to bring video rendering in GStreamer with
Cairo, but that effort means modify many different projects, bottom-up almost
along all the stack. As a result, he has found many features overlapped among
the different projects and also hit against the resistance from the coders of
the different projects to collaborate each other, phenomenon that he called the
“Walled Gardens”.&lt;/p&gt;
&lt;p&gt;And maybe, just maybe, this is what is happening with GTK+, is a fortified
garden, where selfless programmers are patiently sealing the castle for a future
exposition in the wild. I don’t know, maybe GTK+ should break its X Windows
ties. I don’t know. But GTK+ is not gaining any momentum for now among the user
interface programmers.&lt;/p&gt;
&lt;p&gt;Another voices raised the question about “What is Gnome from the developer
perspective?”. Andrew Savory regretted the lack of a SDK for Gnome; meanwhile
Alberto Ruiz praised its absence and pushed in favor of better developer
documentation and tutorials. I think that Gnome, as a developing framework, is a
loose set of (almost) homogeneous libraries, utilities and guide lines, where
the idea of an IDE/SDK implies a centralization of all the projects which is
practically impossible. And, because of this, more and more projects are
integrated into the FreeDesktop community.&lt;/p&gt;
&lt;p&gt;Also Dave Neary and German Poo showed their results from their own analysis in
the Gnome repositories. Dave tried to answer the question “Who makes GNOME?”, so
he extracted gross numbers from all the current data to get the actual great
iron committer; meanwhile German tried to be more lean and took in count
historical aspects as the different milestones of the project, sadly German only
got a lighting talk to show all his results.&lt;/p&gt;
&lt;p&gt;Finally, other projects are still floating around, the most important is
Clutter, now integrating accessibility thanks to Alejandro Piñeiro. Zeitgeist
seems to me a more and more marginal project in Gnome. Telepathy, which is the
de facto IM communication library for Gnome applications, and many others.&lt;/p&gt;
&lt;p&gt;In conclusion, my over all impression of the GUADEC 2010, is that the Gnome
project is in a deep insight of what is it and where is it going. I reckon that
during this period of introspection (wink) we will see few innovation, but
rather the new foundations of the project are putting down the required roots
for the future innovation.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>dsp-exec landed on dsp-tools</title>
		<link href="https://blogs.igalia.com/vjaquez/dsp-exec-landed-on-dsp-tools/"/>
		<updated>2010-07-06T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/dsp-exec-landed-on-dsp-tools/</id>
		<content type="html">&lt;p&gt;In the &lt;a href=&quot;http://elinux.org/BeagleBoard/DSP_Howto&quot;&gt;DSP bridge&lt;/a&gt; realm, usually when
the kernel module is loaded, it in turn loads the so called &lt;em&gt;DSP base image&lt;/em&gt;,
which is a file what encompass the &lt;a href=&quot;http://focus.ti.com/docs/toolsw/folders/print/dspbios.html&quot;&gt;DSP/BIOS
kernel&lt;/a&gt; and the
DSP/BIOS Bridge.Usually, in a development cycle, you may want to test different base images, and
removing and reloading the Linux bridgedriver module is not very practical. For
this case, TI provides the cexec.out utility, which uses the bloated
&lt;a href=&quot;http://dev.omapzoom.org/?p=tidspbridge/userspace-dspbridge.git;a=summary&quot;&gt;libdspbridge
API&lt;/a&gt;,
to load in runtime different DSP base images.&lt;/p&gt;
&lt;p&gt;But we all know that cool boys use dsp_bridge instead of libdspbridge, which is
much more clean, small and nice. And also we have a neat set of utilities called
&lt;a href=&quot;http://github.com/felipec/dsp-tools&quot;&gt;dsp-tools&lt;/a&gt;. Nevertheless a utility like
cexec.out was missing, and because of that dsp-exec has born.&lt;/p&gt;
&lt;p&gt;Last week, my patches were committed by &lt;a href=&quot;http://felipec.wordpress.com/&quot;&gt;FelipeC&lt;/a&gt;
into the stage repository in github, and I’m enjoying them while I’m poking
around in the audio decoding :)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>by the way</title>
		<link href="https://blogs.igalia.com/vjaquez/by-the-way/"/>
		<updated>2010-06-21T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/by-the-way/</id>
		<content type="html">&lt;p&gt;I am attending GUADEC&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/guadec-oranje.png&quot; alt=&quot;I am attending GUADEC&quot;&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>jpeg decoder in gst-dsp</title>
		<link href="https://blogs.igalia.com/vjaquez/jpeg-decoder-in-gst-dsp/"/>
		<updated>2010-06-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/jpeg-decoder-in-gst-dsp/</id>
		<content type="html">&lt;p&gt;Do you remember &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2010/01/29/gstjpegparser/#comments&quot;&gt;this
comment&lt;/a&gt;?
Well, I took the challenge, and it has been hard to accomplish.I started with an early implementation of FelipeC, but then I realised that I
didn’t understand a bit about what it was going on.&lt;/p&gt;
&lt;p&gt;So, I outlined a strategy with two milestones: try to clean up the TI OpenMAX IL
implementation and then to add the jpeg decoder to gst-dsp.&lt;/p&gt;
&lt;p&gt;In order to clean up the TI’s OMXIL, FelipeC recommended me to rewrite
libdspbridge using dsp_bridge beneath, but I didn’t see a real gain on that
task. It makes sense for a progressive TI-OMXIL update without breaking the ABI,
but that was not my purpose, so I stepped further and decided to rewrite the
LCML in terms of dsp_bridge instead.&lt;/p&gt;
&lt;p&gt;The LCML is the acronym for Linux Common Multimedia Layer, and it is a shared
library, loaded at run-time by the OMX components, and it provides the
communication between the ARM-side application and the multimedia DSP socket
node (SN). It is build upon the libdspbridge for the interaction with the
DSPBridge kernel module.&lt;/p&gt;
&lt;p&gt;My task was to rewrite the LCML, removing the libdspbridge linking dependency.
You can see the result in my &lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/ti-omxil/commits/lcml-ng&quot;&gt;lcml-ng
branch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Along the rewrite process I understood the communication protocol used by the
socket nodes. The clean up was really painful because the LCML code is very
messy and poorly designed. And I have to say this, the &lt;a href=&quot;http://en.wikipedia.org/wiki/Hungarian_notation&quot;&gt;Hungarian
notation&lt;/a&gt; must be buried deep
down into the oblivion.&lt;/p&gt;
&lt;p&gt;It was my intention to keep the ABI compatibility but I rather preferred be
readable, so I ended breaking it.&lt;/p&gt;
&lt;p&gt;With a clear idea of how the LCML library works, I retook the challenge, with
some degree of success: the SN was loaded up and allocated correctly, and also I
found that the input port only admits one buffer, and not two as rest of the
video decoders in gstdspvdec. But, when everything looked promising and the
input buffer was pushed, the SN threw an critical error event and the output
buffer was never received.&lt;/p&gt;
&lt;p&gt;I had to do more than merely understand the LCML, I had must rewrite the JPEG
decoder OMX component too. But this time the code was even more obfuscated than
the one in the LCML.&lt;/p&gt;
&lt;p&gt;And I had an epiphany: developing software in community implies have clean and
readable code, for sake of the peer reviewing, each one with heterogeneous
backgrounds. Meanwhile, under the closed and internal development approach, the
QA is based on &lt;a href=&quot;http://en.wikipedia.org/wiki/Black_box_testing&quot;&gt;black box
testing&lt;/a&gt;, where the cleanness of
the code is not a praised virtue, but somewhat the opposite.&lt;/p&gt;
&lt;p&gt;I rewrote all the jpeg decoder bits, from the component to its test application,
but I have not pushed that branch yet into gitorious.&lt;/p&gt;
&lt;p&gt;Finally I came across with the missing parts: each buffer pushed into the SN
must have metadata, which is a structure with information about the buffer; in
the case of the jpeg decoder, there were also a couple of &lt;a href=&quot;http://en.wikipedia.org/wiki/Magic_number_%28programming%29&quot;&gt;magic
numbers&lt;/a&gt;. The
output buffer also comes with metadata, which, among other information,
expresses if the buffer was decoded correctly.&lt;/p&gt;
&lt;p&gt;Yesterday, before meeting my mates for cinema, I emailed a couple patches with
the initial support for the &lt;a href=&quot;http://groups.google.com/group/gst-dsp/browse_thread/thread/3ba8e2f681d0ecbb&quot;&gt;jpeg decoding in
gst-dsp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The next task is find a strategy for the buffer number assignation on each port,
so it could be defined as late as possible.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>my DSP related activities</title>
		<link href="https://blogs.igalia.com/vjaquez/my-dsp-related-activities/"/>
		<updated>2010-05-17T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/my-dsp-related-activities/</id>
		<content type="html">&lt;p&gt;When I started to play with the Beagleboard, my objective was to poke with the
DSP accelerated codecs through OpenMAX and GStreamer. But soon I realized that
it would be a hard task to achieve since the framework, developed by Texas
Instrument, is in part proprietary (though free), and the another is open
source, but it is not developed with an open source community in mind.When I started to pulled it out, the first decision I had to face was to choose
a cross compiling environment. As you know, there are plenty: scratchbox,
OpenEmbedded, Buildroot, PTXdist, etc. But just because people I know from TI
began to write recipes for Poky, I devoted some time learning about it.
Although, after a while, I jumped into OpenEmbedded. The reason were the slow
updating rate against upstream which Poky had (and as I don’t follow the project
anymore, I’m not aware about its current state).&lt;/p&gt;
&lt;p&gt;But bitbake and OpenEmbedded are not the magic wand to build up a complete image
to boot up in a device. There are a lot of things to define previously. Just to
mention one, the distribution to build. By default OpenEmbedded offers Angstrom.
But I did not want a full featured distribution, I wondered for something thin
and lean, only a serial shell to start with, something I could set as a
workbench for my multimedia experiments.&lt;/p&gt;
&lt;p&gt;And for that reason &lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/marmita&quot;&gt;marmita&lt;/a&gt;
born.&lt;/p&gt;
&lt;p&gt;As you may see, I mimicked the “Poky’s way”, making an overlay of OpenEmbedded,
but as soon as I was getting involved in the OE’s community, I realized that
maybe that it was not the correct decision, maybe I should push my changes into
Angstrom instead.&lt;/p&gt;
&lt;p&gt;Anyway, right now I have a steady set of recipes which allows me to build
&lt;a href=&quot;http://people.igalia.com/vjaquez/beagle/&quot;&gt;images for the Beagleboard&lt;/a&gt;, with the
latest dspbridge kernel branch, and many of the TI bytes (either proprietary and
open source) required for running the DSP accelerated codecs.&lt;/p&gt;
&lt;p&gt;On the other hand, I have revamped the &lt;a href=&quot;http://elinux.org/BeagleBoard/DSP_Howto&quot;&gt;DSP
how-to&lt;/a&gt; at &lt;a href=&quot;http://elinux.org&quot;&gt;elinux.org&lt;/a&gt; wiki, with the
instructions to build up a kernel with DSP/BIOS Bridge support, and the means to
test the communication with the DSP through it.&lt;/p&gt;
&lt;p&gt;Along this process I became aware of the TI problems to release his DSP user
space stack to the open source community. Even though the kernel side is moving
quite well towards the kernel mainline, the user space bits are not doing that
well, even more, they will be completely deprecated soon, because the kernel
interface is still evolving.&lt;/p&gt;
&lt;p&gt;At the lowest layer, on the ARM side of the DSP users pace stack, there is a
library known as libbridge, which is basically an abstraction of the ioctl to
the dspbridge kernel module, and it offers &lt;a href=&quot;https://gforge.ti.com/gf/download/docmanfileversion/6/286/db_linux_pguide.pdf&quot;&gt;an interface with a nice
semantics&lt;/a&gt;,
but it is too much aligned to the old win16/32 API style (a bad idea in my
opinion).&lt;/p&gt;
&lt;p&gt;But the problem does not start with the API style, it begins at locating the
library inside of a chaotic bunch of files, insanely bundled in &lt;a href=&quot;http://dev.omapzoom.org/?p=tidspbridge/userspace-dspbridge.git;a=summary&quot;&gt;a git
repository&lt;/a&gt;,
along with binaries (either for Windows and Linux), tarballs, and all sort of
unrelated documentation.&lt;/p&gt;
&lt;p&gt;Furthermore, the image building machinery within TI is a custom set of invasive
makefiles, which all the projects must include and being conform with them. As
result of this highly coupled build engine, extracting and isolating a project
for it release is a painful and error prone process.&lt;/p&gt;
&lt;p&gt;Given those problems, I got lost as soon as I began. So I decided to emulate the
&lt;a href=&quot;http://felipec.wordpress.com/&quot;&gt;Felipe Contreras&lt;/a&gt;’ approach: get rid of
libbridge and use his minimalist dspbridge ioctl wrapper: dsp_bridge, what he
uses for &lt;a href=&quot;http://github.com/felipec/gst-dsp&quot;&gt;gst-dsp&lt;/a&gt;. In order to train myself
in these topics I wrote a clone of the TI’s ping application, using the
dsp_bridge instead. And later on I wrote the DSP socket node counterpart. Both
included in the
&lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/dsp-samples&quot;&gt;dsp-samples&lt;/a&gt; repository.&lt;/p&gt;
&lt;p&gt;Currently, the ping application is also included in the Meego’s
&lt;a href=&quot;http://meego.gitorious.org/maemo-multimedia/dsp-tools&quot;&gt;dsp-tools&lt;/a&gt; repository.&lt;/p&gt;
&lt;p&gt;Nevertheless, most of the DSP multimedia codecs are exposed, out of the box,
through the TI’s OpenMAX IL implementation. And it depends on libbridge. For
that reason I ripped out the libbridge from the userspace-dspbridge repository
and pushed it into a &lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/libbridge&quot;&gt;different
repository&lt;/a&gt;, cleaned it up
its building machinery and removed other unneeded bytes too.&lt;/p&gt;
&lt;p&gt;Finally, I had to do the same for the &lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/ti-omxil&quot;&gt;OpenMAX
IL&lt;/a&gt;, which is not only messed
up with the inside building machinery, but it is not released through a git
repository yet, using instead old fashioned tarballs.&lt;/p&gt;
&lt;p&gt;The future work will be integrate gst-openmax into marmita and try to
participate with gst-dsp development. Also, FelipeC came up with the idea of
rewrite libbridge in terms of dsp_bridge, task that I have been exploring
lately.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>using bugzilla, the right way</title>
		<link href="https://blogs.igalia.com/vjaquez/using-bugzilla-the-right-way/"/>
		<updated>2010-04-30T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/using-bugzilla-the-right-way/</id>
		<content type="html">&lt;p&gt;Yes, I admit it, I hate bugzilla. I mean, the bug tracking is something
indispensable for every software project, but digging in its web interface for
quick searches, I just find it unbearably awful.But I guess I came across with the right tool for overcome this web madness:
&lt;a href=&quot;http://www.liquidx.net/pybugz/&quot;&gt;pybugz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On the other hand, I’ve to say that I agree about using bugzilla to keep track
of patches, it’s a &lt;a href=&quot;http://felipec.wordpress.com/2010/01/19/why-bugzilla-sucks-for-handling-patches/&quot;&gt;bad
idea&lt;/a&gt;
too. A properly organised mailing list and maybe a
&lt;a href=&quot;http://ozlabs.org/~jk/projects/patchwork/&quot;&gt;patchwork&lt;/a&gt;, if the traffic is
massive, as helper.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Jhbuild beneath OpenEmbedded</title>
		<link href="https://blogs.igalia.com/vjaquez/jhbuild-beneath-openembedded/"/>
		<updated>2010-03-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/jhbuild-beneath-openembedded/</id>
		<content type="html">&lt;p&gt;Since a while I’ve been working on a OpenEmbedded overlay called
&lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/marmita&quot;&gt;marmita&lt;/a&gt;. But this post is
not about it. Where I want to aim now is about a nice trick: how to use Jhbuild
using an OpenEmbedded setup.First of all, &lt;a href=&quot;http://live.gnome.org/Jhbuild&quot;&gt;install jhbuild&lt;/a&gt;. And, of course,
&lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/marmita/blobs/master/README&quot;&gt;install
Marmita&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In Marmita, just as in Poky, in order to get into the OE environment, the user
source the script
&lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/marmita/blobs/master/marmita-init-build-env&quot;&gt;marmita-init-build-env&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then, I setup another script, which is though to be the rcfile of a new bash
session:
&lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/marmita/blobs/master/scripts/marmita-simple-cross-compiling-env&quot;&gt;marmita-simple-cross-compiling-env&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, at this moment we have set all those environment variables needed to run a
jhbuild session. There is also an alias for the jhbuild build, which specifies
the jhbuildrc file, crafted for a cross-compiled environment: marmita.jhbuildrc.&lt;/p&gt;
&lt;p&gt;For the moment I’ve only built GStreamer. And as a matter of fact, in the
process, I came up with a simple patch for gst-plugins-bad.&lt;/p&gt;
&lt;p&gt;By the way, the destination directory is in the /opt directory, under the stage
directory; so, if you want to play with the generated output in a device, just
copy that directory tree into the device’s file system.&lt;/p&gt;
&lt;p&gt;Yes, I cannot say that I achieved a full integration between jhbuild and OE, but
what I can state is that cooperation is quite possible.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>apache configuration for video tag in firefox</title>
		<link href="https://blogs.igalia.com/vjaquez/apache-configuration-for-video-tag-in-firefox/"/>
		<updated>2010-03-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/apache-configuration-for-video-tag-in-firefox/</id>
		<content type="html">&lt;p&gt;In contrast with Epiphany-WebKit, Firefox seems to be quite picky at rendering
videos through the HTML5 tag &amp;lt;video&amp;gt;: it demands the correct HTTP &lt;a href=&quot;http://headers.It&quot;&gt;headers.It&lt;/a&gt; doesn’t assume anything. If the stream doesn’t have the correct headers,
Firefox just will put a black box in you face without any further explanation.&lt;/p&gt;
&lt;p&gt;In order to overcome this issue, struggling a little with the sparse information
available through the Internet, I came with this .htaccess file:&lt;/p&gt;
&lt;pre class=&quot;language-apacheconf&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-apacheconf&quot;&gt;    &lt;span class=&quot;token directive-inline property&quot;&gt;AddType&lt;/span&gt; video/ogg          .ogv&lt;br&gt;    &lt;span class=&quot;token directive-inline property&quot;&gt;Header&lt;/span&gt; set Access-Control-Allow-Origin &lt;span class=&quot;token string&quot;&gt;&quot;&#92;*&quot;&lt;/span&gt;&lt;br&gt;    &lt;span class=&quot;token directive-inline property&quot;&gt;Header&lt;/span&gt; unset Etag&lt;br&gt;    &lt;span class=&quot;token directive-inline property&quot;&gt;FileETag&lt;/span&gt; None&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;First of all, my Apache server doesn’t recognize the &lt;code&gt;video/ogg&lt;/code&gt; mime type.&lt;/p&gt;
&lt;p&gt;Second, the header MUST NOT include the ETag key.&lt;/p&gt;
&lt;p&gt;And finally, there’s new header, which isn’t fully implemented by the all
browsers, but it will be, and will mess up all our pages with embedded videos,
is the cross domain accessibility.&lt;/p&gt;
&lt;p&gt;More information:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://diveintohtml5.org/video.html&quot;&gt;http://diveintohtml5.org/video.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bluishcoder.co.nz/2008/11/video-audio-and-cross-domain-usage.html&quot;&gt;http://www.bluishcoder.co.nz/2008/11/video-audio-and-cross-domain-usage.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.flossmanuals.net/TheoraCookbook/MyHosting&quot;&gt;http://en.flossmanuals.net/TheoraCookbook/MyHosting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.askapache.com/htaccess/apache-speed-etags.html&quot;&gt;http://www.askapache.com/htaccess/apache-speed-etags.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_headers.html&quot;&gt;http://httpd.apache.org/docs/2.0/mod/mod_headers.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</content>
	</entry>
	
	<entry>
		<title>Grilo meets Vala</title>
		<link href="https://blogs.igalia.com/vjaquez/grilo-meets-vala/"/>
		<updated>2010-02-12T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/grilo-meets-vala/</id>
		<content type="html">&lt;p&gt;Last week, after the internal presentation of
&lt;a href=&quot;http://gitorious.org/grilo&quot;&gt;Grilo&lt;/a&gt;, I got pretty excited about the project:
basically, using Grilo I could make &lt;a href=&quot;http://code.google.com/p/epris/&quot;&gt;epris&lt;/a&gt;
consume feeds from &lt;a href=&quot;http://www.jamendo.com&quot;&gt;Jamendo&lt;/a&gt;.I started to generate the bindings for &lt;a href=&quot;http://live.gnome.org/Vala/&quot;&gt;Vala&lt;/a&gt;. I
never thought it could be that hard: the heavy use of atypical callbacks in
Grilo made me find a &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=609591&quot;&gt;bug in the code writer of
Vala&lt;/a&gt;. And eventually I came
with &lt;a href=&quot;http://git.gnome.org/browse/vala/commit/?id=e8338e02d8c2366cd2b71aff8bae0daec92af0e9&quot;&gt;a small
patch&lt;/a&gt;,
which I’d just pushed.&lt;/p&gt;
&lt;p&gt;Those problems brought into the discussion to use
&lt;a href=&quot;http://library.gnome.org/devel/gio/stable/GAsyncResult.html&quot;&gt;GAsyncResult&lt;/a&gt;
within Grilo instead of the custom callbacks mechanism. We’ll see where we can
go.&lt;/p&gt;
&lt;p&gt;Finally I got my &lt;a href=&quot;http://gitorious.org/grilo/grilo/blobs/master/tools/vala/grilo-test.vala&quot;&gt;small test
snippet&lt;/a&gt;.
Cute, isn’t it?&lt;/p&gt;
&lt;p&gt;Today also pushed another patches I’d in my Vala queue. The interesting part is,
after talking with &lt;a href=&quot;http://zee-nix.blogspot.com/&quot;&gt;Zeeshan&lt;/a&gt;, I understood that
the gstreamer vapi must be generated with the latest release of GStreamer.
Something logical but I never stopped to think about it.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Slides of my talk at FOSDEM 2010</title>
		<link href="https://blogs.igalia.com/vjaquez/slides-of-my-talk-at-fosdem-2010/"/>
		<updated>2010-02-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/slides-of-my-talk-at-fosdem-2010/</id>
		<content type="html">&lt;p&gt;I still don’t know how to submit my slides into the &lt;a href=&quot;http://fosdem.org/2010/&quot;&gt;FOSDEM
website&lt;/a&gt;, so I’m linking them here by now:&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/fosdem2010-300x225.png&quot; alt=&quot;DSPBridge on OMAP3 - fosdem 2010&quot;&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>gstjpegparser</title>
		<link href="https://blogs.igalia.com/vjaquez/gstjpegparser/"/>
		<updated>2010-01-29T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gstjpegparser/</id>
		<content type="html">&lt;p&gt;Back in August 2009 I was chatting with my old peers in Mexico, and they told me
that they needed a JPEG parser element in GStreamer for their DSP accelerated
JPEG decoder. So, I went to bugzilla and found a &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=583098&quot;&gt;bug report about the issue and
a proposed patch&lt;/a&gt;. But the
published patch still missed some features so I took it and worked on it.After attaching my first try, Arnout, the first author of the patch, came with
some comments to improve the element. Several weeks after I retook the element
and almost rewrote it again. So I was waiting for the OK from a GStreamer
developer.&lt;/p&gt;
&lt;p&gt;Finally, this week, Stefan review it and pushed it. Sadly for me, I didn’t
notice, when I rebased my local commits, squashing my change set into one single
commit, that this commit had as author Arnout, not me :(&lt;/p&gt;
&lt;p&gt;Now &lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=bb5331e2729913aec8ea0f60101049d5b7e590b0&quot;&gt;the commit is under the Arnout’s
credit&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Yeah, sometimes I’m so absentminded.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Ping DSP task node</title>
		<link href="https://blogs.igalia.com/vjaquez/ping-dsp-task-node/"/>
		<updated>2010-01-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/ping-dsp-task-node/</id>
		<content type="html">&lt;p&gt;&lt;em&gt;DSP task nodes&lt;/em&gt;, under the TI Omap3 domain, are a separate execution threads
running on the DSP that implement control or signal processing algorithms.I’ve just pushed a rewrite for the ping dsp task node to my &lt;a href=&quot;http://gitorious.org/vjaquez-beagleboard/dsp-samples&quot;&gt;dsp-samples
repository&lt;/a&gt;. It works with
the dsp-ping program included in
&lt;a href=&quot;http://maemo.gitorious.org/maemo-multimedia/dsp-tools&quot;&gt;dps-tools.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An interesting thing is that it’s nearly 5 times smaller than the dll provided
by TI:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;-rw-r--r-- 1 1001 1001 3920 Jan 19 15:01 pingdyn_3430.dll64P -rw-r--r-- 1 root root 19816 Jan 19 14:44 pingdyn_3430.dll64P.bak&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And &lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/going-to.png&quot; alt=&quot;I&#39;m going to FOSDEM 2010&quot;&gt; too!&lt;/p&gt;
&lt;p&gt;And maybe I’ll talk about this in the embedded devroom… maybe…&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Minimal CD Ripper</title>
		<link href="https://blogs.igalia.com/vjaquez/minimal-cd-ripper/"/>
		<updated>2010-01-14T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/minimal-cd-ripper/</id>
		<content type="html">&lt;p&gt;Back in London I bought a couple CDs. Obviously I don’t use CD players anymore,
I mostly stream all the music I hear (&lt;a href=&quot;http://www.jamendo.com&quot;&gt;jamendo&lt;/a&gt;,
spotify, &lt;a href=&quot;http://last.fm&quot;&gt;last.fm&lt;/a&gt;). Though, if I want to hear music using my n900 without any
network connection, I ought drop in there the music files. So, the solution is
rip out the music from the CDs, encode them et voilà.The obvious solution to rip music is
&lt;a href=&quot;http://live.gnome.org/SoundJuicer&quot;&gt;SoundJuicer&lt;/a&gt;, and I started to compile it
within my jhbuild environment, but I found a huge list of dependencies which I
didn’t want to install, such as brasero. As everybody knows the next logical
think then is “let’s code a simple cd ripper”.&lt;/p&gt;
&lt;p&gt;Vala was my chosen language (and don’t ask why). What I wanted was have metadata
in the files (life without metadata is not feasible anymore), also I want to
encode the files in AAC/MPEG4, and finally I didn’t want any user interaction:
just run the program and have my directory with my music.&lt;/p&gt;
&lt;p&gt;The first problem I found was that Vala hasn’t bindings for
&lt;a href=&quot;http://musicbrainz.org/doc/libmusicbrainz&quot;&gt;libmusicbrainz&lt;/a&gt;, so I started to
cook one for libmusicbrainz v2.x, which I found terrible bad to port to Vala and
also it is already deprecated. Then I cooked another for libmusicbrainz3.&lt;/p&gt;
&lt;p&gt;After that, I also found that
&lt;a href=&quot;http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstTagSetter.html&quot;&gt;GstTagSetter&lt;/a&gt;
wasn’t bind to Vala either, so I made the &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=606826&quot;&gt;patches for
it&lt;/a&gt; and
&lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=606827&quot;&gt;another&lt;/a&gt; for the
GstIterator.&lt;/p&gt;
&lt;p&gt;Solved all those issues, finally I came with my mcdripper!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gitorious.org/vjaquez-misc/mcdripper&quot;&gt;http://gitorious.org/vjaquez-misc/mcdripper&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ah, by the way, it uses async methods, so you’ll need a recent Vala (I use the
git’s version).&lt;/p&gt;
&lt;p&gt;And finally I’ve been ripping my new CDs and storing the files in my N900.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Moving out apt metadata</title>
		<link href="https://blogs.igalia.com/vjaquez/moving-out-apt-metadata/"/>
		<updated>2010-01-12T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/moving-out-apt-metadata/</id>
		<content type="html">&lt;p&gt;As some of you may know, in the N900, the root file system is stored in a
OneNAND chip with 256M of space. Meanwhile &lt;code&gt;/home&lt;/code&gt; and &lt;code&gt;/home/user/MyDocs&lt;/code&gt; are
in a eMMC in two different partitions: ~2GB (ext2) for &lt;code&gt;/home&lt;/code&gt; and ~29GB (vfat)
for &lt;code&gt;/home/user/MyDocs&lt;/code&gt;.The OneNAND is faster than the eMMC, and it’s intended to host only the Maemo
main system, moving out the third party applications to the eMMC. Though, this
new layout has brought new limitations, the more visible one is the /opt problem
[&lt;a href=&quot;http://wiki.maemo.org/Opt_Problem&quot;&gt;2&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;One of the debates about what left and what not in the OneNAND is the apt
database and metadata. Moving out the apt database out from the OneNAND to the
eMMC, in my personal opinion, is very risky: It will slow down the database
processing (which is already slow given the size of the Fremantle repositories),
and if the eMMC gets corrupted, the base system wouldn’t be upgreadable either,
because apt couldn’t read its database. And that’s why I’m against the proposal.&lt;/p&gt;
&lt;p&gt;Nevertheless I’m aware that the apt metadata and database could be huge,
consuming much of the precious OpenNAND storing space. Just to mention it, I’ve
found myself, in my development cycles, moving out those files.&lt;/p&gt;
&lt;p&gt;That’s why I cooked this script:
&lt;a href=&quot;http://people.igalia.com/vjaquez/n900/move-apt-dirs.sh&quot;&gt;move-apt-dirs.sh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;WARNING: this script is &lt;strong&gt;not&lt;/strong&gt; official. You’re at your own if you run it: no
promises, no guaranties.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>shinning new HAM</title>
		<link href="https://blogs.igalia.com/vjaquez/shinning-new-ham/"/>
		<updated>2009-12-14T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/shinning-new-ham/</id>
		<content type="html">&lt;p&gt;A new version HAM will hit the streets soon, and we, the HAM team, are very
proud of all the effort done.There have been 178 commits since the first public release in the HAM
repository, all of them affording user experience and trying to cover several
corner cases on the SSU realm, specially dealing with reduced disk space in the
OneNAND.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/Screenshot-20091214-120423-300x180.png&quot; alt=&quot;New section view in HAM&quot;&gt;&lt;figcaption&gt;New
section view in HAM&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;There are several new features and some eye candy:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The section view has been improved greatly GtkIconView instead of the old
buttons grid.&lt;/li&gt;
&lt;li&gt;Several user interaction (work flows and dialogues appearance) optimizations.&lt;/li&gt;
&lt;li&gt;Keep the cursor position in the package lists among operations.&lt;/li&gt;
&lt;li&gt;Add live search support, dropping the old search dialog.&lt;/li&gt;
&lt;li&gt;Avoid the update icon blink when the screen is blank, saving power&lt;/li&gt;
&lt;li&gt;maemo-confirm-text can show the package name who launched it.&lt;/li&gt;
&lt;li&gt;Minor fixes in logic strings and text display.&lt;/li&gt;
&lt;li&gt;Speed up the HAM launching loading the back-end using a lazy strategy.&lt;/li&gt;
&lt;li&gt;Speed up the package list processing in the back-end, so the package list are
shown more quickly in the UI.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the packagers there are also some bits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Adapt the .install files in order to interact with the packaged catalogs.&lt;/li&gt;
&lt;li&gt;Initial support for OVI store packages.&lt;/li&gt;
&lt;li&gt;Add a dbus function to search packages so other applications can interact
with HAM.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And for the SSU, specially handling the reduced space disk in the root file
system:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use always the eMMC for downloaded packages, avoiding the rootfs even as
fallback.&lt;/li&gt;
&lt;li&gt;Stop as much process as possible when going into the SSU (stop prestarted
apps, camera-ui, browser, rtcom-messaging-ui, alarmd, etc.) in order to
reduce the double mappings of large files.&lt;/li&gt;
&lt;li&gt;Go into rescue mode if the SSU fails and change its looks to a less scary
one.&lt;/li&gt;
&lt;li&gt;Sync the disk before fetching it status, moving the operation to the
back-end.&lt;/li&gt;
&lt;li&gt;Because the documentation use a lot of disk space, we hack a way to get rid
of it during the SSU.&lt;/li&gt;
&lt;li&gt;Use the higher disk compression during the SSU&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Special thanks to Lokesh, David Kedves, Mario, Marius, Gabriel, and all whom
patient had helped us to make HAM a better piece of software to Fremantle users.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>The SSU nightmare (2)</title>
		<link href="https://blogs.igalia.com/vjaquez/the-ssu-nightmare-2/"/>
		<updated>2009-12-01T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/the-ssu-nightmare-2/</id>
		<content type="html">&lt;p&gt;Do you remember the third party policy nightmare
[&lt;a href=&quot;http://blogs.igalia.com/vjaquez/2009/07/28/the-ssu-nightmare/&quot;&gt;1&lt;/a&gt;]? Well,
the SSU saga &lt;a href=&quot;http://continues.As&quot;&gt;continues.As&lt;/a&gt; some of you may know, in the N900, the root file system is stored in a
OneNAND chip with 256M of space. Meanwhile /home and /home/user/MyDocs are in a
eMMC in two different partitions: ~2GB (ext2) for /home and ~29GB (vfat) for
/home/user/MyDocs. This new layout has brought new limitations. The more visible
one is the /opt problem [&lt;a href=&quot;http://wiki.maemo.org/Opt_Problem&quot;&gt;2&lt;/a&gt;]. But others,
more subtle, have been arose, specially in HAM.&lt;/p&gt;
&lt;p&gt;The SSU is the operation to upgrade the system in the device without reflashing,
and this is the preferred way to keep it updated. The release 1.0 of Maemo 5 is
already in the wild, and has been thoroughly tested and promptly fixed, thus the
release 1.1 has a huge change set. And the SSU failed miserably in the early
testing: the root file system ran out of space before the end of the process.&lt;/p&gt;
&lt;p&gt;A first analysis exposed a regression in HAM (it was not closing the running
applications before installing the SSU), and a problem with Gtk+ icon cache
[&lt;a href=&quot;http://library.gnome.org/devel/gtk/unstable/gtk-update-icon-cache.html&quot;&gt;3&lt;/a&gt;]:
as it is a mapped file, when a package updates the icon cache, the rest of
running processes kept a whole copy of the previous file. And closing the
running user applications did not fix the issue, because there are many other
system processes linked with the toolkit library. The Gtk guys cunningly
proposed a fix using the triggers in dpkg
[&lt;a href=&quot;http://www.dpkg.org/dpkg/Triggers&quot;&gt;4&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;Nevertheless, only unstable apt uses the trigger delaying strategy
[&lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473461&quot;&gt;5&lt;/a&gt;]. So we
extracted the related commits and cherry picked them into Maemo’s apt [6]. I
must say that I’m still crossing my fingers begging for the stability of those
commits.&lt;/p&gt;
&lt;p&gt;But the problem remained: the space in the root file system got exhausted. Other
mapped files came noticed. “Kill’em all!”, they shouted, referring to the all
running processes when performing the SSU. At this moment all the dirty &lt;em&gt;ad-hoc&lt;/em&gt;
hacks started get integrated into the source code of HAM (shame on me): first a
list of services to stop (camera-ui, browserd, hildon-desktop, among others),
and then list of processes to kill (yes, signal 9)
[&lt;a href=&quot;http://maemo.gitorious.org/hildon-application-manager/mainline/commit/67ad33249915aa128f7cfab77bab2a5b91be04fc&quot;&gt;8&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;Yet the free space got exhausted. “HAM does not calculate the free space
correctly!”, they complained. There was a remarkable difference of what df shown
and the amount of bytes that HAM recognized as free. We reviewed the source code
of df in busybox [&lt;a href=&quot;http://git.busybox.net/busybox/tree/coreutils/df.c&quot;&gt;9&lt;/a&gt;],
finding that it uses the f_bavail value in the statfs structure, meanwhile HAM
uses f_bfree since Diablo. So in the spirit of prevention we changed it to
f_bavail.&lt;/p&gt;
&lt;p&gt;Still the required free space was more than the estimated. “Use the rescue mode
as the last resource”, they demanded. So we changed added a new &lt;em&gt;ad-hoc&lt;/em&gt; code
path: if the SSU fails because of space exhaustion, reboot and get into the
rescue mode. In this way is assured that none process is running. But this is
not nice use a rescue mode for a normal operation. The upgrade must be as smooth
as possible.&lt;/p&gt;
&lt;p&gt;A further analysis shown that the packages install their documentation, and only
&lt;em&gt;a posteriori&lt;/em&gt; docpurge [&lt;a href=&quot;http://maemo.gitorious.org/maemo-af/docpurge&quot;&gt;10&lt;/a&gt;]
deletes it. We should avoid write the documentation in the root file system. “Do
a bind-mounting to another partition dumping all the documentation there”, they
said, and another &lt;em&gt;ad-hoc&lt;/em&gt; hacks were integrated. At least Marius brought some
sanity and proposed a patch to dpkg to filter out some directories
[&lt;a href=&quot;http://maemo.gitorious.org/maemo-af/dpkg/commit/72c255d86d37a40d24d33ed784e8f3fbde377427&quot;&gt;11&lt;/a&gt;]
before the got wrote in disk. Sadly, his change did not make it in the release
1.1.&lt;/p&gt;
&lt;p&gt;At the end all these madness and hackish solutions seems to fix the SSU for now.
But we shall clean out all this mess from HAM.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Embedded Linux Conference Europe 2009</title>
		<link href="https://blogs.igalia.com/vjaquez/embedded-linux-conference-europe-2009/"/>
		<updated>2009-10-17T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/embedded-linux-conference-europe-2009/</id>
		<content type="html">&lt;p&gt;A couple days ago Juanjo asked me if I wanted to attend the &lt;a href=&quot;http://www.embeddedlinuxconference.com/elc_europe09/index.html&quot;&gt;Embedded Linux
Conference&lt;/a&gt; at
Grenoble, France, sponsored by the CE Linux forum and I usually don’t say “no”
to travel. So one day after I unpacked from Barcelona, I packed again.One of the bad sides of living in A Coruña is the fly connections needed to go
to anywhere. This time it was A Coruña - Madrid - Lyon (St Exupéry Airport) -
Grenoble. Even though I found entertained and challenging all these
heterogeneous connections.&lt;/p&gt;
&lt;p&gt;In the registration area surprisingly I came across with Rob Taylor and Mark
Doffman, from &lt;a href=&quot;http://www.codethink.co.uk&quot;&gt;Codethink&lt;/a&gt;. Later on I saw also
&lt;a href=&quot;http://blogs.gnome.org/bolsh/&quot;&gt;David Neary&lt;/a&gt; and &lt;a href=&quot;http://blogs.gnome.org/uraeus/&quot;&gt;Christian
Schaller&lt;/a&gt; around.&lt;/p&gt;
&lt;p&gt;The opening key talk was in charge of &lt;a href=&quot;http://www.jonmasters.org/&quot;&gt;Jon Masters&lt;/a&gt;,
and was about “Porting Linux” to other hardware platforms, where he just
highlight some hints and landmarks in the porting process, such as run the
vendor tests in the board, port the u-boot, read the hardware erratas (which are
more insightful than the rest of the documentation); read the linux kernel
mailing lists; use the &lt;a href=&quot;http://linuxplumbersconf.org/ocw/proposals/47&quot;&gt;flattened device
tree&lt;/a&gt; to specify the device’s
addresses (there’s no BIOS neither ACPI in embedded system); gave some
recommendations using cscope; and finally insisted in not to take the x86
architecture implementation as references, because is too dirty, he rather
recommended use the score arch (“x86 wouldn’t be designed today”). At the end he
strongly advised about reading the
&lt;a href=&quot;http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=Documentation/development-process&quot;&gt;development-process&lt;/a&gt;
under the kernel documentation.&lt;/p&gt;
&lt;p&gt;The next talk I attended was “Use of the Fast IRQ (FIQ) in ARM-Linux” by
&lt;a href=&quot;http://ar.linux.it/&quot;&gt;Allesandro Rubini&lt;/a&gt;. The FIQ is an interrupt request with a
higher priority and can be handled while another IRQ. Allesandro use them as
near-real-time signal processing under a non-real-time linux kernel. In this
talk he showed his &lt;a href=&quot;http://cvs.gnudd.com/sw/fiq-engine.html&quot;&gt;&lt;/a&gt;project, which
hasn’t been accepted in mainstream, because is too task specific.&lt;/p&gt;
&lt;p&gt;Then I stayed in the talk “Constrained Power Management” by Patrick Bellasi
where he described multiple-policy power management optimization. Patrick
distinguish two PM policies: device specific and system-wide. So he propose a
coordinator entity among the local policies, and this coordinator uses some kind
of linear programming optimization. Cool research stuff.&lt;/p&gt;
&lt;p&gt;My objective for the conference was twofold: to learn about embedded linux
distributions build systems, and to come aware of the community opinions about
Android. So I’d the intention to attend the Matt Porter’s talk, nevertheless
Masters recommended the PTXdist one, and I bought it: failed! The Porter’s talk
won the “best talk” conference’s award.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.ptxdist.org/software/ptxdist/index_en.html&quot;&gt;PTXdist&lt;/a&gt; is just another
embedable-linux-distribution builder, based on Kconfig to “cook” your distro
and in makefiles (&lt;a href=&quot;http://www.lnx-bbc.com/garticle.html&quot;&gt;GAR&lt;/a&gt; style) to build
the packages and express their dependencies. An interesting feature is the
&lt;a href=&quot;http://ltmain.sh&quot;&gt;ltmain.sh&lt;/a&gt; fixup to avoid path hard-coding in libraries lookups.&lt;/p&gt;
&lt;p&gt;Afterward I assisted to Nina Wilner’s talk about “Porting Android to Power
Architecture”. She’s technology chief at IBM for the revamped
&lt;a href=&quot;http://www.power.org&quot;&gt;PowerPC&lt;/a&gt; platform. Sadly she just make advertising for
&lt;a href=&quot;http://www.mentor.com/&quot;&gt;Mentor Graphics&lt;/a&gt;, the guys who employ Matt Porter and
actually done the PowerPC port of Linux to Android. A couple interesting
insights is that even though Google insist that Android is multi-platform it’s
full of ARMisms, and porting its &lt;a href=&quot;http://files.getdropbox.com/u/88269/bionic.txt&quot;&gt;Bionic C
Library&lt;/a&gt; to other architectures
painfully. Nevertheless she stated that Android could make, in the embedded
stage, what Linux made for Unix in the servers: do all over again and do it
right.&lt;/p&gt;
&lt;p&gt;Then I backed to the hardcore topics with “Analyzing Kernel Function Execution
with ftrace” by &lt;a href=&quot;http://elinux.org/User:Tim_Bird&quot;&gt;Tom Bird&lt;/a&gt;. He’s also one the
organizers of the conference.
&lt;a href=&quot;http://people.redhat.com/srostedt/ftrace-tutorial.odp&quot;&gt;ftrace&lt;/a&gt; is the first
generic tracing system to get mainlined. In this talk Tom explained his
adventures to measure the duration of each kernel’s function at boot. With
ftrace you can execute logging functions at every filtered function call.
Meanwhile the community is expecting the port of
&lt;a href=&quot;http://en.wikipedia.org/wiki/DTrace&quot;&gt;dtrace&lt;/a&gt; to Linux.&lt;/p&gt;
&lt;p&gt;In the afternoon &lt;a href=&quot;http://marcin.juszkiewicz.com.pl/&quot;&gt;Marcin Juszkiewicz&lt;/a&gt; talked
about “Hacking with OpenEmbedded”. It was about different use cases for
OpenEmbedded beside the embedded distro building.&lt;/p&gt;
&lt;p&gt;Finally, the BoFs of the conference. I stayed at first in the
&lt;a href=&quot;http://buildroot.uclibc.org/&quot;&gt;Buildroot&lt;/a&gt;, another embedded-distro-building
which is too similar to PTXdist. At the middle of it I ran away to the Android
BoF which I catch at the conclusions. Again, Android doesn’t bring nothing new,
nothing breakthrough, but a lot of questions and doubts, as its ties with
Google, its GPL licensing avoidance efforts, and so on.&lt;/p&gt;
&lt;p&gt;And the Small Business BoF, organized by &lt;a href=&quot;http://opdenacker.org/&quot;&gt;Michael
Opdenacker&lt;/a&gt;, the owner of the company &lt;a href=&quot;http://free-electrons.com/&quot;&gt;Free
Electrons&lt;/a&gt;. Most of the companies there were quite
small, several just one-person companies. The hottest topics there were about
the lawyers need, the time tracking and billing, the hiring process and local vs
abroad clients.&lt;/p&gt;
&lt;p&gt;At the night we’d the social event: a cocktail buffet at Restaurant du
Téléphérique, with a great &lt;a href=&quot;http://www.routard.com/photos/alpes/1519-grenoble_depuis_la_bastille.htm&quot;&gt;panoramic view of the
city&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At the next and last day, the opening keynote was in charge of Philippe Gerum:
“State of real-time Linux: Don’t stop until history follows”. I arrive late to
the talk but as far as I understood, he talked about the advances in the Linux
kernel in the Real Time arena. He put special attention to the project
&lt;a href=&quot;http://www.xenomai.org/index.php/Main_Page&quot;&gt;Xenomai&lt;/a&gt;, which bring hard
real-time support in the GNU/Linux user-space.&lt;/p&gt;
&lt;p&gt;I flipped a coin and decided to go to “The LLVM MIPS and ARM backends” but I was
gladly surprised with the talks swapping to
“&lt;a href=&quot;http://coccinelle.lip6.fr/&quot;&gt;Coccinelle&lt;/a&gt;: A program matching and transformation
tool” by &lt;a href=&quot;http://www.diku.dk/hjemmesider/ansatte/npalix/&quot;&gt;Nicolas Palix&lt;/a&gt;. I came
aware of the powerful concept of &lt;a href=&quot;http://coccinelle.lip6.fr/sp.html&quot;&gt;semantic
patch&lt;/a&gt;. The principal use case for it, is to
detect the collateral effects of an API breakage, also to fix common programming
mistakes. It has been used in the kernel finding tons of potential unseen bugs.
Neat!&lt;/p&gt;
&lt;p&gt;After a short coffee break I ran into the “Survey of Linux measurement and
diagnostics tools” by Frank Rowand. He shown a quick survey of several software
tools for performance measurement such as &lt;a href=&quot;http://www.selenic.com/smem/&quot;&gt;smem&lt;/a&gt;
(quite interesting); &lt;a href=&quot;http://oprofile.sourceforge.net&quot;&gt;oprofile&lt;/a&gt; (quote:
“sampling tools are not that good” also is turning obsolete);
&lt;a href=&quot;http://sourceware.org/systemtap/&quot;&gt;systemtap&lt;/a&gt; (measure the processor use in a
non-intrusive way); time (the old &amp;amp; honest); perf (here Frank talked about the
interesting problem of &lt;a href=&quot;http://en.wikipedia.org/wiki/CPU_cache#Cache_misses&quot;&gt;cache
misses&lt;/a&gt;);
&lt;a href=&quot;http://www.bootchart.org/&quot;&gt;bootchart&lt;/a&gt;; the &lt;a href=&quot;http://www.celinuxforum.org/CelfPubWiki/KernelFunctionTrace&quot;&gt;kernel function
trace&lt;/a&gt;; the
&lt;a href=&quot;http://ltt.polymtl.ca/&quot;&gt;LLTng&lt;/a&gt;, &lt;a href=&quot;http://blog.fenrus.org/?p=5&quot;&gt;Timechart&lt;/a&gt;, an
finally the famous ftrace.&lt;/p&gt;
&lt;p&gt;Meanwhile the lunch time was getting arranged, a showcase took place in a room,
where a couple projects were shown. The most impressive IMHO was the Nsec Linux
system boot by Montavista. There was also Codethink with a
all-microbloggers-on-one application; an LZO compression algorithm for the
kernel; a demo of Android in PowerPC, etc.&lt;/p&gt;
&lt;p&gt;In the second part of the second day, Gilad Ben-Yossef, from
&lt;a href=&quot;http://codefidence.com/&quot;&gt;Codefidence&lt;/a&gt;, talked about “The good, the bad and
ugly: on threads, processes and co-processes”, where he probed that in the Linux
realm, threads and processes have no performance differences. In theory the big
difference between a process and a thread is that the first owns a memory space
and the second share it, so the &lt;a href=&quot;http://en.wikipedia.org/wiki/Context_switch&quot;&gt;context
switching&lt;/a&gt; among process should be
more expensive that in threads. So he decided to do some measurements with a
modified version of &lt;a href=&quot;http://www.bitmover.com/lmbench/lat_ctx.8.html&quot;&gt;lat_ctx&lt;/a&gt;,
and surprise! no appreciable differences were shown. Thus, his conclusion, is
that the reason why people prefer use threads instead of process is because the
API. The mental model offered by the threads is more appeal to the common
programmer than the process model, so Gilad decided to create a wrapper library
to implement process API in terms of the threads API called
&lt;a href=&quot;http://github.com/gby/coproc&quot;&gt;coproc&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;“A computer is a state machine. Threads are for people who can’t program state
machines” – Alan Cox&lt;/p&gt;
&lt;p&gt;The last talk I assisted was “Technical features and components of open source
build systems” by Alex de Vries from Wind River Systems. It tried to bring a
survey of all the requirements of a “perfect” embedded-distro-builder and then a
pseudo BoF was raised with the question why we don’t have already one? There are
tons of these system on the wild, but every has a very specific and reduced set
of features. There was no conclusions but at least the seed was planted.&lt;/p&gt;
&lt;p&gt;Finally, the closing keynote was carried on by Tom Bird and Klaas van Gend, in a
mixed talk about the purpose of the CE Linux forums its goals and achievements
with a contest of &lt;a href=&quot;http://tbe.sourceforge.net/&quot;&gt;the butterfly effect&lt;/a&gt;. It was
fun.&lt;/p&gt;
&lt;p&gt;The conference closed with a round of drinks. I got a nice Chinese beer.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>GIT quick notes</title>
		<link href="https://blogs.igalia.com/vjaquez/git-quick-notes/"/>
		<updated>2009-10-06T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/git-quick-notes/</id>
		<content type="html">&lt;p&gt;I want to work on a &lt;a href=&quot;https://bugzilla.gnome.org/show_bug.cgi?id=583098&quot;&gt;new
plug-in&lt;/a&gt; inside of
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/&quot;&gt;gst-plugins-bad&lt;/a&gt;. But
also I want to expose my development to a personal GIT repository, so my friends
could fetch my &lt;a href=&quot;http://changes.As&quot;&gt;changes.As&lt;/a&gt; &lt;a href=&quot;http://kerneltrap.org/Linux/Git_Management&quot;&gt;Linus Torvalds explained once&lt;/a&gt;
keeping a nice linear regression set of patches above an upstream development
implies the use of git-rebase, nevertheless that also implies that I will have
to &lt;a href=&quot;http://git.or.cz/gitwiki/GitFaq#Whywon.27t.22gitpush.22workafterIrebasedabranch.3F&quot;&gt;force my
pushes&lt;/a&gt;
and my friends will also have trouble keeping their repositories in sync with
mine.&lt;/p&gt;
&lt;p&gt;So this is a kind of compromise between be nice with the people who pull your
changes, or ease your daily work.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>libgoo &amp; gst-goo</title>
		<link href="https://blogs.igalia.com/vjaquez/libgoo-and-gst-goo/"/>
		<updated>2009-09-19T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/libgoo-and-gst-goo/</id>
		<content type="html">&lt;p&gt;Back in 2007 I started to work integrating OpenMAX IL components into the
GStreamer platform.&lt;a href=&quot;http://www.khronos.org/openmax/&quot;&gt;OpenMAX&lt;/a&gt; is a set of programming interfaces,
in C language, for portable multimedia processing. Specifically the Integration
Layer (&lt;a href=&quot;http://www.khronos.org/files/openmax_il_spec_1_1_2.pdf&quot;&gt;IL&lt;/a&gt;) defines the
interface to communicate with multimedia codecs implemented by hardware or
software.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.ti.com/&quot;&gt;Texas Instrument&lt;/a&gt; started to work on an implementation of
the OpenMAX IL for their
&lt;a href=&quot;http://en.wikipedia.org/wiki/Digital_signal_processor&quot;&gt;DSP&lt;/a&gt; accelerated codecs
for
&lt;a href=&quot;http://focus.ti.com/dsp/docs/dspplatformscontenttp.tsp?sectionId=2&amp;amp;familyId=1525&amp;amp;tabId=2220&quot;&gt;OMAP&lt;/a&gt;
platform.&lt;/p&gt;
&lt;p&gt;A quick and rough view of the software architecture implemented to achieve this
processing is more or less exposed in the next diagram:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;    +---------------------+&lt;br&gt;    | OpenMAX IL          |&lt;br&gt;    +---------------------+&lt;br&gt;    | libdspbridge        |&lt;br&gt;    +---------------------+&lt;br&gt;    | Kernel (DSP Bridge) |&lt;br&gt;    +---------------------+&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;http://omappedia.org/wiki/DSPBridge_Project&quot;&gt;DSP Bridge&lt;/a&gt; driver is a Linux
Kernel device driver designed to supply a direct link between the GPP program
and the assigned &lt;a href=&quot;http://www.mpc-data.co.uk/docs/OMAP_MPC-Data_Services.pdf&quot;&gt;DSP
node&lt;/a&gt;. Basically the
features offered by the driver are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Messaging: Ability to exchange fixed size control messages with DSP&lt;/li&gt;
&lt;li&gt;Dynamic memory management: Ability to dynamically map files to DSP address
space&lt;/li&gt;
&lt;li&gt;Dynamic loading: Ability to dynamically load new nodes on DSP at run time&lt;/li&gt;
&lt;li&gt;Power Management: Static and dynamic power management for DSP&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The libdspbridge is part of the &lt;a href=&quot;http://dev.omapzoom.org/?p=tidspbridge/userspace-dspbridge.git;a=summary&quot;&gt;user-space
utilities&lt;/a&gt;
of the DSP bridge, which purpose is to provide a simple programming interface to
the GPP programs for the driver services.&lt;/p&gt;
&lt;p&gt;In the DSP side, using the &lt;a href=&quot;https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm&quot;&gt;C/C++ compiler for the
C64x+&lt;/a&gt;
and the libraries contained in the user-space utilities, it is possible to
compile a DSP program and package it as a DSP node, ready to be controlled by
the DSP bridge driver. But right now TI provides a set of out-of-the-box DSP
multimedia codecs for non-commercial purposes. These nodes are contained in the
&lt;a href=&quot;https://gforge.ti.com/gf/project/openmax/frs/&quot;&gt;tiopenmax package&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, as I said before, my job was to wrap up the OpenMAX IL components delivered
by TI as a GStreamer plug-in. In that way a lot of available multimedia
consumers could use the hardware accelerated codecs. But also, our team did the
test of the delivered OpenMAX components.&lt;/p&gt;
&lt;p&gt;After trying several approaches we came to the conclusion that we need a new
layer of software which will provide us&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Facilitate a great testing coverage of the components without the burden of
the upper framework (GStreamer in this case).&lt;/li&gt;
&lt;li&gt;Improve the code reuse.&lt;/li&gt;
&lt;li&gt;Use an object oriented programming through GObject.&lt;/li&gt;
&lt;li&gt;Facilitate the bug’s workaround for each component and maintenance of those
workarounds.&lt;/li&gt;
&lt;li&gt;A playground for experimenting with features such as (OpenMAX specific)
tunneling and the (TI specific) DSP Audio Software Framework (DASF).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For those reasons we started to develop an intermediate layer called GOO
(GObject OpenMAX).&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;    +---------------------+&lt;br&gt;    | GStreamer / gst-goo |&lt;br&gt;    +---------------------+&lt;br&gt;    | libgoo              |&lt;br&gt;    +---------------------+&lt;br&gt;    | OpenMAX             |&lt;br&gt;    +---------------------+&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/mrchapp/libgoo&quot;&gt;libgoo&lt;/a&gt; is a C language library that wraps
OpenMAX using GObject. The follow diagram shows part of its class hierarchy.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;                               +--------------+&lt;br&gt;                               | GooComponent |&lt;br&gt;                               +--------------+&lt;br&gt;                                       |&lt;br&gt;    +---------------+ +---------------+ +---------------+ +---------------+&lt;br&gt;    | GooTiAudioEnc | | GooTiAudioDec | | GooTiVideoDec | | GooTiVideoEnc |&lt;br&gt;    +---------------+ +---------------+ +---------------+ +---------------+&lt;br&gt;            |                 |                 |                 |&lt;br&gt;     +-------------+   +-------------+  +---------------+ +---------------+&lt;br&gt;     | GooTiAACEnc |   | GooTiAACDec |  | GooTiMpeg4Dec | | GooTiMpeg4Enc |&lt;br&gt;     +-------------+   +-------------+  +---------------+ +---------------+&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At the top there is GooComponent which represents any OpenMAX component. If the
OMX IL implementation is neat and clean, there shouldn’t need to add subclasses
underneath it, just parameterize it, and should be ready to use as any other OMX
IL component. But reality, as usual, is quite different: Every implementation is
different from each other; and to make it worst, each component in a same
implementation might behave differently, and that was the case of the TI
implementation.&lt;/p&gt;
&lt;p&gt;Finally, over libgoo there is &lt;a href=&quot;http://github.com/mrchapp/gst-goo&quot;&gt;gst-goo&lt;/a&gt;, the
set of GStreamer elements which use the libgoo components. GstGoo also sketched
some proof of concepts such as ghost buffers (to be used with the OpenMAX
interop profile), and dasfsink and dasfsrc (TI specific).&lt;/p&gt;
&lt;p&gt;In those days, before I move to the GStreamer team, an old fellow, &lt;a href=&quot;http://felipec.wordpress.com/&quot;&gt;Felipe
Contreras&lt;/a&gt;, worked on
&lt;a href=&quot;http://sourceforge.net/projects/gomx/files/&quot;&gt;gomx&lt;/a&gt;, which is the precedent of
libgoo, before he got an opportunity in Nokia and started to code on
&lt;a href=&quot;http://www.freedesktop.org/wiki/GstOpenMAX&quot;&gt;GstOpenMAX&lt;/a&gt;. An interesting issue
at this point is that FelipeC is pushing boldly for a new set of GStreamer
elements which ditched OpenMAX and talks directly to the kernel’s DSP bridge:
&lt;a href=&quot;http://github.com/felipec/gst-dsp&quot;&gt;gst-dsp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What’s the future of libgoo and GstGoo? I couldn’t say. Since I moved to Igalia,
I left its development. I’ve heard about a couple companies showed some kind of
interest on it, sadly, the current developers are very constrained by the TI
workload.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>misc</title>
		<link href="https://blogs.igalia.com/vjaquez/misc/"/>
		<updated>2009-08-23T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/misc/</id>
		<content type="html">&lt;p&gt;Do you remember that I promised not to use a minimalist window manager? Well,
sorry, another broken promise. Since I started to play around with imapfilter, I
discovered lua. Moreover, a comment in a previous post made a mention of
&lt;a href=&quot;http://awesome.naquadah.org/&quot;&gt;awesome&lt;/a&gt;, a minimalist window manager configured
through lua. So, I installed it, play with it, and suddenly I got delighted with
all of its features: Awesome comes along pretty well with Gnome and its panel,
which I didn’t want to lose at all. Besides, Awesome provides its own panel
(called widget box, a.k.a. wibox), which includes a systray (sadly, awesome
systray steals the icons from the gnome-panel systray). I’ve found that a tidy
desktop, which avoids to the user unnecessary mouse interactions, is much more
relaxed and helps the user to focus on her task. We’ll see how this experiment
ends.Meanwhile, Joaquin, a colleague from Dextra, told about they were having
troubles with the
&lt;a href=&quot;http://github.com/felipec/gst-openmax/tree/master&quot;&gt;gst-openmax&lt;/a&gt; JPEG decoder
element, because it needed a JPEG parser, while the
&lt;a href=&quot;http://github.com/mrchapp/gst-goo/tree/master&quot;&gt;gst-goo&lt;/a&gt; one mimic the official
JPEG decoder provided by GStreamer in
&lt;a href=&quot;http://cgit.freedesktop.org/gstreamer/gst-plugins-good/&quot;&gt;gst-plugins-good&lt;/a&gt;. In
other words, the last two elements actually parse the buffer and validates the
presences of a complete image in a single buffer, while the first doesn’t, it
just assumes it, relying thou on a parser after the data source, which will
deliver the image meta-data through fixed capabilities in the parser’s source
pad.&lt;/p&gt;
&lt;p&gt;Loathed by HAM and all the release processes, I though it could be nice to wet
my feet again in the GStreamer waters. Besides, I need to help Iago with &lt;a href=&quot;http://gitorious.org/gst-plugins-bad-audio-codec-base-classes&quot;&gt;his
codec base
classes&lt;/a&gt;, so this
JPEG parser, would help me to ramp up.&lt;/p&gt;
&lt;p&gt;As an historical note, the first element I took in charge when I get in the
GStreamer development group in Dextra was, precisely, the JPEG decoder.&lt;/p&gt;
&lt;p&gt;As soon as I chatted with Joaquin, I found a &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=583098&quot;&gt;bug report about an element for
that purpose&lt;/a&gt;, but it still
missed a couple features to turn it useful for our needs. And start to hack it.
First, I moved from gst-plugins-good, to gst-plugins-bad, and then parse the
image header in order to find its properties such as width, height, if the image
is progressive, color format, etc. And the set these data in a fixed capability.
Also, the frame-rate is negotiated in the sink pad of the parser, such as in the
official JPEG decoder.&lt;/p&gt;
&lt;p&gt;Finally I got something which seems to work OK and posted it in the same
bugzilla report. I hope to receive feedback soon.&lt;/p&gt;
&lt;p&gt;On the other hand, I’m still waiting for the approval of my last patches to the
GStreamer’s Vala bindings
(&lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=592346&quot;&gt;592346&lt;/a&gt;,
&lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=592345&quot;&gt;592345&lt;/a&gt; and
&lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=591979&quot;&gt;591979&lt;/a&gt;). 591979 can be
particularly controversial, given that it changes a typical class method, into a
static function. I guess I need to ping somebody.&lt;/p&gt;
&lt;p&gt;On the Bacon Video Widget port to Vala, some advances had came, but still
there’s nothing to show yet.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>the true imap usage: imapfilter</title>
		<link href="https://blogs.igalia.com/vjaquez/the-true-imap-usage-imapfilter/"/>
		<updated>2009-08-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/the-true-imap-usage-imapfilter/</id>
		<content type="html">&lt;p&gt;As I &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2009/07/19/lit/&quot;&gt;said before&lt;/a&gt;, I have been
using mutt as my e-mail client, and I’m really getting into it. It does what it
is supposed to do, cleanly and fast.Nevertheless its support to IMAP lacks of several nice features. One I miss the
most is to notice the unread messages in all of my IMAP folders. Yes, what it
does is to notices the new e-mails, but if you ignore the announcement, Mutt
will not remind you those not-yet-read messages later on.&lt;/p&gt;
&lt;p&gt;And that was my biggest fear: Have I missed an important email?&lt;/p&gt;
&lt;p&gt;Then I found &lt;a href=&quot;http://imapfilter.hellug.gr/&quot;&gt;imapfilter&lt;/a&gt;, the IMAP Swiss Army
Knife. Using the &lt;a href=&quot;http://www.lua.org/&quot;&gt;LUA&lt;/a&gt; programming language, you would
manipulate your IMAP resources as you want: you can do complex searches, apply
operations on messages (move, copy, delete), put flags on them, etc.&lt;/p&gt;
&lt;p&gt;So, my task was obtain the list of unread messages in my IMAP account. After a
few of LUA exploration, I managed to get this script:&lt;/p&gt;
&lt;pre class=&quot;language-lua&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-lua&quot;&gt;server &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;IMAP&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;    server &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;mail.server.com&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    username &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;vjaquez&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    password &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;myubberpassword&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;    ssl &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;tls1&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br&gt;&lt;br&gt;mailboxes&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; folders &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; server&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;list&#92;&lt;span class=&quot;token function&quot;&gt;_all&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;&#92;*&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; i&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;m &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;pairs&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;mailboxes&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;do&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;token comment&quot;&gt;-- server&#92;[m&#92;]:check&#92;_status ()&lt;/span&gt;&lt;br&gt;   messages &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; server&#92;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;m&#92;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;is&#92;&lt;span class=&quot;token function&quot;&gt;_unseen&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;-- + server&#92;[m&#92;]:is&#92;_new ()&lt;/span&gt;&lt;br&gt;   subjects &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; server&#92;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;m&#92;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;fetch&#92;&lt;span class=&quot;token function&quot;&gt;_fields&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;subject&#39;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; messages&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; subjects &lt;span class=&quot;token operator&quot;&gt;~=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;nil&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;then&lt;/span&gt;&lt;br&gt;      &lt;span class=&quot;token function&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;      &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; j&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;s &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;pairs&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;subjects&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;do&lt;/span&gt;&lt;br&gt;         &lt;span class=&quot;token function&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;string&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;format&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;t%s&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; string&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;sub&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; s&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;len&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;      &lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;&lt;br&gt;   &lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token keyword&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It prints out nicely all the messages I haven’t read, so I can go to those IMAP
folders, and read them.&lt;/p&gt;
&lt;p&gt;Sadly, there’s no way to integrate (as far as I can see) the imapfilter results
with Mutt. But that would be amazing! Imagine an IMAP email client manipulated
by commands like these.&lt;/p&gt;
&lt;p&gt;And those feelings made me recall the &lt;a href=&quot;http://pvanhoof.be/blog/index.php/2009/05/04/e-mail-as-a-desktop-service-this-is-how-it-should-be-done&quot;&gt;Philip’s
ideas&lt;/a&gt;
about integrating Tinymail with Tracker.&lt;/p&gt;
&lt;p&gt;And I wonder, does imapfilter support pipelining?&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>The SSU nightmare</title>
		<link href="https://blogs.igalia.com/vjaquez/the-ssu-nightmare/"/>
		<updated>2009-07-27T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/the-ssu-nightmare/</id>
		<content type="html">&lt;p&gt;In the Maemo domain, there’s a concept called SSU, Seamless Software Updates,
which is the mean to update the whole operative system without reflashing the
device.This concept is relatively new in the mobile device domain, where reflashing has
been the common upgrade path. But this idea is as old as GNU/Linux
distributions.&lt;/p&gt;
&lt;p&gt;Maemo uses the &lt;a href=&quot;http://en.wikipedia.org/wiki/Deb_(file_format)&quot;&gt;Debian format
packages&lt;/a&gt; and
&lt;a href=&quot;http://en.wikipedia.org/wiki/Dpkg&quot;&gt;dpkg&lt;/a&gt;
/&lt;a href=&quot;http://en.wikipedia.org/wiki/Advanced_Packaging_Tool&quot;&gt;APT&lt;/a&gt; for their handling.&lt;/p&gt;
&lt;p&gt;Meanwhile in Debian we are used to the dist-upgrade command in APT to upgrade to
the new OS release, in Maemo is not the case because each OS release has a
specific hardware target, so there is no need to handle complex dependency
handling.&lt;/p&gt;
&lt;p&gt;And that is the historical reason that the &lt;a href=&quot;http://hildon-app-mgr.garage.maemo.org/&quot;&gt;Hildon Application
Manager&lt;/a&gt; does not use the APT
algorithms for dependency handling. Instead of that, it use custom chicken-like
algorithms: if the dependencies are not fulfilled without any foreseen problem,
the package installation, upgrade or removal is rejected.&lt;/p&gt;
&lt;p&gt;The Maemo OS upgrades are done through a
&lt;a href=&quot;http://bredsaal.dk/blog/A+quick+guide+to+debian+metapackages&quot;&gt;meta-packages&lt;/a&gt;,
which is merely a list of package dependencies to conform the new release. And
this is all the magic in the famous SSU.&lt;/p&gt;
&lt;p&gt;But this approach posses a couple drawbacks, which, in Fremantle, had grown
disproportionately given the dimensions of the project.&lt;/p&gt;
&lt;p&gt;First, the number of packages which conform a new release is so big, that the
package section in the list file is bigger than the buffer size allocated by APT
to parse it. We already filed a &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538917&quot;&gt;bug in
Debian&lt;/a&gt; about this
matter. It seems the problem is an integer overflow.&lt;/p&gt;
&lt;p&gt;Second. It is quite easy to break the SSU process: if you install a third party
application with a hard dependency to an OS package, the meta-package of the
next release will fail, given the &lt;em&gt;chicken-like&lt;/em&gt; nature of H-A-M when solving
dependencies problems.&lt;/p&gt;
&lt;p&gt;The adopted solution is impose a &lt;a href=&quot;https://wiki.maemo.org/Extras/3rd_Party_Package_Policy&quot;&gt;dependency policy for third party
packages&lt;/a&gt;, which
&lt;a href=&quot;http://gitorious.org/hildon-application-manager/mainline/commit/4a6aa872e6055d283e81f4306d8850d9b5b57a16&quot;&gt;current
implementation&lt;/a&gt;
had triggered &lt;a href=&quot;http://talk.maemo.org/showthread.php?t=29752&quot;&gt;a community
discussion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The other proposed solution, use the &lt;em&gt;tiger-like&lt;/em&gt; algorithms available in APT,
was discarded given the risk of the needed changes in the apt-worker versus the
available time frame.&lt;/p&gt;
&lt;p&gt;No, there is not conclusion yet about the third party policy issue.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>lit</title>
		<link href="https://blogs.igalia.com/vjaquez/lit/"/>
		<updated>2009-07-19T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/lit/</id>
		<content type="html">&lt;p&gt;Given the Igalia’s OLPI program (One Laptop Per Igalian) I got a new Thinkpad,
the
&lt;a href=&quot;http://reviews.cnet.com/laptops/lenovo-thinkpad-x301/4505-3121_7-33255266.html&quot;&gt;x301&lt;/a&gt;.
I chose this one just because Alex chose it too, and I trust in the Alex
judgement, and I don’t regret it: it’s a great machine.All my computers had receive a name. The first computer I bought with my own
resources was named &lt;a href=&quot;http://en.wikipedia.org/wiki/Rowena&quot;&gt;Rowena&lt;/a&gt;. I still like
that name. My first laptop was named
&lt;a href=&quot;http://en.wikipedia.org/wiki/Angelina_Jolie&quot;&gt;Angelina&lt;/a&gt;. Meanwhile my third
desktop computer was named Toaster.&lt;/p&gt;
&lt;p&gt;So, in order to not break the tradition, I named the new laptop, and its name is
lit :)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.wordreference.com/definition/lit&quot;&gt;lit&lt;/a&gt; as noun is the contraction of
literature. As adjective is the contraction of illuminated or lighted. Also, in
French means bed.&lt;/p&gt;
&lt;p&gt;I took a different approach to work with this laptop. First of all, I installed
Debian Squeeze on it. Not Ubuntu, nor Gentoo. The reason of this is follow the
standard Igalia’s software stack.&lt;/p&gt;
&lt;p&gt;The second difference is an reinforce in my console orientation :) Instead of
using Evolution, I’m trying Mutt; instead of XChat, IRSSI; right now I’m testing
Newbeuter as feed reader, all of them in a single terminal using GNU/Screen.
Besides, I’m continuing with my Emacs dependency curve.&lt;/p&gt;
&lt;p&gt;And, if you’re wondering, I’m not going to use RatPoison or any other minimalist
window manager, and maybe never will.&lt;/p&gt;
&lt;p&gt;Here’s a screenshot of my current desktop:&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/lit-screenshot-300x187.jpg&quot; alt=&quot;lit-screenshot&quot;&gt;&lt;/figure&gt;
</content>
	</entry>
	
	<entry>
		<title>GCDS ramblings</title>
		<link href="https://blogs.igalia.com/vjaquez/gcds-ramblings/"/>
		<updated>2009-07-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gcds-ramblings/</id>
		<content type="html">&lt;p&gt;The last two years the GUADEC has been pushing the geographical limits of
Europe: in 2008 in Istanbul, more near to Asia, and now, in 2009, in Canarias,
more near to Africa. And that’s OK, I like it actually, is better than repeating
the old hosts of the conference.Comparing my impressions with that two last GUADECs, I found something
interesting: In Istanbul &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2008/07/21/guadec-2008/&quot;&gt;the new ideas were boiling the
environment&lt;/a&gt;, bold
proposals: the seminal concepts for Gnome Shell, Zeitgeist, Gnome 3.0, and so
on. And now, in Gran Canaria, the spirit was an evaluation the development of
those ideas, a revision of where the project is and what’s missing to achieve
the goals.&lt;/p&gt;
&lt;p&gt;In Istanbul, the hackers takeoff. In Gran Canaria, the hackers landed.&lt;/p&gt;
&lt;p&gt;Nokia stepped back from GTK+ in their products and announced their official
support to its recently acquired Qt framework. And that announcement staggered
the gnome mobile gang, forcing to rethink their objectives.&lt;/p&gt;
&lt;p&gt;The online desktop died and from its rotten corpse a new flower appeared: &lt;a href=&quot;http://live.gnome.org/GnomeShell&quot;&gt;Gnome
Shell&lt;/a&gt;: The desktop is a canvas driven by
javascript applets, just like the Web 2.0. Moblin also adopted that idea, and
many other are going in that path.&lt;/p&gt;
&lt;p&gt;The Federico’s crazy idea about a chronological desktop evolved into
&lt;a href=&quot;http://live.gnome.org/GnomeZeitgeist&quot;&gt;Zeitgeist&lt;/a&gt;, which is taking over as the
&lt;a href=&quot;http://projects.gnome.org/tracker/&quot;&gt;Tracker&lt;/a&gt; user interface for Gnome.&lt;/p&gt;
&lt;p&gt;The furor unleashed in Istanbul with the announce of the efforts for
&lt;a href=&quot;http://live.gnome.org/GTK%2B/3.0/Tasks&quot;&gt;Gtk±3.0&lt;/a&gt; had been diminished in this
time. Nevertheless, &lt;a href=&quot;http://blogs.gnome.org/carlosg/&quot;&gt;Garnacho&lt;/a&gt; showed in the
GUADEC-ES some of his unfinished branches, some of them quite amazing, but
unmerged into mainstream yet.&lt;/p&gt;
&lt;p&gt;Almost of the attention was hogged by Clutter, and the Moblin guys are using
this to push the rest of their framework. I guess that everybody is waiting a
miraculous merge among Gtk+ and Clutter, but that’s really hard to happen.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.vuntz.net/journal/&quot;&gt;Vincent&lt;/a&gt; is still pushing for Gnome 3.0. And I
really wish for that to happen. And Gnome 3 means GnomeShell, Zeitgeist, and
possible Gtk+ 3.0 and GStreamer 1.0. Those new versions doesn’t mean necessary
new features, but more clean ups in the code.&lt;/p&gt;
&lt;p&gt;What excited me the most was the discussion &lt;a href=&quot;http://noraisin.net/~jan/diary/?p=93&quot;&gt;towards GStreamer
1.0&lt;/a&gt;. There’s plenty of work to do.
Hopefully I’d find a spot to collaborate on it.&lt;/p&gt;
&lt;p&gt;Also I went the ConMan talk and a couple about WebKit, DBus, and a couple more.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>10 blast moments at GCDS</title>
		<link href="https://blogs.igalia.com/vjaquez/10-blast-moments-at-gcds/"/>
		<updated>2009-07-13T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/10-blast-moments-at-gcds/</id>
		<content type="html">&lt;p&gt;10 blast moments at GCDS1. When Edu played &lt;a href=&quot;http://goear.com/listen/3c07b92/Gimme-the-power-Molotov&quot;&gt;Gimme the
power&lt;/a&gt; in the Gnome
party&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When we rented a car to pass an afternoon in Maspalomas&lt;/li&gt;
&lt;li&gt;When Owen Taylor showed a picture with me and others as if we were the
authors of GnomeShell :)&lt;/li&gt;
&lt;li&gt;The Robert Lefkowitz keynote&lt;/li&gt;
&lt;li&gt;That actually my talk in GUADEC-ES had public!&lt;/li&gt;
&lt;li&gt;The girls taking the sun in the beaches&lt;/li&gt;
&lt;li&gt;The hacking sessions at hotel’s lobby&lt;/li&gt;
&lt;li&gt;Met Jürg Billeter at Collabora’s party&lt;/li&gt;
&lt;li&gt;Gossip with Marius&lt;/li&gt;
&lt;li&gt;The weather… (it didn’t rain!)&lt;/li&gt;
&lt;/ol&gt;
</content>
	</entry>
	
	<entry>
		<title>Gran Canaria Desktop Summit</title>
		<link href="https://blogs.igalia.com/vjaquez/gran-canaria-desktop-summit/"/>
		<updated>2009-07-12T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/gran-canaria-desktop-summit/</id>
		<content type="html">&lt;p&gt;My biggest surprise in the &lt;a href=&quot;http://www.grancanariadesktopsummit.org/&quot;&gt;GCDS&lt;/a&gt; was
in the Owen Taylor’s talk about &lt;a href=&quot;http://www.grancanariadesktopsummit.org/node/177&quot;&gt;Gnome
shell&lt;/a&gt;: he attributed the
authoring of Gnome shell idea to &lt;a href=&quot;http://www.flickr.com/photos/28304468@N04/3088727659/&quot;&gt;Kimmo, Rodrigo, Miguel and
myself!&lt;/a&gt; and I had no
idea! Sadly, I looked in the gnome-shell &lt;a href=&quot;http://git.gnome.org/cgit/gnome-shell/&quot;&gt;git
repository&lt;/a&gt; and I didn’t find any
reference to myself. So, no, I’m not an hypnobate coder.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>My GUADEC-ES talk</title>
		<link href="https://blogs.igalia.com/vjaquez/my-guadec-es-talk/"/>
		<updated>2009-07-10T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/my-guadec-es-talk/</id>
		<content type="html">&lt;p&gt;Last Wednesday I talked in the &lt;a href=&quot;http://www.guadec-es.org/&quot;&gt;GUADEC-ES&lt;/a&gt; about
Vala. A slight introduction to the language. Here are the slides.&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/guadec-es.png&quot; alt=&quot;GUADEC ES&quot; title=&quot;GUADEC ES&quot;&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Hildon Application Manager goes public</title>
		<link href="https://blogs.igalia.com/vjaquez/hildon-application-manager-goes-public/"/>
		<updated>2009-05-25T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/hildon-application-manager-goes-public/</id>
		<content type="html">&lt;p&gt;Almost since my arrival to Igalia I started to work in the &lt;a href=&quot;http://hildon-app-mgr.garage.maemo.org/&quot;&gt;Hildon Application
Manager&lt;/a&gt; or H-A-M for friends. The
project was developed using SVN in &lt;a href=&quot;http://garage.maemo.org&quot;&gt;garage&lt;/a&gt;, but after
the GUADEC in Turkey, we move it to GIT, within an internal server.But after an unexpected and bold movement of &lt;a href=&quot;http://mariusv.wordpress.com/&quot;&gt;Marius
Vollmer&lt;/a&gt;, the latest development version of
H-A-M, for &lt;a href=&quot;http://maemo.org/development/sdks/maemo_5_beta_sdk/&quot;&gt;Fremantle&lt;/a&gt; more
specifically, was pushed into the wild. Thanks mvo!&lt;/p&gt;
&lt;p&gt;H-A-M was finally sync with a repository in
&lt;a href=&quot;http://gitorious.org/hildon-application-manager&quot;&gt;Gitorious&lt;/a&gt;, making available
its source code for everyone. So, everyone is invited to submit your patches! :D&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>The big patch theory</title>
		<link href="https://blogs.igalia.com/vjaquez/the-big-patch-theory/"/>
		<updated>2009-04-09T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/the-big-patch-theory/</id>
		<content type="html">&lt;p&gt;It is well known that the free/open source software major asset is the sense of
community surrounding each project. That idea is the constant in almost all the
promotional videos which participate in the Linux Foundation contest &lt;a href=&quot;http://video.linuxfoundation.org/contest/we-are-linux&quot;&gt;We’re
Linux&lt;/a&gt;.A community driven project, exposed to the masses by Eric Raymond in his paper
&lt;a href=&quot;http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/&quot;&gt;The Cathedral and the
Bazaar&lt;/a&gt;,
has been gaining moment, turning the software development, rather than a
isolated, almost monastic, craft work, into a collaborative, openly discussed,
engineering task.&lt;/p&gt;
&lt;p&gt;All those ideas sound exciting and appealing, but from the trenches, how is it
done? How does a bunch of hackers collaborate all together to construct a
coherent and useful piece of software?&lt;/p&gt;
&lt;p&gt;We could be tempted to think about complex, full solution, software such as
forges, distributed revision control software, etc. But I won’t go there. That’s
buzzword. From my point of view, the essence of any collaborative software
project is the &lt;strong&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Patch_(Unix)&quot;&gt;patch&lt;/a&gt;****.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;According the software engineering, an important activity, in the software
development process, is the peer reviewing. Even ESR gave a name to it: the
&lt;a href=&quot;http://en.wikipedia.org/wiki/Linus%27s_Law&quot;&gt;Linus’s Law&lt;/a&gt;. But the software peer
review is not an task done once or periodically, it would be an almost
impossible duty, or at least impractical, because it’d imply read and analyse
thousands of lines of code. Instead of this, the peer review it’s a continuum,
it’s a process that must be carried on during all the code writing.&lt;/p&gt;
&lt;p&gt;So far we stated two purposes for a patch file: collaborative software
construction and peer review. For the first purpose the activities implied are,
from the developer point of view, modifying the code, extract the diff file and
hand it out; from the integrator point of view, the application of the patch and
keep a register of it. It’s relatively simple process, and it can be automatised
in some degree with the help of a &lt;a href=&quot;http://en.wikipedia.org/wiki/Software_configuration_management&quot;&gt;SCM
software&lt;/a&gt;. But
there’s hidden trick: the patch must be small and specific enough to survive
several changes in the base code, and could be applied cleanly even if the
surrounding code had changed since it was created.&lt;/p&gt;
&lt;p&gt;Nevertheless, for the second purpose, the process from the developer point of
view, is more complex; the crafting of a patch for peer review is not a trivial
task, quite the opposite, good patches are fruit of experience.&lt;/p&gt;
&lt;p&gt;A good patch has set of subjective and objectives values that the reviewers and
the integrator will take in count at the moment to commit it in the official
repository. A patch must be small enough to be easily understandable, attack a
single issue, self-contained (in must have all it needs to solve an issue), well
documented, complete, honour the project code-style, and so on.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://userweb.kernel.org/~akpm/stuff/tpp.txt&quot;&gt;A perfect patch&lt;/a&gt; must transmit
the needed confidence to the maintainer, with a simple glance, to apply it
immediately. And only the experience can give this skills. There’s not a Patch
101 lecture, but maybe is a interesting idea.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>fosdem&#39;09</title>
		<link href="https://blogs.igalia.com/vjaquez/fosdem-09/"/>
		<updated>2009-02-12T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/fosdem-09/</id>
		<content type="html">&lt;p&gt;Last weekend some igalians and I went to Brussels to attend the FOSDEM’09. We
arrived the Friday just in time for the FOSDEM Beer Event (amazing
coincidence!). In the Delirium Café I got my first epiphany about the True
Spirit of FOSDEM: it is not the talks and the meetings, it is the beer. So,
after that night, I could say “mission accomplished”.Nevertheless I went further and also assisted to a couple talks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://launchpad.net/people-project&quot;&gt;The People Framework&lt;/a&gt;: it is about
having a unified method to access to “contacts” backends (google, ldap, etc.) Go
Vala!&lt;/li&gt;
&lt;li&gt;The Hynerian Empire: It was about &lt;a href=&quot;http://live.gnome.org/Rygel&quot;&gt;Rygel&lt;/a&gt;,
a UPnP media server. Go Vala! * Bringing geolocation into GNOME: I slept this
one.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://projects.gnome.org/tracker/&quot;&gt;Tracker&lt;/a&gt;: Philip tried to expose tracker
as the ultimate object locator.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.xfce.org/&quot;&gt;Xfce&lt;/a&gt; 4.6 and then?: It was a “What’s new” in Xfce.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://maemo-beagle.garage.maemo.org/&quot;&gt;Maemo on BeagleBoard&lt;/a&gt;: Nokia
employees says that their software also runs in other hardware.&lt;/li&gt;
&lt;li&gt;WebKit on ebook readers: A WebKit implementation for a specific embedded
device.&lt;/li&gt;
&lt;li&gt;Ext4: What is and what is new in Ext4: a featured Ext3.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But now, when all the craziness of Brussels had gone, reviewing the whole
schedule, I realized that I should went to other talks. These are my actual
chooses… too late…&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wt, a C++ web toolkit, for rich web interfaces to embedded systems&lt;/li&gt;
&lt;li&gt;Reverse Engineering of Proprietary Protocols, Tools and Techniques&lt;/li&gt;
&lt;li&gt;Building Embedded Linux Systems with PTXdist&lt;/li&gt;
&lt;li&gt;A talk on FLOSSMetrics&lt;/li&gt;
&lt;li&gt;CMake - what can it do for your project&lt;/li&gt;
&lt;li&gt;Syslinux and the dynamic x86 boot process&lt;/li&gt;
&lt;li&gt;Emdebian 1.0 release - small &amp;amp; super small Debian&lt;/li&gt;
&lt;li&gt;Mozilla Headless back-end&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the way, I just loved Brussels.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>password management</title>
		<link href="https://blogs.igalia.com/vjaquez/password-management/"/>
		<updated>2009-02-01T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/password-management/</id>
		<content type="html">&lt;p&gt;Be on-line means have user accounts in a lot of services, such as email, social
web sites, blogs, etc… And have multiple user accounts implies have to remember
user names and passwords.I know people that only have one user name and password and repeat the same for
all their accounts. This approach may simplify the need to memorise a lot of
different pair of words. But this method is not reliable at all: 1) if your
password is compromised, you’ll have to change it in all your accounts, and 2)
you may forget an account if you don’t keep track of all the accounts you sign
up.&lt;/p&gt;
&lt;p&gt;Another big issue is that most of the people have passwords easy to remember,
and those passwords usually easy to crack.&lt;/p&gt;
&lt;p&gt;In other words, we have two problems: 1) keep track of all our user accounts
(resource, user name and password), and 2) the password must be not guessable.&lt;/p&gt;
&lt;p&gt;For the second problem you may &lt;a href=&quot;http://security.web.cern.ch/security/passwords/&quot;&gt;follow
hints&lt;/a&gt; and craft each one. But
I am lazy guy and computers execute algorithms better than me. So I installed an
automated password generator (&lt;a href=&quot;http://www.adel.nursat.kz/apg/index.shtml&quot;&gt;apg&lt;/a&gt;)
and let the program offer me a set of possible passwords, choosing the most
appealing one.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token command&quot;&gt;&lt;span class=&quot;token shell-symbol important&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;token bash language-bash&quot;&gt;apg &lt;span class=&quot;token parameter variable&quot;&gt;-M&lt;/span&gt; NCL &lt;span class=&quot;token parameter variable&quot;&gt;-c&lt;/span&gt; cl&lt;span class=&quot;token punctuation&quot;&gt;&#92;&lt;/span&gt;_seed &lt;span class=&quot;token parameter variable&quot;&gt;-t&lt;/span&gt; &lt;span class=&quot;token parameter variable&quot;&gt;-x&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token output&quot;&gt;Awnowov6 (Awn-ow-ov-SIX)&lt;br&gt;Biuj7qua (Bi-uj-SEVEN-qua)&lt;br&gt;RyecGod9 (Ryec-God-NINE)&lt;br&gt;Ojonrag1 (Oj-on-rag-ONE)&lt;br&gt;9KnecOng (NINE-Knec-Ong)&lt;br&gt;ClagHog0 (Clag-Hog-ZERO)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Neat, don’t you think?&lt;/p&gt;
&lt;p&gt;Now, the straightforward solution for the first problem is write down, in a
plain text file, the list of resources, user names and password, of every user
account you have. This file can be consulted if you don’t remember the account
data.&lt;/p&gt;
&lt;p&gt;As a personal choice, I use, in Emacs, the org mode to organise the user data,
because its &lt;a href=&quot;http://orgmode.org/manual/Built_002din-table-editor.html&quot;&gt;table
editor&lt;/a&gt; is just
beautiful. Furthermore, I have several types of outlined user accounts (web
sites, email servers, WEP keys, etc.), what it is also handled by org mode.&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;* web&lt;br&gt;| site                   | user         | password   |&lt;br&gt;|------------------------+--------------+------------|&lt;br&gt;| https://sitio.guay.com | mi_nick_guay | Ojonrag1   |&lt;br&gt;| ...&lt;br&gt;&lt;br&gt;* email servers&lt;br&gt;| server         | user          | password         |&lt;br&gt;|----------------+---------------+------------------|&lt;br&gt;| mi_empresa.com | mi_nick_serio | ClagHog0         |&lt;br&gt;| ...&lt;br&gt;&lt;br&gt;* wep&lt;br&gt;| essid          | password  |&lt;br&gt;|----------------+-----------|&lt;br&gt;| essid_del_piso | Awnowov6  |&lt;br&gt;| ...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But now we have a problem: have a plain text file with all your passwords is
more insecure than just have one shared among all your user accounts. If
somebody gain access to this file, (s)he will own you.&lt;/p&gt;
&lt;p&gt;The solution can’t be more simpler: encrypt the file! Well, yes, you’ll have to
remember one password, but only one! In order to encrypt
&lt;a href=&quot;http://www.gnupg.org/&quot;&gt;GPG&lt;/a&gt; is the way to go. GPG not only support asymmetric
encryption, but also symmetric, which may be handy if you don’t like or you are
not used to use private/public keys. Nevertheless, is worthy learn how to
interact with the asymmetric encryption.&lt;/p&gt;
&lt;p&gt;Well, if you use Emacs, you have the &lt;a href=&quot;http://www.easypg.org/&quot;&gt;EasyPG&lt;/a&gt; mode,
which will easy the GPG interaction, avoiding you to run the gpg command each
time you want to read or save your file, the mode will detect if the file is
encrypted and it will ask you for the pass phrase to decrypt it transparently
for the user.&lt;/p&gt;
&lt;p&gt;Once you have encrypted your password file, you can put it in your home page for
backup and roaming purposes.&lt;/p&gt;
&lt;p&gt;Neat, don’t you think?&lt;/p&gt;
&lt;p&gt;This post is heavily inspired in &lt;a href=&quot;http://emacs.wordpress.com/2008/07/18/keeping-your-secrets-secret/&quot;&gt;Keeping your secrets
secret&lt;/a&gt;.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>no country for boy&#39;s compilers</title>
		<link href="https://blogs.igalia.com/vjaquez/no-country-for-boys-compilers/"/>
		<updated>2008-11-03T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/no-country-for-boys-compilers/</id>
		<content type="html">&lt;p&gt;During the first revision by the mythical committee of ALGOL, called
&lt;a href=&quot;http://en.wikipedia.org/wiki/ALGOL_60&quot;&gt;ALGOL60&lt;/a&gt;, Donald Knuth proposed a mean
for evaluating implementations of the language: the &lt;a href=&quot;http://en.wikipedia.org/wiki/Man_or_boy_test&quot;&gt;man or boy
test&lt;/a&gt;.This test involves a heavy use of closures and evaluating functions as
first-class citizen in the programming language. If your programming language,
either its design and implementation, can solve the test, you’re working on a
mature compiler.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Coroutines, closures and continuations</title>
		<link href="https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/"/>
		<updated>2008-10-08T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/</id>
		<content type="html">&lt;p&gt;I ought start with a disclaimer: I don’t have experience with functional
programming. I never studied it. Nevertheless recently I have had some contact
with some of its concepts, specially with the idea of continuations and
closures. From these contacts came up a question, an hypothesis: &lt;em&gt;by definition,
continuations ⊆ closures ⊆ coroutines?&lt;/em&gt;.The first step should be find their formal definitions and establish their
relationship as subsets. But find and understand formal definitions is not a
piece of cake, at least for me, so I will try to expose the most clear
definitions, in simple words, which I found in the net:&lt;/p&gt;
&lt;h2 id=&quot;coroutine&quot; tabindex=&quot;-1&quot;&gt;coroutine &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/#coroutine&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A coroutine is a generalization of a subroutine which can be paused at some
point and returns a value. When the coroutine is called again, it is resumed
right from the point it was paused and its environment remains intact.&lt;/p&gt;
&lt;p&gt;In other words, a coroutine is a subroutine which has multiple entry points and
multiple return points. The next entry point is where the last return point
occurred or at the beginning of the coroutine if it reached its end previously.
Meanwhile a subroutine only has one entry point and one or more return points.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;In this example, the pause and return point is controlled by the token yield.&lt;/p&gt;
&lt;pre class=&quot;language-c&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-c&quot;&gt;coroutine foo &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;  yield &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;  yield &lt;span class=&quot;token number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;  yield &lt;span class=&quot;token number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;br&gt;&lt;br&gt;print &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;n&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;print &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;n&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;print &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;n&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;print &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;n&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;print &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;n&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;br&gt;print &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;n&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code will print:&lt;/p&gt;
&lt;pre class=&quot;language-shellsession&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shellsession&quot;&gt;&lt;span class=&quot;token output&quot;&gt;1&lt;br&gt;2&lt;br&gt;3&lt;br&gt;1&lt;br&gt;2&lt;br&gt;3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;closure&quot; tabindex=&quot;-1&quot;&gt;closure &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/#closure&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A closure is a block of code (can be anonymous or a named subroutine) which can
contains variables defined out of its lexical scope (free or bound variables).
When that block of code is evaluated, all the external variables and arguments
are used to resolve its free variables.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;mylist&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;  threshold &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;150&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; mylist&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; myitem&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; myitem&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;value &lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; threshold &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this example, the closure is the block code of { e, e.salary &amp;gt; threshold }
which is evaluated for every item in the list (the select method traverse the
list executing the passed closure for each element), and the free variable of
threshold is resolved in the lexical scope of the foo subroutine.&lt;/p&gt;
&lt;h2 id=&quot;continuation&quot; tabindex=&quot;-1&quot;&gt;continuation &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/#continuation&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A continuation is a subroutine which represents the rest of the program.&lt;/p&gt;
&lt;p&gt;In order to visualize this, you must break with the concept of the return of a
subroutine, the subroutines don’t return values, they &lt;em&gt;continue&lt;/em&gt; the execution
of the program with another subroutine. The continuation, obviously, must
receive the whole state of the program.&lt;/p&gt;
&lt;p&gt;In other words, a continuation is a glorified “goto” sentence, where the
execution pointer is transferred from a subroutine to another subroutine. The
concept of the function stack and their dependency relationships are removed.&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;foo&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;value&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; continuation&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span class=&quot;token function&quot;&gt;continuation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;value &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;br&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the previous example, the continuation is passed to the foo subroutine as an
argument, an contains, besides the next subroutine to execute, the whole state
of the program, and receives the an argument which is processed by foo.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot; tabindex=&quot;-1&quot;&gt;conclusion &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/#conclusion&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Each concept, although extends or modifies the wide-used concept of a lexical
scoped subroutine, is independent among them, but not mutually exclusive: in
terms of implementation you may have a coroutine which is a closure, a
continuation which is a closure, a coroutine which is a continuation or vice
versa.&lt;/p&gt;
&lt;p&gt;So, my hypothesis is incorrect, we must rephrase it as, &lt;em&gt;by definition coroutine
∩ closure ∩ continuation = ∅&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;But, &lt;em&gt;by implementation, ∃ coroutine ∪ closure ∪ continuation&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;references&quot; tabindex=&quot;-1&quot;&gt;references &lt;a class=&quot;header-anchor&quot; href=&quot;https://blogs.igalia.com/vjaquez/coroutines-closures-and-continuations/#references&quot;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;what the heck is: a coroutine
&lt;a href=&quot;http://www.sidhe.org/~dan/blog/archives/000178.html&quot;&gt;http://www.sidhe.org/~dan/blog/archives/000178.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Wikipedia Coroutine &lt;a href=&quot;http://en.wikipedia.org/wiki/Coroutines&quot;&gt;http://en.wikipedia.org/wiki/Coroutines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Closure &lt;a href=&quot;http://martinfowler.com/bliki/Closure.html&quot;&gt;http://martinfowler.com/bliki/Closure.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A Definition of Closures
&lt;a href=&quot;http://gafter.blogspot.com/2007/01/definition-of-closures.html&quot;&gt;http://gafter.blogspot.com/2007/01/definition-of-closures.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Wikipedia Closure &lt;a href=&quot;http://en.wikipedia.org/wiki/Closure&quot;&gt;http://en.wikipedia.org/wiki/Closure&lt;/a&gt;_(computer_science)&lt;/li&gt;
&lt;li&gt;Fake threads
&lt;a href=&quot;http://mail.python.org/pipermail/python-dev/1999-July/000467.html&quot;&gt;http://mail.python.org/pipermail/python-dev/1999-July/000467.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Continuations made simple and illustrated
&lt;a href=&quot;http://www.ps.uni-sb.de/~duchier/python/continuations.html&quot;&gt;http://www.ps.uni-sb.de/~duchier/python/continuations.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Wikipedia Continuations &lt;a href=&quot;http://en.wikipedia.org/wiki/Continuations&quot;&gt;http://en.wikipedia.org/wiki/Continuations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
	</entry>
	
	<entry>
		<title>async gio test</title>
		<link href="https://blogs.igalia.com/vjaquez/async-gio-test/"/>
		<updated>2008-09-11T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/async-gio-test/</id>
		<content type="html">&lt;p&gt;In order to understand how to use the asynchronous API of gio, I have cooked a
&lt;a href=&quot;http://www.ceyusa.com/blog/data/files/gio-test.tbz2&quot;&gt;small test&lt;/a&gt;. It was a
little hard to figure out the use of the API, mostly because I could not find
implementations using &lt;a href=&quot;http://blogs.igalia.com/vjaquez/2008/08/26/programming-tips-googles-codesearch&quot;&gt;Google’s
codesearch&lt;/a&gt;,
neither doing grand-greps ™ on my jhbuild’s directory of checkouts.I hope this little test be useful for those who are trying to use gio in their
async operations.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Programming tips: Google&#39;s codesearch</title>
		<link href="https://blogs.igalia.com/vjaquez/programming-tips-googles-codesearch/"/>
		<updated>2008-08-26T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/programming-tips-googles-codesearch/</id>
		<content type="html">&lt;p&gt;Let’s face it: every programmer loves the “copy&amp;amp;paste” when he is prototyping a
solution, learning how to use a new library or just needs a quick fix, and why
not?I mean, yes, it is important understand what we are doing, the implications of
every single line of code, keep the elegance, coherency and the simplicity, but
those characteristics don’t come just from inspiration neither reading and
understanding the theory, nor from a big flame war at email or IRC. We need
examples. We learn, as good ape descendants, from imitation.&lt;/p&gt;
&lt;p&gt;We are learning/fixing/prototyping and we need fast feedback in order to keep us
happy and motivated. We need perceive the progress of our iterative work. The
“copy&amp;amp;paste” is great for those purposes. Then, the discipline must do its work
sustaining the new acquired knowledge, but that is another history.&lt;/p&gt;
&lt;p&gt;But even in the “copy&amp;amp;paste” we must be smart and responsible with ourselves: we
must seek the best examples to imitate, we must look at the alpha male, to
borrow the brightest resources available. “Copy&amp;amp;Paste” the code of a lousy
programmer and you will be another one; “copy&amp;amp;paste” the the code of a great
programmer and maybe, someday, you and I will be one.&lt;/p&gt;
&lt;p&gt;A great resource to search, easily and fast, great sources of code, since a
couple years to now, is &lt;a href=&quot;http://www.google.com/codesearch&quot;&gt;Google’s CodeSearch&lt;/a&gt;.
It does searches along a great number of successful and recognized open projects
sources (released tarballs mostly).&lt;/p&gt;
&lt;p&gt;When I am working on a programming task which implies new code, my usual
work-flow is to visualize the solution as a sequential execution of macro
operations which will be defined to to a more fine grained at each iteration. At
each iteration usually I found situations when I want to have either a quick
solution, or I want to find how others have solved it, or just how to use a
specific function/method call, so I go the CodeSearch site and type the used
programming language, the related API, et voilà, several possible solutions are
shown.&lt;/p&gt;
&lt;p&gt;Further more, if I need know how to achieve something with autoconf-fu,
script-fu, or even system-configuration-fu, I can do searches with specific file
names as &lt;a href=&quot;http://Makefile.am&quot;&gt;Makefile.am&lt;/a&gt; or &lt;a href=&quot;http://configure.ac&quot;&gt;configure.ac&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My two cents in programming tips.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>summer hack</title>
		<link href="https://blogs.igalia.com/vjaquez/summer-hack/"/>
		<updated>2008-08-18T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/summer-hack/</id>
		<content type="html">&lt;p&gt;I have wrote a Rhythmbox plugin for playing mp3 streams from
&lt;a href=&quot;http://ww.goear.com&quot;&gt;goear.com&lt;/a&gt;. It searches, requests several pages on demand,
fill the metadata when the stream begins and sorts the search results.What is missing is the capability to make playlists with selected streams.&lt;/p&gt;
&lt;p&gt;You can find the patch in &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=548316&quot;&gt;Rhythmbox’s
bugzilla&lt;/a&gt;. Just patch the
code, add the goear.png in the plugins/goear directory, build et voila. The
patch was done with the current subversion HEAD, but also is applied cleanly in
the Hardy Ubuntu’s source package.&lt;/p&gt;
&lt;p&gt;By the way, you can find a Hardy Ubuntu package for 32bits with the patch
&lt;a href=&quot;http://www.ceyusa.com/blog/data/files/rhythmbox_0.11.5-0ubuntu8_i386.deb&quot;&gt;here&lt;/a&gt;
(the metadata filling doesn’t work here :()&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>devhelp and jhbuild</title>
		<link href="https://blogs.igalia.com/vjaquez/devhelp-and-jhbuild/"/>
		<updated>2008-07-24T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/devhelp-and-jhbuild/</id>
		<content type="html">&lt;p&gt;When I started to use jhbuild I resolved to not compile a whole new Gnome
desktop because my work laptop is too slow and freeze easily: I had to reduce
the dependencies at minimum and try reuse the libraries already provided by my
distro (Ubuntu by the way).The first trouble I had was to have access to the gtk-doc API documentation
through the installed devhelp. The solution is simply, but not obvious (at least
for me):&lt;/p&gt;
&lt;p&gt;Append in &lt;code&gt;~/.profile&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;language-shell&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-shell&quot;&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;&lt;span class=&quot;token environment constant&quot;&gt;XDG_DATA_DIRS&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&lt;span class=&quot;token variable&quot;&gt;${&lt;span class=&quot;token environment constant&quot;&gt;XDG_DATA_DIRS&lt;/span&gt;}&lt;/span&gt;&quot;&lt;/span&gt;:/opt/jhbuild/share&lt;br&gt;&lt;br&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;token environment constant&quot;&gt;XDG_DATA_DIRS&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Well, you know you’ve to change the path to your jhbuild deployment directory&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Guadec 2008</title>
		<link href="https://blogs.igalia.com/vjaquez/guadec-2008/"/>
		<updated>2008-07-21T00:00:00Z</updated>
		<id>https://blogs.igalia.com/vjaquez/guadec-2008/</id>
		<content type="html">&lt;p&gt;Last week I attended the Guadec 2008 in Turkey. It was my second Guadec. The
first one was in Sevilla in 2002, when I was backpacking Europe. The big
difference between my previous and this last guadec is that now I have a better
understanding of the state of the art, so I could appreciate more the talks and
proposals done, which I will try to summarize in this post.&lt;img src=&quot;https://blogs.igalia.com/vjaquez/images/gnomeba.png&quot; alt=&quot;gnomeba&quot;&gt;&lt;/p&gt;
&lt;p&gt;The Gnome community faces new and not so new challenges. The framework is trying
to push its limits to new frontiers besides renovate its own core.&lt;/p&gt;
&lt;p&gt;First there is the discussion about the strategy for Gtk+.
&lt;a href=&quot;http://www.imendio.com/&quot;&gt;Imendio&lt;/a&gt; is pushing for a ABI breakage in order to
polish the API, sealing the private data in the components, among &lt;a href=&quot;http://developer.imendio.com/sites/developer.imendio.com/files/imendio-gtk-vision.pdf&quot;&gt;other
things&lt;/a&gt;.
Nevertheless, Miguel, being the voice of several ISV, &lt;a href=&quot;http://tirania.org/blog/archive/2008/Jul-14.html&quot;&gt;is disagree with proposed
path&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the Gtk+ road map, a great discussion has been raised about &lt;a href=&quot;http://live.gnome.org/ProjectRidley/CanvasOverview&quot;&gt;the new
canvas&lt;/a&gt;. Seems that the
favorite contender is &lt;a href=&quot;http://www.clutter-project.org/&quot;&gt;Clutter&lt;/a&gt;, pushed by
&lt;a href=&quot;http://o-hand.com/&quot;&gt;OpenedHand&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In other front, Mark Shuttleworth came up with the idea to &lt;a href=&quot;http://derstandard.at/?url=/?id=3413801&quot;&gt;integrate QT in
Gnome&lt;/a&gt;, replacing Gtk+ in the long
term.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.atoker.com/blog/&quot;&gt;Alp Toker&lt;/a&gt; presented the advances in
&lt;a href=&quot;http://webkit.org/&quot;&gt;WebKit&lt;/a&gt; development, and in my perception, a lot of gnomies
are webkit enthusiast, because have a tighter integration with the Gtk+ widgets
and better performance than Firefox currently (which is always temporal). So I
expect more applications using webkit rather than embedded Mozilla.&lt;/p&gt;
&lt;p&gt;Following the web area, there’s a big effort, basically from the
&lt;a href=&quot;http://www.redhat.com/&quot;&gt;RedHat&lt;/a&gt; guys for the &lt;a href=&quot;http://live.gnome.org/OnlineDesktop&quot;&gt;online
desktop&lt;/a&gt;, integrating the desktop with
different and heterogeneous web feeds. I think this is a must for the next
desktop environment. More and more applications are web integrated, and give a
framework to do this and mix all that information smartly is a huge need.&lt;/p&gt;
&lt;p&gt;All the multimedia stack is healthy managed by the guys at
&lt;a href=&quot;http://www.collabora.co.uk/&quot;&gt;Collabora&lt;/a&gt; and &lt;a href=&quot;http://www.fluendo.com/&quot;&gt;Fluendo&lt;/a&gt;.
There’s an important effort in data communication
(&lt;a href=&quot;http://telepathy.freedesktop.org/wiki/&quot;&gt;Telepathy&lt;/a&gt; and
&lt;a href=&quot;http://farsight.freedesktop.org/wiki/&quot;&gt;Farsight&lt;/a&gt;) using the
&lt;a href=&quot;http://www.gstreamer.net/&quot;&gt;GStreamer&lt;/a&gt; framework. Meanwhile another project,
&lt;a href=&quot;http://www.gnomemeeting.org/&quot;&gt;Ekiga&lt;/a&gt;, which doesn’t use GStreamer is steady and
currently the better application for VoIP in Gnome.&lt;/p&gt;
&lt;p&gt;Finally, Miguel is pushing for a HTTP desktop applications model, using
&lt;a href=&quot;http://www.mono-project.com/Moonlight&quot;&gt;Moonlight&lt;/a&gt; as front end machinery, and a
custom HTTP server as gluing proxy for the back end systems applications. A bold
idea with not too many supporters.&lt;/p&gt;
&lt;p&gt;As colophon we must say in the mobile area are great efforts (Nokia as main
bidder) to keep sync with the mainstream development and improve the performance
in both fronts.&lt;/p&gt;
&lt;p&gt;The ideas are in the table, the discussion is on going, and the code being
committed. Where do you want to work in?&lt;/p&gt;
</content>
	</entry>
</feed>
