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/Makefile | 2 +- pages/pageelems.ecpp | 51 ++++++++++++++++++++++++------ pages/setup.ecpp | 25 +++++++++++++++ pages/vlc.ecpp | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/whats_on.ecpp | 2 +- 5 files changed, 156 insertions(+), 11 deletions(-) create mode 100644 pages/vlc.ecpp (limited to 'pages') 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); + @@ -164,6 +175,20 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); + +
<$ tr("Allow video streaming") $>:
+ + CHECKIF(!useStreamdev.empty()); onclick="changedusestreamdev(this)"/> + + +
<$ tr("additional fixed times in 'What's on?'") $>:
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> +
+ + + + + +
+ + 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") { - + % } <%cpp> -- cgit v1.2.3
<$ head $>
<$ head $>