[gnome-remote-desktop] rdp-pipewire-stream: Remove unused SPA_DATA_MemPtr path



commit 1583f389af769e48f3b662e1b87a311f934d2d9a
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Thu May 5 07:40:53 2022 +0200

    rdp-pipewire-stream: Remove unused SPA_DATA_MemPtr path
    
    Unless the PW_STREAM_FLAG_MAP_BUFFERS flag is specified, the
    SPA_DATA_MemPtr path in process_frame_data() is never triggered.
    Since the PW_STREAM_FLAG_MAP_BUFFERS is not specified, this path is
    basically dead.
    So, remove it.

 src/grd-rdp-pipewire-stream.c | 74 -------------------------------------------
 1 file changed, 74 deletions(-)
---
diff --git a/src/grd-rdp-pipewire-stream.c b/src/grd-rdp-pipewire-stream.c
index 16b7b6c2..f9b6220b 100644
--- a/src/grd-rdp-pipewire-stream.c
+++ b/src/grd-rdp-pipewire-stream.c
@@ -831,80 +831,6 @@ process_frame_data (GrdRdpPipeWireStream *stream,
                                grd_rdp_frame_ref (g_steal_pointer (&frame)),
                                (GDestroyNotify) grd_rdp_frame_unref);
     }
-  else if (buffer->datas[0].type == SPA_DATA_MemPtr)
-    {
-      GrdSession *session = GRD_SESSION (stream->session_rdp);
-      GrdContext *context = grd_session_get_context (session);
-      GrdEglThread *egl_thread = grd_context_get_egl_thread (context);
-      GrdHwAccelNvidia *hwaccel_nvidia = stream->rdp_surface->hwaccel_nvidia;
-      AllocateBufferData *allocate_buffer_data;
-      RealizeBufferData *realize_buffer_data;
-      GrdRdpBuffer *rdp_buffer;
-      void *src_data;
-      uint32_t pbo;
-      uint8_t *data_to_upload;
-
-      src_data = buffer->datas[0].data;
-
-      frame->buffer = grd_rdp_buffer_pool_acquire (stream->buffer_pool);
-      if (!frame->buffer)
-        {
-          grd_session_rdp_notify_error (stream->session_rdp,
-                                        GRD_SESSION_RDP_ERROR_GRAPHICS_SUBSYSTEM_FAILED);
-          callback (stream, g_steal_pointer (&frame), FALSE, user_data);
-          return;
-        }
-      rdp_buffer = frame->buffer;
-      pbo = rdp_buffer->pbo;
-
-      if (stream->rdp_surface->needs_no_local_data &&
-          src_stride == dst_stride)
-        {
-          data_to_upload = src_data;
-        }
-      else
-        {
-          copy_frame_data (frame,
-                           src_data,
-                           width, height,
-                           dst_stride,
-                           src_stride,
-                           bpp);
-
-          data_to_upload = rdp_buffer->local_data;
-        }
-
-      if (!hwaccel_nvidia)
-        {
-          callback (stream, g_steal_pointer (&frame), TRUE, user_data);
-          return;
-        }
-
-      unmap_cuda_resources (egl_thread, hwaccel_nvidia, rdp_buffer);
-
-      allocate_buffer_data = g_new0 (AllocateBufferData, 1);
-      allocate_buffer_data->hwaccel_nvidia = hwaccel_nvidia;
-      allocate_buffer_data->rdp_buffer = rdp_buffer;
-
-      realize_buffer_data = g_new0 (RealizeBufferData, 1);
-      realize_buffer_data->hwaccel_nvidia = hwaccel_nvidia;
-      realize_buffer_data->rdp_buffer = rdp_buffer;
-
-      grd_egl_thread_upload (egl_thread,
-                             pbo,
-                             height,
-                             dst_stride,
-                             data_to_upload,
-                             cuda_allocate_buffer,
-                             allocate_buffer_data,
-                             g_free,
-                             cuda_map_resource,
-                             realize_buffer_data,
-                             g_free,
-                             on_framebuffer_ready,
-                             grd_rdp_frame_ref (g_steal_pointer (&frame)),
-                             (GDestroyNotify) grd_rdp_frame_unref);
-    }
   else
     {
       callback (stream, g_steal_pointer (&frame), TRUE, user_data);


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