mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-27 07:00:12 -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
|
|
@ -368,6 +368,23 @@ gst_pinos_pay_chain_pinos (GstPinosPay *pay, GstBuffer * buffer)
|
|||
g_array_append_val (fdids, p.id);
|
||||
break;
|
||||
}
|
||||
case PINOS_PACKET_TYPE_FORMAT_CHANGE:
|
||||
{
|
||||
PinosPacketFormatChange p;
|
||||
GstCaps * caps;
|
||||
|
||||
if (!pinos_buffer_iter_parse_format_change (&it, &p))
|
||||
continue;
|
||||
|
||||
caps = gst_caps_from_string (p.format);
|
||||
|
||||
gst_element_post_message (GST_ELEMENT (pay),
|
||||
gst_message_new_element (GST_OBJECT (pay),
|
||||
gst_structure_new ("PinosPayloaderFormatChange",
|
||||
"format", GST_TYPE_CAPS, caps, NULL)));
|
||||
gst_caps_unref (caps);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue