Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v1.4.8 #51

Merged
merged 14 commits into from
Nov 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pvr.mediaportal.tvserver/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.mediaportal.tvserver"
version="2.4.7"
version="2.4.8"
name="MediaPortal PVR Client"
provider-name="Marcel Groothuis">
<requires>
Expand Down
5 changes: 5 additions & 0 deletions pvr.mediaportal.tvserver/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v2.4.8
- Add Estuary skin support for the old series timer dialog
- Fixed: various Coverity reported issues for Live555 (part 2)
- Fixed: PVR recordings episode name being set to subplot.

v2.4.7
- Fixed: Live555: Android compile fix

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<window type="dialog">
<defaultcontrol always="true">10</defaultcontrol>
<coordinates>
<left>200</left>
<top>105</top>
</coordinates>
<include>Animation_DialogPopupOpenClose</include>
<controls>
<!-- Standard dialog header //-->
<include content="DialogBackgroundCommons">
<param name="DialogBackgroundWidth" value="1520" />
<param name="DialogBackgroundHeight" value="870" />
<param name="DialogHeaderLabel" value="$ADDON[pvr.mediaportal.tvserver 30100]" />
<param name="DialogHeaderId" value="1" />
</include>
<control type="image">
<left>10</left>
<top>80</top>
<width>1200</width>
<height>790</height>
<texture border="40">buttons/dialogbutton-nofo.png</texture>
</control>
<!-- Dialog specific controls //-->
<control type="group">
<posx>30</posx>
<posy>50</posy>
<control type="group">
<!-- Scheduled program details //-->
<posx>30</posx>
<control type="label" description="Program title" id = "20">
<posy>100</posy>
<width>720</width>
<height>30</height>
<font>font13_title</font>
<!--<label>filled in by code</label>-->
<align>left</align>
<aligny>center</aligny>
<textcolor>white</textcolor>
</control>
<control type="label" description="Program start time" id = "21">
<posy>60</posy>
<width>355</width>
<height>30</height>
<font>font13_title</font>
<!--<label>filled in by code</label>-->
<align>left</align>
<aligny>center</aligny>
<textcolor>white</textcolor>
</control>
<control type="label" description="Program channel" id = "22">
<posx>400</posx>
<posy>60</posy>
<width>355</width>
<height>30</height>
<font>font13_title</font>
<!--<label>filled in by code</label>-->
<align>left</align>
<aligny>center</aligny>
<textcolor>white</textcolor>
</control>
</control>

<control type="grouplist" description ="spincontrols" id="23">
<posy>160</posy>
<!--<itemgap>5</itemgap>//-->
<width>1160</width>
<height>750</height>
<onleft>9000</onleft>
<onright>9000</onright>
<onup>23</onup>
<ondown>23</ondown>

<control type="spincontrolex" id="10">
<description>Frequency</description>
<include>DefaultSettingButton</include>
<width>1160</width>
<height>100</height>
<label>$ADDON[pvr.mediaportal.tvserver 30101]</label>
</control>

<control type="spincontrolex" id="11">
<description>Airtime</description>
<include>DefaultSettingButton</include>
<width>1160</width>
<label>$ADDON[pvr.mediaportal.tvserver 30102]</label>
</control>

<control type="spincontrolex" id="12">
<description>Channels</description>
<include>DefaultSettingButton</include>
<width>1160</width>
<label>$ADDON[pvr.mediaportal.tvserver 30103]</label>
</control>

<control type="image" id="24">
<description>separator image</description>
<height>3</height>
<texture colordiffuse="AAAAAAAA" border="3">dialogs/separator-grey.png</texture>
</control>

<control type="spincontrolex" id="13">
<description>Keep</description>
<include>DefaultSettingButton</include>
<width>1160</width>
<label>$ADDON[pvr.mediaportal.tvserver 30104]</label>
</control>

<control type="spincontrolex" id="14">
<description>Record minutes before start</description>
<include>DefaultSettingButton</include>
<width>1160</width>
<label>$ADDON[pvr.mediaportal.tvserver 30105]</label>
</control>

