From 430284545345539c9ffb31df889debac1d3888b5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 Mar 2020 16:36:44 +0100 Subject: Move documentation to metadata files and convert it to Markdown --- lv2/worker/worker.meta.ttl | 53 ++++++++++++++++++++++++++++++++++++++++++++-- lv2/worker/worker.ttl | 44 ++++++-------------------------------- 2 files changed, 58 insertions(+), 39 deletions(-) (limited to 'lv2/worker') diff --git a/lv2/worker/worker.meta.ttl b/lv2/worker/worker.meta.ttl index f25c2c3..1ed077a 100644 --- a/lv2/worker/worker.meta.ttl +++ b/lv2/worker/worker.meta.ttl @@ -1,12 +1,14 @@ @prefix dcs: . @prefix doap: . @prefix foaf: . +@prefix lv2: . @prefix rdfs: . +@prefix work: . a doap:Project ; doap:name "LV2 Worker" ; - doap:shortdesc "Support for a non-realtime plugin worker method." ; + doap:shortdesc "Support for doing non-realtime work in plugins." ; doap:created "2012-03-22" ; doap:developer ; doap:release [ @@ -29,5 +31,52 @@ rdfs:label "Initial release." ] ] - ] . + ] ; + lv2:documentation """ + +This extension allows plugins to schedule work that must be performed in +another thread. Plugins can use this interface to safely perform work that is +not real-time safe, and receive the result in the run context. The details of +threading are managed by the host, allowing plugins to be simple and portable +while using resources more efficiently. + +This interface is designed to gracefully support single-threaded synchronous +execution, which allows the same code to work with sample accuracy for offline +rendering. For example, a sampler plugin may schedule a sample to be loaded +from disk in another thread. During live execution, the host will call the +plugin's work method from another thread, and deliver the result to the audio +thread when it is finished. However, during offline export, the +scheduled load would be executed immediately in the same thread. This +enables reproducible offline rendering, where any changes affect the output +immediately regardless of how long the work takes to execute. + +"""^^lv2:Markdown . + +work:interface + lv2:documentation """ + +The work interface provided by a plugin, LV2_Worker_Interface. + + :::turtle + + @prefix work: <http://lv2plug.in/ns/ext/worker#> . + + <plugin> + a lv2:Plugin ; + lv2:extensionData work:interface . + +"""^^lv2:Markdown . + +work:schedule + lv2:documentation """ + +The work scheduling feature provided by a host, LV2_Worker_Schedule. + +If the host passes this feature to LV2_Descriptor::instantiate, the plugin MAY +use it to schedule work in the audio thread, and MUST NOT call it in any other +context. Hosts MAY pass this feature to other functions as well, in which case +the plugin MAY use it to schedule work in the calling context. The plugin MUST +NOT assume any relationship between different schedule features. + +"""^^lv2:Markdown . diff --git a/lv2/worker/worker.ttl b/lv2/worker/worker.ttl index 3889877..30976a7 100644 --- a/lv2/worker/worker.ttl +++ b/lv2/worker/worker.ttl @@ -8,48 +8,18 @@ a owl:Ontology , lv2:Specification ; + rdfs:label "LV2 Worker" ; + rdfs:comment "Support for doing non-realtime work in plugins." ; rdfs:seeAlso , - ; - lv2:documentation """ -

This extension allows plugins to schedule work that must be performed in -another thread. Plugins can use this interface to safely perform work that is -not real-time safe, and receive the result in the run context. The details of -threading are managed by the host, allowing plugins to be simple and portable -while using resources more efficiently.

- -

This interface is designed to gracefully support single-threaded synchronous -execution, which allows the same code to work with sample accuracy for offline -rendering. For example, a sampler plugin may schedule a sample to be loaded -from disk in another thread. During live execution, the host will call the -plugin's work method from another thread, and deliver the result to the audio -thread when it is finished. However, during offline export, the -scheduled load would be executed immediately in the same thread. This -enables reproducible offline rendering, where any changes affect the output -immediately regardless of how long the work takes to execute.

-""" . + . work:interface a lv2:ExtensionData ; - lv2:documentation """ -

The work interface provided by a plugin, LV2_Worker_Interface.

-
-@prefix work: <http://lv2plug.in/ns/ext/worker#> .
-
-<plugin>
-    a lv2:Plugin ;
-    lv2:extensionData work:interface .
-
-""" . + rdfs:label "work interface" ; + rdfs:comment "The work interface provided by a plugin." . work:schedule a lv2:Feature ; - lv2:documentation """ -

The work scheduling feature provided by a host, LV2_Worker_Schedule.

- -

If the host passes this feature to LV2_Descriptor::instantiate, the plugin -MAY use it to schedule work in the audio thread, and MUST NOT call it in any -other context. Hosts MAY pass this feature to other functions as well, in -which case the plugin MAY use it to schedule work in the calling context. The -plugin MUST NOT assume any relationship between different schedule -features.

""" . + rdfs:label "work schedule" ; + rdfs:comment "The work scheduling feature provided by a host." . -- cgit v1.2.1