News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

vomp and vdr >1.7.3

Started by hondansx, February 02, 2009, 20:35:53

Previous topic - Next topic

MartenR

1) no picture update when fast forward or fast rewind,

solved, stripaudio needs to be adapted for TS: (switched from static to virtual)

UINT DemuxerTS::stripAudio(UCHAR* buf, UINT len) //it has to be adapted
{
    //This function strips all TS Headers and non video payload
    UINT readpos=0;
    UINT writepos=0;
    PESPacket destpaket;
    bool started=true;
    while (readpos < len ) {
        if (buf[readpos] != TS_SIG) {readpos++; continue;}
        UINT oldreadpos=readpos;

        int datalen = TS_SIZE - 4;
        int pid = ( (buf[readpos+1] & 0x1F) << 8 ) | buf[readpos+2];
        UCHAR payload = buf[readpos+1] & 0x40;
        if (buf[readpos+3] & 0x20) { // Adaptation field is present
           datalen -= (buf[readpos+4] + 1);
        }
        if (datalen < 0) {// Error in stream TODO log this
            return 0;
        }
        if (datalen == 0) {// Null packet
             readpos=oldreadpos+TS_SIZE;
            continue;
        }
        readpos += (TS_SIZE - datalen);
        UINT towrite=min(datalen,len-readpos);
        if (pid == vID) {
            if (payload) {
                if (started) {
                    parsePacketDetails(destpaket);
                    memcpy(buf+writepos,destpaket.getData(),destpaket.getSize());
                    writepos+=destpaket.getSize();
                 }
                 destpaket.init(PESTYPE_VID0);
                 readpos += 6; towrite -= 6;
                 started=true;
            }

            if (started) {
                if (!destpaket.write(buf+readpos,towrite)) {
                    parsePacketDetails(destpaket);
                    memcpy(buf+writepos,destpaket.getData(),destpaket.getSize());
                    writepos+=destpaket.getSize();
                    destpaket.truncate();
                    destpaket.write((UCHAR*)"\200\000\000", 3);
                    destpaket.write(buf+readpos,towrite);

                }
            }
           
       

        }
        readpos=oldreadpos+TS_SIZE;
    }
    parsePacketDetails(destpaket);
    memcpy(buf+writepos,destpaket.getData(),destpaket.getSize());
    writepos+=destpaket.getSize();

    return writepos;
}   


This should be enough for today...

QuoteI am looking to integrating noad in vdr in the form of a plugin, so it can be much more efficient.
Using noad as a plugin, introduces the risk, that a crash of noad affects the whole vdr.

QuoteOnly problem is that H264 streams are not being processed in vdr, but only in backends (xine or vdrpau), so even a new plugin will not be able to handle HD streams...
Noad never used the decoders of vdr for the analysation, it has in fact inbuild code, that partly analyses and decodes audio and video, so that a detection is possible. For h264 I think a complete rewrite willl be necessary.

Marten


dingo35

Great work, Marten!

Quote from: MartenR on May 09, 2009, 18:37:00
Using noad as a plugin, introduces the risk, that a crash of noad affects the whole vdr.


That's true, but:
1) analyzing my system, noad has crashed (=segfaulted) on my system exactly 0 times the last month
2) using VDR's routines greatly diminishes further chances of crashing of noad

Perhaps detection of H264 streams is not that difficult, there is also some kind of "independent frame" there, that vdr can identify....

MartenR

Quote2) no AC3 yet;

3) subtitles or telext are not processed yet;

4) multipid audio works partly; the screen shows correct audio-languages, only somehow, after choosing the new language, the sound disappears. Playing around with setAudioChannel, setAudioStream and setAID didn't solve the trick.
I managed to get it working on the vomp-Yaris client, but not sure whether the modifications there are wanted in cvs code...
Also solved, now the solution affected many files, so I will post a final patch after the last issues are solved.
I just needed to use the methods in case of a TS recording used before for live TV, thus I just changed the PAT/PMT code to supply a Channel object describing the current pids and pass them to the audioselector and copy the live tv audio selector code to the player object.

Next weekend I will be away, thus the weekend after the next weekend I will solve the last issues and hopefully supply a final patch.

Marten

dingo35


MartenR

And here are the patches against current cvs, based on dingo35 patch.
I needed to rewrite some code in demuxerts to solve all issues.

Server side mainly the same as dingos but a compiler issue with 1.6 was solved.

I have to admit that teletext and dvb subtitles are untested due to a lack of transimission including subtitles, but they should work somehow...
All testing was done on windows, but this was all on abstract code, so it should run on mvp as well.

Enjoy, I will send it to Chris for cvs inclusion.

Marten

hondansx

Hi,

many thanks to dingo35 and MartenR for their work, that vomp dev goes further......

Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

morfsta

Good work guys! How do we get it included into a Yaris version?

hondansx

Quote from: MartenR on May 21, 2009, 11:15:36
And here are the patches against current cvs, based on dingo35 patch.
I needed to rewrite some code in demuxerts to solve all issues.

Server side mainly the same as dingos but a compiler issue with 1.6 was solved.

I have to admit that teletext and dvb subtitles are untested due to a lack of transimission including subtitles, but they should work somehow...
All testing was done on windows, but this was all on abstract code, so it should run on mvp as well.

Enjoy, I will send it to Chris for cvs inclusion.

Marten

Hi,

on the clientside it fails with:


/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o player.o player.cc
player.cc: In member function `int Player::init(bool)':
player.cc:73: warning: declaration of 'isPesRecording' shadows a member of 'this'
/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o playerradio.o playerradio.cc
/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o vfeed.o vfeed.cc
/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o afeed.o afeed.cc
/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o demuxer.o demuxer.cc
/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o demuxervdr.o demuxervdr.cc
/usr/local/src/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/bin/powerpc-405-linux-gnu-g++ -O3 -Wall -Wshadow  -D_GNU_SOURCE -I../jpeg/jpeg-6b   -c -o demuxerts.o demuxerts.cc
demuxerts.cc: In member function `virtual int DemuxerTS::findPTS(UCHAR*, int, ULLONG*)':
demuxerts.cc:194: warning: converting to non-pointer type `int' from NULL
demuxerts.cc:194: warning: unused variable 'pos'
demuxerts.cc:202: warning: unused variable 'framelength'
demuxerts.cc: In member function `int DemuxerTS::processTS(UCHAR*)':
demuxerts.cc:363: warning: converting to non-pointer type `int' from NULL
demuxerts.cc:449: warning: comparison between signed and unsigned integer expressions
demuxerts.cc:450: warning: comparison between signed and unsigned integer expressions
demuxerts.cc:454: error: name lookup of `i' changed for new ISO `for' scoping
demuxerts.cc:449: error:   using obsolete binding at `i'
demuxerts.cc:454: warning: comparison between signed and unsigned integer expressions
demuxerts.cc:455: warning: comparison between signed and unsigned integer expressions
demuxerts.cc: In static member function `static bool DemuxerTS::scanForVideo(UCHAR*, UINT)':
demuxerts.cc:746: warning: unused variable 'pos'


On serverside with vdr-1.7.2

g++ -O3 -Wall -pipe -fomit-frame-pointer -march=core2 -msse4.1 -fPIC -Woverloaded-virtual -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vompserver"' -DVOMPSERVER -I/usr/local/src/dvb/DVB/linux/include -I../../../include -I/usr/local/src/dvb/DVB/linux/include -o vompclientrrproc.o vompclientrrproc.c
vompclientrrproc.c: In member function 'int VompClientRRProc::processStartStreamingRecording()':
vompclientrrproc.c:1128: error: 'class cRecording' has no member named 'IsPesRecording'
make: *** [vompclientrrproc.o] Fehler 1


Any Ideas?

Thanks,
Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

MartenR

Hmm,
first I hate, the fact, that every compiler interprets c/c++ in a different way.
On the client side, it seems that gcc interprets declaration different then msvc++.
Remove the

"int" in
for(int i

and put a line before for statemaent into the code:

int i;

For the serverside, here is a updated patch attached. (Btw, it seems, that you are compiling against 1.6 or <1.7.3,, so no need for the patches?)

Marten

MartenR

The patch was nonsense, it has to be true....


Marten

hondansx

That did it!  :)

Many thanks,
Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

stu-e

#56
Do these patches apply to current cvs because I'm getting an undefined symbol error when I come to make plugins in my vdr source directory?

Just a wild stab but has it got anything to do with bool ResumeIDLock? Comparing newserverpatch2 patch with the Yaris 07_rec_resume_vdr patch, this bool is declared as extern in vompclientrrproc.h and declared again in vompclientrrproc.c, yet in Yaris it is declared as static in vompclientrrproc.h only.

My C coding skills aren't that strong. Please could anyone comment on this?

Stu-e

dingo35

No, the extern declaration in vompclientrrproc.h and redeclaration in vompclientrrproc.c is correct; the static declaration in the Yaris_rec_resume_vdr patch caused an undefined symbol error.

Perhaps a make clean-plugins; make plugins solves the problem? Check in your PLUGINS/lib directory whether the new *vompserver*so file is actually built there.



stu-e

The symbol error actually occurred when I ran vdr:
vdr: ./PLUGINS/lib/libvdr-vompserver.so.1.7.7: undefined symbol: _ZN10cIndexFile3GetEiPtPlPbPi

I tried a fresh cvs download, applied newserverpatch2.patch and got the same error.
make clean-plugins;make plugins did not help either.

The vompserver lib is in the PLUGINS/lib directory as it says in the error message.

Googling the symbol gives reports of the same error with streamdev plugin, but I was not able to get any more detail than that.

I'm using gcc 4.3.2 and an unpatched vdr 1.7.7

Stu-e

dingo35

This points to cIndexFile::Get ; you could check whether this routine has changed in vdr-1.7.7; try compiling vdr-1.7.5, and/or compare source code changes...