summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2010-12-02 20:49:56 +0200
committerAntti Ajanki <antti.ajanki@iki.fi>2010-12-02 20:49:56 +0200
commit98c387e6944ff6539a5b3bd47336187e447c2570 (patch)
tree06432ab1885f5c8bab773b0fd034b3f6daa139e3
parent0cbd23ffe7817a64d3d43a74adc135be90ab29ae (diff)
downloadvdr-plugin-webvideo-98c387e6944ff6539a5b3bd47336187e447c2570.tar.gz
vdr-plugin-webvideo-98c387e6944ff6539a5b3bd47336187e447c2570.tar.bz2
--prefermplayer
-rw-r--r--HISTORY3
-rw-r--r--README.vdrplugin1
-rw-r--r--src/vdr-plugin/webvideo.c21
3 files changed, 18 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 61f2a62..72332f1 100644
--- a/HISTORY
+++ b/HISTORY
@@ -218,4 +218,5 @@ Video site modules:
Version 0.4.1
- Accept -p as alternative to --postprocess (thanks to Matti Lehtimäki).
-
+- New option --prefermplayer prefers mplayer over xineliboutput when
+ streaming (thanks to Matti Lehtimäki).
diff --git a/README.vdrplugin b/README.vdrplugin
index c628a38..e1e6705 100644
--- a/README.vdrplugin
+++ b/README.vdrplugin
@@ -97,6 +97,7 @@ VDR plugin command line parameters
/usr/local/share/webvi/templates)
-c FILE, --conf=FILE Load settings from FILE
-p CMD, --postprocess=CMD Execute CMD after downloading
+-m, --prefermplayer Prefer mplayer over xineliboutput when streaming
Config file
-----------
diff --git a/src/vdr-plugin/webvideo.c b/src/vdr-plugin/webvideo.c
index 15661d4..02f007a 100644
--- a/src/vdr-plugin/webvideo.c
+++ b/src/vdr-plugin/webvideo.c
@@ -38,6 +38,7 @@ private:
cString destdir;
cString conffile;
cString postprocesscmd;
+ bool prefermplayer;
static int nextMenuID;
@@ -77,6 +78,7 @@ cPluginWebvideo::cPluginWebvideo(void)
// Initialize any member variables here.
// DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
// VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
+ prefermplayer = false;
}
cPluginWebvideo::~cPluginWebvideo()
@@ -91,22 +93,24 @@ const char *cPluginWebvideo::CommandLineHelp(void)
return " -d DIR, --downloaddir=DIR Save downloaded files to DIR\n" \
" -t DIR, --templatedir=DIR Read video site templates from DIR\n" \
" -c FILE, --conf=FILE Load settings from FILE\n" \
- " -p CMD, --postprocess=CMD Execute CMD after downloading\n";
+ " -p CMD, --postprocess=CMD Execute CMD after downloading\n" \
+ " -m, --prefermplayer Prefer mplayer over xineliboutput when streaming\n";
}
bool cPluginWebvideo::ProcessArgs(int argc, char *argv[])
{
// Implement command line argument processing here if applicable.
static struct option long_options[] = {
- { "downloaddir", required_argument, NULL, 'd' },
- { "templatedir", required_argument, NULL, 't' },
- { "conf", required_argument, NULL, 'c' },
- { "postprocess", required_argument, NULL, 'p' },
+ { "downloaddir", required_argument, NULL, 'd' },
+ { "templatedir", required_argument, NULL, 't' },
+ { "conf", required_argument, NULL, 'c' },
+ { "postprocess", required_argument, NULL, 'p' },
+ { "prefermplayer", no_argument, NULL, 'm' },
{ NULL }
};
int c;
- while ((c = getopt_long(argc, argv, "d:t:c:p:", long_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "d:t:c:p:m", long_options, NULL)) != -1) {
switch (c) {
case 'd':
destdir = cString(optarg);
@@ -120,6 +124,9 @@ bool cPluginWebvideo::ProcessArgs(int argc, char *argv[])
case 'p':
postprocesscmd = cString(optarg);
break;
+ case 'm':
+ prefermplayer = true;
+ break;
default:
return false;
}
@@ -148,6 +155,8 @@ bool cPluginWebvideo::Initialize(void)
webvideoConfig->SetTemplatePath(templatedir);
if ((const char *)postprocesscmd)
webvideoConfig->SetPostProcessCmd(postprocesscmd);
+ if (prefermplayer)
+ webvideoConfig->SetPreferXineliboutput(false);
cString mymimetypes = AddDirectory(ConfigDirectory(Name()), "mime.types");
const char *mimefiles [] = {"/etc/mime.types", (const char *)mymimetypes, NULL};