mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
output: send output properties in start
Also send the output properties in start, along with the format.
This commit is contained in:
parent
104632ea7a
commit
e9c72a6102
3 changed files with 19 additions and 8 deletions
|
|
@ -869,7 +869,7 @@ on_stream_started (GObject *source_object,
|
|||
gint fd_idx, fd;
|
||||
gchar *format;
|
||||
GError *error = NULL;
|
||||
GVariant *result;
|
||||
GVariant *result, *properties;
|
||||
|
||||
result = g_dbus_proxy_call_with_unix_fd_list_finish (priv->source_output,
|
||||
&out_fd_list,
|
||||
|
|
@ -879,18 +879,25 @@ on_stream_started (GObject *source_object,
|
|||
goto start_failed;
|
||||
|
||||
g_variant_get (result,
|
||||
"(hs)",
|
||||
"(hs@a{sv})",
|
||||
&fd_idx,
|
||||
&format);
|
||||
&format,
|
||||
&properties);
|
||||
|
||||
g_variant_unref (result);
|
||||
|
||||
if (priv->format)
|
||||
g_bytes_unref (priv->format);
|
||||
priv->format = g_bytes_new (format, strlen (format) + 1);
|
||||
|
||||
priv->format = g_bytes_new_take (format, strlen (format) + 1);
|
||||
g_object_notify (G_OBJECT (stream), "format");
|
||||
|
||||
if (priv->properties)
|
||||
pinos_properties_free (priv->properties);
|
||||
priv->properties = pinos_properties_from_variant (properties);
|
||||
g_variant_unref (properties);
|
||||
|
||||
g_object_notify (G_OBJECT (stream), "properties");
|
||||
|
||||
if ((fd = g_unix_fd_list_get (out_fd_list, fd_idx, &error)) < 0)
|
||||
goto fd_failed;
|
||||
|
||||
|
|
|
|||
|
|
@ -143,16 +143,19 @@
|
|||
@requested_format: requested formats
|
||||
@fd: output file descriptor
|
||||
@format: output format
|
||||
@properties: output properties
|
||||
|
||||
Start the datatransfer of the source with @requested_format.
|
||||
|
||||
The result is a file descriptor that can be used to get metadata
|
||||
and media. @format contains the final media format.
|
||||
and media. @format contains the final media format and @properties
|
||||
the extra properties that describe the media format.
|
||||
-->
|
||||
<method name='Start'>
|
||||
<arg type='s' name='requested_format' direction='in'/>
|
||||
<arg type='h' name='fd' direction='out'/>
|
||||
<arg type='s' name='format' direction='out'/>
|
||||
<arg type='a{sv}' name='properties' direction='out'/>
|
||||
</method>
|
||||
<!-- Stop:
|
||||
|
||||
|
|
|
|||
|
|
@ -215,9 +215,10 @@ handle_start (PinosSourceOutput1 *interface,
|
|||
g_unix_fd_list_append (fdlist, fd[1], NULL);
|
||||
|
||||
g_dbus_method_invocation_return_value_with_unix_fd_list (invocation,
|
||||
g_variant_new ("(hs)",
|
||||
g_variant_new ("(hs@a{sv})",
|
||||
0,
|
||||
g_bytes_get_data (priv->format, NULL)),
|
||||
g_bytes_get_data (priv->format, NULL),
|
||||
pinos_properties_to_variant (priv->properties)),
|
||||
fdlist);
|
||||
|
||||
g_object_set (priv->iface,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue