×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    20

    RtpPacketReceived

    Hi

    In RtpPacketReceived Function , received the RTP packet , assigned the RTP data in “address” (HBufC8)variable and called the SetPlayBuffer function.

    void CRTPEngine::RtpPacketReceived( TRtpId aStreamId, const TRtpRecvHeader& aHeaderInfo, const TDesC8& aPayloadData )
    {
    address =HBufC8::NewLC(160); //address declare as global
    address = aPayloadData.AllocL();
    TDesC8 aPayLoad = aPayloadData; SetPlayBuffer(aPayLoad);

    }

    In SetPlayBuffer Function I want to append (0x00, 0x01).before RTP packet(address) then copy to TPtr8.
    Here I get crash when I copy to TPtr8 .

    void CVoIPTestEngine::SetPlayBuffer(TDesC8& aPayLoadData)
    {
    TPtr8 aTempBuf(NULL,0,0);
    TPtr8 aTempBuf1(NULL,0,0);
    TPtr8 iPlayBufPtr(NULL,0,0);

    CVoIPDataBuffer* iPlayBuf;
    TBuf8<90> lPaddedPayload;

    lPaddedPayload.Zero();
    aTempBuf.Set(address->Des());
    aTempBuf1.Zero();
    TInt inlen=aTempBuf.Length();
    if(inlen>80)
    {
    aTempBuf1.Set(aTempBuf.LeftTPtr(80));
    TUint8 buf[2]; buf[0]=0x01; buf[1]=0x00; //Two Byte To append
    lPaddedPayload.Append(buf,2); //Append the Byte
    lPaddedPayload.Append(aTempBuf1); //append the RTP

    iPlayBufPtr.Copy( lPaddedPayload ); //Copy to TPtr8 Exe Crash error User 23

    iPlayBuf->SetPayloadPtr(iPlayBufPtr);
    iVoIPDnlink->BufferFilled(iPlayBuf);
    User::Free(address);
    CleanupStack::PopAndDestroy();
    return;
    }
    }

    My requirement is I want to append 2 byte before the Receiving RTP packet and copy that data to TPtr8.
    Please give me suggestion on this problem

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    Re: RtpPacketReceived

    Check out User 23 error in SDK.

    This panic is raised when any operation that moves or copies data to an 8 bit variant descriptor, causes the length of that descriptor to exceed its maximum length.

    It may be caused by any of the copying, appending or formatting member functions and, specifically, by the Insert(), Replace(), Fill(), Fillz() and ZeroTerminate() descriptor member functions. It can also be caused by the SetLength() function.

    There is a length issue in copying TBuf8 in TPtr8.


    Regards
    Rajat

Similar Threads

  1. where does RtpPacketReceived () called
    By Jayasanka in forum VoIP
    Replies: 0
    Last Post: 2009-08-04, 05:45
  2. Replies: 11
    Last Post: 2008-05-30, 12:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×