mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
update DBus object with current format
Detect a format change in the payloader and post an element message. Catch the format change element message in the client-source and use it to update the format and possible formats in the source and source-outputs.
This commit is contained in:
parent
44f2c3602d
commit
45976ffeda
5 changed files with 57 additions and 0 deletions
|
|
@ -510,6 +510,7 @@ void
|
|||
pinos_source_update_possible_formats (PinosSource *source, GBytes *formats)
|
||||
{
|
||||
PinosSourcePrivate *priv;
|
||||
GList *walk;
|
||||
|
||||
g_return_if_fail (PINOS_IS_SOURCE (source));
|
||||
priv = source->priv;
|
||||
|
|
@ -518,6 +519,22 @@ pinos_source_update_possible_formats (PinosSource *source, GBytes *formats)
|
|||
g_object_set (priv->iface, "possible-formats",
|
||||
g_bytes_get_data (formats, NULL),
|
||||
NULL);
|
||||
|
||||
for (walk = priv->outputs; walk; walk = g_list_next (walk))
|
||||
g_object_set (walk->data, "possible-formats", formats, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
pinos_source_update_format (PinosSource *source, GBytes *format)
|
||||
{
|
||||
PinosSourcePrivate *priv;
|
||||
GList *walk;
|
||||
|
||||
g_return_if_fail (PINOS_IS_SOURCE (source));
|
||||
priv = source->priv;
|
||||
|
||||
for (walk = priv->outputs; walk; walk = g_list_next (walk))
|
||||
g_object_set (walk->data, "format", format, NULL);
|
||||
}
|
||||
|
||||
PinosSourceOutput *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue