summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/Makefile2
-rw-r--r--pages/pageelems.ecpp51
-rw-r--r--pages/setup.ecpp25
-rw-r--r--pages/vlc.ecpp87
-rw-r--r--pages/whats_on.ecpp2
5 files changed, 156 insertions, 11 deletions
diff --git a/pages/Makefile b/pages/Makefile
index 9945f1f..53deb99 100644
--- a/pages/Makefile
+++ b/pages/Makefile
@@ -18,7 +18,7 @@ VDRDIR ?= ../../../..
OBJS = menu.o channels.o recordings.o schedule.o \
screenshot.o timers.o whats_on.o switch_channel.o \
keypress.o remote.o channels_widget.o edit_timer.o \
- error.o pageelems.o tooltip.o \
+ error.o pageelems.o tooltip.o vlc.o \
searchtimers.o edit_searchtimer.o searchresults.o \
searchepg.o login.o ibox.o xmlresponse.o \
play_recording.o pause_recording.o stop_recording.o \
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index 3d6b866..2fcb5cb 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -149,6 +149,7 @@ int update_status(1);
<script type="text/javascript" src="js/live/liveajax.js"></script>
<script type="text/javascript" src="js/live/infowin.js"></script>
<script type="text/javascript" src="js/live/hinttips.js"></script>
+ <script type="text/javascript" src="js/live/browserwin.js"></script>
<script type="text/javascript" src="js/live/pageenhance.js"></script>
<script type="text/javascript"><!--
var liveEnhanced = new PageEnhance({
@@ -230,6 +231,11 @@ int update_status(1);
<a href="searchresults.html?searchplain=<$ StringEscapeAndBreak(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a>
<%cpp>
}
+ if (LiveSetup().GetUseStreamdev() && elapsed > 0 && LiveFeatures<features::streamdev_server>().Loaded()) {
+</%cpp>
+ <a href="vlc.html?channel=<$ channelId $>"><img src="<$ LiveSetup().GetThemedLink("img", "play.png") $>" alt="" <& tooltip.hint text=(tr("Stream this channel into browser.")) &>></img></a>
+<%cpp>
+ }
</%cpp>
<a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a>
<%cpp>
@@ -239,6 +245,7 @@ int update_status(1);
<td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer epgid=(epgid) &></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (elapsed > 0) { </%cpp><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &><%cpp> } </%cpp></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent()) { </%cpp><a href="searchresults.html?searchplain=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "search.png") $>" alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
+ <td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveSetup().GetUseStreamdev() && elapsed > 0 && LiveFeatures<features::streamdev_server>().Loaded()) { </%cpp><a href="vlc.html?channel=<$ channelId $>"><img src="<$ LiveSetup().GetThemedLink("img", "play.png") $>" alt="" <& tooltip.hint text=(tr("Stream this channel into browser.")) &>></img></a><%cpp> } else { </%cpp><img src="transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><a href="http://akas.imdb.com/Tsearch?title=<$ StringUrlEncode(title) $>"><img src="<$ LiveSetup().GetThemedLink("img", "imdb.png") $>" alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>></img></a></td>
<%cpp>
}
@@ -319,19 +326,45 @@ int update_status(1);
<div class="about_right"><$ LIVEVERSION $></div>
<div class="about_left"><$ tr("VDR version") $>:</div>
<div class="about_right"><$ VDRVERSION $></div>
- <div class="about_left"><$ tr("Features") $>:</div>
+ <div class="about_head"><div><div><$ tr("Features") $></div></div></div>
+ <div class="about_left">EPGsearch:</div>
<div class="about_right">
-<{
+<%cpp>
Features< features::epgsearch >& epgsearch = LiveFeatures< features::epgsearch >();
-}>
- <img align="center" src="<$ LiveSetup().GetThemedLink("img", epgsearch.Recent() ? "active.png" : "inactive.png") $>"/> EPGsearch
-% if ( epgsearch.Recent() ) {
- (<$ tr("active") $>: <$ epgsearch.Version() $>)
-% } else {
- (<$ tr("required") $>: <$ epgsearch.MinVersion() $>)
-% }
+</%cpp>
+ <img align="center" src="<$ LiveSetup().GetThemedLink("img", epgsearch.Recent() ? "active.png" : "inactive.png") $>"/>
+<%cpp>
+ if ( epgsearch.Recent() ) {
+</%cpp>
+ <$ tr("active") $>: <$ epgsearch.Version() $>
+<%cpp>
+ } else {
+</%cpp>
+ <$ tr("required") $>: <$ epgsearch.MinVersion() $>
+<%cpp>
+ }
+</%cpp>
(<a href="http://winni.vdr-developer.org/epgsearch/index.html" target="_blank"><$ tr("Homepage") $></a>)<br/>
</div>
+ <div class="about_left">Streamdev server:</div>
+ <div class="about_right">
+<%cpp>
+ Features< features::streamdev_server >& streamdev = LiveFeatures< features::streamdev_server >();
+</%cpp>
+ <img align="center" src="<$ LiveSetup().GetThemedLink("img", streamdev.Loaded() ? "active.png" : "inactive.png") $>"/>
+<%cpp>
+ if ( streamdev.Loaded() ) {
+</%cpp>
+ <$ tr("active") $>: <$ streamdev.Version() $>
+<%cpp>
+ } else {
+</%cpp>
+ <$ tr("required") $>: <$ streamdev.MinVersion() $>
+<%cpp>
+ }
+</%cpp>
+ (<a href="http://streamdev.vdr-developer.org/" target="_blank"><$ tr("Homepage") $></a>)<br/>
+ </div>
<div class="about_head"><div><div><$ tr("Bugs and suggestions") $></div></div></div>
<div class="about_line"><$ tr("If you encounter any bugs or would like to suggest new features, please use our bugtracker") $>:<br/>
<a target="_blank" href="http://www.vdr-developer.org/mantisbt">http://www.vdr-developer.org/mantisbt</a></div>
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index d4e46f5..debd97c 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -21,6 +21,8 @@ using namespace std;
string showLogo;
string useAjax;
string showInfoBox;
+ string useStreamdev;
+ string streamdevport;
int authchanged = 0;
</%args>
<%session scope="global">
@@ -57,6 +59,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
if (LiveSetup().GetUseAjax()) {
LiveSetup().SetShowInfoBox(!showInfoBox.empty());
}
+ LiveSetup().SetUseStreamdev(!useStreamdev.empty());
+ LiveSetup().SetStreamdevPort(streamdevport.empty() ? 3000 : lexical_cast<int>(streamdevport));
LiveSetup().SaveSetup();
message = tr("Setup saved.");
}
@@ -77,6 +81,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
showLogo = LiveSetup().GetShowLogo() ? "1" : "";
useAjax = LiveSetup().GetUseAjax() ? "1" : "";
showInfoBox = LiveSetup().GetShowInfoBox() ? "1" : "";
+ useStreamdev = LiveSetup().GetUseStreamdev() ? "1" : "";
+ streamdevport = lexical_cast<std::string, int>(LiveSetup().GetStreamdevPort());
</%cpp>
<& pageelems.doc_type &>
@@ -90,6 +96,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
{
changeduseauth(document.getElementById("useauth"));
changeduseajax(document.getElementById("useAjax"));
+ changedusestreamdev(document.getElementById("useStreamdev"));
if (document.getElementById("message").value != "")
alert(document.getElementById("message").value);
}
@@ -105,6 +112,10 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
{
document.getElementById("ajaxsection").style.display = (selection.checked ? "block" : "none");
}
+ function changedusestreamdev(selection)
+ {
+ document.getElementById("streamdevsection").style.display = (selection.checked ? "block" : "none");
+ }
//--></script>
</head>
<body onload="initform()">
@@ -165,6 +176,20 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
</td>
</tr>
<tr>
+ <td class="label leftcol"><div class="withmargin"><$ tr("Allow video streaming") $>:</div></td>
+ <td class="rightcol">
+ <input type="checkbox" name="useStreamdev" id="useStreamdev" value="1" <%cpp> CHECKIF(!useStreamdev.empty()); </%cpp> onclick="changedusestreamdev(this)"/>
+ <div id="streamdevsection" style="display: none">
+ <table border="0" cellpadding="0" cellspacing="0" class="dependent">
+ <tr>
+ <td class="label"><div class="withmargin"><$ tr("streamdev server port") $>:</div></td>
+ <td><input type="text" name="streamdevport" id="streamdevport" value="<$ streamdevport $>" /></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
<td class="label leftcol"><div class="withmargin"><$ tr("additional fixed times in 'What's on?'") $>:</div></td>
<td class="rightcol"><input type="text" name="times" value="<$ times $>" id="times" />
<& tooltip.help text=(tr("Format is HH:MM. Separate multiple times with a semicolon")) &></td>
diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp
new file mode 100644
index 0000000..865b6bd
--- /dev/null
+++ b/pages/vlc.ecpp
@@ -0,0 +1,87 @@
+<%pre>
+#include <vdr/channels.h>
+#include <vdr/i18n.h>
+#include <vdr/keys.h>
+#include "setup.h"
+#include "tools.h"
+
+using namespace std;
+using namespace vdrlive;
+
+</%pre>
+<%args>
+ tChannelID channel;
+ string async;
+</%args>
+<%session scope="global">
+ bool logged_in(false);
+</%session>
+<%request scope="page">
+ cChannel* Channel;
+</%request>
+<%include>page_init.eh</%include>
+<%cpp>
+ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
+
+ pageTitle = tr("VLC: live video stream");
+
+ bool asyncReq = !async.empty() && (lexical_cast<int>(async) != 0);
+
+ ReadLock channelsLock(Channels);
+
+ if (!channelsLock) {
+ throw HtmlError(tr("Couldn't aquire access to channels, please try again later."));
+ }
+ Channel = Channels.GetByChannelID(channel);
+ if (Channel == 0) {
+ throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") );
+ }
+</%cpp>
+<& pageelems.doc_type &>
+<html>
+ <head>
+ <title>VDR-Live - <$ pageTitle $></title>
+<%cpp>
+ if (!asyncReq) {
+</%cpp>
+ <& pageelems.stylesheets &>
+ <& pageelems.ajax_js &>
+<%cpp>
+ }
+</%cpp>
+ </head>
+ <body>
+<%cpp>
+ if (!asyncReq) {
+</%cpp>
+ <& pageelems.logo &>
+ <& menu active="vlc" &>
+<%cpp>
+ }
+</%cpp>
+ <div class="inhalt">
+<%cpp>
+ if ( Channel != 0 ) {
+ int streamdevPort = LiveSetup().GetStreamdevPort();
+ string videourl = string("http://") + request.getServerIp() + ":" + lexical_cast<string,int>(streamdevPort) + "/" + *Channel->GetChannelID().ToString();
+</%cpp>
+ <embed type="application/x-vlc-plugin" name="video1" autoplay="no" loop="yes" width="400" height="300" target="<$ videourl $>" />
+ <& vlc.channel_selection &>
+<%cpp>
+ }
+</%cpp>
+ </div>
+ </body>
+</html>
+<%include>page_exit.eh</%include>
+
+<%def channel_selection>
+<div>
+<input type="button" value="Play" onclick="document.video1.play();" />
+<input type="button" value="Pause" onclick="document.video1.pause();" />
+<input type="button" value="Stop" onclick="document.video1.stop();" />
+<input type="button" value="Mute" onclick="document.video1.mute();" />
+<input type="button" value="Fullscreen" onclick="document.video1.fullscreen();" />
+</div>
+</%def>
+
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index d724c23..7331adc 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -98,7 +98,7 @@ if (type == "now") {
% if (mode == "list") {
<table class="listing" cellspacing="0" cellpadding="0">
<tr class="head">
- <td colspan="7"><div class="boxheader"><div><div><$ head $></div></div></div></td>
+ <td colspan="8"><div class="boxheader"><div><div><$ head $></div></div></div></td>
</tr>
% }
<%cpp>