×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    RTP and VAS synchronizationq

    I'm developing a project that requires the use of RTP plugin and VAS.The programs goes as follows :
    An rtp session is open between to devices and then I use VAS to capture voice packets via MVoIPUplinkObserver::Emptybuffer(...) inside which i use CRtpApi::SendRtpPacket(...) to send packets to the other end. On the other end once MRtpObserver::RtpPacketReceived(..) gets called I call MVoIPDownlinkObserver::FillBuffer(..) to play them back. the problem is that once RtpPacketReceived gets called on either end the program exits on that end. Firstly I want to know how can I capture the output reason on TRK knowing that RtpPacketReceived is a callback method. Secondly I know that this description is vague for anyone to understand but I want a way to synchronize the received packets with the playedback packets (may but like a queue or something) but I'm not so familiar with data structure in symbian so any idea is appreciated as well as any idea that didn't cross my mind.

    If anyone has done this before I will be very thankful if he posts a sample code .
    Regards.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: RTP and VAS synchronizationq

    Apparently you have not met this article so far: http://wiki.forum.nokia.com/index.ph...ded_panic_code

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: RTP and VAS synchronizationq

    Actually I haven't and I'm looking into it.

    But any ideas about how to get around the synchronization problem.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: RTP and VAS synchronizationq

    I do not know neither RTP, nor APS. But when an application abruptly exits, that is a panic, and the panic messages are hidden by default - that is why you have to enable them.

  5. #5
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: RTP and VAS synchronizationq

    Thanks so far for you help I really can't how could I possibly continue without knowing such a thing .I got a USER 23 panic after fixing it i got KERN-EXEC 3 and I'm working on it. But the problem seems to appear again

    I will post the part we are interested in from my code with the hope that I will find an echo
    ########################################
    This is part my CRTPEngine.cpp
    ########################################


    void CRTPEngine::RtpPacketReceived( TRtpId aStreamId,

    const TRtpRecvHeader & aHeaderInfo, const TDesC8 & aPayloadData )
    {
    iView.DrawText(_L("Inside RtpPacketReceived"),KRgbCyan);
    if(!iVoiceEngineReady)
    {
    iVoiceEngineReady =ETrue;
    iVoiceEngine->SetDownlinkFormat(EG711);
    }
    else
    {
    iVoiceEngine->SetPlayBuffer(aPayloadData);
    iVoiceEngine->SetPlayBufferReady();
    }
    }
    ##########################################
    and this is part of my CVoiceEnigne.cpp
    ##########################################
    TBool iPlayBufReady;
    TPtr8 iPlayBufPtr;
    void CVoiceEngine::FillBuffer(const CVoIPAudioDownlinkStream& aSrc,
    CVoIPDataBuffer* aBuffer)
    {
    iView->DrawText(_L("Inside FillBuffer"),KRgbDarkGreen);
    if(iPlayBufReady){
    aBuffer->GetPayloadPtr(iPlayBufPtr);
    iView->DrawText(_L("Inside FillBuffer"),KRgbDarkYellow);


    TInt err=iVoIPDnlink->BufferFilled(aBuffer);
    iPlayBufReady=EFalse;
    }


    From the first glance the problem seems to reside in starting the downlink stream inside rtpPacketReceived
    But I have tried to start it before but it seems to start before the first packet is received

    When this code runs it panics after a couple of received packets with a panic code KERN-EXEC 3 and the SDK says that this is most probably from dereferencing a null object

    Any ideas about how to synchronize both parties.
    Cheers

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: RTP and VAS synchronizationq

    I caught it and now it is much more simpler for anyone(except me of course) to discover. It a descriptors problem. The framework calls this function RtpPacketReceived(const TDesC8& aPayloadData) when an RTP packet is received now i want to copy that data so I defined something like this
    TPtr8 iPayload and intialized it so that it is big enough to hold the data and inside that method I wrote iPayload.Copy(aPayload) . Now as soon as the code gets at this line the program panics with KERN-EXEC 32

    All I want to do is to convert that data to a pointer so that I can put it in a CVoIPDataBuffer.

    Thanks in advance

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: RTP and VAS synchronizationq

    If it has to be a pointer you can consider using HBufC, or even an RBuf details of which you can find here

    However the Kern Exec 32 that you are getting seems to be something else "This panic is called by DProcess::Resume() when trying to resume a process that is still being loaded".
    Cheers,
    Mayank

  8. #8
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: RTP and VAS synchronizationq

    Sorry my bad it was KERN-EXEC 3 actually
    Thanks for this very quick reply
    Waiting for another one.
    Regards.

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: RTP and VAS synchronizationq

    You should read through the doc I pointed out in the earlier post. Kern Exec 3 could be caused by so many things "This panic is raised when an unhandled exception occurs. Exceptions have many causes, but the most common are access violations caused, for example, by dereferencing NULL. Among other possible causes are: general protection faults, executing an invalid instruction, alignment checks, etc." So check if the pointers u are accessing are valid or not to start with.
    Cheers,
    Mayank

  10. #10
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: RTP and VAS synchronizationq

    I will read it but what is illegal in what I did

    TPtr8 iPayload;
    Inside the constructor
    iPayload(0,0,100) maxsize of 100

    And inside RtpPacketReceived(const TDesC8& aPayloadData
    {
    iPayload.Copy(aPayload);
    }
    What could I have done wrong? Or that this method is called by the framework it can't be copied somewhere else (that is ridiculous of course).

  11. #11
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: RTP and VAS synchronizationq

    How about using the good old HBufC

    Code:
    HBufC8*	yourData;
    yourData = NULL;	
    Inside the constructor
    
    
    And inside RtpPacketReceived(const TDesC8& aPayloadData)
    {
    yourData = aPayload.AllocL();
    }
    Cheers,
    Mayank

  12. #12
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Re: RTP and VAS synchronizationq

    I think that you think I'm annoying but perhaps that will be my last question.

    I thing that will work fine and after that I can call yourData->Des() to get a Ptr8 object
    But Isn't every call to this function will create a new heap slot I think I can run out of memory quicker than what I expect.
    I hope I'm mistaken.
    Thanks in advance.

  13. #13
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    81

    Smile Re: RTP and VAS synchronizationq

    That is what I did but I haven't tried it yet

    RtpPacketReceived(const TDesC8& aPayloadData)
    {
    *iHeapBuffer = aPayloadData;
    IPointerDes = iHeadBuffer->Des();
    }

    I think it is going to work, isn't it?

    Lastly I want to know just for my information if I do something like this iHeapBuffer=aPayloadData.Alloc()

    What will happen to the heap cell that was allocated to iHeapBuffer because as far as I know TDesC8.Alloc() creates a new heap cell and returns it address

    Thanks in advance.

  14. #14
    Registered User
    Join Date
    Apr 2009
    Posts
    37

    Re: RTP and VAS synchronizationq

    Were you able to solve the above isssue? If so,can you share with me how were you able to solve it?
    Last edited by neelimabtt; 2009-06-03 at 13:57.

Similar Threads

  1. N95 VAS noise issue
    By raj_rr7 in forum VoIP
    Replies: 9
    Last Post: 2009-06-09, 08:26
  2. Play RTP Streams in S60 3rd edition FP2
    By neelimabtt in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2009-05-14, 11:43
  3. VAS N95 noise issue
    By raj_rr7 in forum Audio
    Replies: 0
    Last Post: 2009-02-17, 10:51

Posting Permissions

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