×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    19

    Help:Audio streaming using Audio Proxy Server(APS) conflicts with Video

    Hello!

    There is a problem that audio streaming by Audio Proxy Server(APS) conflicts with Video:

    I do audio streaming by APS, and capature images periodically by CCamera class, while the encoding (for image)/decoding(for image) are disposed by CImageEncoder/ CImageDecoder API. They(audio stream & video stream) both work OK individually, BUT when I initialize video streaming during the audio streaming by APS is working, the call-back function ReserveComplete()is never called, which means camera initialization is failed , and when I start audio streaming during the Video Streaming is working, the encoding API CImageEncoder is halted until the audio streaming is stoped.

    The above is the problem description. Does someone know about Audio streaming ( using APS) conflicts with Video streaming( using CCamer/CImageEncoder/ CImageDecoder )? And that is why?

    Thank you in advance!
    Gu Hua

    Here are some related codes:
    Audio related:

    void CQueueHandler::RunL()
    {
    if (iStatus != KErrNone)
    {
    iAppEngine->NotifyError(iStatus.Int());
    }
    else if(iType==EPlayQueue)
    {
    if( iPlayQueue!=NULL && iPlayQueue->Count()>0)
    {
    TAPSCommBuffer BufToPlay;
    BufToPlay.iBuffer.Append(FetchFrmPlayQueue());
    BufToPlay.iCommand = EAPSPlayData;
    BufToPlay.iStatus = KErrNone;
    iQ0->Send(BufToPlay);
    iAppEngine->StartOutputStream();
    }
    iQ0->NotifySpaceAvailable(iStatus);
    SetActive();
    }
    else
    {
    TAPSCommBuffer buffer;
    TInt ret = iQ0->Receive(buffer);
    if (ret == KErrNone)
    {
    switch (iType)
    {
    case ERecordCommQueue: // Callbacks from the APS recorder thread
    {
    switch (buffer.iCommand)
    {
    case EAPSRecorderInitialize:…
    case EAPSRecordData:
    iAppEngine->NotifyError(buffer.iStatus);
    break;
    default:
    break;
    }
    break;
    }
    // Callbacks from the APS main thread
    case EPlayCommQueue:
    {
    switch (buffer.iCommand)
    {
    case EAPSPlayerInitialize:

    case EAPSPlayerInitComplete:
    iAppEngine->OutputStreamInitialized(buffer.iStatus);
    break;
    case EAPSRecorderInitComplete:
    iAppEngine->InputStreamInitialized(buffer.iStatus);
    break;
    case EAPSPlayData:

    default:
    break;
    }
    break;
    }
    case ERecordQueue:
    if(buffer.iCommand == EAPSRecordData)
    {
    iSendBuffer.Zero();
    iSendBuffer.Append(buffer.iBuffer);
    if(iSendBuffer.Size()>0)
    {
    iAppEngine->SendAudioData(iSendBuffer);
    }
    }
    break;
    default:
    break;
    }
    }
    else // iQ0->Receive() failure
    {
    iAppEngine->NotifyError(ret);
    return;
    }
    // issue next request
    iQ0->NotifyDataAvailable(iStatus);
    SetActive();
    }
    }

    Video related:

    /*-----------------------------------------------------------
    void CCameraCaptureEngine::ReserveCameraL()
    Description: Reserves camera
    Comments : "ResereComplete" will get called after completion
    Return values: N/A
    ---------------------------------------------------------------*/
    void CCameraCaptureEngine::ReserveCameraL()
    {

    //Ongoing, no need to issue again
    if ( iCameraReserved && !iCameraReserveComplete )
    {
    User::Leave(0);
    }
    if ( !iCameraReserved && iCameraReserveComplete )
    {
    iCameraReserved = ETrue;
    iCameraReserveComplete = EFalse;
    iCamera->Reserve(); //Async
    }


    }
    void CCameraCaptureEngine::Encode()
    {

    RImageTypeDescriptionArray imageTypes;
    CImageEncoder::GetImageTypesL(imageTypes );

    CleanupStack::PushL( TCleanupItem(CleanupRArray, &imageTypes) );
    TInt selectedIdx=0;
    iImageEncoder= CImageEncoder:: DataNewL(iSendBuf,CImageEncoder::EOptionNone,imageTypes[selectedIdx]->ImageType(),imageTypes[selectedIdx]->SubType());

    iState = EEncodingImage;
    iImageEncoder->Convert(&iStatus,*iBitmapSave);

    SetActive();
    CleanupStack::PopAndDestroy(&imageTypes);
    }

    void CCameraCaptureEngine:: Decode(const TDesC8& aData)
    {

    iImageDecoder = CImageDecoder:: DataNewL( iEikEnv->FsSession(),aData,CImageDecoder::EOptionNone);//

    iBitmapShow->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels, iImageDecoder->FrameInfo().iFrameDisplayMode);

    iImageDecoder->Convert(&iStatus,*iBitmapShow);
    SetActive();

    }
    Last edited by guh02; 2008-09-09 at 08:40.

  2. #2
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    Re: Help:Audio streaming using Audio Proxy Server(APS) conflicts with Video

    hi Gu Hua,
    am also trying to develop a video streaming application using the APSoverRTP example.
    could u please share ur project if u dont mind. it would give me edge to start over.
    thank you..

Similar Threads

  1. Streaming Video Audio site - Invite to N95 Owners
    By zoovision in forum News and Announcements
    Replies: 6
    Last Post: 2011-03-11, 08:56
  2. Replies: 2
    Last Post: 2007-01-04, 07:41
  3. Half Duplex Audio Streaming
    By subhrajyotisaha in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-05-25, 04:39

Posting Permissions

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