Simple Plugin API. Wim Taymans Principal Software Engineer October 10, Pinos Wim Taymans

Similar documents
CE Linux 2007 GStreamer Tutorial

The GStreamer Multimedia Architecture. What is GStreamer. What is GStreamer. Why create GStreamer

Jan Schmidt Sydney, Australia / 18 January 2007

Building GStreamer into your app

GStreamer 1.0. FOSDEM, Brussels 4 February Tim-Philipp Müller

Completing the Multimedia Architecture

GStreamer Daemon - Building a media server under 30min. Michael Grüner - David Soto -

Efficient Video Processing on Embedded GPU

FOSDEM 3 February 2018, Brussels. Tim-Philipp Müller < >

Using Gstreamer for building Automated Webcasting Systems

Embedded Streaming Media with GStreamer and BeagleBoard. Presented by Todd Fischer todd.fischer (at) ridgerun.com

A Linux multimedia platform for SH-Mobile processors

Writing Audio Applications using GStreamer

What s new in GStreamer. GUADEC, Strasbourg 26 July Tim-Philipp Müller Sebastian Dröge

Guile-GNOME: GStreamer

DVS-100P Configuration Guide

MCN Streaming. An Adaptive Video Streaming Platform. Qin Chen Advisor: Prof. Dapeng Oliver Wu

4K Video Processing and Streaming Platform on TX1

GStreamer Conference 2013, Edinburgh 22 October Sebastian Dröge Centricular Ltd

GStreamer Application Development Manual (1.4.5) Wim Taymans Steve Baker Andy Wingo Ronald S. Bultje Stefan Kost

4K HEVC Video Processing with GPU Optimization on Jetson TX1

4K Video Processing and Streaming Platform on TX1

What's new in GStreamer Land The last 2 years and the future

GStreamer Status Report: The Road Ahead. GStreamer Conference August 2012 San Diego. Tim-Philipp Müller

What's new in GStreamer

Streaming Media. Advanced Audio. Erik Noreke Standardization Consultant Chair, OpenSL ES. Copyright Khronos Group, Page 1

GStreamer Application Development Manual ( ) Wim Taymans Steve Baker Andy Wingo Ronald S. Bultje

GStreamer Element States How do they work in detail?

FOSDEM Open Media Devroom. 02 February 2019, Brussels. Tim-Philipp Müller < >

LCA14-417: mmap, allocators & sharing buffers - userland experience. Thu 6 March, 4:10pm, S.Semwal, B.Gaignard

GstShark profiling: a real-life example. Michael Grüner - David Soto -

Christophe Massiot (FOSDEM 2016) What makes Upipe great for video processing

Porting Tizen-IVI 3.0 to an ARM based SoC Platform

Memory Management in Tizen. SW Platform Team, SW R&D Center

Preliminary design and validation of a modular framework for predictable composition of medical imaging applications

Porting Tizen-IVI 3.0 to an ARM based SoC Platform. Damian Hobson-Garcia, IGEL Co., Ltd.

CommCare for Android Smartphones

15: OS Scheduling and Buffering

Chromium OS audio. CRAS audio server

EGLSTREAMS: INTEROPERABILITY FOR CAMERA, CUDA AND OPENGL. Debalina Bhattacharjee Sharan Ashwathnarayan

Universal Serial Bus - USB 2.0

HD 1080P 60FPS Game Capture Quick Start Guide

Practical Experiences from Using Pulseaudio in Embedded Handheld Device

NVJPEG. DA _v0.2.0 October nvjpeg Libary Guide

What s cooking in GStreamer. FOSDEM, Brussels 1 February Tim-Philipp Müller Sebastian Dröge

Sync Points in the Intel Gfx Driver. Jesse Barnes Intel Open Source Technology Center

Using OpenMAX Integration Layer with GStreamer - WHITE PAPER -

FFADO: firewire audio for Linux.

