[Live-devel] A question about the streamparser class!

Chen Jianwen chenjw at video.mdc.tsinghua.edu.cn
Thu Apr 21 11:35:46 PDT 2005


Ross Finlayson,

    In StreamParser.cpp we defien a size .
	#define BANK_SIZE 150000
    We use two buffers for parser as follows:
          fBank[0] = new unsigned char[BANK_SIZE];
	  fBank[1] = new unsigned char[BANK_SIZE];
//////////////////////////////////////////////////////////////////////////
  // First, check whether these new bytes would overflow the current
  // bank.  If so, start using a new bank now.
  if (fCurParserIndex + numBytesNeeded > BANK_SIZE) {
											......  
										}
////////////////////////////////////////////////////////////////////////////////////
     And if one buffer is overflow ,we will change to another one. This is to accelerate the 
parsing speed without waitting for the buffer. If I am not right ,please tell me.
     Who can tell me why 150000 is selected here? In my system , memory resource is very
limited. I can not offer such a big memory just for two buffers scheme. And can anyone tell me 
the minimum size for MPEG4 video streams.

	

======= 2005-04-20 06:46:00 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======

>>But the program crashes after one time executing the doGetNextFrame. I
>>can't debug where in the code this happens.
>
>Unfortunately, you're going to have to, because once you've made 
>modifications to the original code, we can't provide much support (except 
>as part of a paid consulting arrangement).  Remember, You Have Complete 
>Source Code.
>
>One suggestion, however:
>In "AVISubsessionIOState::afterGettingFrame()", change the statement
>         unsigned short rtpSeqNum
>                 = fOurSubsession.rtpSource()->curPacketRTPSeqNum();
>to
>         unsigned short rtpSeqNum = 0;
>(because - for you - "fOurSubsession.rtpSource()" will be NULL
>
>You'll also need to fix the places in "AVIFileSink.cpp" that call 
>"readSource()" - replacing this with your input data object.
>
>
>	Ross Finlayson
>	LIVE.COM
>	<http://www.live.com/>
>
>_______________________________________________
>live-devel mailing list
>live-devel at lists.live.com
>http://lists.live.com/mailman/listinfo/live-devel
>.

= = = = = = = = = = = = = = = = = = = =
			

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡
 
				 
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Chen Jianwen
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡chenjw at video.mdc.tsinghua.edu.cn
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-04-21






More information about the live-devel mailing list