blob: ae02d997a3a2cc02410bde3464856f56e41d145d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>MPVDataSinkBase class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>MPVDataSinkBase Class Reference</h1><code>#include &lt;<a class="el" href="pv__plugin__interfaces_8h-source.html">pv_plugin_interfaces.h</a>&gt;</code>
<p>
<p>Inheritance diagram for MPVDataSinkBase:
<p><center><img src="classMPVDataSinkBase.png" usemap="#MPVDataSinkBase_map" border="0" alt=""></center>
<map name="MPVDataSinkBase_map">
<area href="classMPVDataSink.html" alt="MPVDataSink" shape="rect" coords="0,56,154,80">
<area href="classMPVDataSourceAndSink.html" alt="MPVDataSourceAndSink" shape="rect" coords="164,56,318,80">
</map>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a0">MPVDataSinkBase</a> (TUid aType)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a1">~MPVDataSinkBase</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a2">EmptyBufferL</a> (CMMFBuffer *aBuffer, <a class="el" href="classMPVDataSourceBase.html">MPVDataSourceBase</a> *aSupplier, TMediaId)=0</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a3">BufferFilledL</a> (CMMFBuffer *aBuffer)=0</td></tr>
<tr><td nowrap align=right valign=top>virtual TBool&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a4">CanCreateSinkBuffer</a> ()=0</td></tr>
<tr><td nowrap align=right valign=top>virtual CMMFBuffer *&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a5">CreateSinkBufferL</a> (TMediaId, TBool &amp;)</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a6">SinkThreadLogon</a> (MAsyncEventHandler &amp;)</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a7">SinkThreadLogoff</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a8">SinkPrimeL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a9">SinkPlayL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a10">SinkPauseL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a11">SinkStopL</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classMPVDataSourceBase.html">MPVDataSourceBase</a> Class
<p>
Base class for data sinks
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="MPVDataSinkBase::MPVDataSinkBase"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> MPVDataSinkBase::MPVDataSinkBase </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">TUid&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>aType</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a name="a1" doxytag="MPVDataSinkBase::~MPVDataSinkBase"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual MPVDataSinkBase::~MPVDataSinkBase </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="MPVDataSinkBase::BufferFilledL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void MPVDataSinkBase::BufferFilledL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">CMMFBuffer *&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; <em>aBuffer</em> </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method called by a data source to pass back an filled buffer to the sink
<p>
This is a pure virtual function that each derived class must implement. This method is used as the callback when the data sink actively requests a supplier ie a data source to fill a buffer by calling the data sources FillBufferL. When the data sink gets this callback it knows that the buffer has been filled and is ready to be emptied<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aBuffer</em>&nbsp;</td><td>
The buffer that has been filled by a data source and is now available for processing </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a4" doxytag="MPVDataSinkBase::CanCreateSinkBuffer"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TBool MPVDataSinkBase::CanCreateSinkBuffer </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to indicate whether the data sink can create a buffer.
<p>
This is a pure virtual function that each derived class must implement.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
ETrue if the data sink can create a buffer else EFalse </dl> </td>
</tr>
</table>
<a name="a5" doxytag="MPVDataSinkBase::CreateSinkBufferL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual CMMFBuffer* MPVDataSinkBase::CreateSinkBufferL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">TMediaId&nbsp;</td>
<td class="mdname" nowrap>&nbsp;, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>TBool &amp;&nbsp;</td>
<td class="mdname" nowrap>&nbsp;</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns a buffer created by the data sink
<p>
This is a pure virtual function that each derived class must implement.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aMediaId</em>&nbsp;</td><td>
This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data.</td></tr>
<tr><td valign=top><em>aReference</em>&nbsp;</td><td>
This must be written to by the method to indicate whether the created buffer is a 'reference' buffer. A 'reference' buffer is a buffer that is owned by the sink and should be used in preference to the source buffer provided the source buffer is also not a reference buffer. </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
The created buffer </dl> </td>
</tr>
</table>
<a name="a2" doxytag="MPVDataSinkBase::EmptyBufferL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void MPVDataSinkBase::EmptyBufferL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">CMMFBuffer *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>aBuffer</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="classMPVDataSourceBase.html">MPVDataSourceBase</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>aSupplier</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>TMediaId&nbsp;</td>
<td class="mdname" nowrap>&nbsp;</td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method called by a MDataSource to request the data sink to empty aBuffer of data.
<p>
This is a pure virtual function that each derived class must implement. This method is used when a data sink is passively waiting for requests from a supplier ie a data source to empty a buffer. The data sink must call the BufferEmptiedL member on aSupplier when it has emptied the buffer of it's data - the data sink can either make this callback synchronously or asynchronously.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aBuffer</em>&nbsp;</td><td>
The full buffer that needs emptying of it's data</td></tr>
<tr><td valign=top><em>aSupplier</em>&nbsp;</td><td>
The data source that supplied the data. The data sink needs this to make the BufferEmptiedL callback on aSupplier to indicate to the data source that the data sink has finished with the buffer.</td></tr>
<tr><td valign=top><em>aMediaId</em>&nbsp;</td><td>
This identifies the type of media eg audio or video and the stream id. This parameter is required in cases where the source can supply data of more than one media type and/or multiple strams of data </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a10" doxytag="MPVDataSinkBase::SinkPauseL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkPauseL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to 'pause' the data sink
<p>
This is a virtual function that a derrived data sink can implement if any data sink specific action is required to 'pause' </td>
</tr>
</table>
<a name="a9" doxytag="MPVDataSinkBase::SinkPlayL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkPlayL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to 'play' the data sink
<p>
This is a virtual function that a derrived data sink can implement if any data sink specific action is required prior to 'playing'ie the start of data transfer </td>
</tr>
</table>
<a name="a8" doxytag="MPVDataSinkBase::SinkPrimeL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkPrimeL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to 'prime' the data sink
<p>
This is a virtual function that a derrived data sink can implement if any data sink specific 'priming' is required </td>
</tr>
</table>
<a name="a11" doxytag="MPVDataSinkBase::SinkStopL"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkStopL </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to 'stop' the data sink
<p>
This is a virtual function that a derrived data sink can implement if any data sink specific action is required to 'stop' </td>
</tr>
</table>
<a name="a7" doxytag="MPVDataSinkBase::SinkThreadLogoff"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void MPVDataSinkBase::SinkThreadLogoff </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to 'logoff' the data sink from the same thread that sink consumes data in.
<p>
This method may be required as the thread that the data sink is deleted in may not be the same thread that the data transfer took place in. Therefore any thread specific releasing of resources needs to be performed in the SinkThreadLogoff rather than in the destructor
<p>
This is a virtual function that a derrived data sink can implement if any thread specific releasing of resources is required. </td>
</tr>
</table>
<a name="a6" doxytag="MPVDataSinkBase::SinkThreadLogon"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkThreadLogon </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">MAsyncEventHandler &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap>&nbsp; </td>
<td class="md" valign="top">)&nbsp;</td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Method to 'logon' the data sink to the same thread that sink will be consuming data in.
<p>
This method may be required as the thread that the data sink was created in is not always the same thread that the data transfer will take place in. Therefore any thread specific initialisation needs to be performed in the SinkThreadLogon rather than in the creation of the data sink.
<p>
This is a virtual function that a derrived data sink can implement if any thread specific initialisation is required and/or the data sink can create any asynchronous events.<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>aEventHandler</em>&nbsp;</td><td>
This is an MAsyncEventHandler to handle asynchronous events that occur during the transfer of multimedia data. The event handler must be in the same thread as the data transfer thread - hence the reason it is passed in the SinkThreadLogon as opposed to say the constructor.</td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
KErrNone if successful, otherwise a system wide error code. </dl> </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="pv__plugin__interfaces_8h-source.html">pv_plugin_interfaces.h</a></ul>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>PV Author Engine</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>