You Are Here:

Community: Wiki

This page was last modified on 9 October 2008, at 17:12.

CS000899 - Finding audio and video formats supported by the phone

From Forum Nokia Wiki



ID CS000899 Creation date April 17, 2008
Platform S60 3rd Edition, FP1 Tested on devices Nokia N93
Category Symbian C++ Subcategory Multimedia, Audio, Video


Keywords (APIs, classes, methods, functions): CMMFControllerPluginSelectionParameters, CMMFFormatSelectionParameters, RMMFControllerImplInfoArray, RMMFFormatImplInfoArray, CMMFControllerPluginSelectionParameters::SetRequiredPlayFormatSupportL(), CMMFControllerPluginSelectionParameters::SetRequiredRecordFormatSupportL(), CMMFControllerPluginSelectionParameters::SetMediaIdsL(), CMMFControllerPluginSelectionParameters::SetPreferredSupplierL(), CMMFControllerPluginSelectionParameters::ListImplementationsL()

Overview

This snippet shows how to find out all audio/video play and record formats supported by the phone.


This snippet can be self-signed.

MMP file

The following libraries are required:

LIBRARY  MMFControllerFramework.lib

Header file

#include <mmf\common\mmfcontrollerpluginresolver.h>
#include <mmf\common\mmfcontroller.h>

Source file

CMMFControllerPluginSelectionParameters* pluginParameters = CMMFControllerPluginSelectionParameters::NewLC();
CMMFFormatSelectionParameters* formatParameters = CMMFFormatSelectionParameters::NewLC();
 
pluginParameters->SetRequiredPlayFormatSupportL(*formatParameters);
pluginParameters->SetRequiredRecordFormatSupportL(*formatParameters);
 
RArray<TUid> ids;
User::LeaveIfError(ids.Append(KUidMediaTypeAudio));
User::LeaveIfError(ids.Append(KUidMediaTypeVideo));
 
//EAllowOnlySuppliedMediaIds - plug-ins that support exact media ID
//EAllowOtherMediaIds - plug-ins that support at least the media ID
 
//pluginParameters->SetMediaIdsL(ids, CMMFPluginSelectionParameters::EAllowOnlySuppliedMediaIds);
pluginParameters->SetMediaIdsL(ids, CMMFPluginSelectionParameters::EAllowOtherMediaIds);
 
//It is also possible to set the preferred supplier of the plug-in
//and return e.g. only those plug-ins
//pluginParameters->->SetPreferredSupplierL(_L("SupplierName"),
// CMMFPluginSelectionParameters::EOnlyPreferredSupplierPluginsReturned);
 
RMMFControllerImplInfoArray controllers;
CleanupResetAndDestroyPushL(controllers);
 
//Get all audio/video play and record controllers/formats that are supported
pluginParameters->ListImplementationsL(controllers);
 
/* //Print results e.g. to global CConsoleBase* console
_LIT(KAudioFormats,"Audio/Video play and record formats detected:\n");
_LIT(KTab, "\t");
_LIT(KNewLine, "\n");
console->Printf(KAudioFormats);
for (TInt index=0; index<controllers.Count(); index++)
{
const RMMFFormatImplInfoArray& playFormats = controllers[index]->PlayFormats();
const RMMFFormatImplInfoArray& recordFormats = controllers[index]->RecordFormats();
console->Printf(controllers[index]->DisplayName());
console->Printf(KNewLine);
for (TInt i=0; i<playFormats.Count(); i++)
{
console->Printf(KTab);
console->Printf(playFormats[i]->DisplayName());
console->Printf(KNewLine);
}
console->Printf(KNewLine);
for (TInt j=0; j<recordFormats.Count(); j++)
{
console->Printf(KTab);
console->Printf(recordFormats[j]->DisplayName());
console->Printf(KNewLine);
}
}
*/

 
CleanupStack::PopAndDestroy(3);//controllers, formatParameters, pluginParameters

Postconditions

The controllers array contains all audio/video play and record formats supported by the phone.

Related Wiki Articles

No related wiki articles found

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 
RDF Facets: qdcZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fConfiguringE5fAACE5fcodecX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxConfiguringE20AACE20codecE20E2dE20ForumE20NokiaE20WikiX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2fX qfnZtopicQUqfnTopicZaudioQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZmultimediaQRqmarsZrelevanceQNx100X qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZupdatedQDx2008E2d10E2d02X qfnZuserE5ftagQSxaudioX qfnZuserE5ftagQSxmultimediaX qmarsZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