Author Topic: vomp and vdr >1.7.3  (Read 35876 times)

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #45 on: May 09, 2009, 18:37:00 »
1) no picture update when fast forward or fast rewind,

solved, stripaudio needs to be adapted for TS: (switched from static to virtual)
Code: [Select]
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...

Quote
I 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.

Quote
Only 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


Offline dingo35

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #46 on: May 10, 2009, 05:57:44 »
Great work, Marten!

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....

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #47 on: May 10, 2009, 16:59:58 »
Quote
2) 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

Offline dingo35

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #48 on: May 11, 2009, 08:14:05 »
Ok, great!

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #49 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

Offline hondansx

  • Full Member
  • ***
  • Posts: 169
    • ICQ Messenger - 178471580
    • View Profile
    • Email
Re: vomp and vdr >1.7.3
« Reply #50 on: May 21, 2009, 11:22:18 »
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

Offline morfsta

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
    • Email
Re: vomp and vdr >1.7.3
« Reply #51 on: May 22, 2009, 19:34:20 »
Good work guys! How do we get it included into a Yaris version?

Offline hondansx

  • Full Member
  • ***
  • Posts: 169
    • ICQ Messenger - 178471580
    • View Profile
    • Email
Re: vomp and vdr >1.7.3
« Reply #52 on: May 24, 2009, 13:12:41 »
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:

Code: [Select]
/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
Code: [Select]
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

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #53 on: May 24, 2009, 13:50:40 »
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

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #54 on: May 24, 2009, 14:13:05 »
The patch was nonsense, it has to be true....


Marten

Offline hondansx

  • Full Member
  • ***
  • Posts: 169
    • ICQ Messenger - 178471580
    • View Profile
    • Email
Re: vomp and vdr >1.7.3
« Reply #55 on: May 24, 2009, 14:23:14 »
That did it!  :)

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

Offline stu-e

  • Full Member
  • ***
  • Posts: 71
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #56 on: May 26, 2009, 11:55:50 »
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
« Last Edit: May 26, 2009, 12:49:52 by stu-e »

Offline dingo35

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #57 on: May 26, 2009, 15:36:52 »
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.



Offline stu-e

  • Full Member
  • ***
  • Posts: 71
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #58 on: May 26, 2009, 20:41:29 »
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

Offline dingo35

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: vomp and vdr >1.7.3
« Reply #59 on: May 26, 2009, 21:06:04 »
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...