mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
stream: work on stream upload
This commit is contained in:
parent
f06b991a5a
commit
b795fb851f
9 changed files with 224 additions and 36 deletions
|
|
@ -235,6 +235,20 @@ on_deactivate (PinosPort *port, gpointer user_data)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
on_format_change (GObject *obj,
|
||||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
PinosLink *link = user_data;
|
||||
PinosLinkPrivate *priv = link->priv;
|
||||
GBytes *formats;
|
||||
|
||||
g_object_get (priv->output, "format", &formats, NULL);
|
||||
g_debug ("port %p: format change %s", priv->output, g_bytes_get_data (formats, NULL));
|
||||
g_object_set (priv->input, "format", formats, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
pinos_link_constructed (GObject * object)
|
||||
{
|
||||
|
|
@ -246,7 +260,6 @@ pinos_link_constructed (GObject * object)
|
|||
on_output_send,
|
||||
link,
|
||||
NULL);
|
||||
|
||||
priv->input_id = pinos_port_add_send_buffer_cb (priv->input,
|
||||
on_input_send,
|
||||
link,
|
||||
|
|
@ -257,6 +270,8 @@ pinos_link_constructed (GObject * object)
|
|||
g_object_get (priv->output, "format", &formats, NULL);
|
||||
g_object_set (priv->input, "format", formats, NULL);
|
||||
|
||||
g_signal_connect (priv->output, "notify::format", (GCallback) on_format_change, link);
|
||||
|
||||
g_signal_connect (priv->input, "activate", (GCallback) on_activate, link);
|
||||
g_signal_connect (priv->input, "deactivate", (GCallback) on_deactivate, link);
|
||||
g_signal_connect (priv->output, "activate", (GCallback) on_activate, link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue