From 06df85b5eadb9f088793df157b1dc5523a626db5 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sun, 16 Dec 2007 23:49:24 +0000 Subject: - Adapted Rolf Ahrenbergs patch for VLC streaming to current LIVE development status. See Bug #343. This will need some additional tweaking. --- pages/vlc.ecpp | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 pages/vlc.ecpp (limited to 'pages/vlc.ecpp') 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 +#include +#include +#include "setup.h" +#include "tools.h" + +using namespace std; +using namespace vdrlive; + + +<%args> + tChannelID channel; + string async; + +<%session scope="global"> + bool logged_in(false); + +<%request scope="page"> + cChannel* Channel; + +<%include>page_init.eh +<%cpp> + if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + + pageTitle = tr("VLC: live video stream"); + + bool asyncReq = !async.empty() && (lexical_cast(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?") ); + } + +<& pageelems.doc_type &> + + + VDR-Live - <$ pageTitle $> +<%cpp> + if (!asyncReq) { + + <& pageelems.stylesheets &> + <& pageelems.ajax_js &> +<%cpp> + } + + + +<%cpp> + if (!asyncReq) { + + <& pageelems.logo &> + <& menu active="vlc" &> +<%cpp> + } + +
+<%cpp> + if ( Channel != 0 ) { + int streamdevPort = LiveSetup().GetStreamdevPort(); + string videourl = string("http://") + request.getServerIp() + ":" + lexical_cast(streamdevPort) + "/" + *Channel->GetChannelID().ToString(); + + + <& vlc.channel_selection &> +<%cpp> + } + +
+ + +<%include>page_exit.eh + +<%def channel_selection> +
+ + + + + +
+ + -- cgit v1.2.3