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:
parent
f1319fb34f
commit
31b6264a54
4
HISTORY
4
HISTORY
@ -4,3 +4,7 @@ VDR Plugin 'iptv' Revision History
|
|||||||
2007-10-14: Version 0.0.1
|
2007-10-14: Version 0.0.1
|
||||||
|
|
||||||
- Initial revision.
|
- Initial revision.
|
||||||
|
|
||||||
|
2007-xx-xx: Version 0.0.2
|
||||||
|
|
||||||
|
- Added EXT protocol.
|
||||||
|
4
device.h
4
device.h
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* 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
|
#ifndef __IPTV_DEVICE_H
|
||||||
@ -14,6 +14,7 @@
|
|||||||
#include "protocoludp.h"
|
#include "protocoludp.h"
|
||||||
#include "protocolhttp.h"
|
#include "protocolhttp.h"
|
||||||
#include "protocolfile.h"
|
#include "protocolfile.h"
|
||||||
|
#include "protocolext.h"
|
||||||
#include "streamer.h"
|
#include "streamer.h"
|
||||||
#include "sectionfilter.h"
|
#include "sectionfilter.h"
|
||||||
#include "sidscanner.h"
|
#include "sidscanner.h"
|
||||||
@ -40,6 +41,7 @@ private:
|
|||||||
cIptvProtocolUdp *pUdpProtocol;
|
cIptvProtocolUdp *pUdpProtocol;
|
||||||
cIptvProtocolHttp *pHttpProtocol;
|
cIptvProtocolHttp *pHttpProtocol;
|
||||||
cIptvProtocolFile *pFileProtocol;
|
cIptvProtocolFile *pFileProtocol;
|
||||||
|
cIptvProtocolExt *pExtProtocol;
|
||||||
cIptvStreamer *pIptvStreamer;
|
cIptvStreamer *pIptvStreamer;
|
||||||
cSidScanner *pSidScanner;
|
cSidScanner *pSidScanner;
|
||||||
cMutex mutex;
|
cMutex mutex;
|
||||||
|
4
iptv.c
4
iptv.c
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* 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>
|
#include <getopt.h>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#error "VDR-1.5.10 API version or greater is required!"
|
#error "VDR-1.5.10 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *VERSION = "0.0.1";
|
static const char *VERSION = "0.0.2";
|
||||||
static const char *DESCRIPTION = trNOOP("Experience the IPTV");
|
static const char *DESCRIPTION = trNOOP("Experience the IPTV");
|
||||||
|
|
||||||
class cPluginIptv : public cPlugin {
|
class cPluginIptv : public cPlugin {
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: VDR 1.5.7\n"
|
"Project-Id-Version: VDR 1.5.7\n"
|
||||||
"Report-Msgid-Bugs-To: Rolf Ahrenberg\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"
|
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
|
||||||
"Last-Translator: Rolf Ahrenberg\n"
|
"Last-Translator: Rolf Ahrenberg\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
@ -48,6 +48,9 @@ msgstr "HTTP"
|
|||||||
msgid "FILE"
|
msgid "FILE"
|
||||||
msgstr "FILE"
|
msgstr "FILE"
|
||||||
|
|
||||||
|
msgid "EXT"
|
||||||
|
msgstr "EXT"
|
||||||
|
|
||||||
msgid "Protocol"
|
msgid "Protocol"
|
||||||
msgstr "Protokolla"
|
msgstr "Protokolla"
|
||||||
|
|
||||||
|
14
setup.c
14
setup.c
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* 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>
|
#include <string.h>
|
||||||
@ -30,6 +30,7 @@ private:
|
|||||||
eProtocolUDP,
|
eProtocolUDP,
|
||||||
eProtocolHTTP,
|
eProtocolHTTP,
|
||||||
eProtocolFILE,
|
eProtocolFILE,
|
||||||
|
eProtocolEXT,
|
||||||
eProtocolCount
|
eProtocolCount
|
||||||
};
|
};
|
||||||
struct tIptvChannel {
|
struct tIptvChannel {
|
||||||
@ -55,6 +56,7 @@ cIptvMenuEditChannel::cIptvMenuEditChannel(cChannel *Channel, bool New)
|
|||||||
protocols[eProtocolUDP] = tr("UDP");
|
protocols[eProtocolUDP] = tr("UDP");
|
||||||
protocols[eProtocolHTTP] = tr("HTTP");
|
protocols[eProtocolHTTP] = tr("HTTP");
|
||||||
protocols[eProtocolFILE] = tr("FILE");
|
protocols[eProtocolFILE] = tr("FILE");
|
||||||
|
protocols[eProtocolEXT] = tr("EXT");
|
||||||
channel = Channel;
|
channel = Channel;
|
||||||
GetChannelData(channel);
|
GetChannelData(channel);
|
||||||
if (New) {
|
if (New) {
|
||||||
@ -84,6 +86,11 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Port, int
|
|||||||
*Protocol = eProtocolFILE;
|
*Protocol = eProtocolFILE;
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
else if (sscanf(Param, "IPTV|EXT|%a[^|]|%u", &loc, Port) == 2) {
|
||||||
|
cString addr(loc, true);
|
||||||
|
*Protocol = eProtocolEXT;
|
||||||
|
return addr;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +153,9 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel)
|
|||||||
char dlangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
char dlangs[MAXDPIDS][MAXLANGCODE2] = { "" };
|
||||||
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
char slangs[MAXSPIDS][MAXLANGCODE2] = { "" };
|
||||||
switch (data.protocol) {
|
switch (data.protocol) {
|
||||||
|
case eProtocolEXT:
|
||||||
|
param = cString::sprintf("IPTV|EXT|%s|%d", data.location, data.port);
|
||||||
|
break;
|
||||||
case eProtocolFILE:
|
case eProtocolFILE:
|
||||||
param = cString::sprintf("IPTV|FILE|%s|%d", data.location, data.port);
|
param = cString::sprintf("IPTV|FILE|%s|%d", data.location, data.port);
|
||||||
break;
|
break;
|
||||||
@ -176,6 +186,7 @@ void cIptvMenuEditChannel::Setup(void)
|
|||||||
Add(new cMenuEditStrItem(trVDR("File"), data.location, sizeof(data.location), trVDR(FileNameChars)));
|
Add(new cMenuEditStrItem(trVDR("File"), data.location, sizeof(data.location), trVDR(FileNameChars)));
|
||||||
Add(new cMenuEditIntItem(tr("Delay (ms)"), &data.port, 0, 0xFFFF));
|
Add(new cMenuEditIntItem(tr("Delay (ms)"), &data.port, 0, 0xFFFF));
|
||||||
break;
|
break;
|
||||||
|
case eProtocolEXT:
|
||||||
case eProtocolHTTP:
|
case eProtocolHTTP:
|
||||||
case eProtocolUDP:
|
case eProtocolUDP:
|
||||||
default:
|
default:
|
||||||
@ -287,6 +298,7 @@ eOSState cIptvMenuEditChannel::ProcessKey(eKeys Key)
|
|||||||
data.port = 3000;
|
data.port = 3000;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
case eProtocolEXT:
|
||||||
case eProtocolUDP:
|
case eProtocolUDP:
|
||||||
strn0cpy(data.location, "127.0.0.1", sizeof(data.location));
|
strn0cpy(data.location, "127.0.0.1", sizeof(data.location));
|
||||||
data.port = 1234;
|
data.port = 1234;
|
||||||
|
Loading…
Reference in New Issue
Block a user