[haiku-development] Media Player Plugin API

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 21 Jan 2016 16:20:02 +0100

Hello, in the latest weeks I've begin developing an addon API for
MediaPlayer, the primary reason is the need for some features which in my
opinion are well suited if put outside of the mediaplayer core itself.
Among various things I can think of controlling media player remotely, ID3
tags support, playlist formats, equalizer and in general audio/video
filtering that may come handy in various applications.

There are currently three classes implemented :

MediaPlayerRoster

This is the class that can allow to easily script the MediaPlayer
interface. It can be used in two ways, from inside a plugin by calling the
MediaPlayerPlugin::Roster() function to obtain it or by using
MediaPlayerRoster::Roster() to obtain the roster for any or a particular
instance of the app from another team.

There's an additional class MediaPlayerPlaylist which I have just drafted
and is planned to be implemented once the foundation is finished. The idea
is that every roster can provide a Playlist() method returning a pointer to
the playlist attached in this window.

MediaPlayerAddOn

This is the class which allow to iterate and instantiate plugins.

MediaPlayerPlugin

This class is supposed to be implemented by plugins still providing a
fallback implementation for functionalities not supported by the plugin.
Every MediaPlayer instance access to it's own plugins (dormant and
instances) by using an object obtained by the plugin host.

The WIP API is available at this link :

https://gist.github.com/Barrett17/cf57372de42adde02204

I'm developing also an addon allowing to host SoundPlay plugins, there are
still some incompatibilities that I have to solve but the idea is to have
it included in Haiku.

Additionally, I think at some point plugins can support to wrap media
nodes, the audio and video nodes can be reworked so that it's possible to
connect them to an external node before the final consumer handle the
buffers, this way we can get support for things such as the vst_node and
the equalizer_node.

I just would like to hear if someone has something to add, any comment is
appreciated.

--
Regards,
Dario

Other related posts:

  • » [haiku-development] Media Player Plugin API - Dario Casalinuovo