Oxidising GStreamer. Rust out your multimedia! GStreamer Conference October 2017, Prague. Sebastian 'slomo' Dröge < >

TAPS-related topics from the NEAT project. Naeem Khademi (NEAT project) TAPS WG - IETF 97 Seoul- South Korea 16 November 2016

Quality Audio Software Pipeline. Presenters Subhranil Choudhury, Rajendra C Turakani

Dotstack Porting Guide.

Streaming Media Portability

Seamless Dynamic Runtime Reconfiguration in a Software-Defined Radio

Real-Time Architectures 2003/2004. Resource Reservation. Description. Resource reservation. Reinder J. Bril

OpenMAX Integration Layer Application Programming Interface Specification Errata

Track Three Building a Rich UI Based Dual Display Video Player with the Freescale i.mx53 using LinuxLink

FFADO: firewire audio for Linux.

Debugging race condition problems in GStreamer

Disruptor Using High Performance, Low Latency Technology in the CERN Control System

Slow Motion Video. MediaTek Technology White Paper

HIGH PACKET RATES IN GSTREAMER

Cinelerra Feature Comparison. Page 1

Multimedia SoC System Solutions

NVJPEG. DA _v0.1.4 August nvjpeg Libary Guide

CUDA OPTIMIZATIONS ISC 2011 Tutorial

GStreamer in the living room and in outer space

USB BF70x Audio 1.0 Library v.1.2 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors

Shown below is a diagram of a very simple playback graph.

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

Synchronised multi-device media playback with GStreamer

Fundamental CUDA Optimization. NVIDIA Corporation

D3D12 & Vulkan Done Right. Gareth Thomas Developer Technology Engineer, AMD

Webomania Solutions Pvt. Ltd About ClipBucket-A way to broadcast yourself:

Using GStreamer for Seamless Off- Loading Audio Processing to a DSP ELC 2013, San Francisco Ruud Derwig

! Design constraints. " Component failures are the norm. " Files are huge by traditional standards. ! POSIX-like

MRCP. Client Integration Manual. Developer Guide. Powered by Universal Speech Solutions LLC

Disclaimer: this pdf is just the content of the sliders with no format at all. I'm using the moin-wiki slides plugin for the real slides.

Remote Persistent Memory SNIA Nonvolatile Memory Programming TWG

Processors, Performance, and Profiling

Pro Audio is Easy, Consumer Audio is Hard

Serial Digital Audio Routing Switchers?

Understanding Storage I/O Behaviors of Mobile Applications. Louisiana State University Department of Computer Science and Engineering

Synchronised multi-room media playback and distributed live media processing and mixing

Farhad Shafai, Sarance Technologies March, 2008 SARANCE TECHNOLOGIES

Dongjun Shin Samsung Electronics

Intel RealSense SDK 2014

Chapter. Out of order Execution

Media Resource Sharing Through The Media Controller API

Avpy Documentation. Release sydh

Ardour3 Video Integration

Ben Walker Data Center Group Intel Corporation

GStreamer in the living room and in outer space

The Use Of Virtual Platforms In MP-SoC Design. Eshel Haritan, VP Engineering CoWare Inc. MPSoC 2006

Accelerating Cloud Graphics

TransMu x. Users Manual. Version 3. Copyright PixelTools Corporation

Techniques to improve the scalability of Checkpoint-Restart

Transport protocols Introduction

INTERFACING REAL-TIME AUDIO AND FILE I/O

Requirements for a software API to cover automotive video applications. Martin Miller

Transcription:

Simple Plugin API Wim Taymans Principal Software Engineer October 10, 2016 1

In the begining 2 Pinos DBus service for sharing camera Upload video and share

And then... Extend scope Add audio too upload, playback, capture Need for processing pipeline Jack-like graphs? 3 Need for real-time processing with extemely low latency 0.3ms <32 bytes buffers

GStreamer Creates a lot of threads Sources, sinks, demuxers No way to combine threads Does all kinds of locking and allocation in processing threads 4 Buffers, events, caps... Lots of allocations while negotiating Difficult to predict real-time behaviour We can do better

