[Bug 759742] Running multiple nvenc encoders in the same pipeline causes very high CPU load during initialisation
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Dec 21 07:20:34 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=759742
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #317743|none |needs-work
status| |
--- Comment #2 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 317743:
--> (https://bugzilla.gnome.org/review?bug=759742&attachment=317743)
Thanks for the patch, generally looks good :) Just some minor things
::: sys/nvenc/gstnvbaseenc.c
@@ +876,3 @@
+ /* This lock is needed to prevent the situation where multiple encoder
elements
+ * in the same pipeline cause the CPU to spin on initalisation of the
elements. */
+ G_LOCK(initialization_lock);
Move this below the variable declarations.
Is there a smaller part of the function that could be protected with the mutex
or is it really required to protect everything?
@@ +1073,3 @@
GST_ERROR_OBJECT (nvenc, "Subclass failed to set output caps");
/* FIXME: clean up */
+ G_UNLOCK(initialization_lock);
instead of all these unlocks followed by return FALSE, we could also make this
a "goto error" and define the error case below the "return TRUE" case at the
bottom of the function.
Less risk of someone adding new code that forgets to unlock
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list