mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed the channel editor and added extra locking into the CURL protocol.
This commit is contained in:
parent
72a9f21006
commit
d7dfa0aad6
1
HISTORY
1
HISTORY
@ -198,3 +198,4 @@ VDR Plugin 'iptv' Revision History
|
|||||||
|
|
||||||
- Fixed bugs found in the CURL implementation (Thanks
|
- Fixed bugs found in the CURL implementation (Thanks
|
||||||
to Jeremy Hall).
|
to Jeremy Hall).
|
||||||
|
- Fixed the channel editor.
|
||||||
|
@ -424,6 +424,7 @@ int cIptvProtocolCurl::Read(unsigned char* bufferAddrP, unsigned int bufferLenP)
|
|||||||
switch (modeM) {
|
switch (modeM) {
|
||||||
case eModeRtsp:
|
case eModeRtsp:
|
||||||
{
|
{
|
||||||
|
cMutexLock MutexLock(&mutexM);
|
||||||
CURLcode res = CURLE_OK;
|
CURLcode res = CURLE_OK;
|
||||||
iptv_curl_easy_setopt(handleM, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_RECEIVE);
|
iptv_curl_easy_setopt(handleM, CURLOPT_RTSP_REQUEST, (long)CURL_RTSPREQ_RECEIVE);
|
||||||
iptv_curl_easy_perform(handleM);
|
iptv_curl_easy_perform(handleM);
|
||||||
@ -439,6 +440,7 @@ int cIptvProtocolCurl::Read(unsigned char* bufferAddrP, unsigned int bufferLenP)
|
|||||||
int running_handles;
|
int running_handles;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
cMutexLock MutexLock(&mutexM);
|
||||||
res = curl_multi_perform(multiM, &running_handles);
|
res = curl_multi_perform(multiM, &running_handles);
|
||||||
} while (res == CURLM_CALL_MULTI_PERFORM);
|
} while (res == CURLM_CALL_MULTI_PERFORM);
|
||||||
|
|
||||||
@ -455,7 +457,9 @@ int cIptvProtocolCurl::Read(unsigned char* bufferAddrP, unsigned int bufferLenP)
|
|||||||
// Check if end of file
|
// Check if end of file
|
||||||
if (running_handles == 0) {
|
if (running_handles == 0) {
|
||||||
int msgcount;
|
int msgcount;
|
||||||
|
mutexM.Lock();
|
||||||
CURLMsg *msg = curl_multi_info_read(multiM, &msgcount);
|
CURLMsg *msg = curl_multi_info_read(multiM, &msgcount);
|
||||||
|
mutexM.Unlock();
|
||||||
if (msg && (msg->msg == CURLMSG_DONE)) {
|
if (msg && (msg->msg == CURLMSG_DONE)) {
|
||||||
debug("cIptvProtocolCurl::%s(done): %s (%d)", __FUNCTION__,
|
debug("cIptvProtocolCurl::%s(done): %s (%d)", __FUNCTION__,
|
||||||
curl_easy_strerror(msg->data.result), msg->data.result);
|
curl_easy_strerror(msg->data.result), msg->data.result);
|
||||||
|
5
source.c
5
source.c
@ -164,9 +164,8 @@ void cIptvSourceParam::SetData(cChannel *channelP)
|
|||||||
void cIptvSourceParam::GetData(cChannel *channelP)
|
void cIptvSourceParam::GetData(cChannel *channelP)
|
||||||
{
|
{
|
||||||
debug("cIptvSourceParam::%s(%s)", __FUNCTION__, channelP->Parameters());
|
debug("cIptvSourceParam::%s(%s)", __FUNCTION__, channelP->Parameters());
|
||||||
dataM.SetTransponderData(channelP->Source(), channelP->Frequency(), dataM.Srate(), itpM.ToString(Source()), true);
|
channelP->SetTransponderData(channelP->Source(), channelP->Frequency(), dataM.Srate(), itpM.ToString(Source()), true);
|
||||||
dataM.SetId(nidM, tidM, channelP->Sid(), ridM);
|
channelP->SetId(nidM, tidM, channelP->Sid(), ridM);
|
||||||
*channelP = dataM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cOsdItem *cIptvSourceParam::GetOsdItem(void)
|
cOsdItem *cIptvSourceParam::GetOsdItem(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user