Mercurial > mplayer.hg
annotate get_path.c @ 8601:7fe391d6c293
The following patch adds two new command line options:
-sub-bkg-color n
-sub-bkg-alpha n
They control the color and alpha value used to initialize the subtitles and OSD BBOX.
With this you can have subtitles inside a traslucent rectangle.
This is useful when a movie already have "hardcoded" subtitles and you
want to overwrite them with rendered subtitles avoiding too much confusion.
patch by Salvador Eduardo Tropea <salvador@inti.gov.ar>
author | arpi |
---|---|
date | Sat, 28 Dec 2002 13:41:02 +0000 |
parents | d21bae2028a6 |
children | ad429d617df4 |
rev | line source |
---|---|
2557 | 1 |
2 char *get_path(char *filename){ | |
3 char *homedir; | |
4 char *buff; | |
5 static char *config_dir = "/.mplayer"; | |
6 int len; | |
7 | |
8 if ((homedir = getenv("HOME")) == NULL) | |
9 return NULL; | |
10 len = strlen(homedir) + strlen(config_dir) + 1; | |
11 if (filename == NULL) { | |
12 if ((buff = (char *) malloc(len)) == NULL) | |
13 return NULL; | |
14 sprintf(buff, "%s%s", homedir, config_dir); | |
15 } else { | |
16 len += strlen(filename) + 1; | |
17 if ((buff = (char *) malloc(len)) == NULL) | |
18 return NULL; | |
19 sprintf(buff, "%s%s/%s", homedir, config_dir, filename); | |
20 } | |
3746 | 21 mp_msg(MSGT_GLOBAL,MSGL_V,"get_path('%s') -> '%s'\n",filename,buff); |
2557 | 22 return buff; |
23 } |