A GStreamer plugin does a lot Plugin Clock sync Stream sync Pad QoS Processing Threads Locks Scheduling Negotiation 5 Poll/read Bufferpool Async GstBus messages allocation Format Negotiation Pad

Can we focus on this Plugin Clock sync Stream sync Pad QoS Processing Threads Locks Scheduling Negotiation 6 Poll/read Bufferpool Async GstBus messages allocation Format Negotiation Pad

The goals Unified plugin API 7 For muxer, demuxer, decoder, encoder, effect, mixer, Software + Hardware implementations Synchronous and asynchronous Hard real-time capable Extensible Minimal Does not bring in a complete framework Can be used in different frameworks

The options.. (and its plugins) Unified SW HW RT ext generic v4l2 alsa LADSPA LV2 MediaCodec OpenMAX FFMpeg MFT upipe GStreamer 8 minimal Async

The ideas Interfaces Structure with methods Introspection of interfaces URI map API is.h files 9 Map a string to an id Methods either inline or in separate helper library

The Node A basic processing module Dynamic input/output ports Ports are ids Does not do allocations App must do allocations of buffers Allocation free format description Give input, produces output Goes through state changes 10

The Node states Init Loading, initializing Configure Clear format dynamic port added Ready Set property Add/remove ports Set port format Allocate buffers Use buffer Clear buffers Paused Pause Flush Start Streaming Error 11

The Properties Key/type/value Unset values + description of possible values 12 Lists Ranges (with steps) Enum/flags For nodes and ports

The Formats Media type Media subtype Properties For ports 13 Enumerate formats (with filter) Set format (clear by setting NULL format)

The Port info Setting a format changes the info on a port Port features (live, can allocate, ) latency Allocation parameters 14 Size, alignment, metadata, padding

The Allocation Application allocates buffers + metadata Based on port info Allocates the buffer memory or.. Have one of the ports allocate memory if possible 15 With alloc_buffers Only if something else than malloc, really Does use_buffers on the ports

Streaming Asynchronous or synchronous processing Async You get events when data can be pushed and pulled from ports Sync You push and pull from pads Return code tells you what to do 16 Push more, pull, go back to configure/ready state

Streaming 17 Push buffer to input port You actually only send the id of the buffer Both ports know buffer from alloc/use_buffer Pull buffer from output port Pull many ports in one go Get the id of the buffer Event when buffer id is no longer used

Port status 18 Tells you If you can push/pull If the port has a format If the port has buffers

Points of interest Only callback is for events Some methods can be async 19 High bit set in return value, low bits are seqnum You get event with seqnum when the command completes

Platform support A list of interfaces is given at initialization Logging Mainloop integration Mainloop Dataloop (for realtime processing) Scheduler 20 For doing things in other threads

How to use 21 Host has a lot of flexibility and needs to be smart Can choose negotiation Can choose allocation Can choose scheduling, threads, mainloops Can choose synchronization A GStreamer plugin can be a host We could write higher level components working directly with the nodes

Example.. negotiation Host port_enum_format port_enum_format Choose Format port_set_format port_set_format 22

Example.. negotiation Host port_get_info port_get_info Allocate Buffers (with or without memory) port_alloc_buffers port_use_buffers 23

Example.. execution Host HAVE_OUTPUT NEED_INPUT port_pull_output port_push_input 24

Status V4l2 monitor and source Alsa source/sink and monitor Audiotestsrc/videotestsrc Logging/mapping Clock Negotiation, allocator in Pinos Scheduler in Pinos for capture->send 25

Future plans Still early prototypes Plan to move some code from Gstreamer in SPA plugins Audio/video conversion Audiotestsrc/videotestsrc Work on generic scheduler for plugins Hope to use Gstreamer has host for plugins 26

http://cgit.freedesktop.org/~wtay/pinos/log/?h=work 27