Does any body has tried using video capturing using CCamera api. Any example code will be beneficial. Actually i m not getting the exact flow in which api will work.
Yes i have reffered that for capturing the video but the problem is that the video capture through StartVideoCaptureL returns a MMFBuffer which is raw video data in YUV format.now the problem is to encode that raw data to required 3gp format.
I have try to use MMFCodec but have not found any relevant video codec uid and TFourcc code so that i can get the object of MMFCodec class and process my raw data to required format using ProcessL of MMFCodec class.
Please do reply if u have any idea regarding this.
I have already use this api (CvideoRecorderUtility) to capture video in a file successfully but unable to capture video in descriptor using opendescL of CvideoRecorderUtility.It is giving -5 error in openComplete.
Hence i go for CCamera API to capture video but facing problem in playing the video.So if u have any idea please let me know.
// Set the play and record format selection parameters to be blank. // Format support is only retrieved if requested. cSelect->SetRequiredPlayFormatSupportL(*fSelect); cSelect->SetRequiredRecordFormatSupportL(*fSelect);
// Set the media ids RArray<TUid> mediaIds; CleanupClosePushL(mediaIds); User::LeaveIfError(mediaIds.Append(KUidMediaTypeVideo)); // Get plugins that support at least video cSelect->SetMediaIdsL(mediaIds, CMMFPluginSelectionParameters::EAllowOtherMediaIds); cSelect->SetPreferredSupplierL(KNullDesC, CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
// Array to hold all the controllers support the match data RMMFControllerImplInfoArray controllers; CleanupResetAndDestroyPushL(controllers); cSelect->ListImplementationsL(controllers);
TBool recordingSupported = EFalse;
// Find the first controller with at least one record format available for(TInt i = 0; i < controllers.Count(); ++i) { RMMFFormatImplInfoArray recordFormats = controllers[i]->RecordFormats();
************************************** then using the above format id and controller is in openDescL as follows TDesc8* videoClip; videoClip = new(ELeave) TBuf8<3000>; iUtility->OpenDesL(*videoClip, aCameraHandle, iControllerUid, iFormatUid);
*************************** please check the above code do i have pass some wrong argument . please reply as soon as possible.
Sorry, I have absolutely no experience in using CvideoRecorderUtility. You should really check the example from Forum Nokia and try to make that work first.
You do not mention in what environment you are testing your code. At least most of WINS environments do not support using camera at all...
thanks for reply.as u have ask for the environment i have test it on nokia N80 handset (symbian9.0) using series 60 sdk 3rd edition.
Did u check the code TDesc8* videoClip; videoClip = new(ELeave) TBuf8<3000>; iUtility->OpenDesL(*videoClip, aCameraHandle, iControllerUid, iFormatUid);
what do u feel i m passing correct argument or not.
I am also want to capture the video frames with CCamera api but I am not getting how to do this.
I have explored the CCamera application for the 3 rd eddition . If u people have done this please help me to reolve this issue.
Thanks
Forum posts: 17
There is example app (CameraApp) is avaliable in forum.nokia.com
I think it will help you.
Cheers
IndVin
Forum posts: 21
Yes i have reffered that for capturing the video but the problem is
that the video capture through StartVideoCaptureL returns a MMFBuffer which is raw video data in YUV format.now the problem is to encode that raw data to required 3gp format.
I have try to use MMFCodec but have not found any relevant video codec uid and TFourcc code so that i can get the object of MMFCodec class and process my raw data to required format using ProcessL of MMFCodec class.
Please do reply if u have any idea regarding this.
Cheers
Forum posts: 40
http://www.forum.nokia.com/info/sw.nokia.com/id/48d38e98-2b78-4da8-b111-63e9c7d34feb/S60_Platform_Video_Example_v2_0_en.zip.html
Forum posts: 21
I have already use this api (CvideoRecorderUtility) to capture video in a file successfully but unable to capture video in descriptor using opendescL of CvideoRecorderUtility.It is giving -5 error in openComplete.
Hence i go for CCamera API to capture video but facing problem in playing the video.So if u have any idea please let me know.
...........
Forum posts: 40
Forum posts: 21
Thanks for the quick reply.what i m passing the argument in OpenDescL
by retrieving through following code please check this
CMMFControllerPluginSelectionParameters* cSelect =
CMMFControllerPluginSelectionParameters::NewLC();
CMMFFormatSelectionParameters* fSelect =
CMMFFormatSelectionParameters::NewLC();
// Set the play and record format selection parameters to be blank.
// Format support is only retrieved if requested.
cSelect->SetRequiredPlayFormatSupportL(*fSelect);
cSelect->SetRequiredRecordFormatSupportL(*fSelect);
// Set the media ids
RArray<TUid> mediaIds;
CleanupClosePushL(mediaIds);
User::LeaveIfError(mediaIds.Append(KUidMediaTypeVideo));
// Get plugins that support at least video
cSelect->SetMediaIdsL(mediaIds,
CMMFPluginSelectionParameters::EAllowOtherMediaIds);
cSelect->SetPreferredSupplierL(KNullDesC,
CMMFPluginSelectionParameters::EPreferredSupplierPluginsFirstInList);
// Array to hold all the controllers support the match data
RMMFControllerImplInfoArray controllers;
CleanupResetAndDestroyPushL(controllers);
cSelect->ListImplementationsL(controllers);
TBool recordingSupported = EFalse;
// Find the first controller with at least one record format available
for(TInt i = 0; i < controllers.Count(); ++i)
{
RMMFFormatImplInfoArray recordFormats = controllers[i]->RecordFormats();
if(recordFormats.Count() > 0)
{
iControllerUid = controllers[i]->Uid();
iFormatUid = recordFormats[0]->Uid();
recordingSupported = ETrue;
break;
}
}
**************************************
then using the above format id and controller is in openDescL as follows
TDesc8* videoClip;
videoClip = new(ELeave) TBuf8<3000>;
iUtility->OpenDesL(*videoClip, aCameraHandle, iControllerUid, iFormatUid);
***************************
please check the above code do i have pass some wrong argument .
please reply as soon as possible.
Thanks in Advance
.............
Forum posts: 40
You do not mention in what environment you are testing your code. At least most of WINS environments do not support using camera at all...
Forum posts: 21
thanks for reply.as u have ask for the environment i have test it on nokia N80 handset (symbian9.0) using series 60 sdk 3rd edition.
Did u check the code
TDesc8* videoClip;
videoClip = new(ELeave) TBuf8<3000>;
iUtility->OpenDesL(*videoClip, aCameraHandle, iControllerUid, iFormatUid);
what do u feel i m passing correct argument or not.
Thanks
Forum posts: 40
Anyway, allocating three thousand bytes for the video clip is not going to get you a very long video in any case.
I suggest that you take a look at the video capture example I mentioned earlier.
Forum posts: 72
Hi all,
I am also want to capture the video frames with CCamera api but I am not getting how to do this.
I have explored the CCamera application for the 3 rd eddition . If u people have done this please help me to reolve this issue.
Thanks