summaryrefslogtreecommitdiffstats
path: root/parser-mpcmd.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-30 17:08:35 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-30 17:08:35 +0000
commit27d79717d47a4a59885a1433a9fb5cee2c00be58 (patch)
tree6ca96d4bfdc3bc19a9278d6d91448570275e881d /parser-mpcmd.c
parent5787833ca99a5ebe2d6e2ff06eac46edbdc33f56 (diff)
downloadmpv-27d79717d47a4a59885a1433a9fb5cee2c00be58.tar.bz2
mpv-27d79717d47a4a59885a1433a9fb5cee2c00be58.tar.xz
Remove the hack used to pass -dvd, etc into the playlist
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9748 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'parser-mpcmd.c')
-rw-r--r--parser-mpcmd.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/parser-mpcmd.c b/parser-mpcmd.c
index 1d87416a74..b9db499754 100644
--- a/parser-mpcmd.c
+++ b/parser-mpcmd.c
@@ -40,88 +40,6 @@ static int is_entry_option(char *opt, char *param, play_tree_t** ret) {
entry = parse_playlist_file(param);
if(!entry)
return 1;
- } else if(strcasecmp(opt,"vcd") == 0) {
- char* s;
- if(!param)
- return M_OPT_MISSING_PARAM;
- s = (char*)malloc((strlen(param) + 6 + 1)*sizeof(char));
- sprintf(s,"vcd://%s",param);
- entry = play_tree_new();
- play_tree_add_file(entry,s);
- free(s);
- } else if(strcasecmp(opt,"dvd") == 0) {
- char* s;
- if(!param)
- return M_OPT_MISSING_PARAM;
- s = (char*)malloc((strlen(param) + 6 + 1)*sizeof(char));
- sprintf(s,"dvd://%s",param);
- entry = play_tree_new();
- play_tree_add_file(entry,s);
- free(s);
- } else if(strcasecmp(opt,"tv") == 0) {
- char *s,*pr,*prs;
- char *ps,*pe,*channel=NULL;
- char *as;
- int on=0;
-
- if(!param)
- return M_OPT_MISSING_PARAM;
- ps = param;
- pe = strchr(param,':');
- pr = prs = (char*)malloc((strlen(param)+1)*sizeof(char));
- pr[0] = '\0';
- while(ps) {
- if(!pe)
- pe = ps + strlen(ps);
-
- as = strchr(ps,'=');
- if(as && as[1] != '\0' && pe-as > 0)
- as++;
- else
- as = NULL;
- if( !as && pe-ps == 2 && strncasecmp("on",ps,2) == 0 )
- on = 1;
- else if(as && as-ps == 8 && strncasecmp("channel",ps,6) == 0 && pe-as > 0) {
- channel = (char*)realloc(channel,(pe-as+1)*sizeof(char));
- strncpy(channel,as,pe-as);
- channel[pe-as] = '\0';
- } else if(pe-ps > 0) {
- if(prs != pr) {
- prs[0] = ':';
- prs++;
- }
- strncpy(prs,ps,pe-ps);
- prs += pe-ps;
- prs[0] = '\0';
- }
-
- if(pe[0] != '\0') {
- ps = pe+1;
- pe = strchr(ps,':');
- } else
- ps = NULL;
- }
-
- if(on) {
- int l=5;
-
- if(channel)
- l += strlen(channel);
- s = (char*) malloc((l+1)*sizeof(char));
- if(channel)
- sprintf(s,"tv://%s",channel);
- else
- sprintf(s,"tv://");
- entry = play_tree_new();
- play_tree_add_file(entry,s);
- if(strlen(pr) > 0)
- play_tree_set_param(entry,"tv",pr);
- free(s);
- }
- free(pr);
- if(channel)
- free(channel);
-
}
if(entry) {