Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/class_c_m_m_f_record_test.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     2
<html xmlns="http://www.w3.org/1999/xhtml">
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     3
<head>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     5
<title>TB9.2 Example Applications: CMMFRecordTest Class Reference</title>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     8
</head>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     9
<body>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    10
<!-- Generated by Doxygen 1.6.2 -->
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    11
<div class="contents">
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<h1>CMMFRecordTest Class Reference</h1><!-- doxytag: class="CMMFRecordTest" -->
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    13
<p><a href="class_c_m_m_f_record_test-members.html">List of all members.</a></p>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    14
<table border="0" cellpadding="0" cellspacing="0">
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    15
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    16
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a373448249ca3b5b645b915cab1f2ca46"></a><!-- doxytag: member="CMMFRecordTest::Go" ref="a373448249ca3b5b645b915cab1f2ca46" args="()" -->
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    17
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>Go</b> ()</td></tr>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    18
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_m_m_f_record_test.html#a7d51322057936bba891cc6f375671e80">MoscoStateChangeEvent</a> (CBase *aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)</td></tr>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    19
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    20
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a223fa583d02e766942f59002ac21646c"></a><!-- doxytag: member="CMMFRecordTest::NewLC" ref="a223fa583d02e766942f59002ac21646c" args="()" -->
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    21
static <a class="el" href="class_c_m_m_f_record_test.html">CMMFRecordTest</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>NewLC</b> ()</td></tr>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    22
</table>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    23
<hr/><a name="_details"></a><h2>Detailed Description</h2>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    24
<p>This class implements a state machine that records a short clip using each format that the system supports. For each record format that the system supports, it will record 2s of audio to a file, then 2s of audio into a descriptor. It will then move onto the next format.</p>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    25
<p>It is necessary to implement this as a state machine as we get asynchronous callbacks via MoscoStateChangeEvent which we have to wait for before we can continue to the next step.</p>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    26
<p>For each record format, we go through these states in order: 1. EInitFile - while the file recording is initialised 2. (after the MoscoStateChangeEvent callback) ERecordFile - on a 2s timer while recording takes place 3. EDoOpenDesc - while recording into a descriptor is initialised 4. (after the MoscoStateChangeEvent callback) ERecordDesc - again on a 2s timer.</p>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    27
<p>The logic implemented here is probably somewhat more complex that would be necessary for any normal recording, but it demonstrates the principal of how to use the recording API. </p>
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    28
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    29
<p>Definition at line <a class="el" href="mmfrec_8h_source.html#l00041">41</a> of file <a class="el" href="mmfrec_8h_source.html">mmfrec.h</a>.</p>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    30
<hr/><h2>Member Function Documentation</h2>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    31
<a class="anchor" id="a7d51322057936bba891cc6f375671e80"></a><!-- doxytag: member="CMMFRecordTest::MoscoStateChangeEvent" ref="a7d51322057936bba891cc6f375671e80" args="(CBase *aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode)" -->
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    32
<div class="memitem">
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    33
<div class="memproto">
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    34
      <table class="memname">
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    35
        <tr>
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    36
          <td class="memname">void CMMFRecordTest::MoscoStateChangeEvent </td>
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    37
          <td>(</td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    38
          <td class="paramtype">CBase *&nbsp;</td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    39
          <td class="paramname"> <em>aObject</em>, </td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    40
        </tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    41
        <tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    42
          <td class="paramkey"></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    43
          <td></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    44
          <td class="paramtype">TInt&nbsp;</td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    45
          <td class="paramname"> <em>aPreviousState</em>, </td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    46
        </tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    47
        <tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    48
          <td class="paramkey"></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    49
          <td></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    50
          <td class="paramtype">TInt&nbsp;</td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    51
          <td class="paramname"> <em>aCurrentState</em>, </td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    52
        </tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    53
        <tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    54
          <td class="paramkey"></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    55
          <td></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    56
          <td class="paramtype">TInt&nbsp;</td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    57
          <td class="paramname"> <em>aErrorCode</em></td><td>&nbsp;</td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    58
        </tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    59
        <tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    60
          <td></td>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    61
          <td>)</td>
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    62
          <td></td><td></td><td><code> [virtual]</code></td>
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    63
        </tr>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    64
      </table>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    65
</div>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    66
<div class="memdoc">
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    67
<p>This is called by the recorder utility whenever some event occurs relating to the recording. For example, it is called after initialisation when the utility is ready to begin recording. It would be called again if there was a problem during recording that meant it had to be terminated. </p>
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    68
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    69
<p>Definition at line <a class="el" href="mmfrec_8cpp_source.html#l00102">102</a> of file <a class="el" href="mmfrec_8cpp_source.html">mmfrec.cpp</a>.</p>
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    70
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    71
</div>
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    72
</div>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    73
</div>
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    74
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    75
<a href="http://www.doxygen.org/index.html">
6
43e37759235e Week 12 contribution of example code"
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    76
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    77
</body>
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    78
</html>