<control type="spincontrolex" id="15">
<description>Record minutes after end</description>
<include>DefaultSettingButton</include>
<width>1160</width>
<label>$ADDON[pvr.mediaportal.tvserver 30106]</label>
</control>
</control>
</control>

<!-- Dialog Ok/Cancel buttons //-->
<control type="grouplist" id="9000">
<left>1210</left>
<top>92</top>
<orientation>vertical</orientation>
<width>300</width>
<height>250</height>
<itemgap>-10</itemgap>
<onleft>23</onleft>
<onright>23</onright>
<include content="DefaultDialogButton">
<param name="id" value="1" />
<param name="label" value="186" />
</include>
<include content="DefaultDialogButton">
<param name="id" value="2" />
<param name="label" value="222" />
</include>
</control>
</controls>
</window>
2 changes: 1 addition & 1 deletion src/GUIDialogRecordSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ CGUIDialogRecordSettings::CGUIDialogRecordSettings(const PVR_TIMER &timerinfo, c
// find the xml file and not the used image files. This will result in a transparent window
// which is basically useless. Therefore, it is better to let the dialog fail by using the
// incorrect fallback skin name "Confluence"
m_window = GUI->Window_create("DialogRecordSettings.xml", "Confluence", false, true);
m_window = GUI->Window_create("DialogRecordSettings.xml", "skin.confluence", false, true);
if (m_window)
{
m_window->m_cbhdl = this;
Expand Down
6 changes: 6 additions & 0 deletions src/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Socket::Socket(const enum SocketFamily family, const enum SocketDomain domain, c
_protocol = protocol;
_port = 0;
memset (&_sockaddr, 0, sizeof( _sockaddr ) );
#ifdef TARGET_WINDOWS
memset(&_wsaData, 0, sizeof(_wsaData));
#endif
}


Expand All @@ -55,6 +58,9 @@ Socket::Socket()
_protocol = tcp;
_port = 0;
memset (&_sockaddr, 0, sizeof( _sockaddr ) );
#ifdef TARGET_WINDOWS
memset(&_wsaData, 0, sizeof(_wsaData));
#endif
}


Expand Down
5 changes: 3 additions & 2 deletions src/lib/live555/groupsock/GroupEId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ GroupEId::GroupEId(struct in_addr const& groupAddr,
init(groupAddr, sourceFilterAddr, portNum, 255, numSuccessiveGroupAddrs);
}

GroupEId::GroupEId() {
}
// margro: removed to fix Coverity CID 135519
//GroupEId::GroupEId() {
//}

Boolean GroupEId::isSSM() const {
return fSourceFilterAddress.s_addr != netAddressBits(~0);
Expand Down
33 changes: 26 additions & 7 deletions src/lib/live555/groupsock/GroupsockHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ int setupStreamSocket(UsageEnvironment& env,
static int blockUntilReadable(UsageEnvironment& env,
int socket, struct timeval* timeout) {
int result = -1;
bool keepTrying = true;
do {
fd_set rd_set;
FD_ZERO(&rd_set);
Expand All @@ -241,19 +242,28 @@ static int blockUntilReadable(UsageEnvironment& env,

result = select(numFds, &rd_set, NULL, NULL, timeout);
if (timeout != NULL && result == 0) {
keepTrying = false;
break; // this is OK - timeout occurred
} else if (result <= 0) {
int err = env.getErrno();
if (err == EINTR || err == EAGAIN || err == EWOULDBLOCK) continue;
socketErr(env, "select() error: ");
break;
if (err == EINTR || err == EAGAIN || err == EWOULDBLOCK)
{
continue;
}
else
{
socketErr(env, "select() error: ");
keepTrying = false;
break;
}
}

if (!FD_ISSET(socket, &rd_set)) {
socketErr(env, "select() error - !FD_ISSET");
keepTrying = false;
break;
}
} while (0);
} while (keepTrying);

return result;
}
Expand Down Expand Up @@ -389,8 +399,12 @@ unsigned getReceiveBufferSize(UsageEnvironment& env, int socket) {
static unsigned setBufferTo(UsageEnvironment& env, int bufOptName,
int socket, unsigned requestedSize) {
SOCKLEN_T sizeSize = sizeof requestedSize;
setsockopt(socket, SOL_SOCKET, bufOptName, (char*)&requestedSize, sizeSize);

int retval = setsockopt(socket, SOL_SOCKET, bufOptName, (char*)&requestedSize, sizeSize);
if (retval != 0)
{
socketErr(env, "setBufferTo() error: ");
return 0;
}
// Get and return the actual, resulting buffer size:
return getBufferSize(env, bufOptName, socket);
}
Expand Down Expand Up @@ -555,7 +569,12 @@ Boolean getSourcePort(UsageEnvironment& env, int socket, Port& port) {
if (!getSourcePort0(socket, portNum) || portNum == 0) {
// Hack - call bind(), then try again:
MAKE_SOCKADDR_IN(name, INADDR_ANY, 0);
bind(socket, (struct sockaddr*)&name, sizeof name);
int retval = bind(socket, (struct sockaddr*)&name, sizeof name);
if (retval != 0)
{
socketErr(env, "bind() error: ");
return False;
}

if (!getSourcePort0(socket, portNum) || portNum == 0) {
socketErr(env, "getsockname() error: ");
Expand Down
3 changes: 2 additions & 1 deletion src/lib/live555/groupsock/include/GroupEId.hh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public:
portNumBits portNum,
unsigned numSuccessiveGroupAddrs = 1);
// used for a 'source-specific multicast' group
GroupEId(); // used only as a temp constructor prior to initialization
// margro: removed to fix Coverity CID 135519
//GroupEId(); // used only as a temp constructor prior to initialization

struct in_addr const& groupAddress() const { return fGroupAddress; }
struct in_addr const& sourceFilterAddress() const { return fSourceFilterAddress; }
Expand Down
1 change: 1 addition & 0 deletions src/lib/live555/groupsock/include/GroupsockHelper.hh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ char const* timestampString();
var.sin_family = AF_INET;\
var.sin_addr.s_addr = (adr);\
var.sin_port = (prt);\
memset(var.sin_zero, 0, sizeof(var.sin_zero));\
SET_SOCKADDR_SIN_LEN(var);


Expand Down
6 changes: 6 additions & 0 deletions src/lib/live555/groupsock/include/NetCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ along with this library; if not, write to the Free Software Foundation, Inc.,
/* Windows */
#if defined(WINNT) || defined(_WINNT) || defined(__BORLANDC__) || defined(__MINGW32__) || defined(_WIN32_WCE) || defined (_MSC_VER)
#define _MSWSOCK_
#pragma warning(disable:4005) // Disable "warning C4005: '_WINSOCKAPI_' : macro redefinition"
#include <winsock2.h>
#include <ws2tcpip.h>
#pragma warning(default:4005)
#endif
#include <windows.h>
#include <errno.h>
Expand Down Expand Up @@ -123,4 +125,8 @@ typedef unsigned char u_int8_t;
#define SOCKLEN_T int
#endif

#ifndef SOCKET_ERROR
#define SOCKET_ERROR -1
#endif

#endif
4 changes: 3 additions & 1 deletion src/lib/live555/liveMedia/FramedSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ FramedSource::FramedSource(UsageEnvironment& env)
: MediaSource(env),
fAfterGettingFunc(NULL), fAfterGettingClientData(NULL),
fOnCloseFunc(NULL), fOnCloseClientData(NULL),
fIsCurrentlyAwaitingData(False) {
fIsCurrentlyAwaitingData(False),
fTo(NULL), fMaxSize(0), fFrameSize(0), fNumTruncatedBytes(0), fDurationInMicroseconds(0)
{
fPresentationTime.tv_sec = fPresentationTime.tv_usec = 0; // initially
}

Expand Down
7 changes: 6 additions & 1 deletion src/lib/live555/liveMedia/MultiFramedRTPSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ MultiFramedRTPSink::MultiFramedRTPSink(UsageEnvironment& env,
unsigned numChannels)
: RTPSink(env, rtpGS, rtpPayloadType, rtpTimestampFrequency,
rtpPayloadFormatName, numChannels),
fOutBuf(NULL), fCurFragmentationOffset(0), fPreviousFrameEndedFragmentation(False) {
fOutBuf(NULL), fCurFragmentationOffset(0), fPreviousFrameEndedFragmentation(False),
fNoFramesLeft(False), fNumFramesUsedSoFar(0), fIsFirstPacket(True), fTimestampPosition(0),
fSpecialHeaderPosition(0), fSpecialHeaderSize(0), fCurFrameSpecificHeaderPosition(0),
fCurFrameSpecificHeaderSize(0), fTotalFrameSpecificHeaderSizes(0)
{
memset(&fNextSendTime, 0, sizeof(fNextSendTime));
setPacketSizes(1000, 1448);
// Default max packet size (1500, minus allowance for IP, UDP, UMTP headers)
// (Also, make it a multiple of 4 bytes, just in case that matters.)
Expand Down
7 changes: 6 additions & 1 deletion src/lib/live555/liveMedia/MultiFramedRTPSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,12 @@ void MultiFramedRTPSource::networkReadHandler(MultiFramedRTPSource* source,
BufferedPacket::BufferedPacket()
: fPacketSize(MAX_PACKET_SIZE),
fBuf(new unsigned char[MAX_PACKET_SIZE]),
fNextPacket(NULL) {
fNextPacket(NULL),
fHead(0), fTail(0), fUseCount(0), fRTPSeqNo(0), fRTPTimestamp(0),
fHasBeenSyncedUsingRTCP(False), fRTPMarkerBit(False), fIsFirstPacket(True)
{
memset(&fPresentationTime, 0, sizeof(fPresentationTime));
memset(&fTimeReceived, 0, sizeof(fTimeReceived));
}

BufferedPacket::~BufferedPacket() {
Expand Down
8 changes: 6 additions & 2 deletions src/lib/live555/liveMedia/RTSPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ RTSPClient::RTSPClient(UsageEnvironment& env,
fRealChallengeStr(NULL), fRealETagStr(NULL),
#endif
fServerIsKasenna(False), fKasennaContentType(NULL),
fServerIsMicrosoft(False)
fServerIsMicrosoft(False), fDescribeStatusCode(0)
{
fResponseBufferSize = 20000;
fResponseBuffer = new char[fResponseBufferSize+1];
Expand Down Expand Up @@ -2541,5 +2541,9 @@ void RTSPClient::handleCmd_notSupported(char const* cseq) {
char tmpBuf[512];
snprintf((char*)tmpBuf, sizeof tmpBuf,
"RTSP/1.0 405 Method Not Allowed\r\nCSeq: %s\r\n\r\n", cseq);
send(fOutputSocketNum, tmpBuf, strlen(tmpBuf), 0);
int retval = send(fOutputSocketNum, tmpBuf, strlen(tmpBuf), 0);
if (retval == SOCKET_ERROR)
{
envir().setResultErrMsg("send() failed: ");
}
}
2 changes: 1 addition & 1 deletion src/pvrclient-mediaportal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ PVR_ERROR cPVRClientMediaPortal::GetRecordings(ADDON_HANDLE handle)

PVR_STRCPY(tag.strRecordingId, strRecordingId.c_str());
PVR_STRCPY(tag.strTitle, recording.Title());
PVR_STRCPY(tag.strPlotOutline, recording.EpisodeName());
PVR_STRCPY(tag.strEpisodeName, recording.EpisodeName());
PVR_STRCPY(tag.strPlot, recording.Description());
PVR_STRCPY(tag.strChannelName, recording.ChannelName());
tag.iChannelUid = recording.ChannelID();
Expand Down