blob: 4e3a5a3f3d47f078f063c79e1525e511166105c0 [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>MPVDataSourceBase 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>MPVDataSourceBase 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 MPVDataSourceBase:
<p><center><img src="classMPVDataSourceBase.png" usemap="#MPVDataSourceBase_map" border="0" alt=""></center>
<map name="MPVDataSourceBase_map">
<area href="classMPVDataSource.html" alt="MPVDataSource" 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="classMPVDataSourceBase.html#a0">MPVDataSourceBase</a> (TUid aType)</td></tr>
<tr><td nowrap align=right valign=top>virtual&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a1">~MPVDataSourceBase</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a2">FillBufferL</a> (CMMFBuffer *aBuffer, <a class="el" href="classMPVDataSinkBase.html">MPVDataSinkBase</a> *aConsumer, TMediaId)=0</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a3">BufferEmptiedL</a> (CMMFBuffer *aBuffer)=0</td></tr>
<tr><td nowrap align=right valign=top>virtual TBool&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a4">CanCreateSourceBuffer</a> ()=0</td></tr>
<tr><td nowrap align=right valign=top>virtual CMMFBuffer *&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a5">CreateSourceBufferL</a> (TMediaId, TBool &amp;)</td></tr>
<tr><td nowrap align=right valign=top>virtual CMMFBuffer *&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a6">CreateSourceBufferL</a> (TMediaId, CMMFBuffer &amp;, TBool &amp;)</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a7">SourceThreadLogon</a> (MAsyncEventHandler &amp;)</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a8">SourceThreadLogoff</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a9">SourcePrimeL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a10">SourcePlayL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a11">SourcePauseL</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual TInt&nbsp;</td><td valign=bottom><a class="el" href="classMPVDataSourceBase.html#a12">SourceStopL</a> ()</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
MPVDataSourceBase Class
<p>
Base class for data sources
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="MPVDataSourceBase::MPVDataSourceBase"></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"> MPVDataSourceBase::MPVDataSourceBase </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="MPVDataSourceBase::~MPVDataSourceBase"></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 MPVDataSourceBase::~MPVDataSourceBase </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="MPVDataSourceBase::BufferEmptiedL"></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 MPVDataSourceBase::BufferEmptiedL </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 sink to pass back an emptied buffer to the source
<p>
This is a pure virtual function that each derived class must implement. This method is used as the callback when the data source actively requests a consumer ie a data sink to empty a buffer by calling the data sinks EmptyBufferL. When the data source gets this callback it knows that the buffer has been emptied and can be reused<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 emptied by a data sink and is now available for reuse </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a4" doxytag="MPVDataSourceBase::CanCreateSourceBuffer"></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 MPVDataSourceBase::CanCreateSourceBuffer </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 source 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 source can create a buffer else EFalse </dl> </td>
</tr>
</table>
<a name="a6" doxytag="MPVDataSourceBase::CreateSourceBufferL"></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* MPVDataSourceBase::CreateSourceBufferL </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>CMMFBuffer &amp;&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 source
<p>
This is a virtual function that a derived class can implement. This can be used in preference to the above CreateSourceBufferL method in cases where the source buffer creation has a dependancy on the sink buffer<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 eg a multimedia file</td></tr>
<tr><td valign=top><em>aSinkBuffer</em>&nbsp;</td><td>
The sink buffer the nature of which may influence the creation of the source buffer</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 source and should be used in preference to the sink buffer provided the sink buffer is 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="a5" doxytag="MPVDataSourceBase::CreateSourceBufferL"></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* MPVDataSourceBase::CreateSourceBufferL </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 source
<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 eg a multimedia file</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 source and should be used in preference to the sink buffer provided the sink 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="MPVDataSourceBase::FillBufferL"></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 MPVDataSourceBase::FillBufferL </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="classMPVDataSinkBase.html">MPVDataSinkBase</a> *&nbsp;</td>
<td class="mdname" nowrap>&nbsp; <em>aConsumer</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 MDataSink to request the data source to fill aBuffer with data.
<p>
This is a pure virtual function that each derived class must implement. This method is used when a data source is passively waiting for requests from a consumer ie a data sink to fill a buffer. The data source must call the BufferFilledL member on aConsumer when it has filled the buffer with data - the data source 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 buffer that needs filling with data</td></tr>
<tr><td valign=top><em>aConsumer</em>&nbsp;</td><td>
The data sink that consumes the data. The data source needs this to make the BufferFilledL callback on aConsumer when the data source has completed filling the aBuffer.</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 eg a multimedia file </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="a11" doxytag="MPVDataSourceBase::SourcePauseL"></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 MPVDataSourceBase::SourcePauseL </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 source
<p>
This is a virtual function that a derrived data source can implement if any data source specific action is required to 'pause' </td>
</tr>
</table>
<a name="a10" doxytag="MPVDataSourceBase::SourcePlayL"></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 MPVDataSourceBase::SourcePlayL </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 source
<p>
This is a virtual function that a derrived data source can implement if any data source specific action is required prior to 'playing'ie the start of data transfer </td>
</tr>
</table>
<a name="a9" doxytag="MPVDataSourceBase::SourcePrimeL"></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 MPVDataSourceBase::SourcePrimeL </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 source
<p>
This is a virtual function that a derrived data source can implement if any data source specific 'priming' is required </td>
</tr>
</table>
<a name="a12" doxytag="MPVDataSourceBase::SourceStopL"></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 MPVDataSourceBase::SourceStopL </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 source
<p>
This is a virtual function that a derrived data source can implement if any data source specific action is required to 'stop' </td>
</tr>
</table>
<a name="a8" doxytag="MPVDataSourceBase::SourceThreadLogoff"></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 MPVDataSourceBase::SourceThreadLogoff </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 source from the same thread that source supplies data in.
<p>
This method may be required as the thread that the data source 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 SourceThreadLogoff rather than in the destructor
<p>
This is a virtual function that a derrived data source can implement if any thread specific releasing of resources is required. </td>
</tr>
</table>
<a name="a7" doxytag="MPVDataSourceBase::SourceThreadLogon"></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 MPVDataSourceBase::SourceThreadLogon </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 source to the same thread that source will be supplying data in.
<p>
This method may be required as the thread that the data source 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 SourceThreadLogon rather than in the creation of the data source.
<p>
This is a virtual function that a derrived data source can implement if any thread specific initialisation is required and/or the data source 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 SourceThreadLogon 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>