Symbian3/PDK/Source/GUID-F5D2C8DF-58B5-5620-824B-86BE72341DF7.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-F5D2C8DF-58B5-5620-824B-86BE72341DF7"><title>How to Create the Interface</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The AMR payload formatter is implemented as an ECOM plug-in. An application user using the AMR payload formatter has to create an instance of the AMR payload formatter by providing the UID (<codeph>KAmrFormatterUid =
        0X2001AA65</codeph>). Any other formatter that is implemented as an ECOM plug-in and has the same interface as the AMR payload formatter can also be used by providing the UID of that particular implementation. </p> <p>The following code shows how to create the interface. </p> <codeblock id="GUID-7F86E9AB-1CB7-5E0A-99A6-0FBC86F01D1B" xml:space="preserve">// Create an instance of AMR Payload Formatter by passing KAmrFormatterUid
CStreamFormatter * aStreamFormatter =  CStreamFormatter::NewL(TUid::Uid(KAmrFormatterUid));
</codeblock> <p>After creating the interface the user calls the set or get stream properties. For more information see, <xref href="GUID-CCFFFE06-1FB8-56C8-874C-C4C1B936FAA4.dita">How to Set and Get the AMR Stream Property</xref>. </p> <p>The user calls the <xref href="GUID-2283C5F3-9237-38BE-933C-353ADF676B42.dita#GUID-2283C5F3-9237-38BE-933C-353ADF676B42/GUID-F885E957-C375-3CF9-82B7-2611B0974675"><apiname>CStreamFormatter::Pack()</apiname></xref> and <xref href="GUID-2283C5F3-9237-38BE-933C-353ADF676B42.dita#GUID-2283C5F3-9237-38BE-933C-353ADF676B42/GUID-B2F9AE75-87B9-3331-91DA-8FDA72E317F2"><apiname>CStreamFormatter::Unpack()</apiname></xref> function to pack or unpack the AMR encoded data. For more information see, <xref href="GUID-42665F58-7E04-5375-A039-7BBDE218DDE4.dita">How to Pack and Unpack the AMR Encoded Data</xref>. </p> <p>Then the user has to free the allocated memory as shown in the following code. </p> <codeblock id="GUID-CB51AE66-9A83-51DC-A62E-5EDC95CAAB7C" xml:space="preserve">delete aStreamFormatter;
// Close the ECOM session
REComSession::FinalClose(); </codeblock> </conbody></concept>