mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Run codespell on the entire codebase
This tool detects and fixes common English spelling mistakes, with generally very few mistakes. Here is the command I used to generate this commit. There were a few changes that had to be done manually, and of course adding the ignore file: ```shell codespell -I .codespell-ignore -x .codespell-ignore -w ``` I didn’t add it to the CI, but this would be a good place for it.
This commit is contained in:
parent
688a1ab082
commit
14fdf07e8f
56 changed files with 152 additions and 141 deletions
|
|
@ -24,7 +24,7 @@ The PipeWire API is, a object oriented asynchronous protocol.
|
|||
All requests and replies are method invocations on some object.
|
||||
|
||||
Objects are identified with a unique ID. Each object implements an
|
||||
interface and requestes result in invocations of methods on the
|
||||
interface and requests result in invocations of methods on the
|
||||
interface.
|
||||
|
||||
The protocol is message based. A message sent by a client to the
|
||||
|
|
@ -37,7 +37,7 @@ objects or even protocols when required.
|
|||
Messages are encoded with [SPA PODs](spa/pod.md), which make it
|
||||
possible to encode complex objects with right types.
|
||||
|
||||
Events from the server can be a reply to a method or can be emited
|
||||
Events from the server can be a reply to a method or can be emitted
|
||||
when the server state changes.
|
||||
|
||||
Upon connecting to a server, it will broadcast its state. Clients
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ Protocol
|
|||
|
||||
The native protocol and object model is similar to wayland but with custom
|
||||
serialization/deserialization of messages. This is because the datastructures
|
||||
in the messages are more complicated and not easily expressable in xml format.
|
||||
in the messages are more complicated and not easily expressible in xml format.
|
||||
|
||||
|
||||
Extensibility
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# SPA Design
|
||||
|
||||
SPA (Simple Plugin API) is an extensible API to implement alls kinds of plugins.
|
||||
SPA (Simple Plugin API) is an extensible API to implement all kinds of plugins.
|
||||
It is inspired by many other plugin APIs, mostly LV2 and GStreamer.
|
||||
|
||||
Plugins are dynamically loadable objects that contain objects and interfaces that
|
||||
|
|
@ -14,7 +14,7 @@ SPA provides the following functionality:
|
|||
|
||||
SPA was designed with the following goals in mind:
|
||||
|
||||
* No dependencies, SPA is shipped as a set of header files that have no dependecies
|
||||
* No dependencies, SPA is shipped as a set of header files that have no dependencies
|
||||
except for the standard c library.
|
||||
* Very efficient both in space and in time.
|
||||
* Very configurable and usable in many different environments. All aspects of
|
||||
|
|
@ -210,7 +210,7 @@ When you retrieve an interface from a handle, you get a reference to
|
|||
a small structure that contains the type (string) of the interface,
|
||||
a version and a structure with a set of methods (and data) that are
|
||||
the implementation of the interface. Calling a method on the interface
|
||||
will just call the apropriate method in the implementation.
|
||||
will just call the appropriate method in the implementation.
|
||||
|
||||
Interfaces are defined in a header file (for example see
|
||||
`<spa/support/log.h>` for the logger API). It is a self contained
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ DBus Variant or LV2 Atom.
|
|||
|
||||
A POD can express nested structures of Objects (with properties), Vectors,
|
||||
Arrays, sequences and various primitives types. All information in the POD
|
||||
is layed out sequentially in memory and can be written directly to
|
||||
is laid out sequentially in memory and can be written directly to
|
||||
storage or exchanged between processes or threads without additional
|
||||
marshalling..
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ PODs can contain a number of basic SPA types:
|
|||
* `SPA_TYPE_Bool`: a boolean value
|
||||
* `SPA_TYPE_Id`: an enumerated value
|
||||
* `SPA_TYPE_Int`, `SPA_TYPE_Long`, `SPA_TYPE_Float`, `SPA_TYPE_Double`:
|
||||
various numerial types, 32 and 64 bits.
|
||||
various numeral types, 32 and 64 bits.
|
||||
* `SPA_TYPE_String`: a string
|
||||
* `SPA_TYPE_Bytes`: a byte array
|
||||
* `SPA_TYPE_Rectangle`: a rectangle with width and height
|
||||
|
|
@ -196,8 +196,8 @@ pod = spa_pod_builder_pop(&b, &f);
|
|||
```
|
||||
|
||||
As you can see, first push the choice as a Range, then the values. A Range
|
||||
choice expects at least 3 values, the default value, mininum and maximum
|
||||
values. There is a shotcut for this as well using varargs:
|
||||
choice expects at least 3 values, the default value, minimum and maximum
|
||||
values. There is a shortcut for this as well using varargs:
|
||||
|
||||
```c
|
||||
pod = spa_pod_builder_add_object(&b,
|
||||
|
|
@ -299,7 +299,7 @@ below.
|
|||
|
||||
## Object Properties
|
||||
|
||||
To iterate over the properies in an object you can do:
|
||||
To iterate over the properties in an object you can do:
|
||||
|
||||
```c
|
||||
struct spa_pod_prop *prop;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ asynchronously and the returns value will reflect this. PipeWire
|
|||
uses the return values of the underlying SPA (Simple Plugin API)
|
||||
helper objects (See also [error codes](spa/design.md#error-codes)).
|
||||
|
||||
Because all messages on the PipeWire server are handled sequencially,
|
||||
Because all messages on the PipeWire server are handled sequentially,
|
||||
the sync method will be executed after all previous methods are
|
||||
completed. The PipeWire server will emit a `done` event with the
|
||||
same ID and the return value of the original `pw_core_sync()`
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ and a callback + data.
|
|||
```
|
||||
|
||||
We using `pw_stream_new_simple()` but there is also a `pw_stream_new()` that
|
||||
takes an exising `struct pw_core` as the first argument and that requires you
|
||||
takes an existing `struct pw_core` as the first argument and that requires you
|
||||
to add the event handle manually, for more control. The `pw_stream_new_simple()`
|
||||
is, as the name implies, easier to use because it creates a `struct pw_context`
|
||||
and `struct pw_core` automatically.
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ In this example we use the builder to create some `CHOICE` entries for
|
|||
the format properties.
|
||||
|
||||
We have an enumeration of formats, we need to first give the amount of enumerations
|
||||
that follow, then the default (prefered) value, followed by alternatives in order
|
||||
that follow, then the default (preferred) value, followed by alternatives in order
|
||||
of preference:
|
||||
|
||||
```c
|
||||
|
|
@ -231,7 +231,7 @@ of preference:
|
|||
SPA_VIDEO_FORMAT_I420),
|
||||
```
|
||||
|
||||
We also have a `RANGE` of values for the size. We need to give a default (prefered)
|
||||
We also have a `RANGE` of values for the size. We need to give a default (preferred)
|
||||
size and then a min and max value:
|
||||
|
||||
```c
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ automatically serialize the method calls and events between client and
|
|||
server for us.
|
||||
|
||||
We can now listen for events by adding a listener. We're going to
|
||||
listen to the info event on the client object that is emited right
|
||||
listen to the info event on the client object that is emitted right
|
||||
after we bind to it or when it changes. This is not very different
|
||||
from the registry listener we added before:
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ static void registry_event_global(void *_data, uint32_t id,
|
|||
}
|
||||
```
|
||||
|
||||
We're also quiting the mainloop after we get the info to nicely stop
|
||||
We're also quitting the mainloop after we get the info to nicely stop
|
||||
our tutorial application.
|
||||
|
||||
When we stop the application, don't forget to destroy all proxies that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue