Project

General

Profile

Feature #2573 » v2-0004-Add-ability-to-play-stream-by-external-media-player.patch

tmn505, 03/30/2019 03:23 PM

View differences:

pages/Makefile
searchepg.o login.o ibox.o xmlresponse.o play_recording.o \
pause_recording.o stop_recording.o ffw_recording.o \
rwd_recording.o setup.o content.o epginfo.o timerconflicts.o \
recstream.o users.o edit_user.o edit_recording.o osd.o
recstream.o users.o edit_user.o edit_recording.o osd.o \
playlist.o
SRCS := $(patsubst %.o,%.cpp,$(OBJS))
ESRCS := $(patsubst %.o,%.ecpp,$(OBJS))
ESRCS_DEPS := $(patsubst %.o,.%.edep,$(OBJS))
pages/multischedule.ecpp
<td> <div class="boxheader"> <div> <div><$ channel_names[channel] $> <# reply.sout() automatically escapes special characters to html entities #>
<& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channel_IDs[channel]) image="zap.png" alt="" &>
<& pageelems.vlc_stream_channel channelId=(channel_IDs[channel]) &>
<& pageelems.m3u_playlist_channel channelId=(channel_IDs[channel]) &>
</div></div> </div></td>
<td class="time spacer"> &nbsp; </td>
<%cpp>
pages/pageelems.ecpp
</%def>
<# ---------------------------------------------------------------------- #>
<%def m3u_playlist_channel>
<%args>
tChannelID channelId;
</%args>
<%cpp> if (LiveSetup().GetUseStreamdev() && LiveFeatures<features::streamdev_server>().Loaded()) { </%cpp><a href="playlist.m3u?channel=<$ channelId $>"><img src="<$ LiveSetup().GetThemedLink("img", "playlist.png") $>" alt="" <& tooltip.hint text=(tr("Stream this channel into media player.")) &>></img></a><%cpp> } </%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
<%def m3u_playlist_recording>
<%args>
string recid;
string linkText;
</%args>
<%cpp>
#if TNT_WATCHDOG_SILENCE
{
</%cpp><a href="playlist.m3u?recid=<$ recid $>"><img src="<$ LiveSetup().GetThemedLink("img", "playlist.png") $>" alt="" <& tooltip.hint text=(tr("Stream this recording into media player.")) &>></img> <$ linkText $></a>
<%cpp>
}
#endif
</%cpp>
</%def>
<# ---------------------------------------------------------------------- #>
<%def event_timer>
......
if ((duration == 0) || (elapsed >= 0)) {
</%cpp>
<& pageelems.vlc_stream_channel channelId=(channelId) &>
<& pageelems.m3u_playlist_channel channelId=(channelId) &>
<%cpp>
}
if (eventId != 0) {
......
<td class="action leftcol <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.event_timer epgid=(epgid) &></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if (LiveFeatures<features::epgsearch>().Recent() && eventId != 0) { </%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="img/transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if ((duration == 0) || (elapsed > 0)) { </%cpp><& pageelems.vlc_stream_channel channelId=(channelId) &><%cpp> } else { </%cpp><img src="img/transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>"><%cpp>if ((duration == 0) || (elapsed > 0)) { </%cpp><& pageelems.vlc_stream_channel channelId=(channelId) &><& pageelems.m3u_playlist_channel channelId=(channelId) &><%cpp> } else { </%cpp><img src="img/transparent.png" width="16" height="16"><%cpp> } </%cpp></td>
<td class="action <? lastCurrentChanel ? "bottomrow"?>">
<%cpp>
if (eventId != 0) {
pages/playlist.ecpp
<%pre>
#include <setup.h>
#include <tools.h>
#include <users.h>
using namespace std;
using namespace vdrlive;
</%pre>
<%args>
tChannelID channel;
string recid;
</%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");
if (!cUser::CurrentUserHasRightTo(UR_STARTREPLAY))
throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") );
// the availabilty of Channel signals that we will do live tv streaming.
Channel = 0;
if (recid.empty()) {
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
Channel = (cChannel *)Channels->GetByChannelID(channel);
#else
ReadLock channelsLock(Channels);
if (!channelsLock) {
throw HtmlError(tr("Couldn't aquire access to channels, please try again later."));
}
Channel = Channels.GetByChannelID(channel);
#endif
if (Channel == 0) {
throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") );
}
}
string server = request.getHost();
server = server.substr(0, server.rfind(':'));
string videourl;
reply.setContentType("application/vnd.apple.mpegurl");
if (Channel != 0) {
string channelname = Channel->Name();
int streamdevPort = LiveSetup().GetStreamdevPort();
videourl = string("#EXTM3U\n#EXTINF:-1,") + channelname + "\nhttp://" + server + ":" + lexical_cast<string,int>(streamdevPort) + "/" + LiveSetup().GetStreamdevType() + "/" + *Channel->GetChannelID().ToString();
}
else {
videourl = string("#EXTM3U\n#EXTINF:-1\nhttp://") + server + ":" + lexical_cast<string,int>(LiveSetup().GetServerPort()) + "/recstream.html?recid=" + recid;
}
</%cpp>
<& playlist.m3u videourl=(videourl) &>
<%include>page_exit.eh</%include>
<%def m3u>
<%args>
string videourl;
</%args>
<$ videourl $>
</%def>
pages/recordings.ecpp
</%args>
<& pageelems.ajax_action_href action="play_recording" param=(id) tip=(tr("play this recording.")) image="play.png" alt="" &>
<& pageelems.vlc_stream_recording recid=(id) &>
<& pageelems.m3u_playlist_recording recid=(id) &>
<& pageelems.imdb_info_href title=(title) &>
<& recordings.edit_rec id=(id) &>
<& recordings.del_rec id=(id) &>
pages/schedule.ecpp
<& channels_widget name=("channel") selected=(Channel ? *Channel->GetChannelID().ToString() : "") onchange=("document.forms.channels.submit()") &>
<& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(Channel->GetChannelID()) image="zap.png" alt="" &>
<& pageelems.vlc_stream_channel channelId=(Channel->GetChannelID()) &>
<& pageelems.m3u_playlist_channel channelId=(Channel->GetChannelID()) &>
</span>
</form>
</%def>
po/cs_CZ.po
msgid "Stream this recording into browser."
msgstr "Přehrávej tuto nahrávku v prohlížeči."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Nahrát"
po/de_DE.po
msgid "Stream this recording into browser."
msgstr "Aufnahme im Browser anzeigen."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Diese Sendung aufnehmen"
po/es_ES.po
msgid "Stream this recording into browser."
msgstr "Reproduce esta grabaci?n en el navegador"
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Grabar esto"
po/fi_FI.po
msgid "Stream this recording into browser."
msgstr "Aloita tallenteen suoratoisto"
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Tallenna ohjelma"
po/fr_FR.po
msgid "Stream this recording into browser."
msgstr "Diffusez cette cha?ne vers le navigateur."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Enregistrer cette ?mission"
po/it_IT.po
msgid "Stream this recording into browser."
msgstr "Trasmetti questa registrazione nel browser"
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Registra questa trasmissione"
po/lt_LT.po
msgid "Stream this recording into browser."
msgstr "Transliuoti šį įrašą į naršyklę."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Įrašyti"
po/nl_NL.po
msgid "Stream this recording into browser."
msgstr ""
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr ""
po/pl_PL.po
msgid "Stream this recording into browser."
msgstr "Oglądaj nagranie w przeglądarce"
msgid "Stream this channel into media player."
msgstr "Oglądaj kanał w odtwarzaczu multimediów"
msgid "Stream this recording into media player."
msgstr "Oglądaj nagranie w odtwarzaczu multimediów"
msgid "Record this"
msgstr "Nagraj"
po/ru_RU.po
msgid "Stream this recording into browser."
msgstr "Стриминг этой записи в браузер."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Запись."
po/sk_SK.po
msgid "Stream this recording into browser."
msgstr "Prezera? t?to nahr?vku v prehliada?i."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Nahra?"
po/sv_SE.po
msgid "Stream this recording into browser."
msgstr "Strömma denna inspelning till webläsaren."
msgid "Stream this channel into media player."
msgstr ""
msgid "Stream this recording into media player."
msgstr ""
msgid "Record this"
msgstr "Spela in detta."
(2-2/3)