New special meaning "show current channel" when channel 0 is requested.

Applies to HTTP streaming only (thanks to Rolf Ahrenberg)
This commit is contained in:
Frank Schmirler 2012-04-21 22:47:36 +02:00
parent 2e8aefd2fe
commit 8719007f5a
4 changed files with 9 additions and 2 deletions

View File

@ -41,6 +41,7 @@ Rolf Ahrenberg
for suggesting increased thread priorities for cStreamdevWriter/Streamer for suggesting increased thread priorities for cStreamdevWriter/Streamer
for adding "Hide mainmenu entry" option for adding "Hide mainmenu entry" option
for polishing po file headers for polishing po file headers
for adding the special meaning "show current channel" to channel 0
Rantanen Teemu Rantanen Teemu
for providing vdr-incompletesections.diff for providing vdr-incompletesections.diff

View File

@ -1,6 +1,8 @@
VDR Plugin 'streamdev' Revision History VDR Plugin 'streamdev' Revision History
--------------------------------------- ---------------------------------------
- New special meaning "show current channel" when channel 0 is requested.
Applies to HTTP streaming only (thanks to Rolf Ahrenberg)
- Added streamdev-client support for upcoming streamdev-server versions - Added streamdev-client support for upcoming streamdev-server versions
with purely priority driven precedence. with purely priority driven precedence.
- API change of VDR 1.7.26: "avoid device" is no longer available - API change of VDR 1.7.26: "avoid device" is no longer available

6
README
View File

@ -231,8 +231,10 @@ streams directly like this:
http://hostname:3000/S19.2E-0-12480-898 http://hostname:3000/S19.2E-0-12480-898
The first one will deliver a channel by number on the server, the second one The first one will deliver a channel by number on the server, the second one
will request the channel by unique channel id. In addition, you can specify will request the channel by unique channel id. Use the special channel number 0
the desired stream type as a path to the channel. to see the server's current live TV channel.
In addition, you can specify the desired stream type as a path to the channel.
http://hostname:3000/TS/3 http://hostname:3000/TS/3
http://hostname:3000/PES/S19.2E-0-12480-898 http://hostname:3000/PES/S19.2E-0-12480-898

View File

@ -111,6 +111,8 @@ const cChannel* cServerConnection::ChannelFromString(const char *String, int *Ap
if (isnumber(string)) { if (isnumber(string)) {
int temp = strtol(String, NULL, 10); int temp = strtol(String, NULL, 10);
if (temp == 0)
temp = cDevice::CurrentChannel();
if (temp >= 1 && temp <= Channels.MaxNumber()) if (temp >= 1 && temp <= Channels.MaxNumber())
channel = Channels.GetByNumber(temp); channel = Channels.GetByNumber(temp);
} else { } else {