media-session: start the midi bridge from the session

This commit is contained in:
Wim Taymans 2019-10-02 21:12:42 +02:00
parent 0a6ad1adec
commit fb95e7660a
6 changed files with 41 additions and 10 deletions

View file

@ -36,7 +36,7 @@
#include <spa/param/audio/format.h>
#include <spa/pod/filter.h>
#define NAME "alsa-source"
#define NAME "alsa-bridge"
#include "alsa-seq.h"
@ -946,15 +946,15 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
static const struct spa_dict_item info_items[] = {
{ SPA_KEY_FACTORY_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
{ SPA_KEY_FACTORY_DESCRIPTION, "Record midi with the alsa API" },
{ SPA_KEY_FACTORY_DESCRIPTION, "Bridge midi ports with the alsa sequencer API" },
{ SPA_KEY_FACTORY_USAGE, "["SPA_KEY_API_ALSA_PATH"=<device>]" },
};
static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
const struct spa_handle_factory spa_alsa_midi_source_factory = {
const struct spa_handle_factory spa_alsa_seq_bridge_factory = {
SPA_VERSION_HANDLE_FACTORY,
SPA_NAME_API_ALSA_MIDI_SOURCE,
SPA_NAME_API_ALSA_SEQ_BRIDGE,
&info,
impl_get_size,
impl_init,

View file

@ -30,7 +30,7 @@ extern const struct spa_handle_factory spa_alsa_source_factory;
extern const struct spa_handle_factory spa_alsa_sink_factory;
extern const struct spa_handle_factory spa_alsa_udev_factory;
extern const struct spa_handle_factory spa_alsa_device_factory;
extern const struct spa_handle_factory spa_alsa_midi_source_factory;
extern const struct spa_handle_factory spa_alsa_seq_bridge_factory;
SPA_EXPORT
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
@ -52,7 +52,7 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
*factory = &spa_alsa_device_factory;
break;
case 4:
*factory = &spa_alsa_midi_source_factory;
*factory = &spa_alsa_seq_bridge_factory;
break;
default:
return 0;