Re: [PATCH spice-gtk 2/3] channel-display-gst: Reduce contention on queues_mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ack (Uri has the same patch :p)


On 04/16/2018 01:43 PM, Frediano Ziglio wrote:
We don't need to lock the entire queues to create a frame.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
  src/channel-display-gst.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 201842e..f5fa642 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -564,8 +564,9 @@ static gboolean spice_gst_decoder_queue_frame(VideoDecoder *video_decoder,
      GST_BUFFER_DTS(buffer) = GST_CLOCK_TIME_NONE;
      GST_BUFFER_PTS(buffer) = gst_clock_get_time(decoder->clock) - gst_element_get_base_time(decoder->pipeline) + ((uint64_t)MAX(0, latency)) * 1000 * 1000;
+ SpiceGstFrame *gst_frame = create_gst_frame(buffer, frame);
      g_mutex_lock(&decoder->queues_mutex);
-    g_queue_push_tail(decoder->decoding_queue, create_gst_frame(buffer, frame));
+    g_queue_push_tail(decoder->decoding_queue, gst_frame);
      g_mutex_unlock(&decoder->queues_mutex);
if (gst_app_src_push_buffer(decoder->appsrc, buffer) != GST_FLOW_OK) {

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]