Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add event type & source to "multiple listeners" warning #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mildsunrise
Copy link

The "Could not send event upstream, more than one listener is connected" warnings are common, spammy and often don't represent a problem... IMO it would be handy to at least log the event type, and the listener it came from.

@@ -889,8 +889,11 @@ gst_inter_pipe_sink_receive_event (GstInterPipeINode * iface, GstEvent * event)

multiple_listeners:
{
GST_WARNING_OBJECT (self, "Could not send event upstream, "
"more than one listener is connected");
gchar* evtype = g_ascii_strup(GST_EVENT_TYPE_NAME(event), -1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest just using GST_EVENT_TYPE_NAME(event) directly instead of dropping the case and needing to free later.

@@ -870,7 +870,7 @@ gst_inter_pipe_sink_remove_listener (GstInterPipeINode * iface,
}

static gboolean
gst_inter_pipe_sink_receive_event (GstInterPipeINode * iface, GstEvent * event)
gst_inter_pipe_sink_receive_event (GstInterPipeINode * iface, GstInterPipeIListener * listener, GstEvent * event)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a pointer guard for listener. And, incidentally, could you add one for event as well?

@michaelgruner
Copy link
Collaborator

@mildsunrise thanks for your contribution, I agree with your suggestion. I've added a couple of my own on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants