Gstreamer & Rust

Total Page:16

File Type:pdf, Size:1020Kb

Gstreamer & Rust GStreamer & Rust Fast, safe and productive multimedia software FOSDEM 2018 – Rust devroom 4 February, Brussels Sebastian Dröge < [email protected] > Introduction Who? What? + What is GStreamer? https://gstreamer.freedesktop.org for more details GStreamer Pipeline-based, cross-platform multimedia framework Media Pipelines Philosophy Toolbox for higher-level multimedia processing Batteries included … … and usable from many languages But not … Media player or playback library Codec and protocol library Transcoding tool Streaming server … can be used to build all that! GStreamer ❤ Rust Why Rust? Memory-safety, fearless concurrency & modern language and tooling Why Rust? No runtime, no GC & zero-cost abstractions Why Rust? Ownership model maps perfectly to GStreamer's Using GStreamer from Rust Applications Safe, idiomatic bindings to the GStreamer C API https://github.com/sdroege/gstreamer- rs Examples: gstreamer-rs/examples Tutorials: gstreamer-rs/tutorials Plugins Safe, plain Rust infrastructure for writing plugins https://github.com/sdroege/gst-plugin- rs Contains various examples Tutorials being written right now The Future Write more Rust & write less C more plugins (rust-av!), more useful applications This is where you can get involved! We're not going to rewrite GStreamer (yet) It's the perfect time for writing your next GStreamer application or plugin in Rust Rust experience so far Don't be afraid of unsafe code if needed … … but wrap in safe abstractions Don't be afraid of other people's code Adding dependencies is easy, and many things exist already Don't be afraid of performance penalties for using higher-level abstractions Write readable code and optimize later Not all is perfect yet … but the language is continuously improving Wishlist Non-lexical lifetimes * SIMD * custom allocators * const generics & const fns + better cargo integration into other build systems + stable/dened ABI for shared libraries Thanks ¿Questions? [email protected] https://gstreamer.freedesktop.org https://github.com/sdroege/gstreamer-rs https://github.com/sdroege/gst-plugin-rs.
Recommended publications
  • Guile-Gnome-Gstreamer.Pdf
    Guile-GNOME: GStreamer version 0.9.92, updated 10 November 2007 Wim Taymans many others This manual is for (gnome gstreamer) (version 0.9.92, updated 10 November 2007) Copyright 2000-2007 Wim Taymans and others Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. i Short Contents 1 Overview :::::::::::::::::::::::::::::::::::::::::::: 1 2 GstBin :::::::::::::::::::::::::::::::::::::::::::::: 2 3 GstBuffer:::::::::::::::::::::::::::::::::::::::::::: 8 4 GstBus::::::::::::::::::::::::::::::::::::::::::::: 13 5 GstCaps:::::::::::::::::::::::::::::::::::::::::::: 18 6 GstChildProxy :::::::::::::::::::::::::::::::::::::: 24 7 GstClock ::::::::::::::::::::::::::::::::::::::::::: 26 8 gstconfig ::::::::::::::::::::::::::::::::::::::::::: 33 9 GstElementFactory ::::::::::::::::::::::::::::::::::: 34 10 GstElement ::::::::::::::::::::::::::::::::::::::::: 37 11 GstGError :::::::::::::::::::::::::::::::::::::::::: 53 12 GstEvent ::::::::::::::::::::::::::::::::::::::::::: 55 13 GstFilter ::::::::::::::::::::::::::::::::::::::::::: 63 14 GstFormat :::::::::::::::::::::::::::::::::::::::::: 64 15 GstGhostPad:::::::::::::::::::::::::::::::::::::::: 66 16 GstImplementsInterface ::::::::::::::::::::::::::::::: 68 17 GstIndexFactory ::::::::::::::::::::::::::::::::::::: 69 18 GstIndex ::::::::::::::::::::::::::::::::::::::::::: 70 19 GstInfo :::::::::::::::::::::::::::::::::::::::::::: 74 20 GstIterator :::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Oracle® Secure Global Desktop Platform Support and Release Notes for Release 5.2
    Oracle® Secure Global Desktop Platform Support and Release Notes for Release 5.2 April 2015 E51729-03 Oracle Legal Notices Copyright © 2015, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
    [Show full text]
  • D3 Intelligent Camera Platform
    Easy! D3 Intelligent Camera Platform Intelligent Cameras | Framegrabbers | Made in Germany WWW.STEMMER-IMAGING.COM Ease of Use The D3 Intelligent Camera New Intelligent Camera Platform The D3 is the latest, most advanced intelligent camera generation by VRmagic. The D3 platform was designed with usability, flexibility, and performance in mind. Excellent Usability The D3 platform runs a wide range of embedded software and libraries, such as Common Vision Blox Embedded, EyeVision, or HALCON Embedded. This way you can easily take advantage of the latest, state- of-the-art machine vision algorithms. Additionally, the new Mono compatible .NET interface makes applica- tion development with the VRmagic SDK much easier. Software development for the D3 intelligent camera platform – that’s ease of use. Built-In Flexibility The D3‘s embedded system provides users with a high level of flexibility by supporting a multitude of interfaces, such as Ethernet, USB, and GPIOs. Choose either a standard OEM interface board for compact systems integration or an interface evaluation board for convenient test and development. A version for industrial environments is also available. Depending on the business case, a custom interface board may also be a viable option. High Performance The D3 intelligent camera platform features a 1 GHz ARM® Cortex™-A8 Core with floating point unit (FPU) running Linux. A 700 MHz C674x™ DSP with FPU is at your disposal for computationally intensive algo- The D3 Industrial Camera has a rigid aluminum rithms. 2 GB DDR3-800 RAM with 6103 MB/s band- body and industry-standard interfaces such as width and a Gigabit Ethernet interface ensure rapid 24 V power supply and Power over Ethernet.
    [Show full text]
  • Camcorder Multimedia Framework with Linux and Gstreamer
    Camcorder multimedia framework with Linux and GStreamer W. H. Lee, E. K. Kim, J. J. Lee , S. H. Kim, S. S. Park SWL, Samsung Electronics [email protected] Abstract Application Applications Layer Along with recent rapid technical advances, user expec- Multimedia Middleware Sequencer Graphics UI Connectivity DVD FS tations for multimedia devices have been changed from Layer basic functions to many intelligent features. In order to GStreamer meet such requirements, the product requires not only a OSAL HAL OS Layer powerful hardware platform, but also a software frame- Device Software Linux Kernel work based on appropriate OS, such as Linux, support- Drivers codecs Hardware Camcorder hardware platform ing many rich development features. Layer In this paper, a camcorder framework is introduced that is designed and implemented by making use of open Figure 1: Architecture diagram of camcorder multime- source middleware in Linux. Many potential develop- dia framework ers can be referred to this multimedia framework for camcorder and other similar product development. The The three software layers on any hardware platform are overall framework architecture as well as communica- application, middleware, and OS. The architecture and tion mechanisms are described in detail. Furthermore, functional operation of each layer is discussed. Addi- many methods implemented to improve the system per- tionally, some design and implementation issues are ad- formance are addressed as well. dressed from the perspective of system performance. The overall software architecture of a multimedia 1 Introduction framework is described in Section 2. The framework design and its operation are introduced in detail in Sec- It has recently become very popular to use the internet to tion 3.
    [Show full text]
  • 1. Mengapa GIMP & Inkscape Tidak Punya Warna
    Paten Software Merugikan Komunitas Free Software Bismillahirrahmanirrahim. Copyright © 2016 Ade Malsasa Akbar <[email protected]> Tulisan ini berbicara mengenai bahaya paten software yang mengakibatkan banyak Free Software mengalami kekurangan fitur dibanding software proprietari komersial. Tulisan ini awalnya berjudul Mengapa Free Software Mengalami Kekurangan Fitur? tetapi diubah pada 16 Maret 2016 menjadi berjudul yang sekarang. Tulisan ini diharapkan membangkitkan kesadaran setiap orang terhadap perlunya Free Software. Tulisan ini disusun dalam format tanya jawab atau FAQ supaya tepat sasaran dan mudah dimengerti. Saya bukan hanya menulis ini untuk mereka yang bertanya-tanya kenapa Free Software seperti LibreOffice, GIMP, Inkscape, ODF, dan OGG Vorbis mengalami kekurangan fitur. Namun juga saya meniatkan tulisan ini sebagai pengantar buat siapa saja yang hendak menggunakan Free Software, baik pengguna baru maupun yang sudah lama. 1. Mengapa GIMP & Inkscape tidak punya warna Pantone? Karena Pantone Color Matching telah dipatenkan1. Hanya pemilik paten tersebut yang berhak membuat implementasi Pantone di dalam software. Konsekuensinya, GIMP (dan free software lainnya) dilarang membuat fitur Pantone ke dalam software. 2. Mengapa Linux Mint menyediakan versi no-codec? Karena versi no-codec2 dibuat untuk negara Jepang yang di sana MP3 dipatenkan. Pada dasarnya tidak boleh mendistribusikan codec MP3 di Jepang kecuali pemegang asli paten MP3. Berlaku juga untuk negara Amerika Serikat dan Uni Eropa. 3. Mengapa Linux Mint menyertakan codec? Karena versi Linux Mint yang menyertakan codec itu ditujukan untuk semua negara yang di sana codec MP3 tidak dipatenkan. Linux Mint (yang memuat codec) tidak didistribusikan di negara Jepang, Amerika Serikat, dan Uni Eropa3 karena di sana MP3 telah dipatenkan. Kenyataan ini yang tidak banyak diketahui.
    [Show full text]
  • Example in English
    Means of (re)production: GStreamer Outline GStreamer: Multimedia for all @fluendo.com: What we're up to GStreamer What is GStreamer? * A multimedia library and set of plugins * Modular building blocks for media applications Brief example v4l2src ! ffmpegcolorspace ! ximagesink GStreamer history * 0.0.9 October 1999 * 0.1.0 January 2001 * 0.3.0 December 2001 * 0.4.0 July 2002 * 0.6.0 February 2003 * API Stable * 0.8.0 March 2004 * 0.10.0 December 2005 GStreamer history No one can accuse us of version number inflation :) Next incompatible break will be the last: 1.0 An application-based introduction A tour through GStreamer Players Historically the first applications built on GStreamer Surprisingly difficult Players: solutions How do applications interact with a playing media pipeline? * Generic core API to create and interact with pipeline * Media pipeline runs in threads * Messages posted both synchronously and asynchronously from pipeline Players: solutions Synchronization between audio and video * Threads Players: solutions Autoplugging: play any format * Registry of "typefinders" * Registry of capabilities that plugins can handle * Elements that perform autoplugging for you Transcoding / capture E.g. thoggen DVD ripper, radio production apps, flumotion Transcoding / capture: solutions Robustness * long-running pipelines * high load * large number of different codecs Transcoding / capture: solutions Features * language bindings * many capture sources * v4l, firewire, ... * network data flow over tcp * network clock synchronization "Embedded"
    [Show full text]
  • Hydro 04 Technical Report
    Hydro_04 Technical Report MAY 24, 2019 UNIVERSITY OF RHODE ISLAND KINGSTON, RI ROV TEAM: Ellie Felderman…………………………………………………...……Structure Jason Schaedler ……………………………………...……………... Structure JoJo Speredelozzi …………………………………………………… Structure Jason Noel ……………………………………………………………. Structure Caroline Canales …………………………………………………….. Structure Huy Truong…………………………………………………………… Structure Trevor Pierce………………………………………………………….. Structure Cleo Allen……………………………………………………………… Structure Jordan Beason ……………………………...………… Structure Leadership Austin Clark……………………………………...…….. Structure Leadership Hunter Claudio…………………………………...……. Structure Leadership Karla Haiat……………………..……………………………………....... Control Jackson Sugar ……………………… Control Leadership & Team Captain MENTORS: Dr. Stephen Licht…………………………………. Ocean Engineering Dr. Brennan Phillips…………………………….. Ocean Engineering Robin Freeland……………………………………. Ocean Engineering 1 Table of Contents -ACKNOWLEDGEMENTS………………………………………………………………………………………3 -ABSTRACT………………………………………………………………………………….………………………4 -TEAM………………………………………………………………………………………………………………...5 -DESIGN RATIONALE…………………………………………………………………………………………….6 -DEVELOPMENT………………………………………………………………………………………….6 -HYDRO_04 MISSION SOLUTIONS……………………………………………………………….7 -CONTROL SYSTEM……………………………………………………………………………7 -TOPSIDE…………………………………………………………………………………8 -SOFTWARE …………………………………………………………………………….9 -HARDWARE………………………………………………………………………….11 -STRUCTURE……………………………………………………………………………………13 -ROV FRAME……………………………………………………………………..….13 -MANIPULATOR…………………………………………………………….………14 -CANNON CATCHER……………………………………….………………………16
    [Show full text]
  • Replacing C Library Code with Rust
    Replacing C library code with Rust: What I learned with librsvg Federico Mena Quintero [email protected] GUADEC 2017 Manchester, UK What uses librsvg? GNOME platform and desktop: gtk+ indirectly through gdk-pixbuf thumbnailer via gdk-pixbuf eog gstreamer-plugins-bad What uses librsvg? Fine applications: gnome-games (gnome-chess, five-or-more, etc.) gimp gcompris claws-mail darktable What uses librsvg? Desktop environments mate-panel Evas / Enlightenment emacs-x11 What uses librsvg? Things you may not expect ImageMagick Wikipedia ← they have been awesome Long History ● First commit, Eazel, 2001 ● Experiment instead of building a DOM, stream in SVG by using libbxml2’s SAX parser ● Renderer used libart ● Gill → Sodipodi → Inkscape ● Librsvg was being written while the SVG spec was being written ● Ported to Cairo eventually – I’ll remove the last libart-ism any day now Federico takes over ● Librsvg was mostly unmaintained in 2015 ● Took over maintenance in February 2015 ● Started the Rust port in October 2016 Pain points: librsvg’s CVEs ● CVE-2011-3146 - invalid cast of RsvgNode type, crash ● CVE-2015-7557 - out-of-bounds heap read in list-of-points ● CVE-2015-7558 - Infinite loop / stack overflow from cyclic element references (thanks to Benjamin Otte for the epic fix) ● CVE-2016-4348 - NOT OUR PROBLEM - integer overflow when writing PNGs in Cairo (rowstride computation) ● CVE-2017-11464 - Division by zero in Gaussian blur code (my bad, sorry) ● Many non-CVEs found through fuzz testing and random SVGs on the net ● https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=librsvg
    [Show full text]
  • Gst-Debugger Is Still a Thing!
    gst-debugger is still a thing! Marcin Kolny [email protected] October 21, 2017 Marcin Kolny gst-debugger October 21, 2017 1 / 17 Works with local and remote pipelines! Features Visualize pipeline Inspect data (events, queries, buffers, messages, logs) Read/Write element properties Marcin Kolny gst-debugger October 21, 2017 2 / 17 Features Visualize pipeline Inspect data (events, queries, buffers, messages, logs) Read/Write element properties Works with local and remote pipelines! Marcin Kolny gst-debugger October 21, 2017 2 / 17 Tracer plugin GST TRACER plugin $ GST TRACERS=d e b u g s e r v e r gst −launch −1.0 playbin uri=... # default port: 8080 $ GST TRACERS="debugserver(port=1234)" totem Marcin Kolny gst-debugger October 21, 2017 3 / 17 GTK+ Application - Debugger UI Marcin Kolny gst-debugger October 21, 2017 4 / 17 Pipeline topology Marcin Kolny gst-debugger October 21, 2017 5 / 17 Pipeline topology Marcin Kolny gst-debugger October 21, 2017 6 / 17 Pipeline topology Marcin Kolny gst-debugger October 21, 2017 7 / 17 Buffers Marcin Kolny gst-debugger October 21, 2017 8 / 17 Messages Marcin Kolny gst-debugger October 21, 2017 9 / 17 Queries Marcin Kolny gst-debugger October 21, 2017 10 / 17 Events Marcin Kolny gst-debugger October 21, 2017 11 / 17 Logs Marcin Kolny gst-debugger October 21, 2017 12 / 17 Properties capsfilter doesn't have to exist on a client machine! Marcin Kolny gst-debugger October 21, 2017 13 / 17 Pads Marcin Kolny gst-debugger October 21, 2017 14 / 17 Debugger Extensions Add-ins implement Addin interface libgstdebugger-common
    [Show full text]
  • NEW GNOME Martin Martin Benavides
    REVIEWS Gnome 2.18 Updates and Improvements in Gnome 2.18 NEW GNOME Martin Benavides, http://elmaya.pochorno.com Benavides, Martin Gnome 2.18 appears exactly six months after the last stable release. tion with key servers, signing and pub- lishing of keys, and the creation of key The developers have focused on stability, but you’ll also find some new and keyring backups. Seahorse also gives users the ability to create, config- and improved tools. BY CHRISTIAN MEYER ure, and manage SSH keys. This intuitive interface makes GPG espite much criticism, the GNU tiative will find their way back into the accessible to non-expert users. It looks project’s official desktop envi- main project. like the developers will be merging the Dronment is gaining fans. Home Gnome Keyring program and Seahorse in users, as well as corporations, are start- New Programs the near future, although it is unclear ing to back the combination of Gnome, Gnome 2.18 (Figure 2) is available as a when this will happen. Gtk+, and GStreamer. Nokia, for exam- Live CD [4] if you want to try it out be- ple, used Gnome along with Maemo [1] fore you install. The new release sees the Playtime on its N770 Internet Tablet. The N770’s introduction of some useful new tools. Version 2.18 marks the first time the de- successor, the N800 [2], sees a continua- Security-conscious users will appreciate velopers have included a chess program tion of this strategy. Seahorse (Figure 1), for example, which (Figure 3) with the Gnome Games meta- In April, a number of global IT play- hides the complexity of GNU Privacy package.
    [Show full text]
  • EAN-Gstreamer Decoder
    EAN-GStreamer Decoder 2021-04-05 Sales: [email protected] Exports: Export Summary Sheet Support: [email protected] EULA: End User License Agreement Phone: +1 (541) 716-5137 Web: sightlineapplications.com 1 Overview ................................................................ 1 3.4 Panel Plus Streaming Configuration Example ........ 3 1.1 Additional Support Documentation ....................... 1 3.5 GStreamer Examples .............................................. 4 1.2 SightLine Software Requirements .......................... 1 4 Troubleshooting ..................................................... 5 1.3 Third Party Software .............................................. 1 4.1 Testing GStreamer ................................................. 5 2 Installing GStreamer .............................................. 1 4.2 Inspecting GStreamer Plugins ................................ 5 3 Configuration ......................................................... 2 5 Questions and Additional Support ......................... 6 3.1 1500-OEM and 3000-OEM Configuration .............. 2 3.2 4000-OEM Configuration ....................................... 2 3.3 Unicast and Multicast ............................................ 3 CAUTION: Alerts to a potential hazard that may result in personal injury, or an unsafe practice that causes damage to the equipment if not avoided IMPORTANT: Identifies crucial information that is important to setup and configuration procedures. Used to emphasize points or reminds the user
    [Show full text]
  • Mistelix a DVD Authoring Tool for GNU/Linux Desktop Systems
    Mistelix A DVD authoring tool for GNU/Linux desktop systems 5th January 2009 Student: Jordi Mas i Hernàndez Tutor: Jordi Ceballos Villach This project is dedicated to the hundreds of free and open source hackers that invest their time in making all the infrastructure that made this project possible. I want also to thank to the UOC their flexibility given to me to develop a project that is based on Linux (instead of Windows), that runs of top of Mono (instead of Microsoft .Net), that is written in English and that its outputs are open source. 2/59 Table of contents 1. Introduction........................................................................................................................6 1.1 Introduction .................................................................................................................6 1.2 Objectives and scope..................................................................................................6 1.3 Open source................................................................................................................6 1.4 Project justification.......................................................................................................7 1.5 Project deliverables.....................................................................................................7 1.6 Project risks.................................................................................................................8 1.7 Project plan................................................................................................................11
    [Show full text]