[Bug 673327] New: ximagesink/xvimagesink don't compile on Mac; here is a fix.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Apr 1 18:13:31 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=673327
  GStreamer | gst-plugins-base | 0.11.x

           Summary: ximagesink/xvimagesink don't compile on Mac; here is a
                    fix.
    Classification: Platform
           Product: GStreamer
           Version: 0.11.x
        OS/Version: Mac OS
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: jclyons at wesleyan.edu
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Ximagesink and xvimagesink don't compile on the Mac unless I apply my following
two patches:

patch #1(xvimagesink):

--- sys/xvimage/xvimagepool.c.orig    2012-02-16 08:15:28.000000000 -0500
+++ sys/xvimage/xvimagepool.c    2012-02-19 22:16:25.000000000 -0500
@@ -227,6 +227,7 @@
     /* Delete the shared memory segment as soon as we everyone is attached.
      * This way, it will be deleted as soon as we detach later, and not
      * leaked if we crash. */
+
     shmctl (meta->SHMInfo.shmid, IPC_RMID, NULL);

     GST_DEBUG_OBJECT (xvimagesink, "XServer ShmAttached to 0x%x, id 0x%lx",
@@ -296,13 +297,17 @@
         ("Failed to create output image buffer of %dx%d pixels",
             width, height), ("Failed to shmat: %s", g_strerror (errno)));
     /* Clean up the shared memory segment */
+#ifdef HAVE_XSHM
     shmctl (meta->SHMInfo.shmid, IPC_RMID, NULL);
+#endif
     goto beach;
   }
 xattach_failed:
   {
     /* Clean up the shared memory segment */
+#ifdef HAVE_XSHM
     shmctl (meta->SHMInfo.shmid, IPC_RMID, NULL);
+#endif
     g_mutex_unlock (xvimagesink->x_lock);

     GST_ELEMENT_ERROR (xvimagesink, RESOURCE, WRITE,


patch #2(ximagesink):

--- sys/ximage/ximagepool.c.orig    2012-02-16 08:15:28.000000000 -0500
+++ sys/ximage/ximagepool.c    2012-02-19 22:17:11.000000000 -0500
@@ -172,8 +172,10 @@
     /* Now that everyone has attached, we can delete the shared memory
segment.
      * This way, it will be deleted as soon as we detach later, and not
      * leaked if we crash. */
+
     shmctl (meta->SHMInfo.shmid, IPC_RMID, NULL);

+
     GST_DEBUG_OBJECT (ximagesink, "XServer ShmAttached to 0x%x, id 0x%lx",
         meta->SHMInfo.shmid, meta->SHMInfo.shmseg);
   } else
@@ -262,13 +264,17 @@
         ("Failed to create output image buffer of %dx%d pixels",
             width, height), ("Failed to shmat: %s", g_strerror (errno)));
     /* Clean up the shared memory segment */
+#ifdef HAVE_XSHM
     shmctl (meta->SHMInfo.shmid, IPC_RMID, NULL);
+#endif
     goto beach;
   }
 xattach_failed:
   {
     /* Clean up the shared memory segment */
+#ifdef HAVE_XSHM
     shmctl (meta->SHMInfo.shmid, IPC_RMID, NULL);
+#endif
     g_mutex_unlock (ximagesink->x_lock);

     GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE,

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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