thanks, filtering part will follow, I think you going to like the solution I came up with
merge requests for PLi's git
Re: merge requests for PLi's git #361
Re: merge requests for PLi's git #362
Posted 20 November 2013 - 19:12
I have one remark on the code, the string "Transfer-Encoding: chunked" is compared case-dependent. AFAIK http doesn't require this specific capitalisation, so IMHO it's better to do a case-independent compare, changing strncmp into strncasecmp should suffice.
Also I see a few one-liners
Edited by Erik Slagter, 20 November 2013 - 19:14.
* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.
Re: merge requests for PLi's git #363
Posted 20 November 2013 - 20:30
I have one remark on the code, the string "Transfer-Encoding: chunked" is compared case-dependent. AFAIK http doesn't require this specific capitalisation, so IMHO it's better to do a case-independent compare, changing strncmp into strncasecmp should suffice.
Also I see a few one-liners
Have not seen yet a problem with that, but agree with your point.
Re: merge requests for PLi's git #364
Posted 20 November 2013 - 20:33
You could say the same about other string comparisons.
Those one liners makes at least for me the code more readable and what about the existing one liners? I think is pointless talking about one liners, they look just fine.
Edited by zakalibit, 20 November 2013 - 20:34.
Re: merge requests for PLi's git #365
Posted 20 November 2013 - 23:23
Re: merge requests for PLi's git #366
Re: merge requests for PLi's git #367
Re: merge requests for PLi's git #368
Posted 21 November 2013 - 00:04
line 253 needs to change:
- if (partialPktSz > 0 && partialPktSz < sizeof(partialPkt))
+ if (partialPktSz > 0 && partialPktSz < packetSize)
because you have increased the buffer size to 192 and we need to save only incomplete packets.
I do not understand that value, the size can be 188 or 204 if correction bytes are added to the packet
Edited by zakalibit, 21 November 2013 - 00:04.
Re: merge requests for PLi's git #369
Re: merge requests for PLi's git #370
Posted 23 November 2013 - 20:48
When we are using TS streams (1:0:1) the service.streamed() is always null. So Converter IsStream on ServiceInfo returns also false.
The following patch fixes streamed function to return correct information when we are using TS stream, based on m_is_stream flag.
--- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1755,6 +1755,29 @@ RESULT eDVBServicePlay::rdsDecoder(ePtr<iRdsDecoder> &ptr) return 0; } +RESULT eDVBServicePlay::streamed(ePtr<iStreamedService> &ptr) +{ + if (m_is_stream) + { + ptr = this; + return 0; + } + ptr = 0; + return -1; +} + +ePtr<iStreamBufferInfo> eDVBServicePlay::getBufferCharge() +{ + /** FIXME **/ + return 0; +} + +int eDVBServicePlay::setBufferSize(int size) +{ + /** FIXME **/ + return 0; +} + RESULT eDVBServicePlay::getName(std::string &name) { if (m_is_pvr) diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index 038c978..1c2f113 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -86,7 +86,8 @@ class eDVBServicePlay: public eDVBServiceBase, public iAudioTrackSelection, public iAudioChannelSelection, public iSubserviceList, public iTimeshiftService, public iCueSheet, public iSubtitleOutput, public iAudioDelay, - public iRdsDecoder, public iStreamableService + public iRdsDecoder, public iStreamableService, + public iStreamedService { DECLARE_REF(eDVBServicePlay); public: @@ -111,7 +112,12 @@ public: RESULT audioDelay(ePtr<iAudioDelay> &ptr); RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr); RESULT keys(ePtr<iServiceKeys> &ptr) { ptr = 0; return -1; } - RESULT streamed(ePtr<iStreamedService> &ptr) { ptr = 0; return -1; } + + // iStreamedService + RESULT streamed(ePtr<iStreamedService> &ptr); + ePtr<iStreamBufferInfo> getBufferCharge(); + int setBufferSize(int size); + // iPauseableService RESULT pause();0001-Implement-streamed-call-must-return-not-null-value-i.patch.txt 2.27KB 1 downloads
Thanks/Ευχαριστώ
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: merge requests for PLi's git #371
Re: merge requests for PLi's git #372
Posted 1 December 2013 - 12:45
The following patch will enable a867 and af9035 for vu 3.1 kernel.
--- a/meta-openpli/recipes-linux/linux/linux-vuplus-3.1.1.inc +++ b/meta-openpli/recipes-linux/linux/linux-vuplus-3.1.1.inc @@ -3,7 +3,7 @@ LICENSE = "GPL" SECTION = "kernel" KV = "3.1.1" -PR_INC = ".8" +PR_INC = ".9" SRCREV = "r2" @@ -22,6 +22,8 @@ SRC_URI += "http://archive.vuplus.com/download/kernel/linux-${KV}_${SRCREV}.tar. file://em28xx_fix_terratec_entries.patch \ file://em28xx_add_terratec_h5_rev3.patch \ file://fix-dvb-siano-sms-order.patch \ + file://dvb-usb-af9035.patch \ + file://dvb-usb-a867.patch \ file://${MACHINE}_defconfig \ "Patches where available but they didn't apply nicely on 3.1 kernel (Makefile patching was failing).
I don't have such a usb stick in order to test it. Compiled kernel modules are available here : http://openpli.org/f...not-on-vu-solo/ , altough the reporter never downloaded modules (probably black hole suck him )
Attached Files
Edited by athoik, 1 December 2013 - 12:46.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: merge requests for PLi's git #373
Posted 2 December 2013 - 18:11
Can you please commit above?
(because i am preparing new patch for siano dvb-t sticks and PR_INC will change from 9 to 10, actually every kernel will increase PR_INC see here http://openpli.org/f...er/#entry389987)
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: merge requests for PLi's git #374
Posted 4 December 2013 - 19:29
Here is a patch to handle deadlock when inserting EPG for IPTV. More information here: http://openpli.org/f...els-in-general/
When we are destroying eHttpStream object and connectionStatus is busy, we have deadlock at thread kill. We need to call thread kill when connectionStatus changes to non busy state. diff --git a/lib/base/httpstream.cpp b/lib/base/httpstream.cpp index 1aeaf3f..b18025b 100644 --- a/lib/base/httpstream.cpp +++ b/lib/base/httpstream.cpp @@ -1,5 +1,6 @@ #include <cstdio> #include <openssl/evp.h> +#include <unistd.h> // for usleep #include <lib/base/httpstream.h> #include <lib/base/eerror.h> @@ -21,6 +22,11 @@ eHttpStream::eHttpStream() eHttpStream::~eHttpStream() { free(tmpBuf); + while (connectionStatus == BUSY) + { + eDebug("~eHttpStream:: Connection is busy, wait 200 msec..."); + usleep(200000); // wait 200 msec + } kill(true); close(); }
0001-httpstream-Avoid-deadlock-on-eHttpStream-destructor.patch.txt 1004bytes 3 downloads
Thanks.
Edited by athoik, 4 December 2013 - 19:30.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: merge requests for PLi's git #375
Re: merge requests for PLi's git #376
Posted 4 December 2013 - 19:43
The destructor must inform Connect to "disconnect" before pthread_join.
But how this is possible?
Send a signal (eg SIGUSR1, but i cannot see any signal handler inside Connect in wrappers.cpp)?
Thanks.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: merge requests for PLi's git #377
Re: merge requests for PLi's git #378
Posted 4 December 2013 - 22:50
http://sourceforge.n...stream.cpp#l190
BUSY is only when thread starts.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: merge requests for PLi's git #379
Re: merge requests for PLi's git #380
Posted 4 December 2013 - 23:01
eHttpStream::Start thread ~eHttpStream: calling kill ~eHttpStream: calling close send cancel to thread thread: before openUrl openUrl: before Connect cancel received by thread thread join thread joined 0 eHttpStream::Start thread thread: before openUrl openUrl: before Connect ~eHttpStream: calling kill ~eHttpStream: calling close send cancel to thread cancel received by thread thread join
Thread join blocks if we call kill after OpenUrl.
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
49 user(s) are reading this topic
0 members, 49 guests, 0 anonymous users