mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Removed old channels.conf format support and disabled re-tuning of EXT protocol.
This commit is contained in:
parent
613152c6db
commit
e798ff1424
2
HISTORY
2
HISTORY
@ -59,3 +59,5 @@ VDR Plugin 'iptv' Revision History
|
|||||||
2008-xx-xx: Version 0.2.1
|
2008-xx-xx: Version 0.2.1
|
||||||
|
|
||||||
- Updated Italian translation (Thanks to Diego Pierotto).
|
- Updated Italian translation (Thanks to Diego Pierotto).
|
||||||
|
- Removed compatibility mode for old channels.conf format.
|
||||||
|
- EXT protocol is re-tuned only if iptv parameters differ.
|
||||||
|
37
device.c
37
device.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: device.c,v 1.85 2008/02/19 22:29:02 rahrenbe Exp $
|
* $Id: device.c,v 1.86 2008/04/02 20:22:48 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -225,30 +225,6 @@ cString cIptvDevice::GetChannelSettings(const char *IptvParam, int *Parameter, i
|
|||||||
return locstr;
|
return locstr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// compatibility mode for old channels.conf format
|
|
||||||
else if (sscanf(IptvParam, "%a[^|]|%a[^|]|%a[^|]|%u", &tag, &proto, &loc, Parameter) == 4) {
|
|
||||||
cString tagstr(tag, true);
|
|
||||||
cString protostr(proto, true);
|
|
||||||
cString locstr(loc, true);
|
|
||||||
*SidScan = 0;
|
|
||||||
*PidScan = 0;
|
|
||||||
// check if IPTV tag
|
|
||||||
if (strncasecmp(*tagstr, "IPTV", 4) == 0) {
|
|
||||||
// check if protocol is supported and update the pointer
|
|
||||||
if (strncasecmp(*protostr, "UDP", 3) == 0)
|
|
||||||
*Protocol = pUdpProtocol;
|
|
||||||
else if (strncasecmp(*protostr, "HTTP", 4) == 0)
|
|
||||||
*Protocol = pHttpProtocol;
|
|
||||||
else if (strncasecmp(*protostr, "FILE", 4) == 0)
|
|
||||||
*Protocol = pFileProtocol;
|
|
||||||
else if (strncasecmp(*protostr, "EXT", 3) == 0)
|
|
||||||
*Protocol = pExtProtocol;
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
// return location
|
|
||||||
return locstr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,11 +278,12 @@ bool cIptvDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
}
|
}
|
||||||
sidScanEnabled = sidscan ? true : false;
|
sidScanEnabled = sidscan ? true : false;
|
||||||
pidScanEnabled = pidscan ? true : false;
|
pidScanEnabled = pidscan ? true : false;
|
||||||
pIptvStreamer->Set(location, parameter, deviceIndex, protocol);
|
if (pIptvStreamer->Set(location, parameter, deviceIndex, protocol)) {
|
||||||
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
if (sidScanEnabled && pSidScanner && IptvConfig.GetSectionFiltering())
|
||||||
pSidScanner->SetChannel(Channel);
|
pSidScanner->SetChannel(Channel);
|
||||||
if (pidScanEnabled && pPidScanner)
|
if (pidScanEnabled && pPidScanner)
|
||||||
pPidScanner->SetChannel(Channel);
|
pPidScanner->SetChannel(Channel);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
25
setup.c
25
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.57 2008/02/19 22:29:02 rahrenbe Exp $
|
* $Id: setup.c,v 1.58 2008/04/02 20:22:48 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -117,29 +117,6 @@ cString cIptvMenuEditChannel::GetIptvSettings(const char *Param, int *Parameter,
|
|||||||
return locstr;
|
return locstr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sscanf(Param, "%a[^|]|%a[^|]|%a[^|]|%d", &tag, &proto, &loc, Parameter) == 4) {
|
|
||||||
cString tagstr(tag, true);
|
|
||||||
cString protostr(proto, true);
|
|
||||||
cString locstr(loc, true);
|
|
||||||
*SidScan = 0;
|
|
||||||
*PidScan = 0;
|
|
||||||
// check if IPTV tag
|
|
||||||
if (strncasecmp(*tagstr, "IPTV", 4) == 0) {
|
|
||||||
// check if protocol is supported and update the pointer
|
|
||||||
if (strncasecmp(*protostr, "UDP", 3) == 0)
|
|
||||||
*Protocol = eProtocolUDP;
|
|
||||||
else if (strncasecmp(*protostr, "HTTP", 4) == 0)
|
|
||||||
*Protocol = eProtocolHTTP;
|
|
||||||
else if (strncasecmp(*protostr, "FILE", 4) == 0)
|
|
||||||
*Protocol = eProtocolFILE;
|
|
||||||
else if (strncasecmp(*protostr, "EXT", 3) == 0)
|
|
||||||
*Protocol = eProtocolEXT;
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
// return location
|
|
||||||
return locstr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
streamer.c
18
streamer.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: streamer.c,v 1.30 2008/01/30 21:57:33 rahrenbe Exp $
|
* $Id: streamer.c,v 1.31 2008/04/02 20:22:48 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <vdr/thread.h>
|
#include <vdr/thread.h>
|
||||||
@ -16,7 +16,10 @@ cIptvStreamer::cIptvStreamer(cRingBufferLinear* RingBuffer, cMutex* Mutex)
|
|||||||
: cThread("IPTV streamer"),
|
: cThread("IPTV streamer"),
|
||||||
ringBuffer(RingBuffer),
|
ringBuffer(RingBuffer),
|
||||||
mutex(Mutex),
|
mutex(Mutex),
|
||||||
protocol(NULL)
|
protocol(NULL),
|
||||||
|
location(NULL),
|
||||||
|
parameter(-1),
|
||||||
|
index(-1)
|
||||||
{
|
{
|
||||||
debug("cIptvStreamer::cIptvStreamer()\n");
|
debug("cIptvStreamer::cIptvStreamer()\n");
|
||||||
}
|
}
|
||||||
@ -89,6 +92,9 @@ bool cIptvStreamer::Set(const char* Location, const int Parameter, const int Ind
|
|||||||
{
|
{
|
||||||
debug("cIptvStreamer::Set(): %s:%d\n", Location, Parameter);
|
debug("cIptvStreamer::Set(): %s:%d\n", Location, Parameter);
|
||||||
if (!isempty(Location)) {
|
if (!isempty(Location)) {
|
||||||
|
//
|
||||||
|
if (!strcmp(*location, Location) && (parameter == Parameter) && (index == Index) && (protocol == Protocol))
|
||||||
|
return false;
|
||||||
// Update protocol; Close the existing one if changed
|
// Update protocol; Close the existing one if changed
|
||||||
if (protocol != Protocol) {
|
if (protocol != Protocol) {
|
||||||
if (protocol)
|
if (protocol)
|
||||||
@ -98,8 +104,12 @@ bool cIptvStreamer::Set(const char* Location, const int Parameter, const int Ind
|
|||||||
protocol->Open();
|
protocol->Open();
|
||||||
}
|
}
|
||||||
// Set protocol location and parameter
|
// Set protocol location and parameter
|
||||||
if (protocol)
|
if (protocol) {
|
||||||
protocol->Set(Location, Parameter, Index);
|
location = cString(Location);
|
||||||
|
parameter = Parameter;
|
||||||
|
index = Index;
|
||||||
|
protocol->Set(location, parameter, index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -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: streamer.h,v 1.14 2008/01/30 21:57:33 rahrenbe Exp $
|
* $Id: streamer.h,v 1.15 2008/04/02 20:22:48 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_STREAMER_H
|
#ifndef __IPTV_STREAMER_H
|
||||||
@ -24,6 +24,9 @@ private:
|
|||||||
unsigned char* readBuffer;
|
unsigned char* readBuffer;
|
||||||
unsigned int readBufferLen;
|
unsigned int readBufferLen;
|
||||||
cIptvProtocolIf* protocol;
|
cIptvProtocolIf* protocol;
|
||||||
|
cString location;
|
||||||
|
int parameter;
|
||||||
|
int index;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cIptvStreamer(cRingBufferLinear* RingBuffer, cMutex* Mutex);
|
cIptvStreamer(cRingBufferLinear* RingBuffer, cMutex* Mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user