Sort la partie média renderer de pmoupnp pour en faire une crate independante
This commit is contained in:
11
Cargo.lock
generated
11
Cargo.lock
generated
@@ -10,6 +10,7 @@ dependencies = [
|
|||||||
"pmoapp",
|
"pmoapp",
|
||||||
"pmoconfig",
|
"pmoconfig",
|
||||||
"pmocovers",
|
"pmocovers",
|
||||||
|
"pmomediarenderer",
|
||||||
"pmoserver",
|
"pmoserver",
|
||||||
"pmoupnp",
|
"pmoupnp",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@@ -2333,6 +2334,16 @@ dependencies = [
|
|||||||
"utoipa-swagger-ui",
|
"utoipa-swagger-ui",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pmomediarenderer"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"bevy_reflect",
|
||||||
|
"once_cell",
|
||||||
|
"pmodidl",
|
||||||
|
"pmoupnp",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pmoparadise"
|
name = "pmoparadise"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
members = ["PMOMusic", "pmoupnp","pmoconfig", "pmoutils", "pmodidl", "pmoserver", "pmoapp", "pmocache", "pmocovers", "pmoaudiocache", "pmoaudio", "pmoqobuz", "pmoparadise"]
|
members = ["PMOMusic", "pmoupnp", "pmomediarenderer", "pmoconfig", "pmoutils", "pmodidl", "pmoserver", "pmoapp", "pmocache", "pmocovers", "pmoaudiocache", "pmoaudio", "pmoqobuz", "pmoparadise"]
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ edition = "2024"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
pmoconfig = { path = "../pmoconfig" }
|
pmoconfig = { path = "../pmoconfig" }
|
||||||
pmoupnp = { path = "../pmoupnp"}
|
pmoupnp = { path = "../pmoupnp"}
|
||||||
|
pmomediarenderer = { path = "../pmomediarenderer" }
|
||||||
pmoserver = { path = "../pmoserver" }
|
pmoserver = { path = "../pmoserver" }
|
||||||
pmocovers = { path = "../pmocovers", features = ["pmoserver"] }
|
pmocovers = { path = "../pmocovers", features = ["pmoserver"] }
|
||||||
pmoapp = { path = "../pmoapp", features = ["pmoserver"] }
|
pmoapp = { path = "../pmoapp", features = ["pmoserver"] }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
use pmoupnp::{
|
use pmoupnp::{
|
||||||
mediarenderer::MEDIA_RENDERER,
|
|
||||||
ssdp::SsdpServer,
|
ssdp::SsdpServer,
|
||||||
upnp_api::UpnpApiExt,
|
upnp_api::UpnpApiExt,
|
||||||
UpnpServer,
|
UpnpServer,
|
||||||
};
|
};
|
||||||
|
use pmomediarenderer::MEDIA_RENDERER;
|
||||||
use pmoserver::{
|
use pmoserver::{
|
||||||
logs::LoggingOptions,
|
logs::LoggingOptions,
|
||||||
ServerBuilder
|
ServerBuilder
|
||||||
|
|||||||
11
pmomediarenderer/Cargo.toml
Normal file
11
pmomediarenderer/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[package]
|
||||||
|
name = "pmomediarenderer"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
pmoupnp = { path = "../pmoupnp" }
|
||||||
|
pmodidl = { path = "../pmodidl" }
|
||||||
|
|
||||||
|
once_cell = "1.20"
|
||||||
|
bevy_reflect = "0.17.1"
|
||||||
88
pmomediarenderer/README.md
Normal file
88
pmomediarenderer/README.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# pmomediarenderer
|
||||||
|
|
||||||
|
Implémentation d'un MediaRenderer UPnP audio-only conforme à la spécification UPnP AV Architecture.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
Cette crate fournit un MediaRenderer UPnP qui permet de recevoir et lire du contenu audio depuis un serveur UPnP (MediaServer). Elle a été extraite de la crate `pmoupnp` pour permettre une meilleure modularité.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
Le MediaRenderer est composé de trois services obligatoires :
|
||||||
|
|
||||||
|
- **AVTransport** : Contrôle de la lecture (play, pause, stop, seek, next, previous, etc.)
|
||||||
|
- **RenderingControl** : Contrôle du volume et du mute
|
||||||
|
- **ConnectionManager** : Gestion des connexions et des protocoles supportés
|
||||||
|
|
||||||
|
## Device UPnP
|
||||||
|
|
||||||
|
- Type : `urn:schemas-upnp-org:device:MediaRenderer:1`
|
||||||
|
- Services : AVTransport:1, RenderingControl:1, ConnectionManager:1
|
||||||
|
|
||||||
|
## Utilisation
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use pmomediarenderer::MEDIA_RENDERER;
|
||||||
|
use pmoupnp::UpnpServer;
|
||||||
|
|
||||||
|
// Le device est déjà configuré avec tous ses services
|
||||||
|
let renderer = MEDIA_RENDERER.clone();
|
||||||
|
|
||||||
|
// Créer une instance du renderer
|
||||||
|
let instance = renderer.create_instance();
|
||||||
|
|
||||||
|
// Enregistrer le renderer sur un serveur UPnP
|
||||||
|
server.register_device(renderer).await?;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Dépendances
|
||||||
|
|
||||||
|
- `pmoupnp` : Fournit l'infrastructure UPnP de base (devices, services, actions, state variables)
|
||||||
|
- `pmodidl` : Pour la gestion des métadonnées DIDL-Lite
|
||||||
|
- `once_cell` : Pour les initialisations lazy
|
||||||
|
- `bevy_reflect` : Pour la réflexion et l'introspection
|
||||||
|
|
||||||
|
## Services
|
||||||
|
|
||||||
|
### AVTransport
|
||||||
|
|
||||||
|
Service de contrôle de transport audio conforme UPnP AVTransport:1. Gère la lecture de contenu audio.
|
||||||
|
|
||||||
|
**Actions supportées :**
|
||||||
|
- SetAVTransportURI
|
||||||
|
- SetNextAVTransportURI
|
||||||
|
- Play
|
||||||
|
- Pause
|
||||||
|
- Stop
|
||||||
|
- Seek
|
||||||
|
- Next
|
||||||
|
- Previous
|
||||||
|
- GetTransportInfo
|
||||||
|
- GetPositionInfo
|
||||||
|
- GetMediaInfo
|
||||||
|
- GetDeviceCapabilities
|
||||||
|
- GetTransportSettings
|
||||||
|
- GetCurrentTransportActions
|
||||||
|
|
||||||
|
### RenderingControl
|
||||||
|
|
||||||
|
Service de contrôle de rendu conforme UPnP RenderingControl:1. Gère le volume et le mute.
|
||||||
|
|
||||||
|
**Actions supportées :**
|
||||||
|
- GetVolume
|
||||||
|
- SetVolume
|
||||||
|
- GetMute
|
||||||
|
- SetMute
|
||||||
|
|
||||||
|
### ConnectionManager
|
||||||
|
|
||||||
|
Service de gestion des connexions conforme UPnP ConnectionManager:1. Gère les protocoles supportés.
|
||||||
|
|
||||||
|
**Actions supportées :**
|
||||||
|
- GetProtocolInfo
|
||||||
|
- GetCurrentConnectionIDs
|
||||||
|
- GetCurrentConnectionInfo
|
||||||
|
|
||||||
|
## Licence
|
||||||
|
|
||||||
|
Voir le fichier LICENSE à la racine du projet.
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETCURRENTTRANSPORTACTIONS = "GetCurrentTransportActions" {
|
pub static GETCURRENTTRANSPORTACTIONS = "GetCurrentTransportActions" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETDEVICECAPABILITIES = "GetDeviceCapabilities" {
|
pub static GETDEVICECAPABILITIES = "GetDeviceCapabilities" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, NUMBEROFTRACKS, CURRENTTRACK, AVTRANSPORTURI, AVTRANSPORTURIMETADATA, AVTRANSPORTNEXTURI, AVTRANSPORTNEXTURIMETADATA};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, NUMBEROFTRACKS, CURRENTTRACK, AVTRANSPORTURI, AVTRANSPORTURIMETADATA, AVTRANSPORTNEXTURI, AVTRANSPORTNEXTURIMETADATA};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETMEDIAINFO = "GetMediaInfo" {
|
pub static GETMEDIAINFO = "GetMediaInfo" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, CURRENTTRACK, CURRENTTRACKDURATION, AVTRANSPORTURI, AVTRANSPORTURIMETADATA, RELATIVETIMEPOSITION, ABSOLUTETIMEPOSITION};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, CURRENTTRACK, CURRENTTRACKDURATION, AVTRANSPORTURI, AVTRANSPORTURIMETADATA, RELATIVETIMEPOSITION, ABSOLUTETIMEPOSITION};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETPOSITIONINFO = "GetPositionInfo" {
|
pub static GETPOSITIONINFO = "GetPositionInfo" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, TRANSPORTSTATE, TRANSPORTSTATUS};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, TRANSPORTSTATE, TRANSPORTSTATUS};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETTRANSPORTINFO = "GetTransportInfo" {
|
pub static GETTRANSPORTINFO = "GetTransportInfo" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETTRANSPORTSETTINGS = "GetTransportSettings" {
|
pub static GETTRANSPORTSETTINGS = "GetTransportSettings" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static NEXT = "Next" {
|
pub static NEXT = "Next" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static PAUSE = "Pause" {
|
pub static PAUSE = "Pause" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, TRANSPORTPLAYSPEED};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, TRANSPORTPLAYSPEED};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static PLAY = "Play" {
|
pub static PLAY = "Play" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static PREVIOUS = "Previous" {
|
pub static PREVIOUS = "Previous" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_SEEKMODE, CURRENTTRACKDURATION};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_SEEKMODE, CURRENTTRACKDURATION};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static SEEK = "Seek" {
|
pub static SEEK = "Seek" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, AVTRANSPORTNEXTURI, AVTRANSPORTNEXTURIMETADATA};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, AVTRANSPORTNEXTURI, AVTRANSPORTNEXTURIMETADATA};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static SETNEXTAVTRANSPORTURI = "SetNextAVTransportURI" {
|
pub static SETNEXTAVTRANSPORTURI = "SetNextAVTransportURI" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, AVTRANSPORTURI, AVTRANSPORTURIMETADATA};
|
use crate::avtransport::variables::{A_ARG_TYPE_INSTANCE_ID, AVTRANSPORTURI, AVTRANSPORTURIMETADATA};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static SETAVTRANSPORTURI = "SetAVTransportURI" {
|
pub static SETAVTRANSPORTURI = "SetAVTransportURI" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
use crate::avtransport::variables::A_ARG_TYPE_INSTANCE_ID;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static STOP = "Stop" {
|
pub static STOP = "Stop" {
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
//! - [UPnP AVTransport:1 Service Template](https://www.upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf)
|
//! - [UPnP AVTransport:1 Service Template](https://www.upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf)
|
||||||
//! - [UPnP AV Architecture](https://upnp.org/specs/av/)
|
//! - [UPnP AV Architecture](https://upnp.org/specs/av/)
|
||||||
|
|
||||||
use crate::define_service;
|
use pmoupnp::define_service;
|
||||||
|
|
||||||
pub mod variables;
|
pub mod variables;
|
||||||
pub mod actions;
|
pub mod actions;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_INSTANCE_ID: UI4 = "A_ARG_TYPE_InstanceID"
|
pub static A_ARG_TYPE_INSTANCE_ID: UI4 = "A_ARG_TYPE_InstanceID"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_PLAY_SPEED: String = "A_ARG_TYPE_PlaySpeed"
|
pub static A_ARG_TYPE_PLAY_SPEED: String = "A_ARG_TYPE_PlaySpeed"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_SEEKMODE: String = "A_ARG_TYPE_SeekMode" {
|
pub static A_ARG_TYPE_SEEKMODE: String = "A_ARG_TYPE_SeekMode" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static AVTRANSPORTURI: String = "AVTransportURI"
|
pub static AVTRANSPORTURI: String = "AVTransportURI"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::state_variables::{StateVariable, StateVariableError};
|
use pmoupnp::state_variables::{StateVariable, StateVariableError};
|
||||||
use crate::variable_types::StateVarType;
|
use pmoupnp::variable_types::StateVarType;
|
||||||
use bevy_reflect::Reflect;
|
use bevy_reflect::Reflect;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use pmodidl::{DIDLLite, MediaMetadataParser};
|
use pmodidl::{DIDLLite, MediaMetadataParser};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTMEDIADURATION: String = "CurrentMediaDuration"
|
pub static CURRENTMEDIADURATION: String = "CurrentMediaDuration"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTPLAYMODE: String = "CurrentPlayMode" {
|
pub static CURRENTPLAYMODE: String = "CurrentPlayMode" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTTRACKMETADATA: String = "CurrentTrackMetaData"
|
pub static CURRENTTRACKMETADATA: String = "CurrentTrackMetaData"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTTRACKURI: String = "CurrentTrackURI"
|
pub static CURRENTTRACKURI: String = "CurrentTrackURI"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
// Valeurs pour un MediaRenderer audio uniquement (suppression des formats vidéo)
|
// Valeurs pour un MediaRenderer audio uniquement (suppression des formats vidéo)
|
||||||
define_variable! {
|
define_variable! {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static POSSIBLEPLAYBACKSTORAGEMEDIA: String = "PossiblePlaybackStorageMedia"
|
pub static POSSIBLEPLAYBACKSTORAGEMEDIA: String = "PossiblePlaybackStorageMedia"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::state_variables::StateVariable;
|
use pmoupnp::state_variables::StateVariable;
|
||||||
use crate::variable_types::StateVarType;
|
use pmoupnp::variable_types::StateVarType;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
pub static POSSIBLERECORDSTORAGEMEDIA: Lazy<Arc<StateVariable>> = Lazy::new(|| -> Arc<StateVariable> {
|
pub static POSSIBLERECORDSTORAGEMEDIA: Lazy<Arc<StateVariable>> = Lazy::new(|| -> Arc<StateVariable> {
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use crate::state_variables::StateVariable;
|
use pmoupnp::state_variables::StateVariable;
|
||||||
use crate::variable_types::StateVarType;
|
use pmoupnp::variable_types::StateVarType;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
pub static RECORDSTORAGEMEDIUM: Lazy<Arc<StateVariable>> = Lazy::new(|| -> Arc<StateVariable> {
|
pub static RECORDSTORAGEMEDIUM: Lazy<Arc<StateVariable>> = Lazy::new(|| -> Arc<StateVariable> {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static SEEKMODE: String = "SeekMode"
|
pub static SEEKMODE: String = "SeekMode"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTTRACK: String = "CurrentTrack" {
|
pub static CURRENTTRACK: String = "CurrentTrack" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTTRACKDURATION: String = "CurrentTrackDuration" {
|
pub static CURRENTTRACKDURATION: String = "CurrentTrackDuration" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static TRANSPORTPLAYSPEED: String = "TransportPlaySpeed" {
|
pub static TRANSPORTPLAYSPEED: String = "TransportPlaySpeed" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
// États pour un MediaRenderer audio uniquement (suppression des états d'enregistrement)
|
// États pour un MediaRenderer audio uniquement (suppression des états d'enregistrement)
|
||||||
define_variable! {
|
define_variable! {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static TRANSPORTSTATUS: String = "TransportStatus" {
|
pub static TRANSPORTSTATUS: String = "TransportStatus" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::connectionmanager::variables::CURRENTCONNECTIONIDS;
|
use crate::connectionmanager::variables::CURRENTCONNECTIONIDS;
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETCURRENTCONNECTIONIDS = "GetCurrentConnectionIDs" {
|
pub static GETCURRENTCONNECTIONIDS = "GetCurrentConnectionIDs" {
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
use crate::mediarenderer::connectionmanager::variables::{
|
use crate::connectionmanager::variables::{
|
||||||
A_ARG_TYPE_CONNECTIONID, A_ARG_TYPE_RCSID, A_ARG_TYPE_AVTRANSPORTID,
|
A_ARG_TYPE_CONNECTIONID, A_ARG_TYPE_RCSID, A_ARG_TYPE_AVTRANSPORTID,
|
||||||
A_ARG_TYPE_PROTOCOLINFO, A_ARG_TYPE_DIRECTION, A_ARG_TYPE_CONNECTIONSTATUS
|
A_ARG_TYPE_PROTOCOLINFO, A_ARG_TYPE_DIRECTION, A_ARG_TYPE_CONNECTIONSTATUS
|
||||||
};
|
};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETCURRENTCONNECTIONINFO = "GetCurrentConnectionInfo" {
|
pub static GETCURRENTCONNECTIONINFO = "GetCurrentConnectionInfo" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::connectionmanager::variables::{SOURCEPROTOCOLINFO, SINKPROTOCOLINFO};
|
use crate::connectionmanager::variables::{SOURCEPROTOCOLINFO, SINKPROTOCOLINFO};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETPROTOCOLINFO = "GetProtocolInfo" {
|
pub static GETPROTOCOLINFO = "GetProtocolInfo" {
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
//! - [UPnP ConnectionManager:1 Service Template](https://upnp.org/specs/av/UPnP-av-ConnectionManager-v1-Service.pdf)
|
//! - [UPnP ConnectionManager:1 Service Template](https://upnp.org/specs/av/UPnP-av-ConnectionManager-v1-Service.pdf)
|
||||||
//! - [UPnP AV Architecture](https://upnp.org/specs/av/)
|
//! - [UPnP AV Architecture](https://upnp.org/specs/av/)
|
||||||
|
|
||||||
use crate::define_service;
|
use pmoupnp::define_service;
|
||||||
|
|
||||||
pub mod variables;
|
pub mod variables;
|
||||||
pub mod actions;
|
pub mod actions;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_AVTRANSPORTID: I4 = "A_ARG_TYPE_AVTransportID"
|
pub static A_ARG_TYPE_AVTRANSPORTID: I4 = "A_ARG_TYPE_AVTransportID"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_CONNECTIONID: I4 = "A_ARG_TYPE_ConnectionID"
|
pub static A_ARG_TYPE_CONNECTIONID: I4 = "A_ARG_TYPE_ConnectionID"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_CONNECTIONSTATUS: String = "A_ARG_TYPE_ConnectionStatus" {
|
pub static A_ARG_TYPE_CONNECTIONSTATUS: String = "A_ARG_TYPE_ConnectionStatus" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_DIRECTION: String = "A_ARG_TYPE_Direction" {
|
pub static A_ARG_TYPE_DIRECTION: String = "A_ARG_TYPE_Direction" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_PROTOCOLINFO: String = "A_ARG_TYPE_ProtocolInfo"
|
pub static A_ARG_TYPE_PROTOCOLINFO: String = "A_ARG_TYPE_ProtocolInfo"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_RCSID: I4 = "A_ARG_TYPE_RcsID"
|
pub static A_ARG_TYPE_RCSID: I4 = "A_ARG_TYPE_RcsID"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static CURRENTCONNECTIONIDS: String = "CurrentConnectionIDs" {
|
pub static CURRENTCONNECTIONIDS: String = "CurrentConnectionIDs" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
// Pour un MediaRenderer audio, liste les protocoles/formats audio supportés
|
// Pour un MediaRenderer audio, liste les protocoles/formats audio supportés
|
||||||
define_variable! {
|
define_variable! {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static SOURCEPROTOCOLINFO: String = "SourceProtocolInfo" {
|
pub static SOURCEPROTOCOLINFO: String = "SourceProtocolInfo" {
|
||||||
@@ -3,13 +3,11 @@
|
|||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use pmoupnp::devices::Device;
|
||||||
use crate::{
|
use crate::{
|
||||||
devices::Device,
|
avtransport::AVTTRANSPORT,
|
||||||
mediarenderer::{
|
renderingcontrol::RENDERINGCONTROL,
|
||||||
avtransport::AVTTRANSPORT,
|
connectionmanager::CONNECTIONMANAGER,
|
||||||
renderingcontrol::RENDERINGCONTROL,
|
|
||||||
connectionmanager::CONNECTIONMANAGER,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Device MediaRenderer UPnP.
|
/// Device MediaRenderer UPnP.
|
||||||
@@ -32,7 +30,7 @@ use crate::{
|
|||||||
/// # Exemple
|
/// # Exemple
|
||||||
///
|
///
|
||||||
/// ```ignore
|
/// ```ignore
|
||||||
/// use pmoupnp::mediarenderer::MEDIA_RENDERER;
|
/// use pmomediarenderer::MEDIA_RENDERER;
|
||||||
/// use pmoupnp::UpnpModel;
|
/// use pmoupnp::UpnpModel;
|
||||||
///
|
///
|
||||||
/// // Créer une instance du renderer
|
/// // Créer une instance du renderer
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
//! # Utilisation
|
//! # Utilisation
|
||||||
//!
|
//!
|
||||||
//! ```ignore
|
//! ```ignore
|
||||||
//! use pmoupnp::mediarenderer::MEDIA_RENDERER;
|
//! use pmomediarenderer::MEDIA_RENDERER;
|
||||||
//!
|
//!
|
||||||
//! // Le device est déjà configuré avec tous ses services
|
//! // Le device est déjà configuré avec tous ses services
|
||||||
//! let renderer = MEDIA_RENDERER.clone();
|
//! let renderer = MEDIA_RENDERER.clone();
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, MUTE};
|
use crate::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, MUTE};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETMUTE = "GetMute" {
|
pub static GETMUTE = "GetMute" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, VOLUME};
|
use crate::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, VOLUME};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static GETVOLUME = "GetVolume" {
|
pub static GETVOLUME = "GetVolume" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, MUTE};
|
use crate::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, MUTE};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static SETMUTE = "SetMute" {
|
pub static SETMUTE = "SetMute" {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::mediarenderer::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, VOLUME};
|
use crate::renderingcontrol::variables::{A_ARG_TYPE_INSTANCE_ID, A_ARG_TYPE_CHANNEL, VOLUME};
|
||||||
use crate::define_action;
|
use pmoupnp::define_action;
|
||||||
|
|
||||||
define_action! {
|
define_action! {
|
||||||
pub static SETVOLUME = "SetVolume" {
|
pub static SETVOLUME = "SetVolume" {
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
//! - [UPnP RenderingControl:1 Service Template](https://upnp.org/specs/av/UPnP-av-RenderingControl-v1-Service.pdf)
|
//! - [UPnP RenderingControl:1 Service Template](https://upnp.org/specs/av/UPnP-av-RenderingControl-v1-Service.pdf)
|
||||||
//! - [UPnP AV Architecture](https://upnp.org/specs/av/)
|
//! - [UPnP AV Architecture](https://upnp.org/specs/av/)
|
||||||
|
|
||||||
use crate::define_service;
|
use pmoupnp::define_service;
|
||||||
|
|
||||||
pub mod variables;
|
pub mod variables;
|
||||||
pub mod actions;
|
pub mod actions;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_CHANNEL: String = "A_ARG_TYPE_Channel" {
|
pub static A_ARG_TYPE_CHANNEL: String = "A_ARG_TYPE_Channel" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static A_ARG_TYPE_INSTANCE_ID: UI4 = "A_ARG_TYPE_InstanceID"
|
pub static A_ARG_TYPE_INSTANCE_ID: UI4 = "A_ARG_TYPE_InstanceID"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static MUTE: Boolean = "Mute" {
|
pub static MUTE: Boolean = "Mute" {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
use crate::define_variable;
|
use pmoupnp::define_variable;
|
||||||
|
|
||||||
define_variable! {
|
define_variable! {
|
||||||
pub static VOLUME: UI2 = "Volume" {
|
pub static VOLUME: UI2 = "Volume" {
|
||||||
@@ -5,7 +5,6 @@ pub mod upnp_server;
|
|||||||
pub mod upnp_api;
|
pub mod upnp_api;
|
||||||
pub mod actions;
|
pub mod actions;
|
||||||
pub mod devices;
|
pub mod devices;
|
||||||
pub mod mediarenderer;
|
|
||||||
pub mod services;
|
pub mod services;
|
||||||
pub mod soap;
|
pub mod soap;
|
||||||
pub mod ssdp;
|
pub mod ssdp;
|
||||||
|
|||||||
Reference in New Issue
Block a user