vdr-1.4.0 Makefile fixes (libsubvdr)

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

 



On Dienstag 16 Mai 2006 17:15, Petri Hintukainen wrote:
> On Tue, 2006-05-16 at 03:52 +0200, Udo Richter wrote:
> > Stefan Lucke wrote:
> > > Is it possible to get acces to the path name specified with -L option ?
> > > 
> > > vdr -L SEARCH_PATH -P "softdevice -L OTHER_SEARCH_PATH"
> > > 
> > > So in case these paths are the same, it would be nice to drop one
> > > argument for softdevice.
> > 
> > cPluginManager::directory. Unfortunately this is private. There's 
> > currently no way to get access to it without dirty tricks.
> > (see proxy plugin on how to do it anyway ;) )
> 
> Or try something like:
> 
> char *GetLibPath(void)
> {
>   Dl_info info;
>   char *libpath, *pt;
>   static int my_marker = 0;
> 
>   if(!dladdr((void *)&my_marker, &info)) {
>     printf("Error: dladdr() returned false (%s)", dlerror());
>     return NULL;
>   }
>   printf("Plugin file is %s", info.dli_fname);
> 
>   libpath = strdup(info.dli_fname);
>   if(NULL != (pt=strrchr(libpath, '/')))
>     *(pt+1) = 0;
>   
>   printf("Plugin path is %s", libpath);
>   return libpath;
> }
> 

Thanks, thats it. I guess its some sort of RTFM, but that is
exactly what I was looking for. Could drop now -L option.

-- 
Stefan Lucke


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux