changeset 9582:757febff3b17

8150464: [Linux] Build broken after fix for JDK-8136920 Reviewed-by: kcr
author almatvee
date Tue, 23 Feb 2016 19:03:05 -0800
parents 4d8a1695b277
children 3ccf14ef836f
files build.gradle modules/media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile
diffstat 3 files changed, 6 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/build.gradle	Wed Feb 24 13:40:31 2016 +1300
+++ b/build.gradle	Tue Feb 23 19:03:05 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2392,21 +2392,7 @@
                                         args("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}",
                                              "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}",
                                              "BASE_NAME=avplugin", "VERSION=${version}", "LIBAV_DIR=${libavDir}",
-                                             "SUFFIX=", IS_64 ? "ARCH=x64" : "ARCH=x32")
-                                    }
-                                }
-                            }
-
-                            project.ext.libav.ffmpeg.versions.each { version ->
-                                def libavDir = "${project.ext.libav.ffmpeg.basedir}-${version}"
-                                File dir = file(libavDir)
-                                if (dir.exists()) {
-                                    exec {
-                                        commandLine ("make", "${makeJobsFlag}", "-C", "${nativeSrcDir}/gstreamer/projects/linux/avplugin")
-                                        args("CC=${mediaProperties.compiler}", "LINKER=${mediaProperties.linker}",
-                                             "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}",
-                                             "BASE_NAME=avplugin", "VERSION=${version}", "LIBAV_DIR=${libavDir}",
-                                             "SUFFIX=-ffmpeg", IS_64 ? "ARCH=x64" : "ARCH=x32")
+                                              IS_64 ? "ARCH=x64" : "ARCH=x32")
                                     }
                                 }
                             }
--- a/modules/media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c	Wed Feb 24 13:40:31 2016 +1300
+++ b/modules/media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstregistry.c	Tue Feb 23 19:03:05 2016 -0800
@@ -157,8 +157,7 @@
 #include <link.h>
 #include <dlfcn.h>
 
-static const int AVCODEC_EXPLICIT_VERSIONS[] = { 53, 54, 55, 56 };
-static const int AVCODEC_FFMPEG_EXPLICIT_VERSIONS[] = { 56 };
+static const int AVCODEC_EXPLICIT_VERSIONS[] = { 53, 54, 55 };
 
 typedef unsigned (*avcodec_version_proto)();
 
@@ -1309,7 +1308,6 @@
   gchar *filename_partial;
 #ifdef LINUX
   void *avcHandle = NULL;
-  gboolean isAVCFFMPEG = FALSE;
 #endif // LINUX
 #endif // GSTREAMER_LITE
 
@@ -1384,22 +1382,6 @@
               g_free(libname);
           }
 
-          // Look for libavcodec-ffmpeg if libavcodec is not available
-          if (avcHandle == NULL)
-          {
-              vi = (sizeof(AVCODEC_FFMPEG_EXPLICIT_VERSIONS)/sizeof(AVCODEC_FFMPEG_EXPLICIT_VERSIONS[0]));
-              while(!avcHandle && --vi >= 0)
-              {
-                int version = AVCODEC_FFMPEG_EXPLICIT_VERSIONS[vi];
-                gchar* libname = g_strdup_printf("libavcodec-ffmpeg.so.%d", version);
-                avcHandle = dlopen(libname, RTLD_NOW);
-                g_free(libname);
-              }
-
-              if (avcHandle)
-                isAVCFFMPEG = TRUE;
-          }
-
           if (avcHandle)
           {
               dlclose(avcHandle);
@@ -1410,10 +1392,7 @@
               if (g_stat (filename, &file_status) < 0) // Not available, create a versioned filename
               {
                   g_free(filename);
-                  if (isAVCFFMPEG)
-                    filename = g_strdup_printf("%s-ffmpeg-%d%s", filename_partial, AVCODEC_FFMPEG_EXPLICIT_VERSIONS[vi], GST_EXTRA_MODULE_SUFFIX);
-                  else
-                    filename = g_strdup_printf("%s-%d%s", filename_partial, AVCODEC_EXPLICIT_VERSIONS[vi], GST_EXTRA_MODULE_SUFFIX);
+                  filename = g_strdup_printf("%s-%d%s", filename_partial, AVCODEC_EXPLICIT_VERSIONS[vi], GST_EXTRA_MODULE_SUFFIX);
               }
           }
           else
--- a/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile	Wed Feb 24 13:40:31 2016 +1300
+++ b/modules/media/src/main/native/gstreamer/projects/linux/avplugin/Makefile	Tue Feb 23 19:03:05 2016 -0800
@@ -10,8 +10,8 @@
 DIRLIST = av
 
 ifneq ($(strip $(VERSION)),)
-TARGET = $(BUILD_DIR)/lib$(BASE_NAME)$(SUFFIX)-$(VERSION).so
-OBJBASE_DIR = $(BUILD_DIR)/obj/plugins/$(BASE_NAME)$(SUFFIX)-$(VERSION)
+TARGET = $(BUILD_DIR)/lib$(BASE_NAME)-$(VERSION).so
+OBJBASE_DIR = $(BUILD_DIR)/obj/plugins/avplugin-$(VERSION)
 else
 TARGET = $(BUILD_DIR)/lib$(BASE_NAME).so
 OBJBASE_DIR = $(BUILD_DIR)/obj/plugins/avplugin