mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Some late night fixes.
This commit is contained in:
parent
cb87392299
commit
728e791165
4
Makefile
4
Makefile
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile,v 1.3 2007/09/15 15:38:38 rahrenbe Exp $
|
||||
# $Id: Makefile,v 1.4 2007/09/15 23:58:23 rahrenbe Exp $
|
||||
|
||||
# Debugging on/off
|
||||
IPTV_DEBUG = 1
|
||||
#IPTV_DEBUG = 1
|
||||
|
||||
# Strip debug symbols? Set eg. to /bin/true if not
|
||||
STRIP = strip
|
||||
|
4
device.c
4
device.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: device.c,v 1.15 2007/09/15 21:27:00 rahrenbe Exp $
|
||||
* $Id: device.c,v 1.16 2007/09/15 23:58:23 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
@ -30,7 +30,7 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
tsBufferPrefill = MEGABYTE(IptvConfig.GetBufferSizeMB()) *
|
||||
IptvConfig.GetBufferPrefillRatio() / 100;
|
||||
tsBufferPrefill -= (tsBufferPrefill % TS_SIZE);
|
||||
//debug("Buffer=%dMB Prefill=%B\n", IptvConfig.GetBufferSizeMB(), tsBufferPrefill);
|
||||
//debug("Buffer=%d Prefill=%d\n", MEGABYTE(IptvConfig.GetBufferSizeMB()), tsBufferPrefill);
|
||||
pUdpProtocol = new cIptvProtocolUdp();
|
||||
//pRtspProtocol = new cIptvProtocolRtsp();
|
||||
//pHttpProtocol = new cIptvProtocolHttp();
|
||||
|
4
iptv.c
4
iptv.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: iptv.c,v 1.3 2007/09/15 15:38:38 rahrenbe Exp $
|
||||
* $Id: iptv.c,v 1.4 2007/09/15 23:58:23 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -156,6 +156,8 @@ bool cPluginIptv::SetupParse(const char *Name, const char *Value)
|
||||
// Parse your own setup parameters and store their values.
|
||||
if (!strcasecmp(Name, "BufferSize"))
|
||||
IptvConfig.SetBufferSizeMB(atoi(Value));
|
||||
else if (!strcasecmp(Name, "BufferPrefill"))
|
||||
IptvConfig.SetBufferPrefillRatio(atoi(Value));
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: protocoludp.c,v 1.3 2007/09/15 21:27:00 rahrenbe Exp $
|
||||
* $Id: protocoludp.c,v 1.4 2007/09/15 23:58:23 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -155,7 +155,8 @@ int cIptvProtocolUdp::Read(unsigned char* *BufferAddr)
|
||||
{
|
||||
//debug("cIptvProtocolUdp::Read()\n");
|
||||
socklen_t addrlen = sizeof(sockAddr);
|
||||
BufferAddr = &readBuffer;
|
||||
// Set argument point to read buffer
|
||||
*BufferAddr = readBuffer;
|
||||
// Wait for data
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 0;
|
||||
@ -182,7 +183,7 @@ int cIptvProtocolUdp::Read(unsigned char* *BufferAddr)
|
||||
|
||||
bool cIptvProtocolUdp::Open(void)
|
||||
{
|
||||
debug("cIptvProtocolUdp::Open(): streamAddr = %s\n", streamAddr);
|
||||
debug("cIptvProtocolUdp::Open(): streamAddr=%s\n", streamAddr);
|
||||
// Join a new multicast group
|
||||
JoinMulticast();
|
||||
return true;
|
||||
@ -190,7 +191,7 @@ bool cIptvProtocolUdp::Open(void)
|
||||
|
||||
bool cIptvProtocolUdp::Close(void)
|
||||
{
|
||||
debug("cIptvProtocolUdp::Close(): streamAddr = %s\n", streamAddr);
|
||||
debug("cIptvProtocolUdp::Close(): streamAddr=%s\n", streamAddr);
|
||||
// Drop the multicast group
|
||||
DropMulticast();
|
||||
// Close the socket
|
||||
|
4
setup.c
4
setup.c
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: setup.c,v 1.2 2007/09/15 21:27:00 rahrenbe Exp $
|
||||
* $Id: setup.c,v 1.3 2007/09/15 23:58:23 rahrenbe Exp $
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
@ -21,7 +21,7 @@ void cIptvPluginSetup::Setup(void)
|
||||
{
|
||||
int current = Current();
|
||||
Clear();
|
||||
Add(new cMenuEditIntItem(tr("Buffer size [MB]"), &bufferSize, 0, 16));
|
||||
Add(new cMenuEditIntItem(tr("Buffer size [MB]"), &bufferSize, 2, 16));
|
||||
Add(new cMenuEditIntItem(tr("Buffer prefill ratio [%]"), &bufferPrefill, 0, 40));
|
||||
SetCurrent(Get(current));
|
||||
Display();
|
||||
|
Loading…
Reference in New Issue
Block a user