| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
#ifdef HAVE_CONFIG_H |
|---|
| 22 |
# include "config.h" |
|---|
| 23 |
#endif |
|---|
| 24 |
|
|---|
| 25 |
#include <vlc_common.h> |
|---|
| 26 |
#include "../libvlc.h" |
|---|
| 27 |
|
|---|
| 28 |
#if 0 |
|---|
| 29 |
#include <stdio.h> |
|---|
| 30 |
#include <assert.h> |
|---|
| 31 |
#include <pthread.h> |
|---|
| 32 |
|
|---|
| 33 |
static void set_libvlc_path (void) |
|---|
| 34 |
{ |
|---|
| 35 |
static char libvlc_path[PATH_MAX]; |
|---|
| 36 |
|
|---|
| 37 |
assert (strlen (LIBDIR) < sizeof (libvlc_path)); |
|---|
| 38 |
strcpy (libvlc_path, LIBDIR); |
|---|
| 39 |
vlc_global ()->psz_vlcpath = libvlc_path; |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
FILE *maps = fopen ("/proc/self/maps", "rt"); |
|---|
| 43 |
if (maps == NULL) |
|---|
| 44 |
return; |
|---|
| 45 |
|
|---|
| 46 |
for (;;) |
|---|
| 47 |
{ |
|---|
| 48 |
char buf[5000], *dir, *end; |
|---|
| 49 |
|
|---|
| 50 |
if (fgets (buf, sizeof (buf), maps) == NULL) |
|---|
| 51 |
break; |
|---|
| 52 |
|
|---|
| 53 |
dir = strchr (buf, '/'); |
|---|
| 54 |
if (dir == NULL) |
|---|
| 55 |
continue; |
|---|
| 56 |
end = strrchr (dir, '/'); |
|---|
| 57 |
if (end == NULL) |
|---|
| 58 |
continue; |
|---|
| 59 |
if (strncmp (end + 1, "libvlc.so.", 10)) |
|---|
| 60 |
continue; |
|---|
| 61 |
|
|---|
| 62 |
*end = '\0'; |
|---|
| 63 |
printf ("libvlc at %s\n", dir); |
|---|
| 64 |
if (strlen (dir) < sizeof (libvlc_path)) |
|---|
| 65 |
strcpy (libvlc_path, dir); |
|---|
| 66 |
break; |
|---|
| 67 |
} |
|---|
| 68 |
|
|---|
| 69 |
fclose (maps); |
|---|
| 70 |
} |
|---|
| 71 |
#endif |
|---|
| 72 |
|
|---|
| 73 |
void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[]) |
|---|
| 74 |
{ |
|---|
| 75 |
#if 0 |
|---|
| 76 |
static pthread_once_t once = PTHREAD_ONCE_INIT; |
|---|
| 77 |
pthread_once (&once, set_libvlc_path); |
|---|
| 78 |
#endif |
|---|
| 79 |
(void)libvlc; (void)argc; (void)argv; |
|---|
| 80 |
} |
|---|
| 81 |
|
|---|
| 82 |
void system_Configure (libvlc_int_t *libvlc, int *argc, const char *argv[]) |
|---|
| 83 |
{ |
|---|
| 84 |
(void)libvlc; (void)argc; (void)argv; |
|---|
| 85 |
} |
|---|
| 86 |
|
|---|
| 87 |
void system_End (libvlc_int_t *libvlc) |
|---|
| 88 |
{ |
|---|
| 89 |
(void)libvlc; |
|---|
| 90 |
} |
|---|
| 91 |
|
|---|