You Are Here:

Community: Developer Discussion Boards

#1 Old Help:Audio streaming using Audio Proxy Server(APS) conflicts with Video - 2008-09-09, 09:33

Join Date: Oct 2007
Posts: 19
guh02
Offline
Registered User
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 09:40.
Reply With Quote

#2 Old Re: Help:Audio streaming using Audio Proxy Server(APS) conflicts with Video - 2009-02-19, 14:53

Join Date: Nov 2008
Posts: 1
xflash
Offline
Registered User
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..
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Streaming Video Audio site - Invite to N95 Owners zoovision News, Announcements and Job Listings 4 2008-03-02 09:16
Audio, video streaming and codec related several queries... Aditto General Symbian C++ 2 2007-01-04 08:41
Half Duplex Audio Streaming subhrajyotisaha Symbian Media (Graphics & Sounds) 0 2006-05-25 05:39

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia