libdvdread: Encrypted DVD support unavailable
"Gansser, Martin" <[email protected]>
| Newsgroups | gmane.comp.video.ogle.devel |
|---|---|
| Message-ID | <78224A6821F87A4D8023B133E5B1140B40CA61@srvmxellwangen2.ratc-de.com> |
Hi,
I compiled ogle-0.9.0 successfully on hpux 11.00, but the
playback of Encrypted DVD's fails with: Encrypted DVD support unavailable
I used libdvdcss-1.2.4 and libdvdread-0.9.4
I'm not sure who owns the libdvdread project, but
I found a problem with libdvdread on HPUX.
1. Normaly the shared libraries on HPUX have the
suffix .sl.* and not .so.*
2. on HPUX
The shared library functions on HP-UX 'shl_load' does not
support 'dlopen' on 32-bit PA-RISC executables
in the file dvd_input.c there is such a dlopen(), that hpux
doesn't understand:
/* dlopening libdvdcss */
dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
3. A possible port can look like the following lines, I have found.
Is there somone, who can port this to libdvdread ?.
+#ifdef HPUX
+# include <dl.h>
+#else
+# include <dlfcn.h>
+#endif
+
+#ifdef HPUX
+# define SHARED_LIB_EXT ".sl"
+#else
+# define SHARED_LIB_EXT ".so"
+#endif
+
+#ifndef RTLD_NOW
+# define RTLD_NOW 0
+#endif
+static void* open_dynamic_lib(char *filename)
+{
+#ifdef HPUX
+ /*
+ * Use shl_load family of functions on HP-UX. HP-UX does not
+ * support dlopen on 32-bit PA-RISC executables
+ */
+ return shl_load(filename, BIND_DEFERRED, 0);
+#else
+ return dlopen(filename, RTLD_NOW);
+#endif
+}
+
+static void close_dynamic_lib(void* handle)
+{
+#ifdef HPUX
+ shl_t h = handle;
+ shl_unload(h);
+#else
+ dlclose(handle);
+#endif
+}
+
+static void* find_dynamic_symbol(void *handle, char *symbol)
+{
+#ifdef HPUX
+ void *gpi;
+ shl_t h = handle;
+ if ((shl_findsym(&h, symbol, TYPE_PROCEDURE, &gpi)) != 0)
+ gpi = NULL;
+ return gpi;
+#else
+#ifdef SYMBOL_PREFIX
+ char *sym = g_strconcat(SYMBOL_PREFIX, symbol, NULL);
+ void *symh = dlsym(handle, sym);
+ g_free(sym);
+ return symh;
+#else
+ return dlsym(handle, symbol);
+#endif /* SYMBOL_PREFIX */
+#endif /* HPUX */
+}
+
+static void dynamic_lib_error(void)
+{
+#ifdef HPUX
+ perror("Error loading plugin!");
+#else
+ fprintf(stderr, "%s\n", dlerror());
+#endif
+}
thanks Martin