mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
Add plugin version to VFS OSS plugins
To differentiate between the legacy and the current VFS OSS plugin both plugins will feature a 'plugin_version' field in its info file. This is used for enabling features provide by the current version that are not supported in the legacy one. Issue #5167.
This commit is contained in:
parent
4a9e6a001f
commit
33735d0af8
@ -51,6 +51,7 @@ struct Vfs::Oss_file_system::Audio
|
||||
|
||||
struct Info
|
||||
{
|
||||
unsigned plugin_version;
|
||||
unsigned channels;
|
||||
unsigned format;
|
||||
unsigned sample_rate;
|
||||
@ -96,6 +97,7 @@ struct Vfs::Oss_file_system::Audio
|
||||
Readonly_value_file_system<unsigned> &optr_fifo_samples_fs,
|
||||
Value_file_system<unsigned> &play_underruns_fs)
|
||||
:
|
||||
plugin_version { 2 },
|
||||
channels { 0 },
|
||||
format { 0 },
|
||||
sample_rate { 0 },
|
||||
@ -149,6 +151,7 @@ struct Vfs::Oss_file_system::Audio
|
||||
char buf[512] { };
|
||||
|
||||
Genode::Xml_generator xml(buf, sizeof(buf), "oss", [&] () {
|
||||
xml.attribute("plugin_version", plugin_version);
|
||||
xml.attribute("channels", channels);
|
||||
xml.attribute("format", format);
|
||||
xml.attribute("sample_rate", sample_rate);
|
||||
|
@ -70,6 +70,7 @@ struct Vfs::Oss_file_system::Audio
|
||||
|
||||
struct Info
|
||||
{
|
||||
unsigned plugin_version;
|
||||
unsigned channels;
|
||||
unsigned format;
|
||||
unsigned sample_rate;
|
||||
@ -115,6 +116,7 @@ struct Vfs::Oss_file_system::Audio
|
||||
Readonly_value_file_system<unsigned> &optr_fifo_samples_fs,
|
||||
Value_file_system<unsigned> &play_underruns_fs)
|
||||
:
|
||||
plugin_version { 1 },
|
||||
channels { 0 },
|
||||
format { 0 },
|
||||
sample_rate { 0 },
|
||||
@ -168,6 +170,7 @@ struct Vfs::Oss_file_system::Audio
|
||||
char buf[512] { };
|
||||
|
||||
Genode::Xml_generator xml(buf, sizeof(buf), "oss", [&] () {
|
||||
xml.attribute("plugin_version", plugin_version);
|
||||
xml.attribute("channels", channels);
|
||||
xml.attribute("format", format);
|
||||
xml.attribute("sample_rate", sample_rate);
|
||||
|
Loading…
Reference in New Issue
Block a user