1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title>MPVDataSinkBase class Reference</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>MPVDataSinkBase Class Reference</h1><code>#include <<a class="el" href="pv__plugin__interfaces_8h-source.html">pv_plugin_interfaces.h</a>></code> 10 <p> 11 <p>Inheritance diagram for MPVDataSinkBase: 12 <p><center><img src="classMPVDataSinkBase.png" usemap="#MPVDataSinkBase_map" border="0" alt=""></center> 13 <map name="MPVDataSinkBase_map"> 14 <area href="classMPVDataSink.html" alt="MPVDataSink" shape="rect" coords="0,56,154,80"> 15 <area href="classMPVDataSourceAndSink.html" alt="MPVDataSourceAndSink" shape="rect" coords="164,56,318,80"> 16 </map> 17 <table border=0 cellpadding=0 cellspacing=0> 18 <tr><td></td></tr> 19 <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> 20 <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a0">MPVDataSinkBase</a> (TUid aType)</td></tr> 21 <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a1">~MPVDataSinkBase</a> ()</td></tr> 22 <tr><td nowrap align=right valign=top>virtual void </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> 23 <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a3">BufferFilledL</a> (CMMFBuffer *aBuffer)=0</td></tr> 24 <tr><td nowrap align=right valign=top>virtual TBool </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a4">CanCreateSinkBuffer</a> ()=0</td></tr> 25 <tr><td nowrap align=right valign=top>virtual CMMFBuffer * </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a5">CreateSinkBufferL</a> (TMediaId, TBool &)</td></tr> 26 <tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a6">SinkThreadLogon</a> (MAsyncEventHandler &)</td></tr> 27 <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a7">SinkThreadLogoff</a> ()</td></tr> 28 <tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a8">SinkPrimeL</a> ()</td></tr> 29 <tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a9">SinkPlayL</a> ()</td></tr> 30 <tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a10">SinkPauseL</a> ()</td></tr> 31 <tr><td nowrap align=right valign=top>virtual TInt </td><td valign=bottom><a class="el" href="classMPVDataSinkBase.html#a11">SinkStopL</a> ()</td></tr> 32 </table> 33 <hr><a name="_details"></a><h2>Detailed Description</h2> 34 <a class="el" href="classMPVDataSourceBase.html">MPVDataSourceBase</a> Class 35 <p> 36 Base class for data sinks 37 <p> 38 <hr><h2>Constructor & Destructor Documentation</h2> 39 <a name="a0" doxytag="MPVDataSinkBase::MPVDataSinkBase"></a><p> 40 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 41 <tr> 42 <td class="md"> 43 <table cellpadding="0" cellspacing="0" border="0"> 44 <tr> 45 <td class="md" nowrap valign="top"> MPVDataSinkBase::MPVDataSinkBase </td> 46 <td class="md" valign="top">( </td> 47 <td class="md" nowrap valign="top">TUid </td> 48 <td class="mdname1" valign="top" nowrap> <em>aType</em> </td> 49 <td class="md" valign="top">) </td> 50 <td class="md" nowrap><code> [inline]</code></td> 51 </tr> 52 53 </table> 54 </td> 55 </tr> 56 </table> 57 <table cellspacing=5 cellpadding=0 border=0> 58 <tr> 59 <td> 60 61 </td> 62 <td> 63 64 <p> 65 </td> 66 </tr> 67 </table> 68 <a name="a1" doxytag="MPVDataSinkBase::~MPVDataSinkBase"></a><p> 69 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 70 <tr> 71 <td class="md"> 72 <table cellpadding="0" cellspacing="0" border="0"> 73 <tr> 74 <td class="md" nowrap valign="top"> virtual MPVDataSinkBase::~MPVDataSinkBase </td> 75 <td class="md" valign="top">( </td> 76 <td class="mdname1" valign="top" nowrap> </td> 77 <td class="md" valign="top">) </td> 78 <td class="md" nowrap><code> [inline, virtual]</code></td> 79 </tr> 80 81 </table> 82 </td> 83 </tr> 84 </table> 85 <table cellspacing=5 cellpadding=0 border=0> 86 <tr> 87 <td> 88 89 </td> 90 <td> 91 92 <p> 93 </td> 94 </tr> 95 </table> 96 <hr><h2>Member Function Documentation</h2> 97 <a name="a3" doxytag="MPVDataSinkBase::BufferFilledL"></a><p> 98 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 99 <tr> 100 <td class="md"> 101 <table cellpadding="0" cellspacing="0" border="0"> 102 <tr> 103 <td class="md" nowrap valign="top"> virtual void MPVDataSinkBase::BufferFilledL </td> 104 <td class="md" valign="top">( </td> 105 <td class="md" nowrap valign="top">CMMFBuffer * </td> 106 <td class="mdname1" valign="top" nowrap> <em>aBuffer</em> </td> 107 <td class="md" valign="top">) </td> 108 <td class="md" nowrap><code> [pure virtual]</code></td> 109 </tr> 110 111 </table> 112 </td> 113 </tr> 114 </table> 115 <table cellspacing=5 cellpadding=0 border=0> 116 <tr> 117 <td> 118 119 </td> 120 <td> 121 122 <p> 123 Method called by a data source to pass back an filled buffer to the sink 124 <p> 125 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> 126 <table border=0 cellspacing=2 cellpadding=0> 127 <tr><td valign=top><em>aBuffer</em> </td><td> 128 The buffer that has been filled by a data source and is now available for processing </td></tr> 129 </table> 130 </dl> </td> 131 </tr> 132 </table> 133 <a name="a4" doxytag="MPVDataSinkBase::CanCreateSinkBuffer"></a><p> 134 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 135 <tr> 136 <td class="md"> 137 <table cellpadding="0" cellspacing="0" border="0"> 138 <tr> 139 <td class="md" nowrap valign="top"> virtual TBool MPVDataSinkBase::CanCreateSinkBuffer </td> 140 <td class="md" valign="top">( </td> 141 <td class="mdname1" valign="top" nowrap> </td> 142 <td class="md" valign="top">) </td> 143 <td class="md" nowrap><code> [pure virtual]</code></td> 144 </tr> 145 146 </table> 147 </td> 148 </tr> 149 </table> 150 <table cellspacing=5 cellpadding=0 border=0> 151 <tr> 152 <td> 153 154 </td> 155 <td> 156 157 <p> 158 Method to indicate whether the data sink can create a buffer. 159 <p> 160 This is a pure virtual function that each derived class must implement. 161 <p> 162 <dl compact><dt><b>Returns: </b></dt><dd> 163 ETrue if the data sink can create a buffer else EFalse </dl> </td> 164 </tr> 165 </table> 166 <a name="a5" doxytag="MPVDataSinkBase::CreateSinkBufferL"></a><p> 167 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 168 <tr> 169 <td class="md"> 170 <table cellpadding="0" cellspacing="0" border="0"> 171 <tr> 172 <td class="md" nowrap valign="top"> virtual CMMFBuffer* MPVDataSinkBase::CreateSinkBufferL </td> 173 <td class="md" valign="top">( </td> 174 <td class="md" nowrap valign="top">TMediaId </td> 175 <td class="mdname" nowrap> , </td> 176 </tr> 177 <tr> 178 <td></td> 179 <td></td> 180 <td class="md" nowrap>TBool & </td> 181 <td class="mdname" nowrap> </td> 182 </tr> 183 <tr> 184 <td></td> 185 <td class="md">) </td> 186 <td class="md" colspan="2"><code> [inline, virtual]</code></td> 187 </tr> 188 189 </table> 190 </td> 191 </tr> 192 </table> 193 <table cellspacing=5 cellpadding=0 border=0> 194 <tr> 195 <td> 196 197 </td> 198 <td> 199 200 <p> 201 Returns a buffer created by the data sink 202 <p> 203 This is a pure virtual function that each derived class must implement.<dl compact><dt><b>Parameters: </b></dt><dd> 204 <table border=0 cellspacing=2 cellpadding=0> 205 <tr><td valign=top><em>aMediaId</em> </td><td> 206 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> 207 <tr><td valign=top><em>aReference</em> </td><td> 208 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> 209 </table> 210 </dl><dl compact><dt><b>Returns: </b></dt><dd> 211 The created buffer </dl> </td> 212 </tr> 213 </table> 214 <a name="a2" doxytag="MPVDataSinkBase::EmptyBufferL"></a><p> 215 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 216 <tr> 217 <td class="md"> 218 <table cellpadding="0" cellspacing="0" border="0"> 219 <tr> 220 <td class="md" nowrap valign="top"> virtual void MPVDataSinkBase::EmptyBufferL </td> 221 <td class="md" valign="top">( </td> 222 <td class="md" nowrap valign="top">CMMFBuffer * </td> 223 <td class="mdname" nowrap> <em>aBuffer</em>, </td> 224 </tr> 225 <tr> 226 <td></td> 227 <td></td> 228 <td class="md" nowrap><a class="el" href="classMPVDataSourceBase.html">MPVDataSourceBase</a> * </td> 229 <td class="mdname" nowrap> <em>aSupplier</em>, </td> 230 </tr> 231 <tr> 232 <td></td> 233 <td></td> 234 <td class="md" nowrap>TMediaId </td> 235 <td class="mdname" nowrap> </td> 236 </tr> 237 <tr> 238 <td></td> 239 <td class="md">) </td> 240 <td class="md" colspan="2"><code> [pure virtual]</code></td> 241 </tr> 242 243 </table> 244 </td> 245 </tr> 246 </table> 247 <table cellspacing=5 cellpadding=0 border=0> 248 <tr> 249 <td> 250 251 </td> 252 <td> 253 254 <p> 255 Method called by a MDataSource to request the data sink to empty aBuffer of data. 256 <p> 257 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> 258 <table border=0 cellspacing=2 cellpadding=0> 259 <tr><td valign=top><em>aBuffer</em> </td><td> 260 The full buffer that needs emptying of it's data</td></tr> 261 <tr><td valign=top><em>aSupplier</em> </td><td> 262 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> 263 <tr><td valign=top><em>aMediaId</em> </td><td> 264 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> 265 </table> 266 </dl> </td> 267 </tr> 268 </table> 269 <a name="a10" doxytag="MPVDataSinkBase::SinkPauseL"></a><p> 270 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 271 <tr> 272 <td class="md"> 273 <table cellpadding="0" cellspacing="0" border="0"> 274 <tr> 275 <td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkPauseL </td> 276 <td class="md" valign="top">( </td> 277 <td class="mdname1" valign="top" nowrap> </td> 278 <td class="md" valign="top">) </td> 279 <td class="md" nowrap><code> [inline, virtual]</code></td> 280 </tr> 281 282 </table> 283 </td> 284 </tr> 285 </table> 286 <table cellspacing=5 cellpadding=0 border=0> 287 <tr> 288 <td> 289 290 </td> 291 <td> 292 293 <p> 294 Method to 'pause' the data sink 295 <p> 296 This is a virtual function that a derrived data sink can implement if any data sink specific action is required to 'pause' </td> 297 </tr> 298 </table> 299 <a name="a9" doxytag="MPVDataSinkBase::SinkPlayL"></a><p> 300 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 301 <tr> 302 <td class="md"> 303 <table cellpadding="0" cellspacing="0" border="0"> 304 <tr> 305 <td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkPlayL </td> 306 <td class="md" valign="top">( </td> 307 <td class="mdname1" valign="top" nowrap> </td> 308 <td class="md" valign="top">) </td> 309 <td class="md" nowrap><code> [inline, virtual]</code></td> 310 </tr> 311 312 </table> 313 </td> 314 </tr> 315 </table> 316 <table cellspacing=5 cellpadding=0 border=0> 317 <tr> 318 <td> 319 320 </td> 321 <td> 322 323 <p> 324 Method to 'play' the data sink 325 <p> 326 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> 327 </tr> 328 </table> 329 <a name="a8" doxytag="MPVDataSinkBase::SinkPrimeL"></a><p> 330 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 331 <tr> 332 <td class="md"> 333 <table cellpadding="0" cellspacing="0" border="0"> 334 <tr> 335 <td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkPrimeL </td> 336 <td class="md" valign="top">( </td> 337 <td class="mdname1" valign="top" nowrap> </td> 338 <td class="md" valign="top">) </td> 339 <td class="md" nowrap><code> [inline, virtual]</code></td> 340 </tr> 341 342 </table> 343 </td> 344 </tr> 345 </table> 346 <table cellspacing=5 cellpadding=0 border=0> 347 <tr> 348 <td> 349 350 </td> 351 <td> 352 353 <p> 354 Method to 'prime' the data sink 355 <p> 356 This is a virtual function that a derrived data sink can implement if any data sink specific 'priming' is required </td> 357 </tr> 358 </table> 359 <a name="a11" doxytag="MPVDataSinkBase::SinkStopL"></a><p> 360 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 361 <tr> 362 <td class="md"> 363 <table cellpadding="0" cellspacing="0" border="0"> 364 <tr> 365 <td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkStopL </td> 366 <td class="md" valign="top">( </td> 367 <td class="mdname1" valign="top" nowrap> </td> 368 <td class="md" valign="top">) </td> 369 <td class="md" nowrap><code> [inline, virtual]</code></td> 370 </tr> 371 372 </table> 373 </td> 374 </tr> 375 </table> 376 <table cellspacing=5 cellpadding=0 border=0> 377 <tr> 378 <td> 379 380 </td> 381 <td> 382 383 <p> 384 Method to 'stop' the data sink 385 <p> 386 This is a virtual function that a derrived data sink can implement if any data sink specific action is required to 'stop' </td> 387 </tr> 388 </table> 389 <a name="a7" doxytag="MPVDataSinkBase::SinkThreadLogoff"></a><p> 390 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 391 <tr> 392 <td class="md"> 393 <table cellpadding="0" cellspacing="0" border="0"> 394 <tr> 395 <td class="md" nowrap valign="top"> virtual void MPVDataSinkBase::SinkThreadLogoff </td> 396 <td class="md" valign="top">( </td> 397 <td class="mdname1" valign="top" nowrap> </td> 398 <td class="md" valign="top">) </td> 399 <td class="md" nowrap><code> [inline, virtual]</code></td> 400 </tr> 401 402 </table> 403 </td> 404 </tr> 405 </table> 406 <table cellspacing=5 cellpadding=0 border=0> 407 <tr> 408 <td> 409 410 </td> 411 <td> 412 413 <p> 414 Method to 'logoff' the data sink from the same thread that sink consumes data in. 415 <p> 416 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 417 <p> 418 This is a virtual function that a derrived data sink can implement if any thread specific releasing of resources is required. </td> 419 </tr> 420 </table> 421 <a name="a6" doxytag="MPVDataSinkBase::SinkThreadLogon"></a><p> 422 <table width="100%" cellpadding="2" cellspacing="0" border="0"> 423 <tr> 424 <td class="md"> 425 <table cellpadding="0" cellspacing="0" border="0"> 426 <tr> 427 <td class="md" nowrap valign="top"> virtual TInt MPVDataSinkBase::SinkThreadLogon </td> 428 <td class="md" valign="top">( </td> 429 <td class="md" nowrap valign="top">MAsyncEventHandler & </td> 430 <td class="mdname1" valign="top" nowrap> </td> 431 <td class="md" valign="top">) </td> 432 <td class="md" nowrap><code> [inline, virtual]</code></td> 433 </tr> 434 435 </table> 436 </td> 437 </tr> 438 </table> 439 <table cellspacing=5 cellpadding=0 border=0> 440 <tr> 441 <td> 442 443 </td> 444 <td> 445 446 <p> 447 Method to 'logon' the data sink to the same thread that sink will be consuming data in. 448 <p> 449 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. 450 <p> 451 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> 452 <table border=0 cellspacing=2 cellpadding=0> 453 <tr><td valign=top><em>aEventHandler</em> </td><td> 454 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> 455 </table> 456 </dl><dl compact><dt><b>Returns: </b></dt><dd> 457 KErrNone if successful, otherwise a system wide error code. </dl> </td> 458 </tr> 459 </table> 460 <hr>The documentation for this class was generated from the following file:<ul> 461 <li><a class="el" href="pv__plugin__interfaces_8h-source.html">pv_plugin_interfaces.h</a></ul> 462 <hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>PV Author Engine</small> 463 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 464 </small></address> 465 </body> 466 </html> 467