[Live-devel] Nal Unit Type--Engin Kurutepe

weiyutao36 at 163.com weiyutao36 at 163.com
Fri Jan 26 02:48:57 PST 2007


Hi Engin,
I have got your codes and read them. When I compiled them into the LIVE555 library, I found the codes had some bugs and small flaws and they caused some warnings and errors. I made some changes to satisfy the compiler. In the client, I used VLC to receive and play the .264 file. The VLC worked well except that the pictures seemed not so consecutive. I do not know the reason.
Some changes are listed below: 1) In H264RTPStreamerFramer.cpp, I think the funtion "timeval* incrementTimeval(timeval* tv, unsigned int duration)" should be written as follows:timeval* incrementTimeval(timeval* tv, unsigned int duration)
 {
   tv->tv_usec+=duration;
   if( tv->tv_usec > 1000000)
     {
       tv->tv_sec=tv->tv_sec+tv->tv_usec/1000000;
       tv->tv_usec=tv->tv_usec%1000000;
    }
   return tv;
}Maybe I missed something? Also, in function "void H264RTPStreamFramer::afterGettingNALU1()", I commented the
"int tmp32" and "short tmp16" to avoid compling warnings because currently they are not used. Onece again, to avoid compling warning , in function "void encode()", for( int index=0; index<in_size; index+=3), the variable index had better be declared as "unsinged int",
because the in_size is of this type. 2) In H264VideoFileServerMediaSubsession.cpp, I added the following:
#include "ByteStreamFileSource.hh", otherwise it has a compling error. This is because
when you create a video source ,you used this class, see follows:
////////////////////////////////////////////////////////////////////////////////////////
        // Create the video source:
         ByteStreamFileSource* fileSource
          = ByteStreamFileSource::createNew(envir(), fFileName);
//////////////////////////////////////////////////////////////////////////////////////// 3) In the  H264VideoRTPSink.hh, class H264VideoRTPSink has a member variable fOurFramer (H264VideoStreamFramer *fOurFramer;) and in the H264VideoRTPSink.cpp, it is used to do the following:
             char *sps = fOurFramer->getSPS();
 char *pps = fOurFramer->getPPS();
             unsigned int profile_level_id = fOurFramer->getProfileLevelID();
but class H264VideoStreamFramer does not has these member functions and when compiled it, there were some errors. H264RTPStreamFramer, derived from H264VideoStreamFramer, has these functions. So in H264VideoStreamFramer.hh I added the corresponding  virtual functions to make complier satisfactory:
                  virtual char* getSPS() = 0; //weiyutao added
                  virtual char* getPPS() = 0; //weiyutao added
                  virtual unsigned int getProfileLevelID() = 0; //weiyutao added
 If you changed the codes or added some new features/functions, please inform me, OK?
I will study the codes more carefully and do more work.
Thanks in advance. Yutao Wei,Shandong University, P.R. China ps: I can't send mail to your mailbox:kurutepe at nue.tu-berlin.de. I tried my two mailboxes and both could not send to you sucessfully.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070126/68c5fbaf/attachment.html 


More information about the live-devel mailing list