1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Added some missing EXT protocol code.

This commit is contained in:
Rolf Ahrenberg 2007-10-15 21:03:45 +00:00
parent f1319fb34f
commit 31b6264a54
5 changed files with 26 additions and 5 deletions

View File

@ -4,3 +4,7 @@ VDR Plugin 'iptv' Revision History
2007-10-14: Version 0.0.1
- Initial revision.
2007-xx-xx: Version 0.0.2
- Added EXT protocol.

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: device.h,v 1.32 2007/10/14 18:45:34 rahrenbe Exp $
* $Id: device.h,v 1.33 2007/10/15 21:03:45 rahrenbe Exp $
*/
#ifndef __IPTV_DEVICE_H
@ -14,6 +14,7 @@
#include "protocoludp.h"
#include "protocolhttp.h"
#include "protocolfile.h"
#include "protocolext.h"
#include "streamer.h"
#include "sectionfilter.h"
#include "sidscanner.h"
@ -40,6 +41,7 @@ private:
cIptvProtocolUdp *pUdpProtocol;
cIptvProtocolHttp *pHttpProtocol;
cIptvProtocolFile *pFileProtocol;
cIptvProtocolExt *pExtProtocol;
cIptvStreamer *pIptvStreamer;
cSidScanner *pSidScanner;
cMutex mutex;

4
iptv.c
View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: iptv.c,v 1.20 2007/10/14 18:45:34 rahrenbe Exp $
* $Id: iptv.c,v 1.21 2007/10/15 21:03:45 rahrenbe Exp $
*/
#include <getopt.h>
@ -17,7 +17,7 @@
#error "VDR-1.5.10 API version or greater is required!"
#endif
static const char *VERSION = "0.0.1";
static const char *VERSION = "0.0.2";
static const char *DESCRIPTION = trNOOP("Experience the IPTV");
class cPluginIptv : public cPlugin {

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2007-10-14 21:42+0300\n"
"POT-Creation-Date: 2007-10-16 00:00+0300\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: <vdr@linuxtv.org>\n"
@ -48,6 +48,9 @@ msgstr "HTTP"
msgid "FILE"
msgstr "FILE"
msgid "EXT"
msgstr "EXT"
msgid "Protocol"
msgstr "Protokolla"

14
setup.c
View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: setup.c,v 1.33 2007/10/14 18:51:21 rahrenbe Exp $
* $Id: setup.c,v 1.34 2007/10/15 21:03:45 rahrenbe Exp $
*/
#include <string.h>
@ -30,6 +30,7 @@ private:
eProtocolUDP,
eProtocolHTTP,
eProtocolFILE,
eProtocolEXT,
eProtocolCount
};
struct tIptvChannel {
@ -55,6 +56,7 @@ cIptvMenuEditChannel::cIptvMenuEditChannel(cChannel *Channel, bool New)
protocols[eProtocolUDP] = tr("UDP");
protocols[eProtocolHTTP] = tr("HTTP");
protocols[eProtocolFILE] = tr("FILE");
protocols[eProtocolEXT] = tr("EXT");
channel = Channel;
GetChannelData(channel);
if (New) {
@ -84,6 +86,11 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Port, int
*Protocol = eProtocolFILE;
return addr;
}
else if (sscanf(Param, "IPTV|EXT|%a[^|]|%u", &loc, Port) == 2) {
cString addr(loc, true);
*Protocol = eProtocolEXT;
return addr;
}
return NULL;
}
@ -146,6 +153,9 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel)
char dlangs[MAXDPIDS][MAXLANGCODE2] = { "" };
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
switch (data.protocol) {
case eProtocolEXT:
param = cString::sprintf("IPTV|EXT|%s|%d", data.location, data.port);
break;
case eProtocolFILE:
param = cString::sprintf("IPTV|FILE|%s|%d", data.location, data.port);
break;
@ -176,6 +186,7 @@ void cIptvMenuEditChannel::Setup(void)
Add(new cMenuEditStrItem(trVDR("File"), data.location, sizeof(data.location), trVDR(FileNameChars)));
Add(new cMenuEditIntItem(tr("Delay (ms)"), &data.port, 0, 0xFFFF));
break;
case eProtocolEXT:
case eProtocolHTTP:
case eProtocolUDP:
default:
@ -287,6 +298,7 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key)
data.port = 3000;
break;
default:
case eProtocolEXT:
case eProtocolUDP:
strn0cpy(data.location, "127.0.0.1", sizeof(data.location));
data.port = 1234;